FreeCAD C++
Public Member Functions | Protected Member Functions | List of all members
Data::ComplexGeoData Class Referenceabstract

#include <App/ComplexGeoData.h>

Detailed Description

ComplexGeoData Object

Public Member Functions

 ComplexGeoData (void)
 Constructor.
 
virtual ~ComplexGeoData ()
 Destructor.
 
Subelement management
virtual std::vector< const char * > getElementTypes (void) const =0
 
virtual unsigned long countSubElements (const char *Type) const =0
 
virtual SegmentgetSubElement (const char *Type, unsigned long) const =0
 get the subelement by type and number
 
virtual SegmentgetSubElementByName (const char *Name) const
 get subelement by combined name
 
virtual void getLinesFromSubelement (const Segment *, std::vector< Base::Vector3d > &Points, std::vector< Line > &lines) const
 
virtual void getFacesFromSubelement (const Segment *, std::vector< Base::Vector3d > &Points, std::vector< Base::Vector3d > &PointNormals, std::vector< Facet > &faces) const
 
Placement control
void applyTransform (const Base::Matrix4D &rclTrf)
 
void applyTranslation (const Base::Vector3d &)
 
void applyRotation (const Base::Rotation &)
 
void setPlacement (const Base::Placement &rclPlacement)
 
Base::Placement getPlacement () const
 
virtual void setTransform (const Base::Matrix4D &rclTrf)=0
 
virtual Base::Matrix4D getTransform (void) const =0
 
Modification
virtual void transformGeometry (const Base::Matrix4D &rclMat)=0
 Applies a transformation on the real geometric data type.
 
Getting basic geometric entities
virtual Base::BoundBox3d getBoundBox (void) const =0
 Get the bound box.
 
virtual Base::Vector3d getPointFromLineIntersection (const Base::Vector3f &base, const Base::Vector3f &dir) const
 
virtual void getPoints (std::vector< Base::Vector3d > &Points, std::vector< Base::Vector3d > &Normals, float Accuracy, uint16_t flags=0) const
 
virtual void getLines (std::vector< Base::Vector3d > &Points, std::vector< Line > &lines, float Accuracy, uint16_t flags=0) const
 
virtual void getFaces (std::vector< Base::Vector3d > &Points, std::vector< Facet > &faces, float Accuracy, uint16_t flags=0) const
 
virtual bool getCenterOfGravity (Base::Vector3d &center) const
 
- Public Member Functions inherited from Base::Persistence
virtual unsigned int getMemSize (void) const =0
 
virtual void Save (Writer &) const =0
 
virtual void Restore (XMLReader &)=0
 
virtual void SaveDocFile (Writer &) const
 
virtual void RestoreDocFile (Reader &)
 
- Public Member Functions inherited from Base::BaseClass
 BaseClass ()
 Construction.
 
virtual ~BaseClass ()
 Destruction.
 

Protected Member Functions

Base::Vector3d transformToOutside (const Base::Vector3f &vec) const
 from local to outside
 
Base::Vector3f transformToInside (const Base::Vector3d &vec) const
 from local to inside
 

Additional Inherited Members

- Static Public Member Functions inherited from Base::Persistence
static std::string encodeAttribute (const std::string &)
 Encodes an attribute upon saving.
 

Member Function Documentation

◆ applyRotation()

void Data::ComplexGeoData::applyRotation ( const Base::Rotation &  )

Applies an additional rotation to the current transformation.

◆ applyTransform()

void Data::ComplexGeoData::applyTransform ( const Base::Matrix4D rclTrf)

Applies an additional transformation to the current transformation.

◆ applyTranslation()

void Data::ComplexGeoData::applyTranslation ( const Base::Vector3d )

Applies an additional translation to the current transformation.

◆ getCenterOfGravity()

virtual bool Data::ComplexGeoData::getCenterOfGravity ( Base::Vector3d center) const
virtual

Get the center of gravity If this method is implemented then true is returned and the center of gravity. The default implementation only returns false.

◆ getElementTypes()

virtual std::vector<const char*> Data::ComplexGeoData::getElementTypes ( void  ) const
pure virtual

Sub type list List of different subelement types its NOT a list of the subelements itself

Implemented in Part::TopoShape, Mesh::MeshObject, Fem::FemMesh, and Points::PointKernel.

◆ getFaces()

virtual void Data::ComplexGeoData::getFaces ( std::vector< Base::Vector3d > &  Points,
std::vector< Facet > &  faces,
float  Accuracy,
uint16_t  flags = 0 
) const
virtual

Get faces from object with given accuracy

◆ getFacesFromSubelement()

virtual void Data::ComplexGeoData::getFacesFromSubelement ( const Segment ,
std::vector< Base::Vector3d > &  Points,
std::vector< Base::Vector3d > &  PointNormals,
std::vector< Facet > &  faces 
) const
virtual

Get faces from segment

Reimplemented in Part::TopoShape, and Mesh::MeshObject.

◆ getLines()

virtual void Data::ComplexGeoData::getLines ( std::vector< Base::Vector3d > &  Points,
std::vector< Line > &  lines,
float  Accuracy,
uint16_t  flags = 0 
) const
virtual

Get lines from object with given accuracy

◆ getLinesFromSubelement()

virtual void Data::ComplexGeoData::getLinesFromSubelement ( const Segment ,
std::vector< Base::Vector3d > &  Points,
std::vector< Line > &  lines 
) const
virtual

Get lines from segment

Reimplemented in Part::TopoShape.

◆ getPlacement()

Base::Placement Data::ComplexGeoData::getPlacement ( ) const

Return the current transformation as placement using getTransform().

◆ getPointFromLineIntersection()

virtual Base::Vector3d Data::ComplexGeoData::getPointFromLineIntersection ( const Base::Vector3f base,
const Base::Vector3f dir 
) const
virtual

Get point from line object intersection

◆ getPoints()

virtual void Data::ComplexGeoData::getPoints ( std::vector< Base::Vector3d > &  Points,
std::vector< Base::Vector3d > &  Normals,
float  Accuracy,
uint16_t  flags = 0 
) const
virtual

Get points from object with given accuracy

Reimplemented in Part::TopoShape, and Mesh::MeshObject.

◆ getTransform()

virtual Base::Matrix4D Data::ComplexGeoData::getTransform ( void  ) const
pure virtual

Return the current matrix This method has to be handled by the child classes. the actual placement and matrix is not part of this class.

Implemented in Fem::FemMesh, and Part::TopoShape.

◆ setPlacement()

void Data::ComplexGeoData::setPlacement ( const Base::Placement rclPlacement)

Override the current transformation with a placement using the setTransform() method.

◆ setTransform()

virtual void Data::ComplexGeoData::setTransform ( const Base::Matrix4D rclTrf)
pure virtual

Override the current transformation with the new one. This method has to be handled by the child classes. the actual placement and matrix is not part of this class.

Implemented in Fem::FemMesh, and Part::TopoShape.