DXF circle entity class. More...
#include <mydxfcircle.hpp>

Public Member Functions | |
MyDXFCircle () | |
Default constructor. More... | |
MyDXFCircle (class MyDXFFile *dxf) | |
Construct circle entity by reading from DXF file. More... | |
virtual | ~MyDXFCircle () |
Virtual destructor. More... | |
virtual MyDXFCircle * | copy (void) const |
Get a new copy of entity. More... | |
virtual void | explode (class MyDXFEntities *ent, MyDXFFile *dxf, const Transformation *t) const |
Explode into entities. More... | |
virtual void | write (class MyDXFFile *dxf, std::ofstream &ostr) |
Write dxf file to stream. More... | |
virtual EntityType | get_type (void) const |
Get entity type. More... | |
Vec3D | center (void) const |
Get center point of circle. More... | |
void | set_center (const Vec3D &c) |
Set center point of circle. More... | |
double | radius (void) const |
Get radius of circle. More... | |
void | set_radius (double r) |
Set radius of circle. More... | |
virtual Vec3D | start (void) const |
Get start point of path entity. More... | |
virtual Vec3D | end (void) const |
Get end point of path entity. More... | |
virtual void | set_start (const Vec3D &s) |
Set start point of path entity. More... | |
virtual void | set_end (const Vec3D &e) |
Set end point of path entity. More... | |
virtual int | ray_cross (double x, double y) const |
Check for ray crossing. More... | |
bool | geom_same (const MyDXFCircle &circle, double eps=1.0e-6) const |
Check if two entities are geometrically same. More... | |
virtual void | plot (const class MyDXFFile *dxf, cairo_t *cairo, const Transformation *t, const double range[4]) const |
Plot entity with cairo. More... | |
virtual void | get_bbox (Vec3D &min, Vec3D &max, const class MyDXFFile *dxf, const Transformation *t) const |
Return bounding box of entity. More... | |
virtual void | scale (class MyDXFFile *dxf, double s) |
Scale entity by factor s. More... | |
virtual void | translate (class MyDXFFile *dxf, const Vec3D &dx) |
Translate entity by dx. More... | |
virtual void | rotate_z (class MyDXFFile *dxf, double a) |
Rotate entity around origin. More... | |
virtual void | debug_print (std::ostream &os) const |
Print debugging information to stream os. More... | |
![]() | |
virtual | ~MyDXFPathEntity () |
Virtual destructor. More... | |
![]() | |
virtual | ~MyDXFEntity () |
Virtual destructor. More... | |
void | set_layer (const std::string &layer) |
Set layer. More... | |
std::string | get_layer (void) const |
Get layer. More... | |
void | set_handle (const std::string &handle) |
Set entity handle. More... | |
std::string | get_handle (void) const |
Get entity handle. More... | |
Additional Inherited Members | |
![]() | |
MyDXFPathEntity (const MyDXFEntity &ent) | |
![]() | |
void | write_common (class MyDXFFile *dxf, std::ofstream &ostr) |
void | process_group (class MyDXFFile *dxf) |
void | constructor_debug_print (void) const |
void | debug_print_base (std::ostream &os) const |
![]() | |
static void | bbox_ppoint (Vec3D &min, Vec3D &max, const Vec3D &p) |
Propose a point to bounding box. More... | |
![]() | |
std::string | _handle |
std::string | _layer |
Detailed Description
DXF circle entity class.
Constructor & Destructor Documentation
◆ MyDXFCircle() [1/2]
|
inline |
Default constructor.
◆ MyDXFCircle() [2/2]
MyDXFCircle::MyDXFCircle | ( | class MyDXFFile * | dxf | ) |
Construct circle entity by reading from DXF file.
◆ ~MyDXFCircle()
|
inlinevirtual |
Virtual destructor.
Member Function Documentation
◆ center()
|
inline |
Get center point of circle.
◆ copy()
|
inlinevirtual |
Get a new copy of entity.
Implements MyDXFEntity.
◆ debug_print()
|
virtual |
Print debugging information to stream os.
Implements MyDXFEntity.
◆ end()
|
inlinevirtual |
Get end point of path entity.
Implements MyDXFPathEntity.
◆ explode()
|
virtual |
Explode into entities.
Break entity into atomic entities and tranform entities them with tranformation t. Add the tranformed entities to the database ent.
Implements MyDXFEntity.
◆ geom_same()
bool MyDXFCircle::geom_same | ( | const MyDXFCircle & | circle, |
double | eps = 1.0e-6 |
||
) | const |
Check if two entities are geometrically same.
Checks if entity a is the geometrically same as entity b within error limit eps.
◆ get_bbox()
|
virtual |
Return bounding box of entity.
Implements MyDXFEntity.
◆ get_type()
|
inlinevirtual |
Get entity type.
Implements MyDXFEntity.
◆ plot()
|
virtual |
Plot entity with cairo.
Plot the entity using the transformation from from the object space to cairo coordinates. The visible range is specified by range (xmin,ymin,xmax,ymax) in cairo coordinates.
Implements MyDXFEntity.
◆ radius()
|
inline |
Get radius of circle.
◆ ray_cross()
|
virtual |
Check for ray crossing.
Check if ray going from point (x,y) downwards (negative y direction) crosses the entity. Return 1 if crosses odd number of times and 0 if even number of times. Return 2 in case of exact crossing at boundaries. This function is used as a subroutine to inside_loop().
Implements MyDXFPathEntity.
◆ rotate_z()
|
virtual |
◆ scale()
|
virtual |
Scale entity by factor s.
Implements MyDXFEntity.
◆ set_center()
void MyDXFCircle::set_center | ( | const Vec3D & | c | ) |
Set center point of circle.
◆ set_end()
|
inlinevirtual |
Set end point of path entity.
Implements MyDXFPathEntity.
◆ set_radius()
void MyDXFCircle::set_radius | ( | double | r | ) |
Set radius of circle.
◆ set_start()
|
inlinevirtual |
Set start point of path entity.
Implements MyDXFPathEntity.
◆ start()
|
inlinevirtual |
Get start point of path entity.
Implements MyDXFPathEntity.
◆ translate()
Translate entity by dx.
Implements MyDXFEntity.
◆ write()
|
virtual |
Write dxf file to stream.
Implements MyDXFEntity.
The documentation for this class was generated from the following files: