OCCT-Light 0.1
C ABI and C++ veneer for multi-language CAD workflows
Loading...
Searching...
No Matches
mesh.hpp File Reference

C++ veneer for the mesh module. More...

#include <occtl/occtl_mesh.h>
#include <occtl-hpp/core.hpp>
#include <occtl-hpp/geom.hpp>
#include <occtl-hpp/topo.hpp>
#include <cstddef>
#include <cstdint>
#include <optional>
#include <string>
#include <vector>
Include dependency graph for mesh.hpp:

Go to the source code of this file.

Classes

struct  occtl::mesh::AABB3
 Axis-aligned bounding box. Aggregate over the C POD. More...
 
struct  occtl::mesh::Options
 Idiomatic mirror of occtl_mesh_options_t. More...
 
class  occtl::mesh::TriangulationView
 Borrowed view of a face triangulation. Lifetime tied to the source graph. More...
 
class  occtl::mesh::Polygon3DView
 Borrowed view of a 3D polyline cached on an edge. More...
 
class  occtl::mesh::PolygonOnTriView
 Borrowed view of a coedge polyline indexed onto its parent face's triangulation. More...
 
class  occtl::mesh::TriangleBuffersView
 Borrowed aggregate triangle-soup buffers for a graph/root. More...
 
class  occtl::mesh::TriangleAnalysisView
 Borrowed per-triangle normals and adjacency for a graph/root. More...
 
class  occtl::mesh::TriangleComponentsView
 Borrowed normal-connected triangle component labels. More...
 
class  occtl::mesh::TriangleComponentTrianglesView
 Borrowed aggregate triangle indices belonging to one component. More...
 
class  occtl::mesh::TriangleComponentBoundaryView
 Borrowed boundary edges belonging to one triangle component. More...
 
class  occtl::mesh::TriangleComponentBoundaryChainsView
 Borrowed ordered boundary chains belonging to one triangle component. More...
 
class  occtl::mesh::TriangleComponentBoundaryPolylinesView
 Borrowed ordered boundary polylines belonging to one triangle component. More...
 
class  occtl::mesh::TriangleComponentSummariesView
 Borrowed summaries for normal-connected triangle components. More...
 
class  occtl::mesh::TrianglePlaneComponentsView
 Borrowed plane-like normal-connected triangle components. More...
 
class  occtl::mesh::TriangleSphereComponentsView
 Borrowed sphere-like normal-connected triangle components. More...
 
class  occtl::mesh::TriangleCylinderComponentsView
 Borrowed cylinder-like normal-connected triangle components. More...
 

Macros

#define OCCTL_HPP_HAS_SPAN   0
 

Typedefs

using occtl::mesh::FromBuffersOptions = ::occtl_mesh_from_buffers_options_t
 Input buffers for creating a graph-owned triangulated face.
 
using occtl::mesh::TriangleComponentsOptions = ::occtl_mesh_triangle_components_options_t
 
using occtl::mesh::TrianglePlaneComponentsOptions = ::occtl_mesh_triangle_plane_components_options_t
 
using occtl::mesh::TriangleSphereComponentsOptions = ::occtl_mesh_triangle_sphere_components_options_t
 
using occtl::mesh::TriangleCylinderComponentsOptions = ::occtl_mesh_triangle_cylinder_components_options_t
 

Functions

void occtl::mesh::generate (Graph &theGraph, const Options &theOpts)
 Tessellate every active face and free edge in theGraph.
 
void occtl::mesh::generate (Graph &theGraph, const std::vector< NodeId > &theNodes, const Options &theOpts)
 Tessellate the subtree(s) rooted at the supplied nodes.
 
std::pair< Graph, NodeIdocctl::mesh::from_buffers (const FromBuffersOptions &theOptions)
 Creates a new graph containing one triangulated Face from caller buffers.
 
void occtl::mesh::model_metadata_set (Graph &theGraph, const char *const theKey, const std::size_t theKeyLen, const char *const theValue, const std::size_t theValueLen)
 Sets mesh-model metadata on the graph metadata storage.
 
std::string occtl::mesh::model_metadata_get (const Graph &theGraph, const char *const theKey, const std::size_t theKeyLen)
 Retrieves mesh-model metadata from the graph metadata storage.
 
std::vector< std::string > occtl::mesh::model_metadata_keys (const Graph &theGraph)
 Lists mesh-model metadata keys from the graph metadata storage.
 
void occtl::mesh::model_metadata_unset (Graph &theGraph, const char *const theKey, const std::size_t theKeyLen)
 Removes one mesh-model metadata key. Idempotent.
 
TriangulationView occtl::mesh::face_triangulation (const Graph &theGraph, const NodeId theFace)
 Active cached triangulation of theFace.
 
uint32_t occtl::mesh::face_triangulation_count (const Graph &theGraph, const NodeId theFace)
 Number of cached triangulations on theFace.
 
TriangulationView occtl::mesh::face_triangulation_at (const Graph &theGraph, const NodeId theFace, const uint32_t theIndex)
 theIndex-th cached triangulation of theFace.
 
Polygon3DView occtl::mesh::edge_polygon3d (const Graph &theGraph, const NodeId theEdge)
 Cached 3D polyline on theEdge.
 
PolygonOnTriView occtl::mesh::coedge_polygon_on_tri (const Graph &theGraph, const NodeId theCoEdge)
 Cached polygon-on-triangulation for theCoEdge.
 
TriangleBuffersView occtl::mesh::triangle_buffers (const Graph &theGraph, const NodeId theRoot=NodeId::invalid())
 Aggregate cached triangulations into graph-owned triangle-soup buffers.
 
TriangleAnalysisView occtl::mesh::triangle_analysis (const Graph &theGraph, const NodeId theRoot=NodeId::invalid())
 Cached per-triangle normals and adjacency for graph-owned mesh buffers.
 
TriangleComponentsView occtl::mesh::triangle_components (const Graph &theGraph, const TriangleComponentsOptions &theOptions)
 Normal-connected triangle components for graph-owned mesh buffers.
 
TriangleComponentsView occtl::mesh::triangle_components (const Graph &theGraph, const NodeId theRoot=NodeId::invalid())
 Normal-connected triangle components with default tolerance.
 
TriangleComponentSummariesView occtl::mesh::triangle_component_summaries (const Graph &theGraph, const TriangleComponentsOptions &theOptions)
 Summaries for normal-connected triangle components.
 
TriangleComponentSummariesView occtl::mesh::triangle_component_summaries (const Graph &theGraph, const NodeId theRoot=NodeId::invalid())
 Summaries for normal-connected triangle components with default tolerance.
 
TriangleComponentTrianglesView occtl::mesh::triangle_component_triangles (const Graph &theGraph, const TriangleComponentsOptions &theOptions, const uint32_t theComponentId)
 Aggregate triangle indices belonging to one component.
 
TriangleComponentTrianglesView occtl::mesh::triangle_component_triangles (const Graph &theGraph, const uint32_t theComponentId, const NodeId theRoot=NodeId::invalid())
 Aggregate triangle indices for one component with default tolerance.
 
TriangleComponentBoundaryView occtl::mesh::triangle_component_boundary (const Graph &theGraph, const TriangleComponentsOptions &theOptions, const uint32_t theComponentId)
 Boundary edges belonging to one triangle component.
 
TriangleComponentBoundaryView occtl::mesh::triangle_component_boundary (const Graph &theGraph, const uint32_t theComponentId, const NodeId theRoot=NodeId::invalid())
 Boundary edges for one component with default tolerance.
 
TriangleComponentBoundaryChainsView occtl::mesh::triangle_component_boundary_chains (const Graph &theGraph, const TriangleComponentsOptions &theOptions, const uint32_t theComponentId)
 Ordered boundary chains belonging to one triangle component.
 
TriangleComponentBoundaryChainsView occtl::mesh::triangle_component_boundary_chains (const Graph &theGraph, const uint32_t theComponentId, const NodeId theRoot=NodeId::invalid())
 Ordered boundary chains for one component with default tolerance.
 
TriangleComponentBoundaryPolylinesView occtl::mesh::triangle_component_boundary_polylines (const Graph &theGraph, const TriangleComponentsOptions &theOptions, const uint32_t theComponentId)
 Ordered boundary polylines belonging to one triangle component.
 
TriangleComponentBoundaryPolylinesView occtl::mesh::triangle_component_boundary_polylines (const Graph &theGraph, const uint32_t theComponentId, const NodeId theRoot=NodeId::invalid())
 Ordered boundary polylines for one component with default tolerance.
 
TrianglePlaneComponentsView occtl::mesh::triangle_plane_components (const Graph &theGraph, const TrianglePlaneComponentsOptions &theOptions)
 Plane-like normal-connected triangle components.
 
TrianglePlaneComponentsView occtl::mesh::triangle_plane_components (const Graph &theGraph, const NodeId theRoot=NodeId::invalid())
 Plane-like normal-connected triangle components with default tolerance.
 
TriangleSphereComponentsView occtl::mesh::triangle_sphere_components (const Graph &theGraph, const TriangleSphereComponentsOptions &theOptions)
 Sphere-like normal-connected triangle components.
 
TriangleSphereComponentsView occtl::mesh::triangle_sphere_components (const Graph &theGraph, const NodeId theRoot=NodeId::invalid())
 Sphere-like normal-connected triangle components with default tolerance.
 
TriangleCylinderComponentsView occtl::mesh::triangle_cylinder_components (const Graph &theGraph, const TriangleCylinderComponentsOptions &theOptions)
 Cylinder-like normal-connected triangle components.
 
TriangleCylinderComponentsView occtl::mesh::triangle_cylinder_components (const Graph &theGraph, const NodeId theRoot=NodeId::invalid())
 Cylinder-like normal-connected triangle components with default tolerance.
 
NodeId occtl::mesh::make_sphere_component_solid (Graph &theGraph, const TriangleSphereComponentsOptions &theOptions, const uint32_t theComponentId)
 Rebuild one sphere-like triangle component as an analytic Solid root.
 
NodeId occtl::mesh::make_sphere_component_solid (Graph &theGraph, const uint32_t theComponentId, const NodeId theRoot=NodeId::invalid())
 Rebuild one sphere-like triangle component as an analytic Solid root with default tolerance.
 
NodeId occtl::mesh::make_cylinder_component_solid (Graph &theGraph, const TriangleCylinderComponentsOptions &theOptions, const uint32_t theComponentId)
 Rebuild one cylinder-like triangle component as an analytic Solid root.
 
NodeId occtl::mesh::make_cylinder_component_solid (Graph &theGraph, const uint32_t theComponentId, const NodeId theRoot=NodeId::invalid())
 Rebuild one cylinder-like triangle component as an analytic Solid root with default tolerance.
 
std::vector< NodeIdocctl::mesh::make_sphere_component_solids (Graph &theGraph, const TriangleSphereComponentsOptions &theOptions)
 Rebuild all sphere-like triangle components as analytic Solid roots.
 
std::vector< NodeIdocctl::mesh::make_sphere_component_solids (Graph &theGraph, const NodeId theRoot=NodeId::invalid())
 Rebuild all sphere-like triangle components as analytic Solid roots with default tolerance.
 
std::vector< NodeIdocctl::mesh::make_cylinder_component_solids (Graph &theGraph, const TriangleCylinderComponentsOptions &theOptions)
 Rebuild all cylinder-like triangle components as analytic Solid roots.
 
std::vector< NodeIdocctl::mesh::make_cylinder_component_solids (Graph &theGraph, const NodeId theRoot=NodeId::invalid())
 Rebuild all cylinder-like triangle components as analytic Solid roots with default tolerance.
 
NodeId occtl::mesh::make_plane_component_face (Graph &theGraph, const TrianglePlaneComponentsOptions &theOptions, const uint32_t theComponentId)
 Rebuild one plane-like triangle component as a planar Face root.
 
NodeId occtl::mesh::make_plane_component_face (Graph &theGraph, const uint32_t theComponentId, const NodeId theRoot=NodeId::invalid())
 Rebuild one plane-like triangle component as a planar Face root with default tolerance.
 
std::vector< NodeIdocctl::mesh::make_plane_component_faces (Graph &theGraph, const TrianglePlaneComponentsOptions &theOptions)
 Rebuild all plane-like triangle components as planar Face roots.
 
std::vector< NodeIdocctl::mesh::make_plane_component_faces (Graph &theGraph, const NodeId theRoot=NodeId::invalid())
 Rebuild all plane-like triangle components as planar Face roots with default tolerance.
 

Detailed Description

C++ veneer for the mesh module.

Provides idiomatic options, borrowed span views, and mesh generation helpers. Failures translate to occtl::Error via check().