|
OCCT-Light 0.1
C ABI and C++ veneer for multi-language CAD workflows
|
C++ veneer for the prim module. More...
#include <occtl/occtl_prim.h>#include <occtl-hpp/core.hpp>#include <occtl-hpp/curves2d.hpp>#include <occtl-hpp/topo.hpp>#include <cstddef>#include <tuple>#include <utility>#include <vector>
Go to the source code of this file.
Typedefs | |
| using | occtl::prim::FaceFromSurfaceOptions = ::occtl_prim_face_from_surface_options_t |
| Options for building a Face from a surface rep. | |
| using | occtl::prim::FaceFromPointGridOptions = ::occtl_prim_face_from_point_grid_options_t |
| Options for building a Face from a point-grid surface. | |
| using | occtl::prim::FaceFromBoundaryCurvesOptions = ::occtl_prim_face_from_boundary_curves_options_t |
| Options for building a Face from boundary-curve surface filling. | |
| using | occtl::prim::FaceFromCurveGridOptions = ::occtl_prim_face_from_curve_grid_options_t |
| Options for building a Face from a curve-grid Gordon surface. | |
| using | occtl::prim::BrakeSide = ::occtl_prim_brake_side_t |
| Brake-forming offset side. | |
| using | occtl::prim::BrakeFormedOptions = ::occtl_prim_brake_formed_options_t |
| Options for sheet-metal brake-formed solids. | |
Functions | |
| inline ::occtl_axis2_placement_t | occtl::prim::detail::default_ax2 () noexcept |
Default axis2 placement: origin + Z (main) + X. Matches OCCT's gp::XOY(). | |
| NodeId | occtl::prim::make_box (Graph &theGraph, const double theDx, const double theDy, const double theDz, const ::occtl_axis2_placement_t &thePlacement=detail::default_ax2()) |
| Builds a Box and returns its Solid NodeId. Throws on failure. | |
| NodeId | occtl::prim::make_face_from_surface (Graph &theGraph, const FaceFromSurfaceOptions &theOptions) |
| Builds a Face from a surface handle and optional boundary wires. | |
| NodeId | occtl::prim::make_face_from_point_grid (Graph &theGraph, const FaceFromPointGridOptions &theOptions) |
| Builds a Face directly from a point-grid B-spline surface. | |
| NodeId | occtl::prim::make_face_from_boundary_curves (Graph &theGraph, const FaceFromBoundaryCurvesOptions &theOptions) |
| Builds a Face directly from boundary-curve surface filling. | |
| NodeId | occtl::prim::make_face_from_curve_grid (Graph &theGraph, const FaceFromCurveGridOptions &theOptions) |
| Builds a Face directly from a curve-grid Gordon surface. | |
| std::pair< Graph, NodeId > | occtl::prim::make_brake_formed (const Graph &theGraph, const BrakeFormedOptions &theOptions) |
| Builds a sheet-metal brake-formed solid from a planar bend line. | |
| NodeId | occtl::prim::make_sphere (Graph &theGraph, const double theRadius, const ::occtl_axis2_placement_t &thePlacement=detail::default_ax2()) |
| Builds a Sphere and returns its Solid NodeId. Throws on failure. | |
| NodeId | occtl::prim::make_cylinder (Graph &theGraph, const double theRadius, const double theHeight, const ::occtl_axis2_placement_t &thePlacement=detail::default_ax2()) |
| Builds a Cylinder and returns its Solid NodeId. Throws on failure. | |
| NodeId | occtl::prim::make_cone (Graph &theGraph, const double theR1, const double theR2, const double theHeight, const ::occtl_axis2_placement_t &thePlacement=detail::default_ax2()) |
| Builds a Cone and returns its Solid NodeId. Throws on failure. | |
| NodeId | occtl::prim::make_torus (Graph &theGraph, const double theMajor, const double theMinor, const ::occtl_axis2_placement_t &thePlacement=detail::default_ax2()) |
| Builds a Torus and returns its Solid NodeId. Throws on failure. | |
| NodeId | occtl::prim::make_wedge (Graph &theGraph, const double theDx, const double theDy, const double theDz, const double theLtx, const ::occtl_axis2_placement_t &thePlacement=detail::default_ax2()) |
| Builds a right-angular Wedge and returns its Solid NodeId. Throws on failure. | |
| NodeId | occtl::prim::make_halfspace (Graph &theGraph, const NodeId &theFace, const ::occtl_point3_t &theRefPoint) |
Builds a HalfSpace bounded by theFace on the side of theRefPoint. | |
| NodeId | occtl::prim::make_prism (Graph &theGraph, const NodeId &theProfile, const ::occtl_vector3_t &theDirection, const bool theCopy=false, const bool theCanonize=true) |
Builds a linear extrusion of theProfile by theDirection. | |
| NodeId | occtl::prim::make_twist_extrusion (Graph &theGraph, const NodeId &theProfileWire, const ::occtl_axis1_placement_t &theAxis, const double theHeight, const double theAngle, const TwistExtrusionOptions &theOptions={}) |
| Builds a twisted extrusion of a closed Wire profile. | |
| NodeId | occtl::prim::make_extrude_twist (Graph &theGraph, const NodeId &theProfileWire, const ::occtl_axis1_placement_t &theAxis, const double theHeight, const double theAngle, const TwistExtrusionOptions &theOptions={}) |
| Builds a twisted extrusion of a closed Wire profile. | |
| NodeId | occtl::prim::make_revol (Graph &theGraph, const NodeId &theProfile, const ::occtl_axis1_placement_t &theAxis, const double theAngle=6.283185307179586, const bool theCopy=false) |
Builds a revolution of theProfile around theAxis by theAngle radians. | |
| NodeId | occtl::prim::make_pipe (Graph &theGraph, const NodeId &theProfile, const NodeId &theSpineWire) |
Sweeps theProfile along theSpineWire. | |
| NodeId | occtl::prim::make_loft (Graph &theGraph, const std::vector< NodeId > &theSections, const bool theIsSolid=false, const bool theRuled=false, const double thePres3d=1.0e-6) |
| Lofts a sequence of Wire / Vertex sections into a shell or solid. | |
| NodeId | occtl::prim::make_polyline (Graph &theGraph, const std::vector<::occtl_point3_t > &thePoints, const bool theClosed=false) |
Builds an open or closed polyline Wire from thePoints. | |
| NodeId | occtl::prim::make_regular_polygon (Graph &theGraph, const int theSides, const double theCircumradius, const ::occtl_axis2_placement_t &thePlacement=detail::default_ax2(), const double theRotation=0.0) |
| Builds a regular-polygon Wire inscribed in a circle. | |
| NodeId | occtl::prim::make_rectangle (Graph &theGraph, const double theWidth, const double theHeight, const ::occtl_axis2_placement_t &thePlacement=detail::default_ax2()) |
Builds a closed rectangle Wire centred on thePlacement. | |
| NodeId | occtl::prim::make_circle (Graph &theGraph, const double theRadius, const ::occtl_axis2_placement_t &thePlacement=detail::default_ax2()) |
| Builds a closed circular Wire. | |
| NodeId | occtl::prim::make_ellipse (Graph &theGraph, const double theMajor, const double theMinor, const ::occtl_axis2_placement_t &thePlacement=detail::default_ax2()) |
| Builds a closed elliptical Wire. | |
| NodeId | occtl::prim::make_arc_3pt (Graph &theGraph, const ::occtl_point3_t &theStart, const ::occtl_point3_t &theVia, const ::occtl_point3_t &theEnd) |
| Builds a circular-arc Wire through three points. | |
| NodeId | occtl::prim::make_arc_center (Graph &theGraph, const double theRadius, const double theStartAngle, const double theEndAngle, const ::occtl_axis2_placement_t &thePlacement=detail::default_ax2()) |
| Builds a circular-arc Wire from a center frame, radius, and angle range. | |
| NodeId | occtl::prim::make_spline (Graph &theGraph, const std::vector<::occtl_point3_t > &thePoints, const int theDegreeMin=3, const int theDegreeMax=8, const double theTolerance=1.0e-3) |
| Builds a B-spline Wire approximating points. | |
| NodeId | occtl::prim::make_plane (Graph &theGraph, const double theWidth, const double theHeight, const ::occtl_axis2_placement_t &thePlacement=detail::default_ax2()) |
| Builds a rectangular planar Face. | |
| NodeId | occtl::prim::make_disk (Graph &theGraph, const double theRadius, const ::occtl_axis2_placement_t &thePlacement=detail::default_ax2()) |
| Builds a circular planar Face. | |
| NodeId | occtl::prim::make_planar_face (Graph &theGraph, const NodeId &theOuter, const std::vector< NodeId > &theInners={}) |
| Builds a planar Face from a closed outer Wire and optional inner Wires (holes). | |
| NodeId | occtl::prim::make_convex_hull_2d (Graph &theGraph, const std::vector< occtl_point3_t > &thePoints, const std::vector< NodeId > &theVertices={}, const ConvexHull2dOptions &theOptions={}) |
| Builds a convex-hull Wire or planar Face from points and Vertex nodes. | |
| NodeId | occtl::prim::make_trace (Graph &theGraph, const NodeId &thePath, const double theWidth, const TraceOptions &theOptions={}) |
| Builds a constant-width planar Face around an Edge or open Wire path. | |
| NodeId | occtl::prim::make_constrained_curve_edge (Graph &theGraph, const Curve2d &theCurve, const ConstrainedCurveEdgeOptions &theOptions={}) |
| Places a 2D curve on a sketch plane and inserts the resulting Edge. | |
| NodeId | occtl::prim::make_pipe_shell (Graph &theGraph, const NodeId &theSpineWire, const std::vector< NodeId > &theProfiles, const PipeShellOptions &theOptions={}) |
| Rich pipe-shell sweep with explicit mode / transition / contact control. | |
| NodeId | occtl::prim::make_pipe_shell_linear_law (Graph &theGraph, const NodeId &theSpineWire, const NodeId &theProfile, const PipeShellLinearLawOptions &theOptions={}) |
| Rich pipe-shell sweep with linear profile scaling along the spine. | |
| NodeId | occtl::prim::make_pipe_shell_interpolated_law (Graph &theGraph, const NodeId &theSpineWire, const NodeId &theProfile, const PipeShellInterpolatedLawOptions &theOptions) |
| Rich pipe-shell sweep with interpolated profile scaling along the spine. | |
| NodeId | occtl::prim::make_offset_shape (Graph &theGraph, const NodeId &theShape, const double theOffset, const OffsetOptions &theOptions={}) |
Builds an offset of theShape (wire / face / shell / solid). | |
| NodeId | occtl::prim::make_thick_solid (Graph &theGraph, const NodeId &theSolid, const std::vector< NodeId > &theClosingFaces, const double theOffset, const OffsetOptions &theOptions={}) |
Hollows theSolid into a thick-walled solid (the "shell" CAD op). theClosingFaces are dropped to leave open ends. | |
| NodeId | occtl::prim::make_draft_prism (Graph &theGraph, const NodeId &theProfile, const double theHeight, const double theTaperAngle) |
| Builds a tapered prism solid from one Face profile. | |
| NodeId | occtl::prim::make_extrude_tapered (Graph &theGraph, const NodeId &theProfileFace, const double theHeight, const double theTaperAngle) |
| Builds a tapered extrusion solid from one Face profile. | |
| NodeId | occtl::prim::make_ruled_surface (Graph &theGraph, const NodeId &theSectionA, const NodeId &theSectionB) |
| Builds a ruled Face or Shell between two Edge or Wire sections. | |
| NodeId | occtl::prim::make_feat_prism (Graph &theGraph, const NodeId &theBaseShape, const NodeId &theProfile, const NodeId &theSketchFace, const ::occtl_direction3_t &theDirection, const FeatPrismOptions &theOptions={}) |
| Builds a feature prism — extrude a profile on an existing body until a target / length / through all. | |
| NodeId | occtl::prim::make_extrude_until (Graph &theGraph, const NodeId &theBaseShape, const NodeId &theProfile, const NodeId &theSketchFace, const NodeId &theTargetShape, const ::occtl_direction3_t &theDirection, const ExtrudeUntilOptions &theOptions={}) |
| Builds a feature extrusion from a profile until a target shape. | |
| NodeId | occtl::prim::make_feat_draft_prism (Graph &theGraph, const NodeId &theBaseShape, const NodeId &theProfileFace, const NodeId &theSketchFace, const double theTaperAngle, const FeatDraftPrismOptions &theOptions={}) |
| Builds a draft-prism feature on an existing body. | |
| NodeId | occtl::prim::make_cylindrical_hole (Graph &theGraph, const NodeId &theBaseShape, const ::occtl_axis1_placement_t &theAxis, const double theRadius, const CylindricalHoleOptions &theOptions={}) |
Cuts a cylindrical hole feature into theBaseShape. | |
| NodeId | occtl::prim::make_slot (Graph &theGraph, const double theLength, const double theWidth, const ::occtl_axis2_placement_t &thePlacement=detail::default_ax2()) |
| Builds a closed slot (stadium) Wire. | |
| NodeId | occtl::prim::make_tube (Graph &theGraph, const double theOuterRadius, const double theInnerRadius, const double theHeight, const ::occtl_axis2_placement_t &thePlacement=detail::default_ax2()) |
| Builds a hollow-cylinder (tube) Solid. | |
| NodeId | occtl::prim::make_helix (Graph &theGraph, const double theRadius, const double thePitch, const double theHeight, const ::occtl_axis2_placement_t &thePlacement=detail::default_ax2(), const bool theLeftHanded=false) |
| Builds a helical Wire. | |
| NodeId | occtl::prim::make_fillet_2d (Graph &theGraph, const NodeId &theFace, const double theRadius, const std::vector< NodeId > &theVertices={}) |
| Rounds every corner of a planar Face to a uniform radius. | |
| NodeId | occtl::prim::make_full_round_2d (Graph &theGraph, const NodeId &theFace, const NodeId &theEdge, const FullRound2dOptions &theOptions={}) |
| Replaces a selected planar Face edge with a full-round arc. | |
C++ veneer for the prim module.
Provides builder helpers that mirror C info structs as PascalCase PODs and return freshly built NodeId values. Failures translate to occtl::Error.
|
inline |
Builds a Box and returns its Solid NodeId. Throws on failure.
| [in,out] | theGraph | graph receiving the box |
| [in] | theDx | edge size along X |
| [in] | theDy | edge size along Y |
| [in] | theDz | edge size along Z |
| [in] | thePlacement | local frame; defaults to XOY |