OpenLexocad  27.1
Topo::MeshTool Class Reference

Tools for creating, manipulating and querying Meshes. More...

#include <MeshTool.h>

Public Member Functions

 MeshTool (void)
 
virtual ~MeshTool (void)
 

Static Public Member Functions

static pMesh copy (pConstMesh mesh, bool deepCopy=false)
 Makes a copy of the mesh. More...
 
static bool isClosed (pConstMesh mesh)
 Checks if the mesh is closed ( = it has no boundary edges[1] ). More...
 
static bool isPlanar (pConstMesh mesh)
 Checks if the mesh is planar ( = all its points lay on the same plane ). More...
 
static pMesh triangulationToMesh (pConstShape shape)
 
static pMesh triangulationToMesh (pConstShape shape, bool highQuality, std::vector< int > *newToOldFaceIdxMap=0)
 
static pShape convertMesh2Shape (pConstMesh mesh, std::vector< std::vector< Geom::Pnt >> &defectPolygons)
 Converts a mesh to a BREP shape (shell or solid) More...
 
static pShape convertMesh2Solid (pConstMesh aMesh, bool prefer_stiching, bool onlyClosedSolid, bool mergePlanarFaces)
 
static pShape convertMesh2Polyhedral (pConstMesh mesh, std::vector< std::vector< Geom::Pnt >> &defectPolygons)
 Converts a mesh to a Polyhedral (Acis) More...
 
static pShape convertMesh2Brep_by_Face_Stiching (pConstMesh mesh, std::vector< std::vector< Geom::Pnt >> &defectPolygons)
 Converts a mesh to a BREP shape (shell or solid) More...
 
static pShape convertMesh2Shell (pConstMesh mesh, std::vector< std::vector< Geom::Pnt >> &defectPolygons)
 Converts a mesh to an open or closed shell. More...
 
static pMesh makeMeshFromBrepData (pConstBrepData data)
 Makes a mesh from BrepData. More...
 
static pMesh makeMesh (const std::vector< Geom::Pnt > &nodes, const std::vector< int > &model, const std::vector< Geom::Pnt2d > &textureCoords, const std::vector< int > &textureCoordIndices, const std::vector< Geom::Pnt > &normals)
 Makes a mesh from Nodes and Texture-Coordinates. More...
 
static pMesh makeMesh (const std::vector< Geom::Pnt > &nodes, const std::vector< int > &model)
 Makes a mesh from Nodes. More...
 
static pMesh makeMesh (const std::vector< Geom::Pnt > &nodes, const std::vector< int > &model, const std::vector< Geom::Pnt > &normals)
 Makes a mesh from Nodes and normals. More...
 
static std::vector< App::Element * > getElementsFromOMFFile (Core::CoreDocument *doc, const Base::String &fileName, double scaleFactor=1., bool terrain=false)
 Reads in a OMF file and converts each OMF into an App::Element. More...
 
static bool getMesh (pConstMesh mesh, std::vector< Geom::Pnt > &nodes, std::vector< int > &model, std::vector< Draw::SurfaceStyle > &surfaceStyles, std::vector< int > &faceIndices, std::vector< int > &surfaceStyleIndices, std::vector< Geom::Pnt2d > &textureCoords, std::vector< int > &textureCoordIndices, std::vector< Topo::LineItem > *lineItems=0)
 
static bool getCreaseAngle (pConstMesh mesh, float &angle)
 

Detailed Description

Tools for creating, manipulating and querying Meshes.

Constructor & Destructor Documentation

◆ MeshTool()

Topo::MeshTool::MeshTool ( void  )

◆ ~MeshTool()

virtual Topo::MeshTool::~MeshTool ( void  )
virtual

Member Function Documentation

◆ convertMesh2Brep_by_Face_Stiching()

static pShape Topo::MeshTool::convertMesh2Brep_by_Face_Stiching ( pConstMesh  mesh,
std::vector< std::vector< Geom::Pnt >> &  defectPolygons 
)
static

Converts a mesh to a BREP shape (shell or solid)

◆ convertMesh2Polyhedral()

static pShape Topo::MeshTool::convertMesh2Polyhedral ( pConstMesh  mesh,
std::vector< std::vector< Geom::Pnt >> &  defectPolygons 
)
static

Converts a mesh to a Polyhedral (Acis)

◆ convertMesh2Shape()

static pShape Topo::MeshTool::convertMesh2Shape ( pConstMesh  mesh,
std::vector< std::vector< Geom::Pnt >> &  defectPolygons 
)
static

Converts a mesh to a BREP shape (shell or solid)

◆ convertMesh2Shell()

static pShape Topo::MeshTool::convertMesh2Shell ( pConstMesh  mesh,
std::vector< std::vector< Geom::Pnt >> &  defectPolygons 
)
static

Converts a mesh to an open or closed shell.

◆ convertMesh2Solid()

static pShape Topo::MeshTool::convertMesh2Solid ( pConstMesh  aMesh,
bool  prefer_stiching,
bool  onlyClosedSolid,
bool  mergePlanarFaces 
)
static

◆ copy()

static pMesh Topo::MeshTool::copy ( pConstMesh  mesh,
bool  deepCopy = false 
)
static

Makes a copy of the mesh.

◆ getCreaseAngle()

static bool Topo::MeshTool::getCreaseAngle ( pConstMesh  mesh,
float &  angle 
)
static

◆ getElementsFromOMFFile()

static std::vector<App::Element*> Topo::MeshTool::getElementsFromOMFFile ( Core::CoreDocument doc,
const Base::String fileName,
double  scaleFactor = 1.,
bool  terrain = false 
)
static

Reads in a OMF file and converts each OMF into an App::Element.

◆ getMesh()

static bool Topo::MeshTool::getMesh ( pConstMesh  mesh,
std::vector< Geom::Pnt > &  nodes,
std::vector< int > &  model,
std::vector< Draw::SurfaceStyle > &  surfaceStyles,
std::vector< int > &  faceIndices,
std::vector< int > &  surfaceStyleIndices,
std::vector< Geom::Pnt2d > &  textureCoords,
std::vector< int > &  textureCoordIndices,
std::vector< Topo::LineItem > *  lineItems = 0 
)
static

◆ isClosed()

static bool Topo::MeshTool::isClosed ( pConstMesh  mesh)
static

Checks if the mesh is closed ( = it has no boundary edges[1] ).

◆ isPlanar()

static bool Topo::MeshTool::isPlanar ( pConstMesh  mesh)
static

Checks if the mesh is planar ( = all its points lay on the same plane ).

◆ makeMesh() [1/3]

static pMesh Topo::MeshTool::makeMesh ( const std::vector< Geom::Pnt > &  nodes,
const std::vector< int > &  model,
const std::vector< Geom::Pnt2d > &  textureCoords,
const std::vector< int > &  textureCoordIndices,
const std::vector< Geom::Pnt > &  normals 
)
static

Makes a mesh from Nodes and Texture-Coordinates.

◆ makeMesh() [2/3]

static pMesh Topo::MeshTool::makeMesh ( const std::vector< Geom::Pnt > &  nodes,
const std::vector< int > &  model 
)
static

Makes a mesh from Nodes.

◆ makeMesh() [3/3]

static pMesh Topo::MeshTool::makeMesh ( const std::vector< Geom::Pnt > &  nodes,
const std::vector< int > &  model,
const std::vector< Geom::Pnt > &  normals 
)
static

Makes a mesh from Nodes and normals.

◆ makeMeshFromBrepData()

static pMesh Topo::MeshTool::makeMeshFromBrepData ( pConstBrepData  data)
static

Makes a mesh from BrepData.

◆ triangulationToMesh() [1/2]

static pMesh Topo::MeshTool::triangulationToMesh ( pConstShape  shape)
static

Creates a mesh from the shape's triangulation. Tessellates the shape if necessary. Returns nullptr if there is no triangulation. If the shape is a mesh returns a triangulated deep copy.

◆ triangulationToMesh() [2/2]

static pMesh Topo::MeshTool::triangulationToMesh ( pConstShape  shape,
bool  highQuality,
std::vector< int > *  newToOldFaceIdxMap = 0 
)
static

Creates a mesh from the shape's triangulation. Tessellates the shape if necessary. Returns nullptr if there is no triangulation. If the shape is a mesh returns a triangulated deep copy.


The documentation for this class was generated from the following file: