The MeshObject class provides an interface for the underlying MeshKernel class and most of its algorithm on it. More...
#include <Mesh.h>
Classes | |
class | const_facet_iterator |
class | const_point_iterator |
Public Types | |
enum | CutType { INNER , OUTER } |
enum | GeometryType { PLANE , CYLINDER , SPHERE } |
typedef std::pair< Base::Vector3f, Base::Vector3f > | TPlane |
typedef std::list< std::vector< Base::Vector3f > > | TPolylines |
Public Member Functions | |
MeshObject () | |
MeshObject (const MeshCore::MeshKernel &Kernel) | |
MeshObject (const MeshCore::MeshKernel &Kernel, const Base::Matrix4D &Mtrx) | |
MeshObject (const MeshObject &) | |
void | operator= (const MeshObject &) |
virtual | ~MeshObject () |
Subelement management | |
virtual std::vector< const char * > | getElementTypes () const |
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 |
virtual Data::Segment * | getSubElement (const char *Type, unsigned long) const |
get the subelement by type and number More... | |
virtual void | getFacesFromSubElement (const Data::Segment *, std::vector< Base::Vector3d > &Points, std::vector< Base::Vector3d > &PointNormals, std::vector< Facet > &faces) const |
Get faces from segment. More... | |
void | setTransform (const Base::Matrix4D &rclTrf) |
Override the current transformation with the new one. More... | |
Base::Matrix4D | getTransform () const |
Return the current matrix This method has to be handled by the child classes. More... | |
void | transformGeometry (const Base::Matrix4D &rclMat) |
Applies a transformation on the real geometric data type. More... | |
void | swap (MeshCore::MeshKernel &Kernel) |
Swaps the content of Kernel and the internal mesh kernel. More... | |
void | swap (MeshObject &mesh) |
Querying | |
std::string | representation () const |
std::string | topologyInfo () const |
unsigned long | countPoints () const |
unsigned long | countFacets () const |
unsigned long | countEdges () const |
unsigned long | countSegments () const |
bool | isSolid () const |
Base::Vector3d | getPoint (PointIndex) const |
MeshPoint | getMeshPoint (PointIndex) const |
Mesh::Facet | getMeshFacet (FacetIndex) const |
double | getSurface () const |
double | getVolume () const |
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 | getFaces (std::vector< Base::Vector3d > &Points, std::vector< Facet > &Topo, float Accuracy, uint16_t flags=0) const |
Get faces from object with given accuracy. More... | |
std::vector< PointIndex > | getPointsFromFacets (const std::vector< FacetIndex > &facets) const |
void | setKernel (const MeshCore::MeshKernel &m) |
MeshCore::MeshKernel & | getKernel () |
const MeshCore::MeshKernel & | getKernel () const |
virtual Base::BoundBox3d | getBoundBox () const |
Get the bound box. More... | |
virtual bool | getCenterOfGravity (Base::Vector3d ¢er) const |
Get the center of gravity If this method is implemented then true is returned and the center of gravity. More... | |
I/O | |
unsigned int | getMemSize () const |
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... | |
void | Save (Base::Writer &writer) const |
This method is used to save properties to an XML document. More... | |
void | SaveDocFile (Base::Writer &writer) const |
This method is used to save large amounts of data to a binary file. More... | |
void | Restore (Base::XMLReader &reader) |
This method is used to restore properties from an XML document. More... | |
void | RestoreDocFile (Base::Reader &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 | save (const char *file, MeshCore::MeshIO::Format f=MeshCore::MeshIO::Undefined, const MeshCore::Material *mat=nullptr, const char *objectname=nullptr) const |
void | save (std::ostream &, MeshCore::MeshIO::Format f, const MeshCore::Material *mat=nullptr, const char *objectname=nullptr) const |
bool | load (const char *file, MeshCore::Material *mat=nullptr) |
bool | load (std::istream &, MeshCore::MeshIO::Format f, MeshCore::Material *mat=nullptr) |
void | save (std::ostream &) const |
void | load (std::istream &) |
Manipulation | |
void | addFacet (const MeshCore::MeshGeomFacet &facet) |
void | addFacets (const std::vector< MeshCore::MeshGeomFacet > &facets) |
void | addFacets (const std::vector< MeshCore::MeshFacet > &facets, bool checkManifolds) |
void | addFacets (const std::vector< MeshCore::MeshFacet > &facets, const std::vector< Base::Vector3f > &points, bool checkManifolds) |
void | addFacets (const std::vector< Data::ComplexGeoData::Facet > &facets, const std::vector< Base::Vector3d > &points, bool checkManifolds) |
void | setFacets (const std::vector< MeshCore::MeshGeomFacet > &facets) |
void | setFacets (const std::vector< Data::ComplexGeoData::Facet > &facets, const std::vector< Base::Vector3d > &points) |
void | addMesh (const MeshObject &) |
Combines two independent mesh objects. More... | |
void | addMesh (const MeshCore::MeshKernel &) |
Combines two independent mesh objects. More... | |
void | deleteFacets (const std::vector< FacetIndex > &removeIndices) |
void | deletePoints (const std::vector< PointIndex > &removeIndices) |
std::vector< std::vector< FacetIndex > > | getComponents () const |
unsigned long | countComponents () const |
void | removeComponents (unsigned long) |
unsigned long | getPointDegree (const std::vector< FacetIndex > &facets, std::vector< PointIndex > &point_degree) const |
Checks for the given facet indices what will be the degree for each point when these facets are removed from the mesh kernel. More... | |
void | fillupHoles (unsigned long, int, MeshCore::AbstractPolygonTriangulator &) |
void | offset (float fSize) |
void | offsetSpecial2 (float fSize) |
void | offsetSpecial (float fSize, float zmax, float zmin) |
void | clear () |
clears the Mesh More... | |
void | transformToEigenSystem () |
Base::Matrix4D | getEigenSystem (Base::Vector3d &v) const |
void | movePoint (PointIndex, const Base::Vector3d &v) |
void | setPoint (PointIndex, const Base::Vector3d &v) |
void | smooth (int iterations, float d_max) |
void | decimate (float fTolerance, float fReduction) |
void | decimate (int targetSize) |
Base::Vector3d | getPointNormal (PointIndex) const |
std::vector< Base::Vector3d > | getPointNormals () const |
void | crossSections (const std::vector< TPlane > &, std::vector< TPolylines > §ions, float fMinEps=1.0e-2f, bool bConnectPolygons=false) const |
void | cut (const Base::Polygon2d &polygon, const Base::ViewProjMethod &proj, CutType) |
void | trim (const Base::Polygon2d &polygon, const Base::ViewProjMethod &proj, CutType) |
void | trimByPlane (const Base::Vector3f &base, const Base::Vector3f &normal) |
Selection | |
void | deleteSelectedFacets () |
void | deleteSelectedPoints () |
void | addFacetsToSelection (const std::vector< FacetIndex > &) const |
void | addPointsToSelection (const std::vector< PointIndex > &) const |
void | removeFacetsFromSelection (const std::vector< FacetIndex > &) const |
void | removePointsFromSelection (const std::vector< PointIndex > &) const |
unsigned long | countSelectedFacets () const |
bool | hasSelectedFacets () const |
unsigned long | countSelectedPoints () const |
bool | hasSelectedPoints () const |
void | getFacetsFromSelection (std::vector< FacetIndex > &) const |
void | getPointsFromSelection (std::vector< PointIndex > &) const |
void | clearFacetSelection () const |
void | clearPointSelection () const |
Boolean operations | |
MeshObject * | unite (const MeshObject &) const |
MeshObject * | intersect (const MeshObject &) const |
MeshObject * | subtract (const MeshObject &) const |
MeshObject * | inner (const MeshObject &) const |
MeshObject * | outer (const MeshObject &) const |
std::vector< std::vector< Base::Vector3f > > | section (const MeshObject &, bool connectLines, float fMinDist) const |
Topological operations | |
void | refine () |
void | removeNeedles (float) |
void | optimizeTopology (float) |
void | optimizeEdges () |
void | splitEdges () |
void | splitEdge (FacetIndex, FacetIndex, const Base::Vector3f &) |
void | splitFacet (FacetIndex, const Base::Vector3f &, const Base::Vector3f &) |
void | swapEdge (FacetIndex, FacetIndex) |
void | collapseEdge (FacetIndex, FacetIndex) |
void | collapseFacet (FacetIndex) |
void | collapseFacets (const std::vector< FacetIndex > &) |
void | insertVertex (FacetIndex, const Base::Vector3f &v) |
void | snapVertex (FacetIndex, const Base::Vector3f &v) |
Mesh validation | |
unsigned long | countNonUniformOrientedFacets () const |
void | flipNormals () |
void | harmonizeNormals () |
void | validateIndices () |
void | validateCaps (float fMaxAngle, float fSplitFactor) |
void | validateDeformations (float fMaxAngle, float fEps) |
void | validateDegenerations (float fEps) |
void | removeDuplicatedPoints () |
void | removeDuplicatedFacets () |
bool | hasNonManifolds () const |
bool | hasInvalidNeighbourhood () const |
bool | hasPointsOutOfRange () const |
bool | hasFacetsOutOfRange () const |
bool | hasCorruptedFacets () const |
void | removeNonManifolds () |
void | removeNonManifoldPoints () |
bool | hasSelfIntersections () const |
void | removeSelfIntersections () |
void | removeSelfIntersections (const std::vector< FacetIndex > &) |
void | removeFoldsOnSurface () |
void | removeFullBoundaryFacets () |
bool | hasInvalidPoints () const |
void | removeInvalidPoints () |
void | mergeFacets () |
bool | hasPointsOnEdge () const |
void | removePointsOnEdge (bool fillBoundary) |
Mesh segments | |
void | addSegment (const Segment &) |
void | addSegment (const std::vector< FacetIndex > &) |
const Segment & | getSegment (unsigned long) const |
Segment & | getSegment (unsigned long) |
MeshObject * | meshFromSegment (const std::vector< FacetIndex > &) const |
std::vector< Segment > | getSegmentsOfType (GeometryType, float dev, unsigned long minFacets) const |
Public Member Functions inherited from Data::ComplexGeoData | |
ComplexGeoData () | |
Constructor. More... | |
virtual | ~ComplexGeoData () |
Destructor. More... | |
virtual Segment * | getSubElementByName (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... | |
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 Base::Vector3d | getPointFromLineIntersection (const Base::Vector3f &base, const Base::Vector3f &dir) const |
Get point from line object intersection 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... | |
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 PyObject * | getPyObject () |
This method returns the Python wrapper for a C++ object. More... | |
virtual Type | getTypeId () const |
bool | isDerivedFrom (const Type type) const |
BaseClass & | operator= (const BaseClass &)=default |
virtual void | setPyObject (PyObject *) |
virtual | ~BaseClass () |
Destruction. More... | |
Public Member Functions inherited from Base::Handled | |
int | getRefCount () const |
Handled () | |
const Handled & | operator= (const Handled &) |
void | ref () const |
void | unref () const |
virtual | ~Handled () |
Static Public Member Functions | |
Primitives | |
static MeshObject * | createMeshFromList (Py::List &list) |
static MeshObject * | createSphere (float, int) |
static MeshObject * | createEllipsoid (float, float, int) |
static MeshObject * | createCylinder (float, float, int, float, int) |
static MeshObject * | createCone (float, float, float, int, float, int) |
static MeshObject * | createTorus (float, float, int) |
static MeshObject * | createCube (float, float, float) |
static MeshObject * | createCube (float, float, float, float) |
static MeshObject * | createCube (const Base::BoundBox3d &) |
Static Public Member Functions inherited from Data::ComplexGeoData | |
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) |
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 () |
Iterator | |
typedef std::vector< Segment >::const_iterator | const_segment_iterator |
class | Segment |
const_point_iterator | points_begin () const |
const_point_iterator | points_end () const |
const_facet_iterator | facets_begin () const |
const_facet_iterator | facets_end () const |
const_segment_iterator | segments_begin () const |
const_segment_iterator | segments_end () const |
Additional Inherited Members | |
Public Attributes inherited from Data::ComplexGeoData | |
long | Tag |
Protected Member Functions inherited from Data::ComplexGeoData | |
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... | |
Static Protected Member Functions inherited from Base::BaseClass | |
static void | initSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Type::instantiationMethod method=nullptr) |
The MeshObject class provides an interface for the underlying MeshKernel class and most of its algorithm on it.
typedef std::vector<Segment>::const_iterator Mesh::MeshObject::const_segment_iterator |
typedef std::pair<Base::Vector3f, Base::Vector3f> Mesh::MeshObject::TPlane |
typedef std::list<std::vector<Base::Vector3f> > Mesh::MeshObject::TPolylines |
MeshObject::MeshObject | ( | ) |
Referenced by getSubElement(), inner(), intersect(), meshFromSegment(), outer(), subtract(), and unite().
|
explicit |
|
explicit |
MeshObject::MeshObject | ( | const MeshObject & | mesh | ) |
|
virtual |
void MeshObject::addFacet | ( | const MeshCore::MeshGeomFacet & | facet | ) |
void MeshObject::addFacets | ( | const std::vector< Data::ComplexGeoData::Facet > & | facets, |
const std::vector< Base::Vector3d > & | points, | ||
bool | checkManifolds | ||
) |
void MeshObject::addFacets | ( | const std::vector< MeshCore::MeshFacet > & | facets, |
bool | checkManifolds | ||
) |
void MeshObject::addFacets | ( | const std::vector< MeshCore::MeshFacet > & | facets, |
const std::vector< Base::Vector3f > & | points, | ||
bool | checkManifolds | ||
) |
void MeshObject::addFacets | ( | const std::vector< MeshCore::MeshGeomFacet > & | facets | ) |
Referenced by MeshGui::ViewProviderMesh::fillHole(), and cStock::Tessellate().
void MeshObject::addFacetsToSelection | ( | const std::vector< FacetIndex > & | inds | ) | const |
References MeshCore::MeshFacet::SELECTED, and MeshCore::MeshAlgorithm::SetFacetsFlag().
Referenced by MeshGui::ViewProviderMesh::addSelection(), MeshGui::ViewProviderMesh::selectArea(), MeshGui::ViewProviderMesh::selectComponent(), MeshGui::ViewProviderMesh::selectFacet(), and MeshGui::ViewProviderMesh::setSelection().
void MeshObject::addMesh | ( | const MeshCore::MeshKernel & | kernel | ) |
Combines two independent mesh objects.
Referenced by PathScripts.PathCamoticsGui.CamoticsSimulation::worker().
void MeshObject::addMesh | ( | const MeshObject & | mesh | ) |
Combines two independent mesh objects.
Referenced by Mesh::MergeExporter::addMesh(), and PathScripts.PathCamoticsGui.CamoticsSimulation::worker().
void MeshObject::addPointsToSelection | ( | const std::vector< PointIndex > & | inds | ) | const |
References MeshCore::MeshPoint::SELECTED, and MeshCore::MeshAlgorithm::SetPointsFlag().
void MeshObject::addSegment | ( | const Segment & | s | ) |
void MeshObject::addSegment | ( | const std::vector< FacetIndex > & | inds | ) |
void MeshObject::clear | ( | ) |
clears the Mesh
References setTransform().
void MeshObject::clearFacetSelection | ( | ) | const |
References MeshCore::MeshAlgorithm::ResetFacetFlag(), and MeshCore::MeshFacet::SELECTED.
Referenced by MeshGui::ViewProviderMesh::clearSelection(), ReverseEngineeringGui::SegmentationManual::createSegment(), MeshGui::ViewProviderMesh::deleteSelection(), and MeshGui::ViewProviderMesh::setSelection().
void MeshObject::clearPointSelection | ( | ) | const |
References MeshCore::MeshAlgorithm::ResetPointFlag(), and MeshCore::MeshPoint::SELECTED.
void MeshObject::collapseEdge | ( | FacetIndex | facet, |
FacetIndex | neighbour | ||
) |
References MeshCore::MeshTopoAlgorithm::CollapseEdge().
void MeshObject::collapseFacet | ( | FacetIndex | facet | ) |
References MeshCore::MeshTopoAlgorithm::CollapseFacet().
void MeshObject::collapseFacets | ( | const std::vector< FacetIndex > & | facets | ) |
References MeshCore::MeshTopoAlgorithm::CollapseFacet().
unsigned long MeshObject::countComponents | ( | ) | const |
unsigned long MeshObject::countEdges | ( | ) | const |
unsigned long MeshObject::countFacets | ( | ) | const |
Referenced by Mesh::MergeExporter::addMesh(), MeshGui::ViewProviderMesh::canHighlightColors(), MeshGui::ViewProviderMesh::deselectFacet(), MeshGui::MeshSelection::fullSelection(), MeshGui::ViewProviderMesh::getFacetsFromPolygon(), MeshGui::ViewProviderMesh::highlightColors(), MeshGui::ViewProviderMesh::highlightComponents(), MeshGui::ViewProviderMesh::highlightSegments(), MeshGui::ViewProviderMesh::highlightSelection(), MeshGui::ViewProviderMesh::removeFacets(), and MeshGui::ViewProviderMesh::selectFacet().
unsigned long MeshObject::countNonUniformOrientedFacets | ( | ) | const |
References MeshCore::MeshEvalOrientation::GetIndices().
unsigned long MeshObject::countPoints | ( | ) | const |
unsigned long MeshObject::countSegments | ( | ) | const |
unsigned long MeshObject::countSelectedFacets | ( | ) | const |
References MeshCore::MeshAlgorithm::CountFacetFlag(), and MeshCore::MeshFacet::SELECTED.
Referenced by hasSelectedFacets().
unsigned long MeshObject::countSelectedPoints | ( | ) | const |
References MeshCore::MeshAlgorithm::CountPointFlag(), and MeshCore::MeshPoint::SELECTED.
Referenced by hasSelectedPoints().
|
virtual |
Implements Data::ComplexGeoData.
References countSegments().
|
static |
References createMeshFromList().
Referenced by Mesh::Cone::execute().
|
static |
|
static |
References createMeshFromList().
Referenced by Mesh::Cube::execute().
|
static |
References createMeshFromList().
|
static |
References createMeshFromList().
Referenced by Mesh::Cylinder::execute().
|
static |
References createMeshFromList().
Referenced by Mesh::Ellipsoid::execute().
|
static |
References MeshCore::MeshGeomFacet::CalcNormal().
Referenced by createCone(), createCube(), createCylinder(), createEllipsoid(), createSphere(), createTorus(), and Mesh::PropertyMeshKernel::setPyObject().
|
static |
References createMeshFromList().
Referenced by Mesh::Sphere::execute().
|
static |
References createMeshFromList().
Referenced by Mesh::Torus::execute().
void MeshObject::crossSections | ( | const std::vector< TPlane > & | planes, |
std::vector< TPolylines > & | sections, | ||
float | fMinEps = 1.0e-2f , |
||
bool | bConnectPolygons = false |
||
) | const |
References MeshCore::MeshAlgorithm::CutWithPlane(), and MeshCore::MeshKernel::Transform().
void MeshObject::cut | ( | const Base::Polygon2d & | polygon, |
const Base::ViewProjMethod & | proj, | ||
MeshObject::CutType | type | ||
) |
References MeshCore::MeshAlgorithm::CheckFacets(), deleteFacets(), INNER, inner(), and OUTER.
void MeshObject::decimate | ( | float | fTolerance, |
float | fReduction | ||
) |
References MeshCore::MeshSimplify::simplify().
void MeshObject::decimate | ( | int | targetSize | ) |
References MeshCore::MeshSimplify::simplify().
void MeshObject::deleteFacets | ( | const std::vector< FacetIndex > & | removeIndices | ) |
void MeshObject::deletePoints | ( | const std::vector< PointIndex > & | removeIndices | ) |
Referenced by deleteSelectedPoints(), and removeInvalidPoints().
void MeshObject::deleteSelectedFacets | ( | ) |
void MeshObject::deleteSelectedPoints | ( | ) |
const_facet_iterator Mesh::MeshObject::facets_begin | ( | ) | const |
const_facet_iterator Mesh::MeshObject::facets_end | ( | ) | const |
void MeshObject::fillupHoles | ( | unsigned long | length, |
int | level, | ||
MeshCore::AbstractPolygonTriangulator & | cTria | ||
) |
References MeshCore::MeshTopoAlgorithm::FillupHoles().
void MeshObject::flipNormals | ( | ) |
References MeshCore::MeshTopoAlgorithm::FlipNormals().
|
virtual |
Get the bound box.
Implements Data::ComplexGeoData.
References Base::BoundBox3< _Precision >::Add(), Base::BoundBox3< _Precision >::CalcPoint(), Base::BoundBox3< _Precision >::IsValid(), and Data::ComplexGeoData::transformToOutside().
|
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 from Data::ComplexGeoData.
References MeshCore::MeshAlgorithm::GetGravityPoint(), and Data::ComplexGeoData::transformToOutside().
std::vector< std::vector< FacetIndex > > MeshObject::getComponents | ( | ) | const |
References MeshCore::MeshComponents::OverEdge, and MeshCore::MeshComponents::SearchForComponents().
Referenced by MeshGui::ViewProviderMesh::highlightComponents().
Base::Matrix4D MeshObject::getEigenSystem | ( | Base::Vector3d & | v | ) | const |
|
virtual |
Sub type list List of different subelement types its NOT a list of the subelements itself.
Implements Data::ComplexGeoData.
|
virtual |
Get faces from object with given accuracy.
Reimplemented from Data::ComplexGeoData.
References getPoint(), and Data::ComplexGeoData::Facet::I1.
|
virtual |
Get faces from segment.
Reimplemented from Data::ComplexGeoData.
References Base::BaseClass::getClassTypeId(), Base::BaseClass::getTypeId(), Mesh::MeshSegment::mesh, and Mesh::MeshSegment::segment.
void MeshObject::getFacetsFromSelection | ( | std::vector< FacetIndex > & | inds | ) | const |
References MeshCore::MeshAlgorithm::GetFacetsFlag(), and MeshCore::MeshFacet::SELECTED.
Referenced by MeshGui::ViewProviderMesh::deleteSelection(), and MeshGui::ViewProviderMesh::highlightSelection().
MeshCore::MeshKernel & Mesh::MeshObject::getKernel | ( | ) |
Referenced by MeshPartGui::CurveOnMeshHandler::Private::createGrid(), MeshGui::MeshSelection::deleteSelection(), MeshGui::MeshSelection::deleteSelectionBorder(), MeshGui::MeshSelection::deselectComponent(), MeshGui::ViewProviderMesh::deselectComponent(), Mesh::Curvature::execute(), Mesh::SegmentByMesh::execute(), Mesh::SetOperations::execute(), MeshGui::ViewProviderMesh::faceInfo(), MeshGui::ViewProviderMesh::fillHole(), MeshGui::ViewProviderMesh::getFacetsFromPolygon(), MeshGui::ViewProviderMeshNode::handleEvent(), Inspection::InspectNominalFastMesh::InspectNominalFastMesh(), MeshGui::ViewProviderMesh::invertSelection(), MeshGui::ViewProviderMesh::isFacetSelected(), MeshGui::RemeshGmsh::loadOutput(), MeshPartGui::Mesh2ShapeGmsh::loadOutput(), MeshGui::SoFCMeshPickNode::notify(), MeshGui::DlgEvaluateMeshImp::on_analyzeDegeneratedButton_clicked(), MeshGui::DlgEvaluateMeshImp::on_analyzeDuplicatedFacesButton_clicked(), MeshGui::DlgEvaluateMeshImp::on_analyzeDuplicatedPointsButton_clicked(), MeshGui::DlgEvaluateMeshImp::on_analyzeFoldsButton_clicked(), MeshGui::DlgEvaluateMeshImp::on_analyzeIndicesButton_clicked(), MeshGui::DlgEvaluateMeshImp::on_analyzeNonmanifoldsButton_clicked(), MeshGui::DlgEvaluateMeshImp::on_analyzeOrientationButton_clicked(), MeshGui::DlgEvaluateMeshImp::on_analyzeSelfIntersectionButton_clicked(), MeshGui::DlgEvaluateMeshImp::on_repairAllTogether_clicked(), MeshGui::SoFCMeshPickNode::pick(), MeshGui::ViewProviderMesh::segmentMesh(), MeshGui::MeshSelection::selectComponent(), MeshGui::ViewProviderMesh::selectComponent(), MeshGui::DlgEvaluateMeshImp::showInformation(), MeshGui::ViewProviderMesh::splitMesh(), and MeshGui::PropertyMeshKernelItem::value().
const MeshCore::MeshKernel & Mesh::MeshObject::getKernel | ( | ) | const |
|
virtual |
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?
Implements Base::Persistence.
Mesh::Facet MeshObject::getMeshFacet | ( | FacetIndex | index | ) | const |
MeshPoint MeshObject::getMeshPoint | ( | PointIndex | index | ) | const |
References getPoint().
Base::Vector3d MeshObject::getPoint | ( | PointIndex | index | ) | const |
References Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
Referenced by ArchStructure.CommandStructuralSystem::Activated(), PathScripts.PathOpGui.TaskPanelBaseLocationPage::addLocation(), PathScripts.PathDressupTagGui.PathDressupTagTaskPanel::addNewTag(), PathScripts.PathOpGui.TaskPanelBaseLocationPage::editLocation(), PathScripts.PathDressupTagGui.PathDressupTagTaskPanel::editTag(), getFaces(), getMeshPoint(), draftguitools.gui_arcs.Arc_3Points::getPoint(), ArchCurtainWall.CommandArchCurtainWall::getPoint(), ArchTruss.CommandArchTruss::getPoint(), getPoints(), PathScripts.PathDressupTagGui.PathDressupTagTaskPanel::modifyStandardButtons(), and PathScripts.PathOpGui.TaskPanelBaseLocationPage::modifyStandardButtons().
unsigned long MeshObject::getPointDegree | ( | const std::vector< FacetIndex > & | facets, |
std::vector< PointIndex > & | point_degree | ||
) | const |
Checks for the given facet indices what will be the degree for each point when these facets are removed from the mesh kernel.
The point degree information is stored in point_degree. The return value gives the number of points which will have a degree of zero.
Referenced by MeshGui::ViewProviderMesh::removeFacets().
Base::Vector3d MeshObject::getPointNormal | ( | PointIndex | index | ) | const |
std::vector< Base::Vector3d > MeshObject::getPointNormals | ( | ) | const |
|
virtual |
Get points from object with given accuracy.
Reimplemented from Data::ComplexGeoData.
References getPoint(), Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
std::vector< PointIndex > MeshObject::getPointsFromFacets | ( | const std::vector< FacetIndex > & | facets | ) | const |
void MeshObject::getPointsFromSelection | ( | std::vector< PointIndex > & | inds | ) | const |
References MeshCore::MeshAlgorithm::GetPointsFlag(), and MeshCore::MeshPoint::SELECTED.
Segment & MeshObject::getSegment | ( | unsigned long | index | ) |
const Segment & MeshObject::getSegment | ( | unsigned long | index | ) | const |
std::vector< Segment > MeshObject::getSegmentsOfType | ( | MeshObject::GeometryType | type, |
float | dev, | ||
unsigned long | minFacets | ||
) | const |
References CYLINDER, MeshCore::MeshSegmentAlgorithm::FindSegments(), PLANE, and SPHERE.
|
virtual |
get the subelement by type and number
Implements Data::ComplexGeoData.
References countSegments(), getSegment(), Mesh::MeshSegment::mesh, MeshObject(), Mesh::MeshSegment::segment, and Segment.
double MeshObject::getSurface | ( | ) | const |
|
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.
Implements Data::ComplexGeoData.
Referenced by MeshPartGui::CurveOnMeshHandler::Private::createGrid(), Inspection::InspectActualMesh::InspectActualMesh(), Inspection::InspectNominalFastMesh::InspectNominalFastMesh(), and Inspection::InspectNominalMesh::InspectNominalMesh().
double MeshObject::getVolume | ( | void | ) | const |
void MeshObject::harmonizeNormals | ( | ) |
References MeshCore::MeshTopoAlgorithm::HarmonizeNormals().
Referenced by MeshGui::RemeshGmsh::loadOutput(), and MeshPartGui::Mesh2ShapeGmsh::loadOutput().
bool MeshObject::hasCorruptedFacets | ( | ) | const |
References MeshCore::MeshEvalCorruptedFacets::Evaluate().
bool MeshObject::hasFacetsOutOfRange | ( | ) | const |
References MeshCore::MeshEvalRangeFacet::Evaluate().
bool MeshObject::hasInvalidNeighbourhood | ( | ) | const |
References MeshCore::MeshEvalNeighbourhood::Evaluate().
bool MeshObject::hasInvalidPoints | ( | ) | const |
References MeshCore::MeshEvalNaNPoints::GetIndices().
bool MeshObject::hasNonManifolds | ( | ) | const |
References MeshCore::MeshEvalTopology::Evaluate().
bool MeshObject::hasPointsOnEdge | ( | ) | const |
References MeshCore::MeshEvalPointOnEdge::Evaluate().
bool MeshObject::hasPointsOutOfRange | ( | ) | const |
References MeshCore::MeshEvalRangePoint::Evaluate().
bool MeshObject::hasSelectedFacets | ( | ) | const |
bool MeshObject::hasSelectedPoints | ( | ) | const |
References countSelectedPoints().
bool MeshObject::hasSelfIntersections | ( | ) | const |
References MeshCore::MeshEvalSelfIntersection::Evaluate().
MeshObject * MeshObject::inner | ( | const MeshObject & | mesh | ) | const |
References MeshCore::SetOperations::Do(), MeshCore::SetOperations::Inner, MeshObject(), and MeshCore::MeshKernel::Transform().
Referenced by cut().
void MeshObject::insertVertex | ( | FacetIndex | facet, |
const Base::Vector3f & | v | ||
) |
References MeshCore::MeshTopoAlgorithm::InsertVertex().
MeshObject * MeshObject::intersect | ( | const MeshObject & | mesh | ) | const |
bool MeshObject::isSolid | ( | ) | const |
References MeshCore::MeshEvalSolid::Evaluate().
bool MeshObject::load | ( | const char * | file, |
MeshCore::Material * | mat = nullptr |
||
) |
References MeshCore::Material::binding, Base::FileInfo::dirPath(), MeshCore::MeshOutput::GetFormat(), MeshCore::MeshInput::GetGroupNames(), MeshCore::Material::library, MeshCore::MeshInput::LoadAny(), MeshCore::MeshInput::LoadMTL(), MeshCore::MeshIO::OBJ, MeshCore::MeshIO::PER_FACE, and Base::FileInfo::setFile().
Referenced by draftguitools.gui_setstyle.Draft_SetStyle_TaskPanel::loadDefaults(), draftguitools.gui_setstyle.Draft_SetStyle_TaskPanel::onLoadStyle(), draftguitools.gui_setstyle.Draft_SetStyle_TaskPanel::onSaveStyle(), RestoreDocFile(), and Sandbox::MeshLoaderThread::run().
void MeshObject::load | ( | std::istream & | in | ) |
References Base::Console(), MeshCore::MeshEvalTopology::Evaluate(), MeshCore::MeshEvalNeighbourhood::Evaluate(), Base::ConsoleSingleton::Log(), and Base::ConsoleSingleton::Warning().
Referenced by draftguitools.gui_setstyle.Draft_SetStyle_TaskPanel::loadDefaults(), draftguitools.gui_setstyle.Draft_SetStyle_TaskPanel::onLoadStyle(), and draftguitools.gui_setstyle.Draft_SetStyle_TaskPanel::onSaveStyle().
bool MeshObject::load | ( | std::istream & | str, |
MeshCore::MeshIO::Format | f, | ||
MeshCore::Material * | mat = nullptr |
||
) |
References MeshCore::MeshInput::GetGroupNames(), and MeshCore::MeshInput::LoadFormat().
Referenced by draftguitools.gui_setstyle.Draft_SetStyle_TaskPanel::loadDefaults(), draftguitools.gui_setstyle.Draft_SetStyle_TaskPanel::onLoadStyle(), and draftguitools.gui_setstyle.Draft_SetStyle_TaskPanel::onSaveStyle().
void MeshObject::mergeFacets | ( | ) |
References MeshCore::MeshFixMergeFacets::Fixup().
MeshObject * MeshObject::meshFromSegment | ( | const std::vector< FacetIndex > & | indices | ) | const |
References MeshCore::MeshKernel::Merge(), and MeshObject().
Referenced by MeshGui::ViewProviderMesh::splitMesh().
void MeshObject::movePoint | ( | PointIndex | index, |
const Base::Vector3d & | v | ||
) |
References Data::ComplexGeoData::transformToInside(), and draftgeoutils.general::vec().
void MeshObject::offset | ( | float | fSize | ) |
void MeshObject::offsetSpecial | ( | float | fSize, |
float | zmax, | ||
float | zmin | ||
) |
References Base::Vector3< _Precision >::Normalize(), and Base::Vector3< _Precision >::z.
void MeshObject::offsetSpecial2 | ( | float | fSize | ) |
References Base::Builder3D::addSingleLine(), Base::Builder3D::addSinglePoint(), MeshCore::MeshTopoAlgorithm::Cleanup(), MeshCore::MeshTopoAlgorithm::CollapseFacet(), MeshCore::MeshGeomFacet::GetGravityPoint(), MeshCore::MeshEvalSelfIntersection::GetIntersections(), MeshCore::MeshGeomFacet::GetNormal(), MeshCore::MeshFacetIterator::Init(), MeshCore::MeshFacet::INVALID, MeshCore::MeshGeomFacet::IsFlag(), Base::Vector3< _Precision >::Length(), MeshCore::MeshFacetIterator::More(), MeshCore::MeshFacetIterator::Next(), Base::Vector3< _Precision >::Normalize(), MeshCore::MeshFacetIterator::Position(), and Base::Builder3D::saveToLog().
void MeshObject::operator= | ( | const MeshObject & | mesh | ) |
References setTransform().
void MeshObject::optimizeEdges | ( | ) |
void MeshObject::optimizeTopology | ( | float | fMaxAngle | ) |
References MeshCore::MeshTopoAlgorithm::OptimizeTopology().
MeshObject * MeshObject::outer | ( | const MeshObject & | mesh | ) | const |
const_point_iterator Mesh::MeshObject::points_begin | ( | ) | const |
const_point_iterator Mesh::MeshObject::points_end | ( | ) | const |
void MeshObject::refine | ( | ) |
void MeshObject::removeComponents | ( | unsigned long | count | ) |
References MeshCore::MeshTopoAlgorithm::FindComponents().
void MeshObject::removeDuplicatedFacets | ( | ) |
References MeshCore::MeshFixDuplicateFacets::Fixup().
void MeshObject::removeDuplicatedPoints | ( | ) |
References MeshCore::MeshFixDuplicatePoints::Fixup().
void MeshObject::removeFacetsFromSelection | ( | const std::vector< FacetIndex > & | inds | ) | const |
void MeshObject::removeFoldsOnSurface | ( | ) |
References deleteFacets(), MeshCore::MeshEvalFoldsOnSurface::Evaluate(), MeshCore::MeshEvalFoldsOnBoundary::Evaluate(), MeshCore::MeshEvalFoldOversOnSurface::Evaluate(), MeshCore::MeshEvalFoldsOnSurface::GetIndices(), MeshCore::MeshEvalFoldsOnBoundary::GetIndices(), and MeshCore::MeshEvalFoldOversOnSurface::GetIndices().
void MeshObject::removeFullBoundaryFacets | ( | ) |
References deleteFacets().
void MeshObject::removeInvalidPoints | ( | ) |
References deletePoints(), and MeshCore::MeshEvalNaNPoints::GetIndices().
void MeshObject::removeNeedles | ( | float | length | ) |
References MeshCore::MeshRemoveNeedles::Fixup().
void MeshObject::removeNonManifoldPoints | ( | ) |
void MeshObject::removeNonManifolds | ( | ) |
void MeshObject::removePointsFromSelection | ( | const std::vector< PointIndex > & | inds | ) | const |
References MeshCore::MeshAlgorithm::ResetPointsFlag(), and MeshCore::MeshPoint::SELECTED.
void MeshObject::removePointsOnEdge | ( | bool | fillBoundary | ) |
References MeshCore::MeshFixPointOnEdge::Fixup().
void MeshObject::removeSelfIntersections | ( | ) |
void MeshObject::removeSelfIntersections | ( | const std::vector< FacetIndex > & | indices | ) |
References MeshCore::MeshFixSelfIntersection::Fixup().
std::string MeshObject::representation | ( | ) | const |
Referenced by ifc4.ifcproduct::placementforshaperepresentation(), automotive_design.motion_link_relationship::wr1(), automotive_design.pcurve::wr1(), automotive_design.degenerate_pcurve::wr1(), config_control_design.pcurve::wr1(), config_control_design.degenerate_pcurve::wr1(), ifc2x3.ifcproduct::wr1(), automotive_design.pcurve::wr2(), automotive_design.degenerate_pcurve::wr2(), config_control_design.pcurve::wr2(), and config_control_design.degenerate_pcurve::wr2().
|
virtual |
This method is used to restore properties from an XML document.
It uses the XMLReader class, which bases on SAX, to read the in Save() written information. Again the Vector as an example:
Implements Base::Persistence.
|
virtual |
This method is used to restore large amounts of data from a file In this method you simply stream in your SaveDocFile() saved data.
Again you have to apply for the call of this method in the Restore() call:
After you issued the reader.addFile() your RestoreDocFile() is called:
Reimplemented from Base::Persistence.
References load().
|
virtual |
This method is used to save properties to an XML document.
A good example you'll find in PropertyStandard.cpp, e.g. the vector:
The writer.ind() expression writes the indentation, just for pretty printing of the XML. As you see, the writing of the XML document is not done with a DOM implementation because of performance reasons. Therefore the programmer has to take care that a valid XML document is written. This means closing tags and writing UTF-8.
Implements Base::Persistence.
void MeshObject::save | ( | const char * | file, |
MeshCore::MeshIO::Format | f = MeshCore::MeshIO::Undefined , |
||
const MeshCore::Material * | mat = nullptr , |
||
const char * | objectname = nullptr |
||
) | const |
References MeshCore::Material::binding, Base::FileInfo::dirPath(), Base::FileInfo::fileNamePure(), MeshCore::MeshOutput::GetFormat(), MeshCore::Group::indices, MeshCore::Material::library, MeshCore::MeshIO::OBJ, MeshCore::MeshIO::PER_FACE, MeshCore::MeshOutput::SaveAny(), MeshCore::MeshOutput::SaveMTL(), Base::FileInfo::setFile(), MeshCore::MeshOutput::SetGroups(), MeshCore::MeshOutput::SetObjectName(), MeshCore::MeshOutput::Transform(), and MeshCore::MeshIO::Undefined.
Referenced by Mesh::Export::execute(), Mod.Show.mTempoVis.TempoVis::modify(), Mod.Show.mTempoVis.TempoVis::modifyVPProperty(), draftguitools.gui_setstyle.Draft_SetStyle_TaskPanel::onSaveStyle(), Mod.Show.mTempoVis.TempoVis::saveCamera(), and Mesh::MergeExporter::~MergeExporter().
void MeshObject::save | ( | std::ostream & | out | ) | const |
void MeshObject::save | ( | std::ostream & | str, |
MeshCore::MeshIO::Format | f, | ||
const MeshCore::Material * | mat = nullptr , |
||
const char * | objectname = nullptr |
||
) | const |
References MeshCore::Group::indices, MeshCore::MeshOutput::SaveFormat(), MeshCore::MeshOutput::SetGroups(), MeshCore::MeshOutput::SetObjectName(), and MeshCore::MeshOutput::Transform().
Referenced by Mod.Show.mTempoVis.TempoVis::modify(), Mod.Show.mTempoVis.TempoVis::modifyVPProperty(), draftguitools.gui_setstyle.Draft_SetStyle_TaskPanel::onSaveStyle(), and Mod.Show.mTempoVis.TempoVis::saveCamera().
|
virtual |
This method is used to save large amounts of data to a binary file.
Sometimes it makes no sense to write property data as XML. In case the amount of data is too big or the data type has a more effective way to save itself. In this cases it is possible to write the data in a separate file inside the document archive. In case you want do so you have to re-implement SaveDocFile(). First, you have to inform the framework in Save() that you want do so. Here an example from the Mesh module which can save a (pontetionaly big) triangle mesh:
The writer.isForceXML() is an indication to force you to write XML. Regardless of size and effectiveness. The second part informs the Base::writer through writer.addFile("MeshKernel.bms", this) that this object wants to write a file with the given name. The method addFile() returns a unique name that then is written in the XML stream. This allows your RestoreDocFile() method to identify and read the file again. Later your SaveDocFile() method is called as many times as you issued the addFile() call:
In this method you can simply stream your content to the file (Base::Writer inheriting from ostream).
Reimplemented from Base::Persistence.
References Base::Writer::Stream().
std::vector< std::vector< Base::Vector3f > > MeshObject::section | ( | const MeshObject & | mesh, |
bool | connectLines, | ||
float | fMinDist | ||
) | const |
const_segment_iterator Mesh::MeshObject::segments_begin | ( | ) | const |
const_segment_iterator Mesh::MeshObject::segments_end | ( | ) | const |
void MeshObject::setFacets | ( | const std::vector< Data::ComplexGeoData::Facet > & | facets, |
const std::vector< Base::Vector3d > & | points | ||
) |
void MeshObject::setFacets | ( | const std::vector< MeshCore::MeshGeomFacet > & | facets | ) |
void MeshObject::setKernel | ( | const MeshCore::MeshKernel & | m | ) |
Referenced by Mesh::MergeExporter::addMesh().
void MeshObject::setPoint | ( | PointIndex | index, |
const Base::Vector3d & | v | ||
) |
|
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.
Implements Data::ComplexGeoData.
Referenced by clear(), operator=(), and transformToEigenSystem().
void MeshObject::smooth | ( | int | iterations, |
float | d_max | ||
) |
void MeshObject::snapVertex | ( | FacetIndex | facet, |
const Base::Vector3f & | v | ||
) |
References MeshCore::MeshTopoAlgorithm::SnapVertex().
void MeshObject::splitEdge | ( | FacetIndex | facet, |
FacetIndex | neighbour, | ||
const Base::Vector3f & | v | ||
) |
References MeshCore::MeshTopoAlgorithm::SplitEdge().
void MeshObject::splitEdges | ( | ) |
void MeshObject::splitFacet | ( | FacetIndex | facet, |
const Base::Vector3f & | v1, | ||
const Base::Vector3f & | v2 | ||
) |
References MeshCore::MeshTopoAlgorithm::SplitFacet().
MeshObject * MeshObject::subtract | ( | const MeshObject & | mesh | ) | const |
void MeshObject::swap | ( | MeshCore::MeshKernel & | Kernel | ) |
Swaps the content of Kernel and the internal mesh kernel.
Referenced by MeshGui::Segmentation::accept(), MeshGui::SegmentationBestFit::accept(), ReverseEngineeringGui::Segmentation::accept(), MeshPart::BrepMesh::create(), ReverseEngineeringGui::SegmentationManual::createSegment(), and transformGeometry().
void MeshObject::swap | ( | MeshObject & | mesh | ) |
void MeshObject::swapEdge | ( | FacetIndex | facet, |
FacetIndex | neighbour | ||
) |
References MeshCore::MeshTopoAlgorithm::SwapEdge().
std::string MeshObject::topologyInfo | ( | ) | const |
|
virtual |
Applies a transformation on the real geometric data type.
Implements Data::ComplexGeoData.
References swap(), and MeshCore::MeshKernel::Transform().
void MeshObject::transformToEigenSystem | ( | ) |
void MeshObject::trim | ( | const Base::Polygon2d & | polygon, |
const Base::ViewProjMethod & | proj, | ||
MeshObject::CutType | type | ||
) |
References deleteFacets(), MeshCore::MeshTrimming::INNER, INNER, MeshCore::MeshTrimming::OUTER, OUTER, and trim().
Referenced by trim(), and trimByPlane().
void MeshObject::trimByPlane | ( | const Base::Vector3f & | base, |
const Base::Vector3f & | normal | ||
) |
References deleteFacets(), and trim().
MeshObject * MeshObject::unite | ( | const MeshObject & | mesh | ) | const |
void MeshObject::validateCaps | ( | float | fMaxAngle, |
float | fSplitFactor | ||
) |
References MeshCore::MeshFixCaps::Fixup().
void MeshObject::validateDeformations | ( | float | fMaxAngle, |
float | fEps | ||
) |
References MeshCore::MeshFixDeformedFacets::Fixup(), and Base::toRadians().
void MeshObject::validateDegenerations | ( | float | fEps | ) |
References MeshCore::MeshFixDegeneratedFacets::Fixup().
void MeshObject::validateIndices | ( | ) |
Referenced by getSubElement().