Class for creating the mesh structure by adding facets. More...
#include <Builder.h>
Public Member Functions | |
| void | AddFacet (Base::Vector3f *facetPoints, unsigned char flag=0, unsigned long prop=0) |
| Add new facet. | |
| void | AddFacet (const Base::Vector3f &pt1, const Base::Vector3f &pt2, const Base::Vector3f &pt3, const Base::Vector3f &normal, unsigned char flag=0, unsigned long prop=0) |
| Add new facet. | |
| void | AddFacet (const MeshGeomFacet &facet, bool takeFlag=false, bool takeProperty=false) |
| adding facets | |
| void | Finish (bool freeMemory=false) |
| Finishes building up the mesh structure. | |
| void | Initialize (unsigned long ctFacets, bool deletion=true) |
| Initializes the class. | |
| MeshBuilder (MeshKernel &rclM) | |
| void | SetTolerance (float) |
| Set the tolerance for the comparison of points. | |
| ~MeshBuilder (void) | |
Friends | |
| class | MeshKernel |
Class for creating the mesh structure by adding facets.
Building the structure needs 3 steps: 1. initializing 2. adding the facets 3. finishing
// Sample Code for building a mesh structure MeshBuilder builder(someMeshReference); builder.Initialize(numberOfFacets); ... for (...) builder.AddFacet(...); ... builder.Finish();
Definition at line 59 of file Builder.h.
| MeshBuilder::MeshBuilder | ( | MeshKernel & | rclM | ) |
Definition at line 39 of file Builder.cpp.
References MeshCore::MeshDefinitions::_fMinPointDistanceD1.
| MeshBuilder::~MeshBuilder | ( | void | ) |
Definition at line 44 of file Builder.cpp.
References MeshCore::MeshDefinitions::_fMinPointDistanceD1.
| void MeshBuilder::AddFacet | ( | Base::Vector3f * | facetPoints, | |
| unsigned char | flag = 0, |
|||
| unsigned long | prop = 0 | |||
| ) |
Add new facet.
| facetPoints | Array of vectors (size 4) in order of vec1, vec2, vec3, normal | |
| flag | ||
| prop |
Definition at line 116 of file Builder.cpp.
References MeshCore::MeshKernel::_aclFacetArray, MeshCore::MeshFacet::_aulPoints, MeshCore::MeshFacet::_ucFlag, MeshCore::MeshPoint::_ulProp, MeshCore::MeshFacet::_ulProp, SketcherExample::f, Base::SequencerLauncher::next(), draftTools::p, and boost::numeric::bindings::atlas::swap().
| void MeshBuilder::AddFacet | ( | const Base::Vector3f & | pt1, | |
| const Base::Vector3f & | pt2, | |||
| const Base::Vector3f & | pt3, | |||
| const Base::Vector3f & | normal, | |||
| unsigned char | flag = 0, |
|||
| unsigned long | prop = 0 | |||
| ) |
| void MeshBuilder::AddFacet | ( | const MeshGeomFacet & | facet, | |
| bool | takeFlag = false, |
|||
| bool | takeProperty = false | |||
| ) |
adding facets
Add new facet
| facet | the facet | |
| takeFlag | if true the flag from the MeshGeomFacet will be taken | |
| takeProperty |
Definition at line 98 of file Builder.cpp.
References MeshCore::MeshGeomFacet::_aclPoints, MeshCore::MeshGeomFacet::_ucFlag, MeshCore::MeshGeomFacet::_ulProp, and MeshCore::MeshGeomFacet::GetNormal().
Referenced by AddFacet(), best_fit_test(), MeshCore::MeshInput::LoadAsciiSTL(), MeshCore::MeshInput::LoadBinarySTL(), MeshCore::MeshKernel::operator=(), SpringbackCorrection::Perform(), ReadDyna::PutInMesh(), best_fit::Tesselate_Face(), best_fit::Tesselate_Shape(), tesselateShape(), and SpringbackCorrection::TransferFaceTriangulationtoFreeCAD().
| void MeshBuilder::Finish | ( | bool | freeMemory = false |
) |
Finishes building up the mesh structure.
Must be done after adding facets.
| freeMemory | if false (default) only the memory of internal structures gets freed, otherwise additional unneeded memory in the mesh structure is tried to be freed. |
Definition at line 214 of file Builder.cpp.
References MeshCore::MeshKernel::_aclFacetArray, MeshCore::MeshKernel::_aclPointArray, Mesh2Shape::faces, MeshCore::MeshKernel::RecalcBoundBox(), and boost::numeric::bindings::atlas::swap().
Referenced by best_fit_test(), MeshCore::MeshInput::LoadAsciiSTL(), MeshCore::MeshInput::LoadBinarySTL(), MeshCore::MeshKernel::operator=(), SpringbackCorrection::Perform(), ReadDyna::PutInMesh(), best_fit::Tesselate_Face(), best_fit::Tesselate_Shape(), tesselateShape(), and SpringbackCorrection::TransferFaceTriangulationtoFreeCAD().
| void MeshBuilder::Initialize | ( | unsigned long | ctFacets, | |
| bool | deletion = true | |||
| ) |
Initializes the class.
Must be done before adding facets
| ctFacets | count of facets. | |
| deletion | if true (default) the mesh-kernel will be cleared otherwise you can add new facets on an existing mesh-kernel |
Definition at line 55 of file Builder.cpp.
References MeshCore::MeshKernel::_aclFacetArray, MeshCore::MeshKernel::_aclPointArray, MeshCore::MeshKernel::Clear(), and SketcherExample::f.
Referenced by best_fit_test(), MeshCore::MeshInput::LoadAsciiSTL(), MeshCore::MeshInput::LoadBinarySTL(), MeshCore::MeshKernel::operator=(), SpringbackCorrection::Perform(), ReadDyna::PutInMesh(), best_fit::Tesselate_Face(), best_fit::Tesselate_Shape(), tesselateShape(), and SpringbackCorrection::TransferFaceTriangulationtoFreeCAD().
| void MeshBuilder::SetTolerance | ( | float | fTol | ) |
Set the tolerance for the comparison of points.
Normally you don't need to set the tolerance.
Definition at line 50 of file Builder.cpp.
References MeshCore::MeshDefinitions::_fMinPointDistanceD1.
friend class MeshKernel [friend] |
1.6.1