Class for creating the mesh structure by adding facets. More...
#include <Builder.h>
Helper class | |
| class | MeshKernel |
| MeshBuilder (MeshKernel &rclM) | |
| ~MeshBuilder () | |
| void | SetTolerance (float) |
| Set the tolerance for the comparison of points. More... | |
| void | Initialize (size_t ctFacets, bool deletion=true) |
| Initializes the class. More... | |
| void | AddFacet (const MeshGeomFacet &facet, bool takeFlag=false, bool takeProperty=false) |
| adding facets More... | |
| 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. More... | |
| void | AddFacet (Base::Vector3f *facetPoints, unsigned char flag=0, unsigned long prop=0) |
| Add new facet. More... | |
| void | Finish (bool freeMemory=false) |
| Finishes building up the mesh structure. More... | |
Class for creating the mesh structure by adding facets.
Building the structure needs 3 steps:
| MeshBuilder::MeshBuilder | ( | MeshKernel & | rclM | ) |
| MeshBuilder::~MeshBuilder | ( | ) |
| 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 |
| 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 |
||
| ) |
Add new facet.
References AddFacet().
| 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 |
References AddFacet(), and MeshCore::MeshGeomFacet::GetNormal().
Referenced by AddFacet(), MeshCore::MeshInput::LoadAsciiSTL(), MeshCore::MeshInput::LoadBinarySTL(), and MeshCore::MeshKernel::operator=().
| 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. |
Referenced by MeshCore::MeshInput::LoadAsciiSTL(), MeshCore::MeshInput::LoadBinarySTL(), and MeshCore::MeshKernel::operator=().
| void MeshBuilder::Initialize | ( | size_t | 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 |
Referenced by MeshCore::MeshInput::LoadAsciiSTL(), MeshCore::MeshInput::LoadBinarySTL(), and MeshCore::MeshKernel::operator=().
| void MeshBuilder::SetTolerance | ( | float | fTol | ) |
Set the tolerance for the comparison of points.
Normally you don't need to set the tolerance.
|
friend |