Data::ComplexGeoData Class Referenceabstract

ComplexGeoData Object. More...

#include <ComplexGeoData.h>

Classes

struct  Domain
 
struct  Facet
 
struct  Line
 

Public Member Functions

 ComplexGeoData ()
 Constructor. More...
 
virtual ~ComplexGeoData ()
 Destructor. More...
 
Subelement management
virtual std::vector< const char * > getElementTypes () 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 () 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 () 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 () 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...
 
 BaseClass (const BaseClass &)=default
 
virtual PyObjectgetPyObject ()
 This method returns the Python wrapper for a C++ object. More...
 
virtual Type getTypeId () const
 
bool isDerivedFrom (const Type type) const
 
BaseClassoperator= (const BaseClass &)=default
 
virtual void setPyObject (PyObject *)
 
virtual ~BaseClass ()
 Destruction. More...
 
- Public Member Functions inherited from Base::Handled
int getRefCount () 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 ()
 
static Type getClassTypeId ()
 
static void init ()
 
- 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 ( )

Constructor.

◆ ~ComplexGeoData()

ComplexGeoData::~ComplexGeoData ( )
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 ( ) const
pure virtual

Get the bound box.

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

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

◆ getElementTypes()

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

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

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

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

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

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

◆ getSubElement()

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

get the subelement by type and number

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

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

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

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

◆ 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: