OpenLexocad  27.1
Geom::Geometry Class Referenceabstract

#include <Geometry.h>

Inheritance diagram for Geom::Geometry:
Base::Persistence Base::BaseClass Geom::GeomCurve Geom::GeomPoint Geom::GeomSurface Geom::GeomBoundedCurve Geom::GeomConic Geom::GeomLine Geom::GeomOffsetCurve Geom::GeomBezierSurface Geom::GeomBSplineSurface Geom::GeomCone Geom::GeomCylinder Geom::GeomOffsetSurface Geom::GeomPlane Geom::GeomPlateSurface Geom::GeomSphere Geom::GeomSurfaceOfExtrusion Geom::GeomSurfaceOfRevolution Geom::GeomToroid Geom::GeomTrimmedSurface

Public Member Functions

virtual ~Geometry ()
 
virtual TopoDS_Shape toShape () const =0
 
virtual const Handle (Geom_Geometry) &handle() const =0
 
virtual void save (Base::AbstractWriter &, Base::PersistenceVersion &) override
 This method is used to save properties or very small amounts of data to an XML document. More...
 
virtual void restore (Base::AbstractXMLReader &, Base::PersistenceVersion &) override
 This method is used to restore properties from an XML document. More...
 
virtual Geometrycopy (void) const =0
 
Geometryclone (void) const
 
boost::uuids::uuid getTag () const
 returns the tag of the geometry object More...
 
std::vector< std::weak_ptr< const GeometryExtension > > getExtensions () const
 
bool hasExtension (Base::Type type) const
 
bool hasExtension (std::string name) const
 
std::weak_ptr< const GeometryExtensiongetExtension (Base::Type type) const
 
std::weak_ptr< const GeometryExtensiongetExtension (std::string name) const
 
std::weak_ptr< GeometryExtensiongetExtension (Base::Type type)
 
std::weak_ptr< GeometryExtensiongetExtension (std::string name)
 
void setExtension (std::unique_ptr< GeometryExtension > &&geo)
 
void deleteExtension (Base::Type type)
 
void deleteExtension (std::string name)
 
void mirror (const Base::Vector3d &point)
 
void mirror (const Base::Vector3d &point, const Base::Vector3d &dir)
 
void rotate (const Base::Placement &plm)
 
void scale (const Base::Vector3d &vec, double scale)
 
void transform (const Base::Matrix4D &mat)
 
void translate (const Base::Vector3d &vec)
 
- Public Member Functions inherited from Base::Persistence
virtual void saveDocFile (Base::AbstractWriter &, const Base::String &, const Base::String &)
 This method is used to save large amounts of data to a binary file. More...
 
virtual void restoreDocFile (Base::Reader &, const Base::String &)
 This method is used to restore large amounts of data from a binary file. More...
 
virtual bool mustbeSaved () const
 Return 'true' if this object must always be saved in the file. More...
 
virtual bool createSQL (Base::AbstractWriter &, Base::PersistenceVersion &, bool)
 This method is used to save properties or very small amounts of data to an XML document. More...
 
- Public Member Functions inherited from Base::BaseClass
virtual Type getTypeId (void) const
 
template<typename T >
bool isDerivedFrom () const
 
bool isDerivedFrom (const Type type) const
 
 BaseClass ()
 Construction. More...
 
virtual ~BaseClass ()
 Destruction. More...
 

Protected Member Functions

void createNewTag ()
 create a new tag for the geometry object More...
 
void assignTag (const Geom::Geometry *)
 copies the tag from the geometry passed as a parameter to this object More...
 
void copyNonTag (const Geom::Geometry *)
 
 Geometry ()
 

Protected Attributes

boost::uuids::uuid tag
 
std::vector< std::shared_ptr< GeometryExtension > > extensions
 

Additional Inherited Members

- Static Public Member Functions inherited from Base::Persistence
static std::string encodeAttribute (const std::string &)
 
- Static Public Member Functions inherited from Base::BaseClass
static Type getClassTypeId (void)
 
static void init (void)
 
static void * create (void)
 
static void setIfcNameAndID (const std::string &n, int id)
 
- Public Attributes inherited from Base::BaseClass
long ____deadVal = 0xBADEAFFE
 
- Static Protected Member Functions inherited from Base::BaseClass
static void initSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Type::instantiationMethod method=0)
 
static void initIfcTypes (const std::string &s, Base::Type classTypeId, int id)
 

Constructor & Destructor Documentation

◆ ~Geometry()

virtual Geom::Geometry::~Geometry ( )
virtual

◆ Geometry()

Geom::Geometry::Geometry ( )
protected

Member Function Documentation

◆ assignTag()

void Geom::Geometry::assignTag ( const Geom::Geometry )
protected

copies the tag from the geometry passed as a parameter to this object

◆ clone()

Geometry* Geom::Geometry::clone ( void  ) const

returns a cloned object. A cloned object has the same tag (see getTag) as the original object. if you want a copy not having the same tag, you can use copy() instead. If you want a clone with another geometry handle, it is possible to clone an object and then assign another handle or to create an object via constructor and use assignTag to assign the tag of the other geometry. If you do not desire to have the same tag, then a copy can be performed by using a constructor (which will generate another tag) and then, if necessary (e.g. if the constructor did not take a handle as a parameter), set a new handle.

◆ copy()

virtual Geometry* Geom::Geometry::copy ( void  ) const
pure virtual

returns a copy of this object having a new randomly generated tag. If you also want to copy the tag, you may use clone() instead. For creation of geometry with other handles, with or without the same tag, you may use the constructors and the sethandle functions. The tag of a geometry can be copied to another geometry using the assignTag function.

Implemented in Geom::GeomSurfaceOfExtrusion, Geom::GeomSurfaceOfRevolution, Geom::GeomTrimmedSurface, Geom::GeomPlateSurface, Geom::GeomOffsetSurface, Geom::GeomPlane, Geom::GeomToroid, Geom::GeomSphere, Geom::GeomCone, Geom::GeomCylinder, Geom::GeomBSplineSurface, Geom::GeomBezierSurface, Geom::GeomOffsetCurve, Geom::GeomLineSegment, Geom::GeomLine, Geom::GeomArcOfParabola, Geom::GeomParabola, Geom::GeomArcOfHyperbola, Geom::GeomHyperbola, Geom::GeomArcOfEllipse, Geom::GeomEllipse, Geom::GeomArcOfCircle, Geom::GeomCircle, Geom::GeomArcOfConic, Geom::GeomTrimmedCurve, Geom::GeomConic, Geom::GeomBSplineCurve, Geom::GeomBezierCurve, and Geom::GeomPoint.

◆ copyNonTag()

void Geom::Geometry::copyNonTag ( const Geom::Geometry )
protected

◆ createNewTag()

void Geom::Geometry::createNewTag ( )
protected

create a new tag for the geometry object

◆ deleteExtension() [1/2]

void Geom::Geometry::deleteExtension ( Base::Type  type)

◆ deleteExtension() [2/2]

void Geom::Geometry::deleteExtension ( std::string  name)

◆ getExtension() [1/4]

std::weak_ptr<const GeometryExtension> Geom::Geometry::getExtension ( Base::Type  type) const

◆ getExtension() [2/4]

std::weak_ptr<const GeometryExtension> Geom::Geometry::getExtension ( std::string  name) const

◆ getExtension() [3/4]

std::weak_ptr<GeometryExtension> Geom::Geometry::getExtension ( Base::Type  type)

◆ getExtension() [4/4]

std::weak_ptr<GeometryExtension> Geom::Geometry::getExtension ( std::string  name)

◆ getExtensions()

std::vector<std::weak_ptr<const GeometryExtension> > Geom::Geometry::getExtensions ( ) const

◆ getTag()

boost::uuids::uuid Geom::Geometry::getTag ( ) const

returns the tag of the geometry object

◆ Handle()

◆ hasExtension() [1/2]

bool Geom::Geometry::hasExtension ( Base::Type  type) const

◆ hasExtension() [2/2]

bool Geom::Geometry::hasExtension ( std::string  name) const

◆ mirror() [1/2]

void Geom::Geometry::mirror ( const Base::Vector3d point)

◆ mirror() [2/2]

void Geom::Geometry::mirror ( const Base::Vector3d point,
const Base::Vector3d dir 
)

◆ restore()

◆ rotate()

void Geom::Geometry::rotate ( const Base::Placement plm)

◆ save()

◆ scale()

void Geom::Geometry::scale ( const Base::Vector3d vec,
double  scale 
)

◆ setExtension()

void Geom::Geometry::setExtension ( std::unique_ptr< GeometryExtension > &&  geo)

◆ toShape()

virtual TopoDS_Shape Geom::Geometry::toShape ( ) const
pure virtual

◆ transform()

void Geom::Geometry::transform ( const Base::Matrix4D mat)

◆ translate()

void Geom::Geometry::translate ( const Base::Vector3d vec)

Member Data Documentation

◆ extensions

std::vector<std::shared_ptr<GeometryExtension> > Geom::Geometry::extensions
protected

◆ tag

boost::uuids::uuid Geom::Geometry::tag
protected

The documentation for this class was generated from the following file: