Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
sf::dxf Namespace Reference

Classes

struct  Arc
 Represents a DXF ARC entity. More...
 
struct  Circle
 Represents a DXF CIRCLE entity. More...
 
struct  Entity
 Base class for all DXF geometric entities. More...
 
class  GraphicsScene
 The GraphicsScene class is a custom QGraphicsScene for rendering DXF entities. More...
 
class  GraphicsView
 The GraphicsView class provides a custom QGraphicsView with panning and zooming capabilities. More...
 
struct  LayerInfo
 LayerInfo holds properties for each layer. More...
 
struct  Line
 Represents a DXF LINE entity. More...
 
struct  Polyline
 Represents a DXF POLYLINE entity. More...
 
class  Reader
 The Reader class parses DXF files using 'dxflib' and stores entities by layer. More...
 

Typedefs

using LayerEntities = QMap< QString, QList< std::shared_ptr< Entity > > >
 LayerEntities holds all parsed entities, organized by layer. Using std::shared_ptr for automatic memory management of entity objects.
 
using Entities = LayerEntities::mapped_type
 Entities type from the map for holding entities of a layer.
 
using Layers = QMap< QString, LayerInfo >
 Layers holds information for all layers in the DXF file.
 
typedef QList< QPair< QPointF, bool > > Lines
 Type holding a point and a flag which determines if the point is the last of a line. This allows for proper drawing this using OpenGL's GL_LINES.
 

Functions

_DXF_FUNC Lines generateVertices (const Entities &entities, double density)
 Converts DXF entities to a list of 2D vertices suitable for OpenGL line strip rendering.
 

Typedef Documentation

◆ Entities

using sf::dxf::Entities = typedef LayerEntities::mapped_type

Entities type from the map for holding entities of a layer.

◆ LayerEntities

using sf::dxf::LayerEntities = typedef QMap<QString, QList<std::shared_ptr<Entity> >>

LayerEntities holds all parsed entities, organized by layer. Using std::shared_ptr for automatic memory management of entity objects.

◆ Layers

using sf::dxf::Layers = typedef QMap<QString, LayerInfo>

Layers holds information for all layers in the DXF file.

◆ Lines

typedef QList<QPair<QPointF, bool> > sf::dxf::Lines

Type holding a point and a flag which determines if the point is the last of a line. This allows for proper drawing this using OpenGL's GL_LINES.

Function Documentation

◆ generateVertices()

_DXF_FUNC Lines sf::dxf::generateVertices ( const Entities entities,
double  density 
)

Converts DXF entities to a list of 2D vertices suitable for OpenGL line strip rendering.

Parameters
entitiesList of DXF entities to process.
densityArc density value in arc-length units (controls vertex count for arcs and circles). The maximum of vertices for an arc segment is 360 and the minimum is 3.
Returns
Vector of 2D vertices representing the entities.