The MeshKernel class is the basic class that holds the data points, the edges and the facets describing a mesh object. More...
#include <MeshKernel.h>
Public Member Functions | |
MeshKernel (const MeshKernel &rclMesh) | |
Construction. | |
MeshKernel (void) | |
Construction. | |
~MeshKernel (void) | |
Destruction. | |
Modification | |
void | AddFacet (const MeshGeomFacet &rclSFacet) |
Adds a single facet to the data structure. | |
unsigned long | AddFacets (const std::vector< MeshFacet > &rclFAry, const std::vector< Base::Vector3f > &rclPAry) |
Adds new points and facets to the data structure. | |
unsigned long | AddFacets (const std::vector< MeshFacet > &rclFAry) |
Adds an array of topologic facets to the data structure without inserting new points. | |
void | AddFacets (const std::vector< MeshGeomFacet > &rclFAry) |
Adds an array of facets to the data structure. | |
void | Adopt (MeshPointArray &rPoints, MeshFacetArray &rFaces, bool checkNeighbourHood=false) |
This method does basically the same as Assign() unless that it swaps the content of both arrays. | |
void | Assign (const MeshPointArray &rPoints, const MeshFacetArray &rFaces, bool checkNeighbourHood=false) |
This allows to assign the mesh structure directly. | |
void | Clear (void) |
Clears the whole data structure. | |
void | CutFacets (const MeshFacetGrid &rclGrid, const Base::ViewProjMethod *pclP, const Base::Polygon2D &rclPoly, bool bCutInner, std::vector< unsigned long > &raclCutted) |
Does basically the same as method above unless that the facets to be deleted are returned with their index number in the facet array of the mesh structure. | |
void | CutFacets (const MeshFacetGrid &rclGrid, const Base::ViewProjMethod *pclP, const Base::Polygon2D &rclPoly, bool bCutInner, std::vector< MeshGeomFacet > &raclFacets) |
CheckFacets() is invoked within this method and all found facets get deleted from the mesh structure. | |
bool | DeleteFacet (unsigned long ulInd) |
Does basically the same as the method above unless that the index of the facet is given. | |
bool | DeleteFacet (const MeshFacetIterator &rclIter) |
Deletes the facet the iterator points to. | |
void | DeleteFacets (const std::vector< unsigned long > &raulFacets) |
Removes several facets from the data structure. | |
bool | DeletePoint (unsigned long ulInd) |
Does basically the same as the method above unless that the index of the facet is given. | |
bool | DeletePoint (const MeshPointIterator &rclIter) |
Deletes the point the iterator points to. | |
void | DeletePoints (const std::vector< unsigned long > &raulPoints) |
Removes several points from the data structure. | |
void | Merge (const MeshPointArray &rPoints, const MeshFacetArray &rFaces) |
This method is provided for convenience that directly accepts the point and facet arrays. | |
void | Merge (const MeshKernel &rKernel) |
Adds all facets and referenced points to the underlying mesh structure. | |
void | MovePoint (unsigned long ulPtIndex, const Base::Vector3f &rclTrans) |
Moves the point at the given index along the vector rclTrans. | |
void | operator*= (const Base::Matrix4D &rclMat) |
Transform the data structure with the given transformation matrix. | |
MeshKernel & | operator+= (const std::vector< MeshGeomFacet > &rclFAry) |
Adds an array of facets to the data structure. | |
MeshKernel & | operator+= (const MeshGeomFacet &rclSFacet) |
Adds a single facet to the data structure. | |
MeshKernel & | operator= (const MeshKernel &rclMesh) |
Assignment operator. | |
MeshKernel & | operator= (const std::vector< MeshGeomFacet > &rclFAry) |
Replaces the current data structure with the structure built up of the array of triangles given in rclFAry. | |
void | RebuildNeighbours (void) |
Rebuilds the neighbour indices for all facets. | |
void | SetPoint (unsigned long ulPtIndex, float x, float y, float z) |
Sets the point at the given index to the new rPoint. | |
void | SetPoint (unsigned long ulPtIndex, const Base::Vector3f &rPoint) |
Sets the point at the given index to the new rPoint. | |
void | Smooth (int iterations, float d_max) |
Smothes the mesh kernel. | |
void | Swap (MeshKernel &mesh) |
Swaps the content of this kernel and mesh. | |
void | Transform (const Base::Matrix4D &rclMat) |
Transform the data structure with the given transformation matrix. | |
Querying | |
std::vector< Base::Vector3f > | CalcVertexNormals () const |
Returns an array of the vertex normals of the mesh. | |
unsigned long | CountEdges (void) const |
Returns the number of edge. | |
unsigned long | CountFacets (void) const |
Returns the number of facets. | |
unsigned long | CountPoints (void) const |
const Base::BoundBox3f & | GetBoundBox (void) const |
Determines the bounding box. | |
void | GetEdges (std::vector< MeshGeomEdge > &) const |
Returns the array of all edges. | |
MeshGeomFacet | GetFacet (const MeshFacet &rclFacet) const |
MeshGeomFacet | GetFacet (unsigned long ulIndex) const |
Returns the facet at the given index. | |
void | GetFacetNeighbours (unsigned long ulIndex, unsigned long &rulNIdx0, unsigned long &rulNIdx1, unsigned long &rulNIdx2) const |
Returns the indices of the neighbour facets of the given facet index. | |
std::vector< unsigned long > | GetFacetPoints (const std::vector< unsigned long > &) const |
Returns the point indices of the given facet indices. | |
void | GetFacetPoints (unsigned long ulFaIndex, unsigned long &rclP0, unsigned long &rclP1, unsigned long &rclP2) const |
Returns the point indices of the given facet index. | |
MeshFacetArray | GetFacets (const std::vector< unsigned long > &) const |
Returns an array of facets to the given indices. | |
const MeshFacetArray & | GetFacets (void) const |
Returns the array of all facets. | |
unsigned int | GetMemSize (void) const |
Returns the number of required memory in bytes. | |
MeshPoint | GetPoint (unsigned long ulIndex) const |
Returns the point at the given index. | |
const MeshPointArray & | GetPoints (void) const |
Returns the array of all data points. | |
std::vector< unsigned long > | HasFacets (const MeshPointIterator &rclIter) const |
Determines all facets that are associated to this point. | |
bool | IsValid (void) const |
Returns true if the data structure is valid. | |
void | RecalcBoundBox (void) |
Forces a recalculation of the bounding box. | |
Iterators | |
The iterator methods are provided for convenience. They return an iterator object that points to the first element in the appropriate list. MeshKernel mesh = ... // iterate over all facets for ( MeshFacetIterator it = mesh.FacetIterator(); it.More(); it.Next() ) ... An iterator can also be used in the following way MeshKernel mesh = ... // iterate over all facets MeshFacetIterator it(mesh); for ( it.Init(); it.More(); it.Next() ) ... | |
MeshFacetIterator | FacetIterator () const |
Returns an iterator object to go over all facets. | |
MeshPointIterator | PointIterator () const |
Returns an iterator object to go over all points. | |
Evaluation | |
float | GetSurface (const std::vector< unsigned long > &aSegment) const |
Calculates the surface area of the segment defined by aSegment. | |
float | GetSurface () const |
Calculates the surface area of the mesh object. | |
float | GetVolume () const |
Calculates the volume of the mesh object. | |
bool | HasNonManifolds () const |
Checks whether the mesh has non.manifold edges. | |
bool | HasOpenEdges () const |
Checks whether the mesh has open edges. | |
bool | HasSelfIntersections () const |
Checks whether the mesh intersects itself. | |
I/O methods | |
void | Read (std::istream &rclIn) |
void | Write (std::ostream &rclOut) const |
Binary streaming of data. | |
Facet visitors | |
The MeshKernel class provides different methods to visit "topologic connected" facets to a given start facet. Two facets are regarded as "topologic connected" if they share a common edge or a common point. All methods expect a MeshFacetVisitor as argument that can decide to continue or to stop. If there is no topologic neighbour facet any more being not marked as "VISIT" the algorithm stops anyway.
| |
unsigned long | VisitNeighbourFacets (MeshFacetVisitor &rclFVisitor, unsigned long ulStartFacet) const |
This method visits all neighbour facets, i.e facets that share a common edge starting from the facet associated to index ulStartFacet. | |
unsigned long | VisitNeighbourFacetsOverCorners (MeshFacetVisitor &rclFVisitor, unsigned long ulStartFacet) const |
Does basically the same as the method above unless the facets that share just a common point are regared as neighbours. | |
Point visitors | |
The MeshKernel class provides a method to visit neighbour points to a given start point. Two points are regarded as neighbours if they share an edge. The method expects a MeshPointVisitor as argument that can decide to continue or to stop. If there is no topologic neighbour point any more being not marked as "VISIT" the algorithm stops anyway. | |
unsigned long | VisitNeighbourPoints (MeshPointVisitor &rclPVisitor, unsigned long ulStartPoint) const |
This method visits all neighbour points starting from the point associated to index ulStartPoint. | |
Protected Member Functions | |
void | AdjustNormal (MeshFacet &rclFacet, const Base::Vector3f &rclNormal) |
Adjusts the facet's orierntation to the given normal direction. | |
void | ErasePoint (unsigned long ulIndex, unsigned long ulFacetIndex, bool bOnlySetInvalid=false) |
Checks if this point is associated to no other facet and deletes if so. | |
Base::Vector3f | GetGravityPoint (const MeshFacet &rclFacet) const |
Calculates the gravity point to the given facet. | |
Base::Vector3f | GetNormal (const MeshFacet &rclFacet) const |
Calculates the normal to the given facet. | |
void | RebuildNeighbours (unsigned long) |
Rebuilds the neighbour indices for subset of all facets from index index on. | |
void | RemoveInvalids () |
Removes all as INVALID marked points and facets from the structure. | |
Protected Attributes | |
MeshFacetArray | _aclFacetArray |
Holds the array of facets. | |
MeshPointArray | _aclPointArray |
Holds the array of geometric points. | |
bool | _bValid |
Current state of validality. | |
Base::BoundBox3f | _clBoundBox |
The current calculated bounding box. | |
Friends | |
class | MeshAlgorithm |
class | MeshBuilder |
class | MeshFacetIterator |
class | MeshFastFacetIterator |
class | MeshFixDegeneratedFacets |
class | MeshFixDegenerations |
class | MeshFixDuplicatePoints |
class | MeshFixInvalids |
class | MeshFixNeighbourhood |
class | MeshFixSingleFacet |
class | MeshPointIterator |
class | MeshTopoAlgorithm |
The MeshKernel class is the basic class that holds the data points, the edges and the facets describing a mesh object.
The bounding box is calculated during the buildup of the data structure and gets only re-caclulated after insertion of new facets but not after removal of facets.
This class provides only some rudimental querying methods.
Definition at line 64 of file MeshKernel.h.
MeshKernel::MeshKernel | ( | void | ) |
Construction.
Definition at line 49 of file MeshKernel.cpp.
References _clBoundBox, and Base::BoundBox3< _Precision >::Flush().
MeshKernel::MeshKernel | ( | const MeshKernel & | rclMesh | ) |
Construction.
Definition at line 55 of file MeshKernel.cpp.
MeshCore::MeshKernel::~MeshKernel | ( | void | ) | [inline] |
Destruction.
Definition at line 72 of file MeshKernel.h.
void MeshKernel::AddFacet | ( | const MeshGeomFacet & | rclSFacet | ) |
Adds a single facet to the data structure.
This method is very slow and should be called occassionally only. This does the same as the += operator above.
Definition at line 115 of file MeshKernel.cpp.
References _aclFacetArray, _aclPointArray, MeshCore::MeshGeomFacet::_aclPoints, MeshCore::MeshFacet::_aulNeighbours, MeshCore::MeshFacet::_aulPoints, _clBoundBox, AdjustNormal(), MeshCore::MeshGeomFacet::GetNormal(), and MeshCore::MeshPointArray::GetOrAddIndex().
Referenced by Mesh::MeshObject::addFacet(), operator+=(), and SpringbackCorrection::SmoothMesh().
unsigned long MeshKernel::AddFacets | ( | const std::vector< MeshFacet > & | rclFAry, | |
const std::vector< Base::Vector3f > & | rclPAry | |||
) |
Adds new points and facets to the data structure.
The client programmer must make sure that all new points are referenced by the new facets. All points in rclPAry get copied at the end of the internal point array to keep their order. The point indices of the facets must be related to the internal point array, not the passed array rclPAry.
Example: We have a mesh with p points and f facets where we want append new points and facets to. Let's assume that the first facet of rclFAry refereneces the 1st, 2nd and 3rd points of rclPAry then its indices must be p, p+1, p+2 -- not 0,1,2. This is due to the fact that facets of rclFAry can also reference point indices of the internal point array.
Definition at line 318 of file MeshKernel.cpp.
References _aclPointArray, _clBoundBox, and AddFacets().
unsigned long MeshKernel::AddFacets | ( | const std::vector< MeshFacet > & | rclFAry | ) |
Adds an array of topologic facets to the data structure without inserting new points.
Facets which would create non-manifolds are not inserted. The client programmer must make sure that the referenced point indices are correct and that no geometric overlaps can be created. The method returns the total number of facets. This method might be useful to close gaps or fill up holes in a mesh.
Definition at line 175 of file MeshKernel.cpp.
References _aclFacetArray, _aclPointArray, CountFacets(), CountPoints(), MeshCore::MeshPoint::INVALID, MeshCore::MeshFacet::INVALID, k, MeshCore::MeshPointArray::ResetInvalid(), MeshCore::MeshPointArray::SetFlag(), and MeshCore::MeshFacetArray::SetProperty().
void MeshKernel::AddFacets | ( | const std::vector< MeshGeomFacet > & | rclFAry | ) |
Adds an array of facets to the data structure.
This method keeps temporarily set properties and flags. This does the same as the += operator above.
Definition at line 165 of file MeshKernel.cpp.
References Merge().
Referenced by AddFacets(), Mesh::MeshObject::addFacets(), MeshPart::CurveProjectorWithToolMesh::Do(), MeshCore::MeshTopoAlgorithm::FillupHoles(), MeshPart::MeshAlgos::LoftOnCurve(), and operator+=().
void MeshCore::MeshKernel::AdjustNormal | ( | MeshFacet & | rclFacet, | |
const Base::Vector3f & | rclNormal | |||
) | [inline, protected] |
Adjusts the facet's orierntation to the given normal direction.
Definition at line 508 of file MeshKernel.h.
References _aclPointArray, MeshCore::MeshFacet::_aulPoints, and MeshCore::MeshFacet::FlipNormal().
Referenced by AddFacet().
void MeshKernel::Adopt | ( | MeshPointArray & | rPoints, | |
MeshFacetArray & | rFaces, | |||
bool | checkNeighbourHood = false | |||
) |
This method does basically the same as Assign() unless that it swaps the content of both arrays.
These arrays may be empty after assigning to the kernel. This method is a convenient way to build up the mesh structure from outside and assign to a mesh kernel without copying the data. Especially for huge meshes this saves memory and increases speed.
Definition at line 93 of file MeshKernel.cpp.
References _aclFacetArray, _aclPointArray, RebuildNeighbours(), and RecalcBoundBox().
Referenced by MeshPart::Mesher::createMesh(), getBoundary_Conditions(), MeshCore::MeshInput::LoadMeshNode(), MeshCore::MeshInput::LoadOBJ(), MeshCore::MeshInput::LoadPLY(), MeshCore::MeshInput::LoadXML(), minBoundingBox(), MeshGui::SoFCMeshNode::readInstance(), Mesh::Interface< Kernel >::release(), Mesh::PropertyMeshKernel::Restore(), Mesh::MeshObject::setFacets(), and SMESH_PCA().
void MeshKernel::Assign | ( | const MeshPointArray & | rPoints, | |
const MeshFacetArray & | rFaces, | |||
bool | checkNeighbourHood = false | |||
) |
This allows to assign the mesh structure directly.
The caller must make sure that the point indices are correctly set but the neighbourhood gets checked and corrected if checkNeighbourHood is true.
Definition at line 84 of file MeshKernel.cpp.
References _aclFacetArray, _aclPointArray, RebuildNeighbours(), and RecalcBoundBox().
Referenced by SpringbackCorrection::CalcCurv(), import_NASTRAN(), SpringbackCorrection::Init(), SpringbackCorrection::InitFaceCheck(), Approximate::ParameterInnerPoints(), SpringbackCorrection::Perform(), Approximate::Reparam(), SpringbackCorrection::SmoothMesh(), and SpringbackCorrection::SpringbackCorrection().
std::vector< Base::Vector3f > MeshKernel::CalcVertexNormals | ( | ) | const |
Returns an array of the vertex normals of the mesh.
A vertex normal gets calculated by summarizing the normals of the associated facets.
Definition at line 915 of file MeshKernel.cpp.
References CountFacets(), CountPoints(), GetFacetPoints(), GetPoint(), and KDL::Norm().
Referenced by Mesh::MeshObject::getPointNormal(), MeshPart::MeshAlgos::offset(), Mesh::MeshObject::offset(), MeshPart::MeshAlgos::offsetSpecial(), Mesh::MeshObject::offsetSpecial(), MeshPart::MeshAlgos::offsetSpecial2(), and Mesh::MeshObject::offsetSpecial2().
void MeshKernel::Clear | ( | void | ) |
Clears the whole data structure.
Definition at line 388 of file MeshKernel.cpp.
References _aclFacetArray, _aclPointArray, _clBoundBox, and Base::BoundBox3< _Precision >::Flush().
Referenced by Mesh::MeshObject::clear(), MeshPart::MeshAlgos::coarsen(), Mesh::GTSAlgos::coarsen(), cutting_tools::cutting_tools(), MeshCore::SetOperations::Do(), Mesh::GTSAlgos::fillMeshFromGTSSurface(), import_NASTRAN(), MeshCore::MeshBuilder::Initialize(), MeshCore::MeshInput::LoadMeshNode(), MeshCore::MeshInput::LoadOBJ(), MeshCore::MeshInput::LoadPLY(), MeshCore::MeshInput::LoadSTL(), minBoundingBox(), Approximate::ParameterInnerPoints(), and SpringbackCorrection::TransferFaceTriangulationtoFreeCAD().
unsigned long MeshKernel::CountEdges | ( | void | ) | const |
Returns the number of edge.
Definition at line 1035 of file MeshKernel.cpp.
References _aclFacetArray.
Referenced by Mesh::MeshObject::countEdges(), MeshCore::MeshInfo::GeneralInformation(), MeshGui::DlgEvaluateMeshImp::showInformation(), useMesh(), and MeshGui::PropertyMeshKernelItem::value().
unsigned long MeshCore::MeshKernel::CountFacets | ( | void | ) | const [inline] |
Returns the number of facets.
Definition at line 85 of file MeshKernel.h.
Referenced by AddFacets(), Mesh::MeshObject::addSegment(), MeshCore::MeshTopoAlgorithm::AdjustEdgesToCurvatureDirection(), MeshCore::MeshEigensystem::CalculateLocalSystem(), CalcVertexNormals(), MeshCore::MeshAlgorithm::CheckFacets(), Mesh::MeshPy::collapseEdge(), Mesh::MeshObject::countFacets(), Mesh::GTSAlgos::createGTSSurface(), MeshGui::ViewProviderMeshBuilder::createMesh(), MeshCore::MeshInfo::DetailedFacetInfo(), MeshCore::SetOperations::Do(), Mesh::Curvature::execute(), SpringbackCorrection::FaceCheck(), MeshCore::MeshFixDegeneratedFacets::Fixup(), MeshCore::MeshInfo::GeneralInformation(), MeshCore::MeshAlgorithm::GetAverageEdgeLength(), Mesh::MeshObject::getFaces(), MeshCore::MeshAlgorithm::GetFacetsFromToolMesh(), MeshCore::MeshEvalOrientation::GetIndices(), MeshCore::MeshAlgorithm::GetMeshBorders(), Mesh::MeshObject::getSegmentsFromType(), SpringbackCorrection::Init(), SpringbackCorrection::InitFaceCheck(), MeshCore::MeshInfo::InternalFacetInfo(), SpringbackCorrection::Load(), MeshCore::MeshInput::LoadAny(), SpringbackCorrection::MeshCurvature(), MeshCore::MeshAlgorithm::NearestPointFromPoint(), MeshCore::MeshTopoAlgorithm::OptimizeTopology(), MeshCore::MeshFacetGrid::RebuildGrid(), Mesh::MeshObject::refine(), Mesh::MeshObject::removeDuplicatedFacets(), Mesh::MeshObject::removeDuplicatedPoints(), MeshCore::MeshFixDegeneratedFacets::RemoveEdgeTooSmall(), Mesh::MeshObject::removeNonManifolds(), Mesh::MeshObject::removeSelfIntersections(), MeshCore::MeshSearchNeighbours::SampleAllFacets(), MeshVRML::Save(), MeshCore::MeshOutput::SaveAsciiSTL(), MeshCore::MeshOutput::SaveBinarySTL(), MeshCore::MeshOutput::SaveInventor(), MeshCore::MeshOutput::SaveNastran(), MeshCore::MeshOutput::SaveOBJ(), MeshCore::MeshOutput::SaveOFF(), MeshCore::MeshOutput::SavePython(), MeshCore::MeshOutput::SaveXML(), MeshCore::MeshComponents::SearchForComponents(), MeshGui::ViewProviderMesh::segmentMesh(), MeshGui::DlgEvaluateMeshImp::showInformation(), MeshCore::MeshTopoAlgorithm::SnapVertex(), Mesh::MeshPy::splitEdge(), Mesh::MeshPy::splitFacet(), MeshGui::ViewProviderMesh::splitMesh(), SpringbackCorrection::SpringbackCorrection(), Mesh::MeshPy::swapEdge(), useMesh(), MeshCore::MeshFacetGrid::Validate(), Mesh::MeshObject::validateDeformations(), Mesh::MeshObject::validateDegenerations(), Mesh::MeshObject::validateIndices(), MeshGui::PropertyMeshKernelItem::value(), MeshCore::MeshPointGrid::Verify(), MeshCore::MeshFacetGrid::Verify(), and Write().
unsigned long MeshCore::MeshKernel::CountPoints | ( | void | ) | const [inline] |
Definition at line 90 of file MeshKernel.h.
Referenced by AddFacets(), MeshCore::MeshTopoAlgorithm::AdjustEdgesToCurvatureDirection(), Approximate::Approximate(), SpringbackCorrection::CalcCurv(), CalcVertexNormals(), best_fit::Comp_Normals(), UniGridApprox::CompMeshError(), best_fit::CompTotalError(), Mesh::Interface< Kernel >::copy(), Mesh::MeshObject::countPoints(), Mesh::GTSAlgos::createGTSSurface(), MeshGui::ViewProviderMeshBuilder::createMesh(), MeshCore::MeshInfo::DetailedPointInfo(), MeshCore::MeshEvalRangePoint::Evaluate(), MeshCore::MeshEvalFoldsOnSurface::Evaluate(), Mesh::Curvature::execute(), MeshGui::ViewProviderMesh::fillHole(), fit_iter(), MeshCore::MeshInfo::GeneralInformation(), Deviation::GenNormals(), Mesh::MeshObject::getFaces(), MeshCore::MeshEvalRangePoint::GetIndices(), MeshCore::MeshInfo::InternalPointInfo(), SpringbackCorrection::MeshCurvature(), offset_mesh(), Approximate::ParameterBoundary(), SpringbackCorrection::Perform(), MeshCore::MeshPointGrid::RebuildGrid(), MeshVRML::Save(), MeshCore::MeshOutput::SaveInventor(), MeshCore::MeshOutput::SaveOBJ(), MeshCore::MeshOutput::SaveOFF(), MeshCore::MeshOutput::SaveXML(), CamGui::Cutting::selectMesh(), MeshGui::DlgEvaluateMeshImp::showInformation(), MeshCore::MeshSmoothing::Smooth(), useMesh(), MeshCore::MeshPointGrid::Validate(), MeshGui::PropertyMeshKernelItem::value(), and Write().
void MeshKernel::CutFacets | ( | const MeshFacetGrid & | rclGrid, | |
const Base::ViewProjMethod * | pclP, | |||
const Base::Polygon2D & | rclPoly, | |||
bool | bCutInner, | |||
std::vector< unsigned long > & | raclCutted | |||
) |
Does basically the same as method above unless that the facets to be deleted are returned with their index number in the facet array of the mesh structure.
Definition at line 706 of file MeshKernel.cpp.
References DeleteFacets(), and MeshAlgorithm.
void MeshKernel::CutFacets | ( | const MeshFacetGrid & | rclGrid, | |
const Base::ViewProjMethod * | pclP, | |||
const Base::Polygon2D & | rclPoly, | |||
bool | bCutInner, | |||
std::vector< MeshGeomFacet > & | raclFacets | |||
) |
CheckFacets() is invoked within this method and all found facets get deleted from the mesh structure.
The facets to be deleted are returned with their geometric reprsentation.
Definition at line 693 of file MeshKernel.cpp.
References DeleteFacets(), GetFacet(), and MeshAlgorithm.
bool MeshKernel::DeleteFacet | ( | unsigned long | ulInd | ) |
Does basically the same as the method above unless that the index of the facet is given.
Definition at line 438 of file MeshKernel.cpp.
References _aclFacetArray, DeleteFacet(), and MeshCore::MeshFacetIterator::Set().
bool MeshKernel::DeleteFacet | ( | const MeshFacetIterator & | rclIter | ) |
Deletes the facet the iterator points to.
The deletion of a facet requires the following steps:
Definition at line 400 of file MeshKernel.cpp.
References _aclFacetArray, MeshCore::MeshFacetIterator::_clIter, MeshCore::MeshFacetArray::Erase(), ErasePoint(), and MeshCore::MeshFacetIterator::Position().
Referenced by DeleteFacet(), DeletePoint(), MeshCore::MeshTopoAlgorithm::RemoveCorruptedFacet(), and MeshCore::MeshTopoAlgorithm::RemoveDegeneratedFacet().
void MeshKernel::DeleteFacets | ( | const std::vector< unsigned long > & | raulFacets | ) |
Removes several facets from the data structure.
Definition at line 449 of file MeshKernel.cpp.
References _aclFacetArray, _aclPointArray, MeshCore::MeshFacet::_aulPoints, RecalcBoundBox(), RemoveInvalids(), MeshCore::MeshPointArray::ResetInvalid(), MeshCore::MeshFacetArray::ResetInvalid(), MeshCore::MeshFacet::SetInvalid(), and MeshCore::MeshPointArray::SetProperty().
Referenced by CutFacets(), Mesh::MeshObject::deleteFacets(), MeshCore::MeshFixSelfIntersection::Fixup(), MeshCore::MeshFixSingleFacet::Fixup(), MeshCore::MeshFixTopology::Fixup(), MeshCore::MeshFixFoldsOnBoundary::Fixup(), MeshCore::MeshFixFoldsOnSurface::Fixup(), MeshCore::MeshFixDuplicateFacets::Fixup(), MeshCore::MeshTopoAlgorithm::RemoveComponents(), and Mesh::MeshObject::removeComponents().
bool MeshKernel::DeletePoint | ( | unsigned long | ulInd | ) |
Does basically the same as the method above unless that the index of the facet is given.
Definition at line 481 of file MeshKernel.cpp.
References _aclPointArray, DeletePoint(), and MeshCore::MeshPointIterator::Set().
bool MeshKernel::DeletePoint | ( | const MeshPointIterator & | rclIter | ) |
Deletes the point the iterator points to.
The deletion of a point requires the following step:
Definition at line 492 of file MeshKernel.cpp.
References _aclPointArray, MeshCore::MeshPointIterator::_clIter, DeleteFacet(), and MeshCore::MeshFacetIterator::End().
Referenced by DeletePoint().
void MeshKernel::DeletePoints | ( | const std::vector< unsigned long > & | raulPoints | ) |
Removes several points from the data structure.
Definition at line 523 of file MeshKernel.cpp.
References _aclFacetArray, _aclPointArray, MeshCore::MeshPoint::_ulProp, MeshCore::MeshPoint::IsValid(), RecalcBoundBox(), RemoveInvalids(), MeshCore::MeshPointArray::ResetInvalid(), and MeshCore::MeshPointArray::SetProperty().
Referenced by Mesh::MeshObject::deletePoints(), and MeshCore::MeshFixDuplicatePoints::Fixup().
void MeshKernel::ErasePoint | ( | unsigned long | ulIndex, | |
unsigned long | ulFacetIndex, | |||
bool | bOnlySetInvalid = false | |||
) | [protected] |
Checks if this point is associated to no other facet and deletes if so.
The point indices of the facets get adjusted. ulIndex is the index of the point to be deleted. ulFacetIndex is the index of the quasi deleted facet and is ignored. If bOnlySetInvalid is true the point doesn't get deleted but marked as invalid.
Definition at line 557 of file MeshKernel.cpp.
References _aclFacetArray, and _aclPointArray.
Referenced by DeleteFacet().
MeshFacetIterator MeshKernel::FacetIterator | ( | ) | const |
Returns an iterator object to go over all facets.
Definition at line 1002 of file MeshKernel.cpp.
References MeshCore::MeshFacetIterator::Begin().
const Base::BoundBox3f& MeshCore::MeshKernel::GetBoundBox | ( | void | ) | const [inline] |
Determines the bounding box.
Definition at line 97 of file MeshKernel.h.
Referenced by CmdMeshBoundingBox::activated(), Approximate::Approximate(), MeshCore::MeshGrid::CalculateGridLength(), MeshGui::SoFCMeshObjectShape::computeBBox(), MeshGui::SoFCMeshOpenEdge::computeBBox(), MeshGui::SoFCMeshNode::computeBBox(), getBoundary_Conditions(), Mesh::MeshObject::getBoundBox(), MeshCore::MeshAlgorithm::GetFacetsFromToolMesh(), MeshCore::MeshGrid::GetMeshBoundBox(), import_NASTRAN(), MeshCore::MeshGrid::InitGrid(), Inspection::InspectNominalFastMesh::InspectNominalFastMesh(), Inspection::InspectNominalMesh::InspectNominalMesh(), MeshCore::MeshEigensystem::MeshEigensystem(), MeshCore::MeshFacetGrid::MeshFacetGrid(), MeshCore::MeshPointGrid::MeshPointGrid(), minBoundingBox(), Approximate::ParameterBoundary(), MeshVRML::Save(), MeshCore::MeshAlgorithm::Surround(), useMesh(), and MeshVRML::WriteVRMLViewpoints().
void MeshKernel::GetEdges | ( | std::vector< MeshGeomEdge > & | edges | ) | const |
Returns the array of all edges.
Notice: The Edgelist will be temporary generated. Changes on the mesh structure does not affect the Edgelist
Definition at line 1014 of file MeshKernel.cpp.
References _aclFacetArray, _aclPointArray, MeshCore::MeshGeomEdge::_aclPoints, and MeshCore::MeshGeomEdge::_bBorder.
Referenced by MeshCore::MeshEvalSolid::Evaluate().
MeshGeomFacet MeshCore::MeshKernel::GetFacet | ( | const MeshFacet & | rclFacet | ) | const [inline] |
Definition at line 467 of file MeshKernel.h.
References _aclPointArray, MeshCore::MeshGeomFacet::_aclPoints, MeshCore::MeshFacet::_aulPoints, MeshCore::MeshFacet::_ucFlag, and MeshCore::MeshFacet::_ulProp.
MeshGeomFacet MeshCore::MeshKernel::GetFacet | ( | unsigned long | ulIndex | ) | const [inline] |
Returns the facet at the given index.
This method is rather slow and should be called occassionally only. For fast access the MeshFacetIterator interface should be used.
Definition at line 451 of file MeshKernel.h.
References _aclFacetArray, _aclPointArray, MeshCore::MeshGeomFacet::_aclPoints, MeshCore::MeshGeomFacet::_ucFlag, MeshCore::MeshGeomFacet::_ulProp, and MeshCore::MeshGeomFacet::CalcNormal().
Referenced by MeshCore::MeshPlaneVisitor::AllowVisit(), MeshCore::MeshAlgorithm::CheckFacets(), best_fit::Comp_Normals(), CutFacets(), MeshCore::MeshAlgorithm::CutWithPlane(), MeshCore::MeshTopoAlgorithm::DelaunayFlip(), MeshCore::MeshAlgorithm::Distance(), MeshCore::SetOperations::Do(), MeshCore::MeshEvalFoldOversOnSurface::Evaluate(), MeshCore::MeshEvalFoldsOnBoundary::Evaluate(), MeshCore::MeshEvalFoldsOnSurface::Evaluate(), Mesh::SegmentByMesh::execute(), SpringbackCorrection::FaceCheck(), MeshGui::ViewProviderMesh::faceInfo(), MeshCore::MeshAlgorithm::FillupHole(), MeshCore::MeshAlgorithm::FirstFacetToVertex(), fit_iter(), MeshCore::MeshAlgorithm::GetFacetsFromPlane(), MeshCore::MeshRefPointToFacets::GetNormal(), SpringbackCorrection::Init(), SpringbackCorrection::InitFaceCheck(), SpringbackCorrection::Load(), MeshCore::MeshPlaneVisitor::MeshPlaneVisitor(), MeshCore::MeshAlgorithm::NearestFacetOnRay(), MeshCore::MeshAlgorithm::NearestPointFromPoint(), MeshCore::MeshRefPointToFacets::Neighbours(), MeshCore::MeshSearchNeighbours::NeighboursFacetFromFacet(), MeshCore::MeshSearchNeighbours::NeighboursFromFacet(), MeshCore::MeshSearchNeighbours::NeighboursFromSampledFacets(), offset_mesh(), MeshPart::CurveProjectorShape::projectCurve(), MeshCore::MeshAlgorithm::RayNearestField(), MeshCore::MeshRefNormalToPoints::Rebuild(), MeshCore::MeshAlgorithm::SearchFacetsFromPolyline(), MeshCore::MeshFacetGrid::SearchNearestFacetInGrid(), MeshCore::MeshRefPointToFacets::SearchNeighbours(), SpringbackCorrection::SpringbackCorrection(), and MeshCore::MeshPlaneVisitor::Visit().
void MeshCore::MeshKernel::GetFacetNeighbours | ( | unsigned long | ulIndex, | |
unsigned long & | rulNIdx0, | |||
unsigned long & | rulNIdx1, | |||
unsigned long & | rulNIdx2 | |||
) | const [inline] |
Returns the indices of the neighbour facets of the given facet index.
Definition at line 483 of file MeshKernel.h.
References _aclFacetArray.
Referenced by MeshPart::CurveProjectorShape::projectCurve(), and useMesh().
std::vector< unsigned long > MeshKernel::GetFacetPoints | ( | const std::vector< unsigned long > & | facets | ) | const |
Returns the point indices of the given facet indices.
Definition at line 713 of file MeshKernel.cpp.
References GetFacetPoints().
void MeshCore::MeshKernel::GetFacetPoints | ( | unsigned long | ulFaIndex, | |
unsigned long & | rclP0, | |||
unsigned long & | rclP1, | |||
unsigned long & | rclP2 | |||
) | const [inline] |
Returns the point indices of the given facet index.
Definition at line 535 of file MeshKernel.h.
References _aclFacetArray.
Referenced by CalcVertexNormals(), Mesh::GTSAlgos::createGTSSurface(), GetFacetPoints(), and useMesh().
MeshFacetArray MeshKernel::GetFacets | ( | const std::vector< unsigned long > & | indices | ) | const |
Returns an array of facets to the given indices.
The indices must not be out of range.
Definition at line 750 of file MeshKernel.cpp.
const MeshFacetArray& MeshCore::MeshKernel::GetFacets | ( | void | ) | const [inline] |
Returns the array of all facets.
Definition at line 145 of file MeshKernel.h.
Referenced by MeshCore::MeshTopoAlgorithm::AdjustEdgesToCurvatureDirection(), SpringbackCorrection::CalcCurv(), MeshCore::MeshAlgorithm::CheckFacets(), Mesh::MeshPy::collapseEdge(), MeshGui::SoFCMeshSegmentShape::computeBBox(), Mesh::Interface< Kernel >::copy(), MeshGui::ViewProviderMeshBuilder::createMesh(), MeshCore::MeshInfo::DetailedEdgeInfo(), MeshCore::MeshEvalNeighbourhood::Evaluate(), MeshCore::MeshEvalSelfIntersection::Evaluate(), MeshCore::MeshEvalTopology::Evaluate(), MeshCore::MeshEvalOrientation::Evaluate(), MeshCore::MeshEvalCorruptedFacets::Evaluate(), MeshCore::MeshEvalRangePoint::Evaluate(), MeshCore::MeshEvalRangeFacet::Evaluate(), MeshCore::MeshEvalBorderFacet::Evaluate(), MeshCore::MeshEvalFoldOversOnSurface::Evaluate(), MeshCore::MeshEvalFoldsOnBoundary::Evaluate(), MeshCore::MeshEvalFoldsOnSurface::Evaluate(), MeshCore::MeshEvalDuplicateFacets::Evaluate(), MeshCore::MeshEvalInvalids::Evaluate(), Mesh::Curvature::execute(), SpringbackCorrection::FaceCheck(), MeshGui::ViewProviderMesh::faceInfo(), SpringbackCorrection::FacetRegionGrowing(), MeshCore::MeshFixSelfIntersection::Fixup(), MeshCore::MeshFixTopology::Fixup(), MeshCore::MeshFixDuplicateFacets::Fixup(), MeshGui::SoFCMeshObjectBoundary::generatePrimitives(), MeshGui::SoFCMeshSegmentShape::generatePrimitives(), MeshGui::SoFCMeshObjectShape::generatePrimitives(), MeshGui::SoFCMeshNode::generatePrimitives(), SpringbackCorrection::GetCurvature(), Mesh::MeshObject::getFaces(), Mesh::MeshObject::getFacet(), MeshCore::MeshRefPointToFacets::getFacet(), MeshCore::MeshEvalTopology::GetFacetManifolds(), MeshCore::MeshEvalNeighbourhood::GetIndices(), MeshCore::MeshEvalOrientation::GetIndices(), MeshCore::MeshEvalCorruptedFacets::GetIndices(), MeshCore::MeshEvalRangePoint::GetIndices(), MeshCore::MeshEvalRangeFacet::GetIndices(), MeshCore::MeshEvalDuplicateFacets::GetIndices(), MeshCore::MeshEvalInvalids::GetIndices(), MeshCore::MeshEvalSelfIntersection::GetIntersections(), MeshGui::SoFCMeshObjectBoundary::getPrimitiveCount(), MeshGui::SoFCMeshOpenEdge::getPrimitiveCount(), Mesh::MeshObject::getSegmentsFromType(), SpringbackCorrection::Init(), SpringbackCorrection::InitFaceCheck(), MeshCore::MeshInfo::InternalFacetInfo(), MeshGui::RemoveComponents::invertSelection(), Mesh::MeshObject::load(), SpringbackCorrection::MeshCurvature(), Mesh::MeshObject::meshFromSegment(), MeshCore::MeshRefPointToFacets::NeighbourPoints(), MeshCore::MeshRefPointToFacets::Neighbours(), MeshCore::MeshTopoAlgorithm::OptimizeTopology(), Approximate::ParameterInnerPoints(), SpringbackCorrection::Perform(), MeshCore::MeshRefNormalToPoints::Rebuild(), MeshCore::MeshRefEdgeToFacets::Rebuild(), MeshCore::MeshRefPointToPoints::Rebuild(), MeshCore::MeshRefFacetToFacets::Rebuild(), MeshCore::MeshRefPointToFacets::Rebuild(), SpringbackCorrection::RegionEvaluate(), Approximate::ReorderNeighbourList(), Approximate::Reparam(), MeshCore::MeshOutput::SaveInventor(), MeshCore::MeshOutput::SaveMeshNode(), MeshCore::MeshOutput::SaveOBJ(), MeshCore::MeshOutput::SaveOFF(), MeshCore::MeshOutput::SavePLY(), MeshCore::MeshOutput::SaveXML(), MeshCore::MeshComponents::SearchForComponents(), MeshCore::MeshRefPointToFacets::SearchNeighbours(), MeshGui::ViewProviderMeshNode::showOpenEdges(), MeshGui::ViewProviderMeshFaceSet::showOpenEdges(), MeshGui::ViewProviderIndexedFaceSet::showOpenEdges(), SpringbackCorrection::SmoothMesh(), Mesh::MeshPy::splitEdge(), Mesh::MeshObject::splitEdges(), SpringbackCorrection::SpringbackCorrection(), Mesh::MeshPy::swapEdge(), MeshCore::MeshTopoAlgorithm::SwapEdgeBenefit(), MeshCore::MeshInfo::TopologyInformation(), MeshGui::SoFCMeshNode::write(), and Mesh::MeshPy::writeInventor().
Base::Vector3f MeshCore::MeshKernel::GetGravityPoint | ( | const MeshFacet & | rclFacet | ) | const [inline, protected] |
Calculates the gravity point to the given facet.
Definition at line 525 of file MeshKernel.h.
References _aclPointArray, MeshCore::MeshFacet::_aulPoints, Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
Referenced by MeshCore::MeshTopoAlgorithm::CollapseFacet().
unsigned int MeshCore::MeshKernel::GetMemSize | ( | void | ) | const [inline] |
Returns the number of required memory in bytes.
Definition at line 93 of file MeshKernel.h.
Referenced by Mesh::MeshObject::getMemSize().
Base::Vector3f MeshCore::MeshKernel::GetNormal | ( | const MeshFacet & | rclFacet | ) | const [inline, protected] |
Calculates the normal to the given facet.
Definition at line 517 of file MeshKernel.h.
References _aclPointArray, MeshCore::MeshFacet::_aulPoints, and Base::Vector3< _Precision >::Normalize().
Referenced by MeshCore::MeshTopoAlgorithm::SnapVertex().
MeshPoint MeshCore::MeshKernel::GetPoint | ( | unsigned long | ulIndex | ) | const [inline] |
Returns the point at the given index.
This method is rather slow and should be called occassionally only. For fast access the MeshPointIterator interfsce should be used.
Definition at line 445 of file MeshKernel.h.
References _aclPointArray.
Referenced by CalcVertexNormals(), best_fit::Comp_Normals(), Mesh::GTSAlgos::createGTSSurface(), MeshCore::MeshTopoAlgorithm::DelaunayFlip(), fit_iter(), Mesh::MeshObject::getPoint(), offset_mesh(), MeshPart::MeshAlgos::offsetSpecial(), Mesh::MeshObject::offsetSpecial(), MeshPart::MeshAlgos::offsetSpecial2(), Mesh::MeshObject::offsetSpecial2(), Approximate::ParameterBoundary(), Approximate::ParameterInnerPoints(), useMesh(), and MeshCore::MeshSearchNeighbourFacetsVisitor::Visit().
const MeshPointArray& MeshCore::MeshKernel::GetPoints | ( | void | ) | const [inline] |
Returns the array of all data points.
Definition at line 142 of file MeshKernel.h.
Referenced by MeshCore::MeshTopoAlgorithm::AdjustEdgesToCurvatureDirection(), SpringbackCorrection::CalcCurv(), MeshCore::MeshEigensystem::CalculateLocalSystem(), MeshCore::MeshAlgorithm::CheckFacets(), best_fit::CompTotalError(), MeshGui::SoFCMeshObjectBoundary::computeBBox(), MeshGui::SoFCMeshSegmentShape::computeBBox(), MeshGui::ViewProviderMeshBuilder::createMesh(), MeshCore::MeshInfo::DetailedEdgeInfo(), MeshCore::MeshEigensystem::Evaluate(), MeshCore::MeshEvalFoldsOnSurface::Evaluate(), MeshCore::MeshEvalDuplicatePoints::Evaluate(), MeshCore::MeshEvalInvalids::Evaluate(), SpringbackCorrection::FaceCheck(), MeshCore::MeshFixDuplicatePoints::Fixup(), MeshGui::SoFCMeshObjectBoundary::generatePrimitives(), MeshGui::SoFCMeshSegmentShape::generatePrimitives(), MeshGui::SoFCMeshObjectShape::generatePrimitives(), MeshGui::SoFCMeshNode::generatePrimitives(), Deviation::GenNormals(), MeshCore::MeshRefPointToPoints::GetAverageEdgeLength(), SpringbackCorrection::GetCurvature(), MeshCore::MeshEvalDuplicatePoints::GetIndices(), MeshCore::MeshEvalInvalids::GetIndices(), MeshCore::MeshRefPointToPoints::GetNormal(), SpringbackCorrection::Init(), SpringbackCorrection::InitFaceCheck(), Mesh::MeshObject::meshFromSegment(), Approximate::ParameterInnerPoints(), SpringbackCorrection::Perform(), best_fit::Perform(), MeshCore::MeshRefNormalToPoints::Rebuild(), MeshCore::MeshRefPointToPoints::Rebuild(), MeshCore::MeshRefPointToFacets::Rebuild(), SpringbackCorrection::RegionEvaluate(), Approximate::ReorderNeighbourList(), Approximate::Reparam(), MeshCore::MeshOutput::SaveMeshNode(), MeshCore::MeshOutput::SaveOBJ(), MeshCore::MeshOutput::SaveOFF(), MeshCore::MeshOutput::SavePLY(), MeshCore::MeshOutput::SaveXML(), MeshGui::ViewProviderMeshNode::showOpenEdges(), MeshCore::MeshSmoothing::Smooth(), SpringbackCorrection::SmoothMesh(), SpringbackCorrection::SpringbackCorrection(), MeshCore::MeshTopoAlgorithm::SwapEdgeBenefit(), MeshCore::LaplaceSmoothing::Umbrella(), and MeshGui::SoFCMeshNode::write().
float MeshKernel::GetSurface | ( | const std::vector< unsigned long > & | aSegment | ) | const |
Calculates the surface area of the segment defined by aSegment.
Definition at line 946 of file MeshKernel.cpp.
References MeshCore::MeshFacetIterator::Set().
float MeshKernel::GetSurface | ( | ) | const |
Calculates the surface area of the mesh object.
Definition at line 936 of file MeshKernel.cpp.
References MeshCore::MeshFacetIterator::Init(), MeshCore::MeshFacetIterator::More(), and MeshCore::MeshFacetIterator::Next().
Referenced by Mesh::MeshObject::getSurface().
float MeshKernel::GetVolume | ( | ) | const |
Calculates the volume of the mesh object.
Therefore the mesh must be a solid, if not 0 is returned.
Definition at line 959 of file MeshKernel.cpp.
References MeshCore::MeshGeomFacet::_aclPoints, MeshCore::MeshEvalSolid::Evaluate(), SketcherExample::f, MeshCore::MeshFacetIterator::Init(), MeshCore::MeshFacetIterator::More(), MeshCore::MeshFacetIterator::Next(), Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
Referenced by Mesh::MeshObject::getVolume().
std::vector< unsigned long > MeshKernel::HasFacets | ( | const MeshPointIterator & | rclIter | ) | const |
Determines all facets that are associated to this point.
This method is very slow and should be called occassionally only.
Definition at line 729 of file MeshKernel.cpp.
References _aclFacetArray, and MeshCore::MeshPointIterator::Position().
bool MeshKernel::HasNonManifolds | ( | ) | const |
Checks whether the mesh has non.manifold edges.
An edge is regarded as non-manifolds if it shares more than two facets.
Definition at line 989 of file MeshKernel.cpp.
References MeshCore::MeshEvalTopology::Evaluate().
bool MeshKernel::HasOpenEdges | ( | ) | const |
Checks whether the mesh has open edges.
Definition at line 983 of file MeshKernel.cpp.
References MeshCore::MeshEvalSolid::Evaluate().
Referenced by CmdMeshEvaluateSolid::activated().
bool MeshKernel::HasSelfIntersections | ( | ) | const |
Checks whether the mesh intersects itself.
Definition at line 995 of file MeshKernel.cpp.
References MeshCore::MeshEvalSelfIntersection::Evaluate().
bool MeshCore::MeshKernel::IsValid | ( | void | ) | const [inline] |
Returns true if the data structure is valid.
Definition at line 138 of file MeshKernel.h.
Referenced by RemoveInvalids().
void MeshKernel::Merge | ( | const MeshPointArray & | rPoints, | |
const MeshFacetArray & | rFaces | |||
) |
This method is provided for convenience that directly accepts the point and facet arrays.
Definition at line 335 of file MeshKernel.cpp.
References _aclFacetArray, _aclPointArray, _clBoundBox, and RebuildNeighbours().
void MeshKernel::Merge | ( | const MeshKernel & | rKernel | ) |
Adds all facets and referenced points to the underlying mesh structure.
The client programmer must be sure that both meshes don't have geometric overlaps, otherwise the resulting mesh might be invalid, i.e. has self-intersections.
Definition at line 326 of file MeshKernel.cpp.
References _aclFacetArray, and _aclPointArray.
Referenced by AddFacets(), Mesh::MeshObject::addMesh(), MeshCore::SetOperations::Do(), MeshCore::MeshInput::LoadMeshNode(), MeshCore::MeshInput::LoadNastran(), MeshCore::MeshInput::LoadOBJ(), MeshCore::MeshInput::LoadPLY(), and Mesh::MeshObject::meshFromSegment().
void MeshCore::MeshKernel::MovePoint | ( | unsigned long | ulPtIndex, | |
const Base::Vector3f & | rclTrans | |||
) | [inline] |
Moves the point at the given index along the vector rclTrans.
Definition at line 493 of file MeshKernel.h.
References _aclPointArray.
Referenced by Mesh::MeshObject::movePoint(), MeshPart::MeshAlgos::offset(), Mesh::MeshObject::offset(), offset_mesh(), MeshPart::MeshAlgos::offsetSpecial(), Mesh::MeshObject::offsetSpecial(), MeshPart::MeshAlgos::offsetSpecial2(), and Mesh::MeshObject::offsetSpecial2().
void MeshKernel::operator*= | ( | const Base::Matrix4D & | rclMat | ) |
Transform the data structure with the given transformation matrix.
Definition at line 885 of file MeshKernel.cpp.
References Transform().
MeshKernel & MeshKernel::operator+= | ( | const std::vector< MeshGeomFacet > & | rclFAry | ) |
Adds an array of facets to the data structure.
This method keeps temporarily set properties and flags.
Definition at line 159 of file MeshKernel.cpp.
References AddFacets().
MeshKernel & MeshKernel::operator+= | ( | const MeshGeomFacet & | rclSFacet | ) |
Adds a single facet to the data structure.
This method is very slow and should be called occassionally only.
Definition at line 109 of file MeshKernel.cpp.
References AddFacet().
MeshKernel & MeshKernel::operator= | ( | const MeshKernel & | rclMesh | ) |
Assignment operator.
Definition at line 60 of file MeshKernel.cpp.
References _aclFacetArray, _aclPointArray, _bValid, and _clBoundBox.
MeshKernel & MeshKernel::operator= | ( | const std::vector< MeshGeomFacet > & | rclFAry | ) |
Replaces the current data structure with the structure built up of the array of triangles given in rclFAry.
Definition at line 71 of file MeshKernel.cpp.
References MeshCore::MeshBuilder::AddFacet(), MeshCore::MeshBuilder::Finish(), and MeshCore::MeshBuilder::Initialize().
MeshPointIterator MeshKernel::PointIterator | ( | ) | const |
Returns an iterator object to go over all points.
Definition at line 1008 of file MeshKernel.cpp.
References MeshCore::MeshPointIterator::Begin().
void MeshKernel::Read | ( | std::istream & | rclIn | ) |
Definition at line 799 of file MeshKernel.cpp.
References _aclFacetArray, _aclPointArray, _clBoundBox, Base::Stream::BigEndian, Base::BoundBox3< _Precision >::MaxX, Base::BoundBox3< _Precision >::MaxY, Base::BoundBox3< _Precision >::MaxZ, Base::BoundBox3< _Precision >::MinX, Base::BoundBox3< _Precision >::MinY, Base::BoundBox3< _Precision >::MinZ, Base::Stream::setByteOrder(), Base::SwapEndian(), and draftlibs::fcgeo::v1().
Referenced by Mesh::MeshObject::load(), and MeshCore::MeshInput::LoadAny().
void MeshKernel::RebuildNeighbours | ( | unsigned long | index | ) | [protected] |
Rebuilds the neighbour indices for subset of all facets from index index on.
Definition at line 899 of file Evaluation.cpp.
References _aclFacetArray, MeshCore::MeshFacet::_aulNeighbours, RobotExampleTrajectoryOutOfShapes::count, MeshCore::Edge_Index::f, MeshCore::Edge_Index::p0, MeshCore::Edge_Index::p1, and MeshCore::MeshFacet::Side().
void MeshKernel::RebuildNeighbours | ( | void | ) |
Rebuilds the neighbour indices for all facets.
Definition at line 970 of file Evaluation.cpp.
Referenced by Adopt(), Assign(), MeshCore::MeshFixNeighbourhood::Fixup(), MeshCore::MeshFixTopology::Fixup(), MeshCore::MeshFixDuplicateFacets::Fixup(), MeshCore::MeshFixDuplicatePoints::Fixup(), Mesh::MeshObject::load(), Merge(), and MeshCore::MeshFixDegeneratedFacets::RemoveEdgeTooSmall().
void MeshKernel::RecalcBoundBox | ( | void | ) |
Forces a recalculation of the bounding box.
This method should be called after the removal of points.or after a transformation of the data structure.
Definition at line 908 of file MeshKernel.cpp.
References _aclPointArray, _clBoundBox, and Base::BoundBox3< _Precision >::Flush().
Referenced by Adopt(), Assign(), DeleteFacets(), DeletePoints(), MeshCore::MeshBuilder::Finish(), UniGridApprox::MeshOffset(), MeshPart::MeshAlgos::offset(), Mesh::MeshObject::offset(), MeshPart::MeshAlgos::offsetSpecial2(), and Mesh::MeshObject::offsetSpecial2().
void MeshKernel::RemoveInvalids | ( | ) | [protected] |
Removes all as INVALID marked points and facets from the structure.
Definition at line 603 of file MeshKernel.cpp.
References _aclFacetArray, _aclPointArray, MeshCore::MeshFacet::IsValid(), IsValid(), MeshCore::MeshPoint::IsValid(), and k.
Referenced by MeshCore::MeshTopoAlgorithm::Cleanup(), DeleteFacets(), DeletePoints(), MeshCore::MeshFixInvalids::Fixup(), and MeshCore::MeshFixDegeneratedFacets::RemoveEdgeTooSmall().
void MeshCore::MeshKernel::SetPoint | ( | unsigned long | ulPtIndex, | |
float | x, | |||
float | y, | |||
float | z | |||
) | [inline] |
Sets the point at the given index to the new rPoint.
Definition at line 503 of file MeshKernel.h.
References _aclPointArray.
void MeshCore::MeshKernel::SetPoint | ( | unsigned long | ulPtIndex, | |
const Base::Vector3f & | rPoint | |||
) | [inline] |
Sets the point at the given index to the new rPoint.
Definition at line 498 of file MeshKernel.h.
References _aclPointArray.
Referenced by fit_iter(), Mesh::MeshObject::setPoint(), Mesh::PropertyMeshKernel::setPointIndices(), MeshCore::MeshSmoothing::Smooth(), and MeshCore::LaplaceSmoothing::Umbrella().
void MeshKernel::Smooth | ( | int | iterations, | |
float | d_max | |||
) |
Smothes the mesh kernel.
Definition at line 903 of file MeshKernel.cpp.
Referenced by Mesh::MeshObject::smooth().
void MeshKernel::Swap | ( | MeshKernel & | mesh | ) |
Swaps the content of this kernel and mesh.
Definition at line 102 of file MeshKernel.cpp.
References _aclFacetArray, _aclPointArray, and _clBoundBox.
Referenced by Mesh::MeshObject::load(), and Mesh::MeshObject::swap().
void MeshKernel::Transform | ( | const Base::Matrix4D & | rclMat | ) |
Transform the data structure with the given transformation matrix.
It does exactly the same as the '*=' operator.
Definition at line 890 of file MeshKernel.cpp.
References _aclPointArray, _clBoundBox, and Base::BoundBox3< _Precision >::Flush().
Referenced by best_fit::Coarse_correction(), import_NASTRAN(), Mesh::MeshObject::inner(), Mesh::MeshObject::intersect(), best_fit::MeshFit_Coarse(), minBoundingBox(), operator*=(), Mesh::MeshObject::outer(), best_fit::Perform(), best_fit::Perform_PointCloud(), Mesh::MeshPy::rotate(), Mesh::MeshObject::subtract(), Mesh::MeshPy::transform(), Mesh::MeshObject::transformGeometry(), Mesh::MeshPy::translate(), and Mesh::MeshObject::unite().
unsigned long MeshKernel::VisitNeighbourFacets | ( | MeshFacetVisitor & | rclFVisitor, | |
unsigned long | ulStartFacet | |||
) | const |
This method visits all neighbour facets, i.e facets that share a common edge starting from the facet associated to index ulStartFacet.
All facets having set the VISIT flag are ignored. Therefore the user have to set or unset this flag if needed. All facets that get visited during this algorithm are marked as VISIT and the Visit() method of the given MeshFacetVisitor gets invoked. If there are no unvisited neighbours any more the algorithms returns immediately and returns the number of visited facets.
Definition at line 34 of file Visitor.cpp.
References _aclFacetArray, MeshCore::MeshFacetVisitor::AllowVisit(), MeshCore::MeshFacetArray::SetFlag(), MeshCore::MeshFacetVisitor::Visit(), and MeshCore::MeshFacet::VISIT.
Referenced by MeshGui::ViewProviderMesh::deselectComponent(), Mesh::SegmentByMesh::execute(), MeshCore::MeshEvalOrientation::GetIndices(), Mesh::MeshObject::getSegmentsFromType(), SpringbackCorrection::Perform(), MeshCore::MeshComponents::SearchForComponents(), and MeshGui::ViewProviderMesh::selectComponent().
unsigned long MeshKernel::VisitNeighbourFacetsOverCorners | ( | MeshFacetVisitor & | rclFVisitor, | |
unsigned long | ulStartFacet | |||
) | const |
Does basically the same as the method above unless the facets that share just a common point are regared as neighbours.
Definition at line 86 of file Visitor.cpp.
References _aclFacetArray, MeshCore::MeshFacet::_aulPoints, MeshCore::MeshFacetArray::SetFlag(), MeshCore::MeshFacetVisitor::Visit(), and MeshCore::MeshFacet::VISIT.
Referenced by MeshCore::MeshComponents::SearchForComponents().
unsigned long MeshKernel::VisitNeighbourPoints | ( | MeshPointVisitor & | rclPVisitor, | |
unsigned long | ulStartPoint | |||
) | const |
This method visits all neighbour points starting from the point associated to index ulStartPoint.
All points having set the VISIT flag are ignored. Therefore the user have to set or unset this flag if needed before the algorithm starts. All points that get visited during this algorithm are marked as VISIT and the Visit() method of the given MeshPointVisitor gets invoked. If there are no unvisited neighbours any more the algorithms returns immediately and returns the number of visited points.
Definition at line 124 of file Visitor.cpp.
References _aclPointArray, MeshCore::MeshPointVisitor::Visit(), and MeshCore::MeshPoint::VISIT.
void MeshKernel::Write | ( | std::ostream & | rclOut | ) | const |
Binary streaming of data.
Definition at line 759 of file MeshKernel.cpp.
References _aclFacetArray, _aclPointArray, _clBoundBox, CountFacets(), CountPoints(), Base::BoundBox3< _Precision >::MaxX, Base::BoundBox3< _Precision >::MaxY, Base::BoundBox3< _Precision >::MaxZ, Base::BoundBox3< _Precision >::MinX, Base::BoundBox3< _Precision >::MinY, and Base::BoundBox3< _Precision >::MinZ.
Referenced by Mesh::MeshObject::save(), MeshCore::MeshOutput::SaveAny(), and Mesh::MeshObject::SaveDocFile().
friend class MeshAlgorithm [friend] |
Definition at line 434 of file MeshKernel.h.
Referenced by CutFacets().
friend class MeshBuilder [friend] |
Definition at line 442 of file MeshKernel.h.
friend class MeshFacetIterator [friend] |
Definition at line 432 of file MeshKernel.h.
friend class MeshFastFacetIterator [friend] |
Definition at line 433 of file MeshKernel.h.
friend class MeshFixDegeneratedFacets [friend] |
Definition at line 440 of file MeshKernel.h.
friend class MeshFixDegenerations [friend] |
Definition at line 437 of file MeshKernel.h.
friend class MeshFixDuplicatePoints [friend] |
Definition at line 441 of file MeshKernel.h.
friend class MeshFixInvalids [friend] |
Definition at line 439 of file MeshKernel.h.
friend class MeshFixNeighbourhood [friend] |
Definition at line 436 of file MeshKernel.h.
friend class MeshFixSingleFacet [friend] |
Definition at line 438 of file MeshKernel.h.
friend class MeshPointIterator [friend] |
Definition at line 431 of file MeshKernel.h.
friend class MeshTopoAlgorithm [friend] |
Definition at line 435 of file MeshKernel.h.
MeshFacetArray MeshCore::MeshKernel::_aclFacetArray [protected] |
Holds the array of facets.
Definition at line 426 of file MeshKernel.h.
Referenced by AddFacet(), MeshCore::MeshBuilder::AddFacet(), AddFacets(), Adopt(), Assign(), MeshCore::MeshAlgorithm::CheckBorderFacets(), Clear(), MeshCore::MeshTopoAlgorithm::CollapseEdge(), MeshCore::MeshTopoAlgorithm::CollapseFacet(), MeshCore::MeshAlgorithm::CountBorderEdges(), CountEdges(), MeshCore::MeshAlgorithm::CountFacetFlag(), MeshCore::MeshTopoAlgorithm::DelaunayFlip(), DeleteFacet(), DeleteFacets(), DeletePoints(), MeshCore::MeshAlgorithm::Distance(), ErasePoint(), MeshCore::MeshAlgorithm::FillupHole(), MeshCore::MeshBuilder::Finish(), MeshCore::MeshFixDuplicatePoints::Fixup(), MeshCore::MeshTopoAlgorithm::FlipNormals(), MeshCore::MeshAlgorithm::GetBorderPoints(), GetEdges(), GetFacet(), MeshCore::MeshAlgorithm::GetFacetBorders(), GetFacetNeighbours(), GetFacetPoints(), MeshCore::MeshAlgorithm::GetFacetsFlag(), MeshCore::MeshAlgorithm::GetMeshBorder(), MeshCore::MeshTopoAlgorithm::HarmonizeNormals(), HasFacets(), MeshCore::MeshBuilder::Initialize(), MeshCore::MeshTopoAlgorithm::InsertVertex(), MeshCore::MeshTopoAlgorithm::InsertVertexAndSwapEdge(), MeshCore::MeshTopoAlgorithm::IsSwapEdgeLegal(), Merge(), operator=(), MeshCore::MeshTopoAlgorithm::OptimizeTopology(), MeshCore::MeshAlgorithm::PointsFromFacetsIndices(), Read(), RebuildNeighbours(), MeshCore::MeshTopoAlgorithm::RemoveCorruptedFacet(), MeshCore::MeshTopoAlgorithm::RemoveDegeneratedFacet(), MeshCore::MeshFixDegeneratedFacets::RemoveEdgeTooSmall(), RemoveInvalids(), MeshCore::MeshAlgorithm::ResetFacetFlag(), MeshCore::MeshAlgorithm::ResetFacetsFlag(), MeshCore::MeshAlgorithm::SetFacetFlag(), MeshCore::MeshAlgorithm::SetFacetsFlag(), MeshCore::MeshAlgorithm::SetFacetsProperty(), MeshCore::MeshTopoAlgorithm::ShouldSwapEdge(), MeshCore::MeshTopoAlgorithm::SnapVertex(), MeshCore::MeshAlgorithm::SplitBoundaryLoops(), MeshCore::MeshTopoAlgorithm::SplitEdge(), MeshCore::MeshTopoAlgorithm::SplitFacet(), MeshCore::MeshTopoAlgorithm::SplitOpenEdge(), Swap(), MeshCore::MeshTopoAlgorithm::SwapEdge(), VisitNeighbourFacets(), VisitNeighbourFacetsOverCorners(), and Write().
MeshPointArray MeshCore::MeshKernel::_aclPointArray [protected] |
Holds the array of geometric points.
Definition at line 425 of file MeshKernel.h.
Referenced by AddFacet(), AddFacets(), AdjustNormal(), Adopt(), Assign(), MeshCore::MeshTopoAlgorithm::BeginCache(), Clear(), MeshCore::MeshTopoAlgorithm::CollapseEdge(), MeshCore::MeshTopoAlgorithm::CollapseFacet(), MeshCore::MeshAlgorithm::CountPointFlag(), DeleteFacets(), DeletePoint(), DeletePoints(), MeshCore::MeshAlgorithm::Distance(), ErasePoint(), MeshCore::MeshAlgorithm::FillupHole(), MeshCore::MeshTopoAlgorithm::FillupHoles(), MeshCore::MeshBuilder::Finish(), GetEdges(), GetFacet(), MeshCore::MeshAlgorithm::GetFacetBorders(), GetGravityPoint(), GetNormal(), GetPoint(), MeshCore::MeshAlgorithm::GetPointsFlag(), MeshCore::MeshBuilder::Initialize(), MeshCore::MeshTopoAlgorithm::InsertVertex(), MeshCore::MeshTopoAlgorithm::IsSwapEdgeLegal(), Merge(), MovePoint(), operator=(), MeshCore::MeshAlgorithm::PointsFromFacetsIndices(), Read(), RecalcBoundBox(), MeshCore::MeshTopoAlgorithm::RemoveDegeneratedFacet(), MeshCore::MeshFixDegeneratedFacets::RemoveEdgeTooSmall(), RemoveInvalids(), MeshCore::MeshAlgorithm::ResetPointFlag(), MeshCore::MeshAlgorithm::ResetPointsFlag(), SetPoint(), MeshCore::MeshAlgorithm::SetPointFlag(), MeshCore::MeshAlgorithm::SetPointsFlag(), MeshCore::MeshTopoAlgorithm::ShouldSwapEdge(), MeshCore::MeshTopoAlgorithm::SnapVertex(), MeshCore::MeshTopoAlgorithm::SplitEdge(), MeshCore::MeshTopoAlgorithm::SplitFacet(), MeshCore::MeshTopoAlgorithm::SplitOpenEdge(), Swap(), Transform(), VisitNeighbourPoints(), and Write().
bool MeshCore::MeshKernel::_bValid [protected] |
Current state of validality.
Definition at line 428 of file MeshKernel.h.
Referenced by operator=().
Base::BoundBox3f MeshCore::MeshKernel::_clBoundBox [protected] |
The current calculated bounding box.
Definition at line 427 of file MeshKernel.h.
Referenced by AddFacet(), AddFacets(), Clear(), MeshCore::MeshTopoAlgorithm::FillupHoles(), Merge(), MeshKernel(), operator=(), Read(), RecalcBoundBox(), Swap(), Transform(), and Write().