API Reference¶
Geometry¶
-
namespace Geometry¶
Functions
-
std::optional<TopoDS_Shape> MakeSphere(double radius)¶
Create a sphere of the given radius centred at the origin.
- Returns:
the shape, or std::nullopt if OCCT reports a build failure.
-
std::optional<TopoDS_Shape> MakeBox(double dx, double dy, double dz)¶
Create an axis-aligned box with one corner at the origin.
- Returns:
the shape, or std::nullopt if OCCT reports a build failure.
-
std::optional<BoundingBox> GetBoundingBox(const TopoDS_Shape &shape)¶
Compute the axis-aligned bounding box of a shape.
- Returns:
nullopt if the shape is null or degenerate.
-
std::string ShapeTypeString(const TopoDS_Shape &shape)¶
Human-readable name for the top-level shape type (e.g. “Solid”, “Shell”).
-
std::optional<TopoDS_Shape> MakeSphere(double radius)¶
I/O¶
-
class StepExporter¶
-
class StlExporter¶
Public Functions
-
inline void SetLinearDeflection(double deflection) noexcept¶
Linear deflection controls triangle density (smaller = finer mesh).
Default: 0.1
-
inline void SetAngularDeflection(double radians) noexcept¶
Angular deflection in radians. Default: 0.5.
-
void Write(const TopoDS_Shape &shape, const std::filesystem::path &path) const¶
Mesh and write
shapetopath.- Throws:
std::runtime_error – on OCCT write failure.
-
inline void SetLinearDeflection(double deflection) noexcept¶