Data::ComplexGeoData Class Referenceabstract

ComplexGeoData Object. More...

#include <ComplexGeoData.h>

Classes

struct  Domain
 
struct  Facet
 
struct  Line
 

Public Member Functions

 ComplexGeoData (void)
 Constructor. More...
 
virtual ~ComplexGeoData ()
 Destructor. More...
 
Subelement management
virtual std::vector< const char * > getElementTypes (void) const =0
 Sub type list List of different subelement types its NOT a list of the subelements itself. More...
 
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 More...
 
virtual SegmentgetSubElementByName (const char *Name) const
 get subelement by combined name More...
 
virtual void getLinesFromSubelement (const Segment *, std::vector< Base::Vector3d > &Points, std::vector< Line > &lines) const
 Get lines from segment. More...
 
virtual void getFacesFromSubelement (const Segment *, std::vector< Base::Vector3d > &Points, std::vector< Base::Vector3d > &PointNormals, std::vector< Facet > &faces) const
 Get faces from segment. More...
 
Placement control
void applyTransform (const Base::Matrix4D &rclTrf)
 Applies an additional transformation to the current transformation. More...
 
void applyTranslation (const Base::Vector3d &)
 Applies an additional translation to the current transformation. More...
 
void applyRotation (const Base::Rotation &)
 Applies an additional rotation to the current transformation. More...
 
void setPlacement (const Base::Placement &rclPlacement)
 Override the current transformation with a placement using the setTransform() method. More...
 
Base::Placement getPlacement () const
 Return the current transformation as placement using getTransform(). More...
 
virtual void setTransform (const Base::Matrix4D &rclTrf)=0
 Override the current transformation with the new one. More...
 
virtual Base::Matrix4D getTransform (void) const =0
 Return the current matrix This method has to be handled by the child classes. More...
 
Modification
virtual void transformGeometry (const Base::Matrix4D &rclMat)=0
 Applies a transformation on the real geometric data type. More...
 
Getting basic geometric entities
virtual Base::BoundBox3d getBoundBox (void) const =0
 Get the bound box. More...
 
virtual Base::Vector3d getPointFromLineIntersection (const Base::Vector3f &base, const Base::Vector3f &dir) const
 Get point from line object intersection
More...
 
virtual void getPoints (std::vector< Base::Vector3d > &Points, std::vector< Base::Vector3d > &Normals, float Accuracy, uint16_t flags=0) const
 Get points from object with given accuracy. More...
 
virtual void getLines (std::vector< Base::Vector3d > &Points, std::vector< Line > &lines, float Accuracy, uint16_t flags=0) const
 Get lines from object with given accuracy. More...
 
virtual void getFaces (std::vector< Base::Vector3d > &Points, std::vector< Facet > &faces, float Accuracy, uint16_t flags=0) const
 Get faces from object with given accuracy. More...
 
virtual bool getCenterOfGravity (Base::Vector3d &center) const
 Get the center of gravity If this method is implemented then true is returned and the center of gravity. More...
 
- Public Member Functions inherited from Base::Persistence
void dumpToStream (std::ostream &stream, int compression)
 
virtual unsigned int getMemSize (void) const =0
 This method is used to get the size of objects It is not meant to have the exact size, it is more or less an estimation which runs fast! Is it two bytes or a GB? More...
 
virtual Base::Type getTypeId (void) const
 
virtual void Restore (XMLReader &)=0
 This method is used to restore properties from an XML document. More...
 
virtual void RestoreDocFile (Reader &)
 This method is used to restore large amounts of data from a file In this method you simply stream in your SaveDocFile() saved data. More...
 
void restoreFromStream (std::istream &stream)
 
virtual void Save (Writer &) const =0
 This method is used to save properties to an XML document. More...
 
virtual void SaveDocFile (Writer &) const
 This method is used to save large amounts of data to a binary file. More...
 
- Public Member Functions inherited from Base::BaseClass
 BaseClass ()
 Construction. More...
 
virtual PyObjectgetPyObject (void)
 This method returns the Python wrapper for a C++ object. More...
 
bool isDerivedFrom (const Type type) const
 
virtual void setPyObject (PyObject *)
 
virtual ~BaseClass ()
 Destruction. More...
 
- Public Member Functions inherited from Base::Handled
int getRefCount (void) const
 
 Handled ()
 
const Handledoperator= (const Handled &)
 
void ref () const
 
void unref () const
 
virtual ~Handled ()
 

Element name mapping

long Tag
 
static const std::string & elementMapPrefix ()
 Special prefix to mark the beginning of a mapped sub-element name. More...
 
static const std::string & tagPostfix ()
 Special postfix to mark the following tag. More...
 
static const std::string & indexPostfix ()
 Special postfix to mark the index of an array element. More...
 
static const std::string & missingPrefix ()
 Special prefix to mark a missing element. More...
 
static bool hasMissingElement (const char *subname)
 Check if a subname contains missing element. More...
 
static const char * isMappedElement (const char *name)
 Check if the name starts with elementMapPrefix() More...
 
static std::string newElementName (const char *name)
 Strip out the trailing element name if there is mapped element name precedes it. More...
 
static std::string oldElementName (const char *name)
 Strip out the mapped element name if there is one. More...
 
static std::string noElementName (const char *name)
 Strip out the old and new element name if there is one. More...
 
static const char * findElementName (const char *subname)
 Find the start of an element name in a subname. More...
 
static const char * hasMappedElementName (const char *subname)
 
Base::Vector3d transformToOutside (const Base::Vector3f &vec) const
 from local to outside More...
 
Base::Vector3f transformToInside (const Base::Vector3d &vec) const
 from local to inside More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Base::Persistence
static void * create (void)
 
static std::string encodeAttribute (const std::string &)
 Encodes an attribute upon saving. More...
 
static Base::Type getClassTypeId (void)
 
static void init (void)
 
- Static Public Member Functions inherited from Base::BaseClass
static void * create (void)
 
static Type getClassTypeId (void)
 
static void init (void)
 
- Static Protected Member Functions inherited from Base::BaseClass
static void initSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Type::instantiationMethod method=nullptr)
 

Detailed Description

Constructor & Destructor Documentation

◆ ComplexGeoData()

ComplexGeoData::ComplexGeoData ( void  )

Constructor.

◆ ~ComplexGeoData()

ComplexGeoData::~ComplexGeoData ( void  )
virtual

Destructor.

Member Function Documentation

◆ applyRotation()

void ComplexGeoData::applyRotation ( const Base::Rotation rot)

Applies an additional rotation to the current transformation.

References getTransform(), Base::Rotation::getValue(), and setTransform().

◆ applyTransform()

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

Applies an additional transformation to the current transformation.

References getTransform(), and setTransform().

◆ applyTranslation()

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

Applies an additional translation to the current transformation.

References getTransform(), Base::Matrix4D::move(), and setTransform().

◆ countSubElements()

virtual unsigned long Data::ComplexGeoData::countSubElements ( const char *  Type) const
pure virtual

◆ elementMapPrefix()

const std::string & ComplexGeoData::elementMapPrefix ( )
static

Special prefix to mark the beginning of a mapped sub-element name.

Referenced by indexPostfix(), isMappedElement(), and tagPostfix().

◆ findElementName()

◆ getBoundBox()

virtual Base::BoundBox3d Data::ComplexGeoData::getBoundBox ( void  ) const
pure virtual

Get the bound box.

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

◆ getCenterOfGravity()

bool 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.

Reimplemented in Part::TopoShape.

◆ 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 Points::PointKernel, Part::TopoShape, Mesh::MeshObject, and Fem::FemMesh.

◆ getFaces()

void 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.

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

◆ getFacesFromSubelement()

void 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()

void 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()

void 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 ComplexGeoData::getPlacement ( ) const

Return the current transformation as placement using getTransform().

References getTransform().

◆ getPointFromLineIntersection()

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

Get point from line object intersection

◆ getPoints()

void 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 Points::PointKernel, Part::TopoShape, and Mesh::MeshObject.

◆ getSubElement()

virtual Segment* Data::ComplexGeoData::getSubElement ( const char *  Type,
unsigned long   
) const
pure virtual

get the subelement by type and number

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

Referenced by getSubElementByName().

◆ getSubElementByName()

Data::Segment * ComplexGeoData::getSubElementByName ( const char *  Name) const
virtual

get subelement by combined name

References getSubElement().

◆ 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 Points::PointKernel, Part::TopoShape, Mesh::MeshObject, and Fem::FemMesh.

Referenced by applyRotation(), applyTransform(), applyTranslation(), and getPlacement().

◆ hasMappedElementName()

static const char* Data::ComplexGeoData::hasMappedElementName ( const char *  subname)
static

◆ hasMissingElement()

bool ComplexGeoData::hasMissingElement ( const char *  subname)
static

Check if a subname contains missing element.

References missingPrefix().

Referenced by Part::TopoShape::shapeType().

◆ indexPostfix()

const std::string & ComplexGeoData::indexPostfix ( )
static

Special postfix to mark the index of an array element.

References elementMapPrefix().

Referenced by App::LinkBaseExtension::extensionGetSubObject().

◆ isMappedElement()

const char * ComplexGeoData::isMappedElement ( const char *  name)
static

◆ missingPrefix()

const std::string & ComplexGeoData::missingPrefix ( )
static

Special prefix to mark a missing element.

Referenced by hasMissingElement().

◆ newElementName()

std::string ComplexGeoData::newElementName ( const char *  name)
static

Strip out the trailing element name if there is mapped element name precedes it.

References isMappedElement().

◆ noElementName()

std::string ComplexGeoData::noElementName ( const char *  name)
static

◆ oldElementName()

std::string ComplexGeoData::oldElementName ( const char *  name)
static

Strip out the mapped element name if there is one.

References isMappedElement().

Referenced by Gui::ElementColors::Private::addItem(), App::GeoFeature::resolveElement(), and PartDesign::SubShapeBinder::update().

◆ setPlacement()

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

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

References setTransform(), and Base::Placement::toMatrix().

Referenced by TechDraw::ShapeExtractor::getLocation3dFromFeat(), and Part::Datum::getShape().

◆ 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 Points::PointKernel, Part::TopoShape, Mesh::MeshObject, and Fem::FemMesh.

Referenced by applyRotation(), applyTransform(), applyTranslation(), and setPlacement().

◆ tagPostfix()

const std::string & ComplexGeoData::tagPostfix ( )
static

Special postfix to mark the following tag.

References elementMapPrefix().

◆ transformGeometry()

virtual void Data::ComplexGeoData::transformGeometry ( const Base::Matrix4D rclMat)
pure virtual

Applies a transformation on the real geometric data type.

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

◆ transformToInside()

◆ transformToOutside()

Base::Vector3d Data::ComplexGeoData::transformToOutside ( const Base::Vector3f vec) const
protected

Member Data Documentation

◆ Tag

long Data::ComplexGeoData::Tag
mutable

The documentation for this class was generated from the following files:
  • Sources/FreeCAD/src/App/ComplexGeoData.h
  • Sources/FreeCAD/src/App/ComplexGeoData.cpp