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

OCCT-Light: feature and recipe-based model construction API. More...

#include "occtl_core.h"
#include "occtl_curves2d.h"
#include "occtl_geom.h"
#include "occtl_surfaces.h"
#include "occtl_topo.h"
Include dependency graph for occtl_prim_feature.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  occtl_prim_face_from_surface_options
 
struct  occtl_prim_face_from_point_grid_options
 
struct  occtl_prim_face_from_boundary_curves_options
 
struct  occtl_prim_face_from_curve_grid_options
 
struct  occtl_prim_brake_formed_options
 
struct  occtl_prim_draft_prism_info
 
struct  occtl_prim_extrude_tapered_info
 
struct  occtl_prim_ruled_surface_info
 
struct  occtl_prim_feat_prism_info
 
struct  occtl_prim_extrude_until_info
 
struct  occtl_prim_feat_draft_prism_info
 
struct  occtl_prim_cylindrical_hole_info
 

Macros

#define OCCTL_PRIM_FACE_FROM_SURFACE_OPTIONS_VERSION_1   1u
 
#define OCCTL_PRIM_FACE_FROM_SURFACE_OPTIONS_INIT
 
#define OCCTL_PRIM_FACE_FROM_POINT_GRID_OPTIONS_VERSION_1   1u
 
#define OCCTL_PRIM_FACE_FROM_POINT_GRID_OPTIONS_INIT
 
#define OCCTL_PRIM_FACE_FROM_BOUNDARY_CURVES_OPTIONS_VERSION_1   1u
 
#define OCCTL_PRIM_FACE_FROM_BOUNDARY_CURVES_OPTIONS_INIT
 
#define OCCTL_PRIM_FACE_FROM_CURVE_GRID_OPTIONS_VERSION_1   1u
 
#define OCCTL_PRIM_FACE_FROM_CURVE_GRID_OPTIONS_INIT
 
#define OCCTL_PRIM_BRAKE_FORMED_OPTIONS_VERSION_1   1u
 
#define OCCTL_PRIM_BRAKE_FORMED_OPTIONS_INIT
 
#define OCCTL_PRIM_DRAFT_PRISM_INFO_VERSION_1   1u
 
#define OCCTL_PRIM_DRAFT_PRISM_INFO_INIT    {OCCTL_PRIM_DRAFT_PRISM_INFO_VERSION_1, NULL, OCCTL_NODE_ID_INVALID, 1.0, 0.0}
 
#define OCCTL_PRIM_EXTRUDE_TAPERED_INFO_VERSION_1   1u
 
#define OCCTL_PRIM_EXTRUDE_TAPERED_INFO_INIT    {OCCTL_PRIM_EXTRUDE_TAPERED_INFO_VERSION_1, NULL, OCCTL_NODE_ID_INVALID, 1.0, 0.0}
 
#define OCCTL_PRIM_RULED_SURFACE_INFO_VERSION_1   1u
 
#define OCCTL_PRIM_RULED_SURFACE_INFO_INIT    {OCCTL_PRIM_RULED_SURFACE_INFO_VERSION_1, NULL, OCCTL_NODE_ID_INVALID, OCCTL_NODE_ID_INVALID}
 
#define OCCTL_PRIM_FEAT_PRISM_INFO_VERSION_1   1u
 
#define OCCTL_PRIM_FEAT_PRISM_INFO_INIT
 
#define OCCTL_PRIM_EXTRUDE_UNTIL_INFO_VERSION_1   1u
 
#define OCCTL_PRIM_EXTRUDE_UNTIL_INFO_INIT
 
#define OCCTL_PRIM_FEAT_DRAFT_PRISM_INFO_VERSION_1   1u
 
#define OCCTL_PRIM_FEAT_DRAFT_PRISM_INFO_INIT
 
#define OCCTL_PRIM_CYLINDRICAL_HOLE_INFO_VERSION_1   1u
 
#define OCCTL_PRIM_CYLINDRICAL_HOLE_INFO_INIT
 

Typedefs

typedef struct occtl_prim_face_from_surface_options occtl_prim_face_from_surface_options_t
 
typedef struct occtl_prim_face_from_point_grid_options occtl_prim_face_from_point_grid_options_t
 
typedef struct occtl_prim_face_from_boundary_curves_options occtl_prim_face_from_boundary_curves_options_t
 
typedef struct occtl_prim_face_from_curve_grid_options occtl_prim_face_from_curve_grid_options_t
 
typedef enum occtl_prim_brake_side occtl_prim_brake_side_t
 
typedef struct occtl_prim_brake_formed_options occtl_prim_brake_formed_options_t
 
typedef struct occtl_prim_draft_prism_info occtl_prim_draft_prism_info_t
 
typedef struct occtl_prim_extrude_tapered_info occtl_prim_extrude_tapered_info_t
 
typedef struct occtl_prim_ruled_surface_info occtl_prim_ruled_surface_info_t
 
typedef enum occtl_prim_until_kind occtl_prim_until_kind_t
 
typedef enum occtl_prim_feat_combine occtl_prim_feat_combine_t
 
typedef struct occtl_prim_feat_prism_info occtl_prim_feat_prism_info_t
 
typedef enum occtl_prim_extrude_until_side occtl_prim_extrude_until_side_t
 
typedef struct occtl_prim_extrude_until_info occtl_prim_extrude_until_info_t
 
typedef struct occtl_prim_feat_draft_prism_info occtl_prim_feat_draft_prism_info_t
 
typedef enum occtl_prim_cylindrical_hole_kind occtl_prim_cylindrical_hole_kind_t
 
typedef struct occtl_prim_cylindrical_hole_info occtl_prim_cylindrical_hole_info_t
 

Enumerations

enum  occtl_prim_brake_side { OCCTL_PRIM_BRAKE_SIDE_LEFT = 0 , OCCTL_PRIM_BRAKE_SIDE_RIGHT = 1 , OCCTL_PRIM_BRAKE_SIDE_RESERVED_FUTURE = 0x7fffffff }
 
enum  occtl_prim_until_kind {
  OCCTL_UNTIL_LENGTH = 0 , OCCTL_UNTIL_SHAPE = 1 , OCCTL_UNTIL_THRU_ALL = 2 , OCCTL_UNTIL_HEIGHT = 3 ,
  OCCTL_UNTIL_RESERVED_FUTURE = 0x7fffffff
}
 
enum  occtl_prim_feat_combine { OCCTL_FEAT_SEPARATE = 0 , OCCTL_FEAT_CUT = 1 , OCCTL_FEAT_FUSE = 2 , OCCTL_FEAT_COMBINE_RESERVED_FUTURE = 0x7fffffff }
 
enum  occtl_prim_extrude_until_side {
  OCCTL_EXTRUDE_UNTIL_NEXT = 0 , OCCTL_EXTRUDE_UNTIL_LAST = 1 , OCCTL_EXTRUDE_UNTIL_PREVIOUS = 2 , OCCTL_EXTRUDE_UNTIL_FIRST = 3 ,
  OCCTL_EXTRUDE_UNTIL_RESERVED_FUTURE = 0x7fffffff
}
 
enum  occtl_prim_cylindrical_hole_kind {
  OCCTL_CYLINDRICAL_HOLE_THROUGH_ALL , OCCTL_CYLINDRICAL_HOLE_BETWEEN_PARAMS , OCCTL_CYLINDRICAL_HOLE_THRU_NEXT = 2 , OCCTL_CYLINDRICAL_HOLE_UNTIL_END = 3 ,
  OCCTL_CYLINDRICAL_HOLE_BLIND = 4 , OCCTL_CYLINDRICAL_HOLE_RESERVED_FUTURE = 0x7fffffff
}
 

Functions

void occtl_prim_face_from_surface_options_init (occtl_prim_face_from_surface_options_t *options)
 
occtl_status_t occtl_prim_make_face_from_surface (occtl_graph_t *graph, const occtl_prim_face_from_surface_options_t *options, occtl_node_id_t *out_face)
 
void occtl_prim_face_from_point_grid_options_init (occtl_prim_face_from_point_grid_options_t *options)
 
occtl_status_t occtl_prim_make_face_from_point_grid (occtl_graph_t *graph, const occtl_prim_face_from_point_grid_options_t *options, occtl_node_id_t *out_face)
 
void occtl_prim_face_from_boundary_curves_options_init (occtl_prim_face_from_boundary_curves_options_t *options)
 
occtl_status_t occtl_prim_make_face_from_boundary_curves (occtl_graph_t *graph, const occtl_prim_face_from_boundary_curves_options_t *options, occtl_node_id_t *out_face)
 
void occtl_prim_face_from_curve_grid_options_init (occtl_prim_face_from_curve_grid_options_t *options)
 
occtl_status_t occtl_prim_make_face_from_curve_grid (occtl_graph_t *graph, const occtl_prim_face_from_curve_grid_options_t *options, occtl_node_id_t *out_face)
 
void occtl_prim_brake_formed_options_init (occtl_prim_brake_formed_options_t *opts)
 
occtl_status_t occtl_prim_make_brake_formed (const occtl_graph_t *graph, const occtl_prim_brake_formed_options_t *options, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
 
void occtl_prim_draft_prism_info_init (occtl_prim_draft_prism_info_t *info)
 
occtl_status_t occtl_prim_make_draft_prism (occtl_graph_t *graph, const occtl_prim_draft_prism_info_t *info, occtl_node_id_t *out_shape)
 
void occtl_prim_extrude_tapered_info_init (occtl_prim_extrude_tapered_info_t *info)
 
occtl_status_t occtl_prim_make_extrude_tapered (occtl_graph_t *graph, const occtl_prim_extrude_tapered_info_t *info, occtl_node_id_t *out_shape)
 
void occtl_prim_ruled_surface_info_init (occtl_prim_ruled_surface_info_t *info)
 
occtl_status_t occtl_prim_make_ruled_surface (occtl_graph_t *graph, const occtl_prim_ruled_surface_info_t *info, occtl_node_id_t *out_shape)
 
void occtl_prim_feat_prism_info_init (occtl_prim_feat_prism_info_t *info)
 
occtl_status_t occtl_prim_make_feat_prism (occtl_graph_t *graph, const occtl_prim_feat_prism_info_t *info, occtl_node_id_t *out_shape)
 
void occtl_prim_extrude_until_info_init (occtl_prim_extrude_until_info_t *info)
 
occtl_status_t occtl_prim_make_extrude_until (occtl_graph_t *graph, const occtl_prim_extrude_until_info_t *info, occtl_node_id_t *out_shape)
 
void occtl_prim_feat_draft_prism_info_init (occtl_prim_feat_draft_prism_info_t *info)
 
occtl_status_t occtl_prim_make_feat_draft_prism (occtl_graph_t *graph, const occtl_prim_feat_draft_prism_info_t *info, occtl_node_id_t *out_shape)
 
void occtl_prim_cylindrical_hole_info_init (occtl_prim_cylindrical_hole_info_t *info)
 
occtl_status_t occtl_prim_make_cylindrical_hole (occtl_graph_t *graph, const occtl_prim_cylindrical_hole_info_t *info, occtl_node_id_t *out_shape)
 

Detailed Description

OCCT-Light: feature and recipe-based model construction API.

Macro Definition Documentation

◆ OCCTL_PRIM_BRAKE_FORMED_OPTIONS_INIT

#define OCCTL_PRIM_BRAKE_FORMED_OPTIONS_INIT
Value:
{OCCTL_PRIM_BRAKE_FORMED_OPTIONS_VERSION_1, \
NULL, \
1.0, \
NULL, \
0, \
0, \
1.0e-6}
@ OCCTL_PRIM_BRAKE_SIDE_LEFT
Definition occtl_prim_feature.h:326
@ OCCTL_TOPO_WIRE_OFFSET_2D_JOIN_ARC
Definition occtl_topo_build.h:194
#define OCCTL_NODE_ID_INVALID
Definition occtl_topo_types.h:138

◆ OCCTL_PRIM_CYLINDRICAL_HOLE_INFO_INIT

#define OCCTL_PRIM_CYLINDRICAL_HOLE_INFO_INIT
Value:
{OCCTL_PRIM_CYLINDRICAL_HOLE_INFO_VERSION_1, \
NULL, \
{{0.0, 0.0, 0.0}, {0.0, 0.0, 1.0}}, \
0.0, \
0.0, \
0.0, \
0.0, \
1}
@ OCCTL_CYLINDRICAL_HOLE_THROUGH_ALL
Definition occtl_prim_feature.h:900

◆ OCCTL_PRIM_EXTRUDE_UNTIL_INFO_INIT

#define OCCTL_PRIM_EXTRUDE_UNTIL_INFO_INIT
Value:
{OCCTL_PRIM_EXTRUDE_UNTIL_INFO_VERSION_1, \
NULL, \
{0.0, 0.0, 1.0}, \
1, \
0.0}
@ OCCTL_EXTRUDE_UNTIL_NEXT
Definition occtl_prim_feature.h:721
@ OCCTL_FEAT_FUSE
Definition occtl_prim_feature.h:632

◆ OCCTL_PRIM_FACE_FROM_BOUNDARY_CURVES_OPTIONS_INIT

#define OCCTL_PRIM_FACE_FROM_BOUNDARY_CURVES_OPTIONS_INIT
Value:
{OCCTL_PRIM_FACE_FROM_BOUNDARY_CURVES_OPTIONS_VERSION_1, \
NULL, \
OCCTL_SURFACE_BOUNDARY_CURVES_CREATE_INFO_INIT, \
1.0e-6}

◆ OCCTL_PRIM_FACE_FROM_CURVE_GRID_OPTIONS_INIT

#define OCCTL_PRIM_FACE_FROM_CURVE_GRID_OPTIONS_INIT
Value:
{OCCTL_PRIM_FACE_FROM_CURVE_GRID_OPTIONS_VERSION_1, \
NULL, \
OCCTL_SURFACE_CURVE_GRID_CREATE_INFO_INIT, \
1.0e-6}

◆ OCCTL_PRIM_FACE_FROM_POINT_GRID_OPTIONS_INIT

#define OCCTL_PRIM_FACE_FROM_POINT_GRID_OPTIONS_INIT
Value:
{OCCTL_PRIM_FACE_FROM_POINT_GRID_OPTIONS_VERSION_1, \
NULL, \
OCCTL_SURFACE_POINT_GRID_CREATE_INFO_INIT, \
1.0e-6}

◆ OCCTL_PRIM_FACE_FROM_SURFACE_OPTIONS_INIT

#define OCCTL_PRIM_FACE_FROM_SURFACE_OPTIONS_INIT
Value:
{OCCTL_PRIM_FACE_FROM_SURFACE_OPTIONS_VERSION_1, \
NULL, \
OCCTL_REP_ID_INVALID, \
NULL, \
0, \
1.0e-6}

◆ OCCTL_PRIM_FEAT_DRAFT_PRISM_INFO_INIT

#define OCCTL_PRIM_FEAT_DRAFT_PRISM_INFO_INIT
Value:
{OCCTL_PRIM_FEAT_DRAFT_PRISM_INFO_VERSION_1, \
NULL, \
0.0, \
1, \
0.0}
@ OCCTL_UNTIL_LENGTH
Definition occtl_prim_feature.h:616

◆ OCCTL_PRIM_FEAT_PRISM_INFO_INIT

#define OCCTL_PRIM_FEAT_PRISM_INFO_INIT
Value:
{OCCTL_PRIM_FEAT_PRISM_INFO_VERSION_1, \
NULL, \
{0.0, 0.0, 1.0}, \
1, \
0.0}

Typedef Documentation

◆ occtl_prim_brake_formed_options_t

Configuration for occtl_prim_make_brake_formed.

Builds a sheet-metal style solid from a planar bend line. station_widths may contain one width reused for every bend-line station, or one width per station vertex in line.

◆ occtl_prim_brake_side_t

◆ occtl_prim_cylindrical_hole_info_t

Info for occtl_prim_make_cylindrical_hole.

Cuts one cylindrical hole feature from base_shape. axis.location is the start point for directed modes and axis.direction gives the drilling direction. The result is inserted as a new topology root; the input body is left unchanged in the graph.

◆ occtl_prim_cylindrical_hole_kind_t

Cylindrical-hole termination mode for occtl_prim_make_cylindrical_hole.

Selects how far the cylindrical cutting volume extends along the supplied axis. The default through-all mode cuts with an infinite cylinder.

◆ occtl_prim_draft_prism_info_t

Info for occtl_prim_make_draft_prism.

Builds a tapered solid from one planar Face using OCCT LocOpe_DPrism. This is the accurate fast path for draft/tapered extrusion of a single closed profile.

◆ occtl_prim_extrude_tapered_info_t

Info for occtl_prim_make_extrude_tapered.

Semantic wrapper for tapered extrusion of one Face profile. The taper follows the profile Face normal.

◆ occtl_prim_extrude_until_info_t

Info for occtl_prim_make_extrude_until.

Builds a feature extrusion from profile on base_shape until target_shape. FIRST/PREVIOUS map to the opposite of direction, and NEXT/LAST map to direction.

◆ occtl_prim_extrude_until_side_t

◆ occtl_prim_face_from_boundary_curves_options_t

Configuration for occtl_prim_make_face_from_boundary_curves.

Builds a B-spline surface from two, three, or four contiguous boundary curves and inserts a Face using the generated surface's natural bounds.

◆ occtl_prim_face_from_curve_grid_options_t

Configuration for occtl_prim_make_face_from_curve_grid.

Builds a Gordon B-spline surface from an intersecting U/V curve network and inserts a Face using the generated surface's natural bounds.

◆ occtl_prim_face_from_point_grid_options_t

Configuration for occtl_prim_make_face_from_point_grid.

Builds a B-spline surface from a row-major point grid and inserts a Face using the generated surface's natural bounds. This is the graph-facing counterpart to occtl_surface_create_from_point_grid.

◆ occtl_prim_face_from_surface_options_t

Configuration for occtl_prim_make_face_from_surface.

Builds a Face from a surface rep and optional boundary wires. When outer_wire is invalid, no boundary wires may be supplied and OCCT builds a face from the surface's natural bounds. When outer_wire is valid, it is used as the outer boundary and inner_wires, if any, are added as holes.

◆ occtl_prim_feat_combine_t

Combine-mode for feature operations.

Controls how the produced material interacts with the base shape.

◆ occtl_prim_feat_draft_prism_info_t

Info for occtl_prim_make_feat_draft_prism.

Builds a draft prism feature on an existing body. Unlike occtl_prim_make_draft_prism, this operation delegates to OCCT BRepFeat_MakeDPrism and combines the tapered feature with base_shape.

◆ occtl_prim_feat_prism_info_t

Info for occtl_prim_make_feat_prism.

Builds a feature prism on an existing body: extrudes profile and combines the result with base_shape (fuse / cut / separate). Supports termination by target shape or height.

◆ occtl_prim_ruled_surface_info_t

Info for occtl_prim_make_ruled_surface.

Builds a ruled surface between two existing graph sections using OCCT BRepFill. Both sections must have the same topological kind: Edge + Edge produces a Face, while Wire + Wire produces a Shell.

◆ occtl_prim_until_kind_t

Until-mode for occtl_prim_make_feat_prism.

Selects how the extrusion is terminated (fixed length, until a target shape, all the way through, or until a target capped at a length).

Enumeration Type Documentation

◆ occtl_prim_brake_side

Offset side for occtl_prim_make_brake_formed.

Enumerator
OCCTL_PRIM_BRAKE_SIDE_LEFT 

Offset to OCCT's positive planar-wire side.

OCCTL_PRIM_BRAKE_SIDE_RIGHT 

Offset to OCCT's negative planar-wire side.

◆ occtl_prim_cylindrical_hole_kind

Cylindrical-hole termination mode for occtl_prim_make_cylindrical_hole.

Selects how far the cylindrical cutting volume extends along the supplied axis. The default through-all mode cuts with an infinite cylinder.

Enumerator
OCCTL_CYLINDRICAL_HOLE_THROUGH_ALL 

Cut all material intersected by the infinite cylinder.

OCCTL_CYLINDRICAL_HOLE_BETWEEN_PARAMS 

Cut between p_from and p_to along axis.

OCCTL_CYLINDRICAL_HOLE_THRU_NEXT 

Cut to the next encountered boundary along axis.

OCCTL_CYLINDRICAL_HOLE_UNTIL_END 

Cut all material after the axis origin.

OCCTL_CYLINDRICAL_HOLE_BLIND 

Cut a blind hole of length from the axis origin.

◆ occtl_prim_extrude_until_side

Target side for occtl_prim_make_extrude_until.

Enumerator
OCCTL_EXTRUDE_UNTIL_NEXT 

Extrude along direction to the target.

OCCTL_EXTRUDE_UNTIL_LAST 

Extrude along direction to the target.

OCCTL_EXTRUDE_UNTIL_PREVIOUS 

Extrude opposite direction to the target.

OCCTL_EXTRUDE_UNTIL_FIRST 

Extrude opposite direction to the target.

◆ occtl_prim_feat_combine

Combine-mode for feature operations.

Controls how the produced material interacts with the base shape.

Enumerator
OCCTL_FEAT_SEPARATE 

Produce a separate body — no Boolean against base_shape.

OCCTL_FEAT_CUT 

Subtract the produced material from base_shape.

OCCTL_FEAT_FUSE 

Add the produced material to base_shape.

◆ occtl_prim_until_kind

Until-mode for occtl_prim_make_feat_prism.

Selects how the extrusion is terminated (fixed length, until a target shape, all the way through, or until a target capped at a length).

Enumerator
OCCTL_UNTIL_LENGTH 

Extrude a fixed length along direction.

OCCTL_UNTIL_SHAPE 

Extrude until the result meets until_shape.

OCCTL_UNTIL_THRU_ALL 

Extrude through all of base_shape.

OCCTL_UNTIL_HEIGHT 

Extrude until until_shape, capped at length.

Function Documentation

◆ occtl_prim_brake_formed_options_init()

void occtl_prim_brake_formed_options_init ( occtl_prim_brake_formed_options_t opts)

Initialises opts to default values matching OCCTL_PRIM_BRAKE_FORMED_OPTIONS_INIT.

NULL-tolerant.

Parameters
[out]optsBorrows it. May be NULL (no-op).

\par Thread Safety Yes.

See also
occtl_prim_make_brake_formed

◆ occtl_prim_cylindrical_hole_info_init()

void occtl_prim_cylindrical_hole_info_init ( occtl_prim_cylindrical_hole_info_t info)

Runtime initialiser for occtl_prim_cylindrical_hole_info_t.

Sets all fields to OCCTL_PRIM_CYLINDRICAL_HOLE_INFO_INIT.

Parameters
[out]infoBorrows it. NULL-tolerant; no-op when NULL.

\par Thread Safety Yes.

See also
occtl_prim_make_cylindrical_hole

◆ occtl_prim_draft_prism_info_init()

void occtl_prim_draft_prism_info_init ( occtl_prim_draft_prism_info_t info)

Runtime initialiser for occtl_prim_draft_prism_info_t.

Sets all fields to OCCTL_PRIM_DRAFT_PRISM_INFO_INIT.

Parameters
[out]infoBorrows it. NULL-tolerant; no-op when NULL.

\par Thread Safety Yes.

See also
occtl_prim_make_draft_prism

◆ occtl_prim_extrude_tapered_info_init()

void occtl_prim_extrude_tapered_info_init ( occtl_prim_extrude_tapered_info_t info)

Runtime initialiser for occtl_prim_extrude_tapered_info_t.

Sets all fields to OCCTL_PRIM_EXTRUDE_TAPERED_INFO_INIT.

Parameters
[out]infoBorrows it. NULL-tolerant; no-op when NULL.

\par Thread Safety Yes.

See also
occtl_prim_make_extrude_tapered

◆ occtl_prim_extrude_until_info_init()

void occtl_prim_extrude_until_info_init ( occtl_prim_extrude_until_info_t info)

Runtime initialiser for occtl_prim_extrude_until_info_t.

Sets all fields to OCCTL_PRIM_EXTRUDE_UNTIL_INFO_INIT.

Parameters
[out]infoBorrows it. NULL-tolerant; no-op when NULL.

\par Thread Safety Yes.

See also
occtl_prim_make_extrude_until

◆ occtl_prim_face_from_boundary_curves_options_init()

void occtl_prim_face_from_boundary_curves_options_init ( occtl_prim_face_from_boundary_curves_options_t options)

Initialises options to defaults matching OCCTL_PRIM_FACE_FROM_BOUNDARY_CURVES_OPTIONS_INIT.

NULL-tolerant.

Parameters
[out]optionsBorrows it. May be NULL (no-op).

\par Thread Safety Yes.

See also
occtl_prim_make_face_from_boundary_curves

◆ occtl_prim_face_from_curve_grid_options_init()

void occtl_prim_face_from_curve_grid_options_init ( occtl_prim_face_from_curve_grid_options_t options)

Initialises options to defaults matching OCCTL_PRIM_FACE_FROM_CURVE_GRID_OPTIONS_INIT.

NULL-tolerant.

Parameters
[out]optionsBorrows it. May be NULL (no-op).

\par Thread Safety Yes.

See also
occtl_prim_make_face_from_curve_grid

◆ occtl_prim_face_from_point_grid_options_init()

void occtl_prim_face_from_point_grid_options_init ( occtl_prim_face_from_point_grid_options_t options)

Initialises options to defaults matching OCCTL_PRIM_FACE_FROM_POINT_GRID_OPTIONS_INIT.

NULL-tolerant.

Parameters
[out]optionsBorrows it. May be NULL (no-op).

\par Thread Safety Yes.

See also
occtl_prim_make_face_from_point_grid

◆ occtl_prim_face_from_surface_options_init()

void occtl_prim_face_from_surface_options_init ( occtl_prim_face_from_surface_options_t options)

Initialises options to defaults matching OCCTL_PRIM_FACE_FROM_SURFACE_OPTIONS_INIT.

NULL-tolerant.

Parameters
[out]optionsBorrows it. May be NULL (no-op).

\par Thread Safety Yes.

See also
occtl_prim_make_face_from_surface

◆ occtl_prim_feat_draft_prism_info_init()

void occtl_prim_feat_draft_prism_info_init ( occtl_prim_feat_draft_prism_info_t info)

Runtime initialiser for occtl_prim_feat_draft_prism_info_t.

Sets all fields to OCCTL_PRIM_FEAT_DRAFT_PRISM_INFO_INIT.

Parameters
[out]infoBorrows it. NULL-tolerant; no-op when NULL.

\par Thread Safety Yes.

See also
occtl_prim_make_feat_draft_prism

◆ occtl_prim_feat_prism_info_init()

void occtl_prim_feat_prism_info_init ( occtl_prim_feat_prism_info_t info)

Runtime initialiser for occtl_prim_feat_prism_info_t.

Sets all fields to OCCTL_PRIM_FEAT_PRISM_INFO_INIT.

Parameters
[out]infoBorrows it. NULL-tolerant; no-op when NULL.

\par Thread Safety Yes.

See also
occtl_prim_make_feat_prism

◆ occtl_prim_make_brake_formed()

occtl_status_t occtl_prim_make_brake_formed ( const occtl_graph_t graph,
const occtl_prim_brake_formed_options_t options,
occtl_graph_t **  out_graph,
occtl_node_id_t out_root 
)

Builds a sheet-metal brake-formed solid from a planar bend line.

The operation offsets line by thickness, creates station sections between the original and offset stations, extends those sections by the supplied station widths, and delegates solid skinning to OCCT.

Parameters
[in]graphBorrows it. Must be non-NULL.
[in]optionsBorrows it. Must be non-NULL and carry a supported struct_version.
[out]out_graphOwns it. Receives a new graph on success.
[out]out_rootBorrows it. Receives the brake-formed Solid NodeId.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTAny required pointer is NULL, p_next is non-NULL, thickness / tolerance / widths are invalid, or side / join flags are unknown.
OCCTL_VERSION_MISMATCHoptions has an unsupported struct_version.
OCCTL_NOT_FOUNDline is invalid or removed.
OCCTL_WRONG_KINDline is neither an Edge nor a Wire.
OCCTL_GEOMETRY_INVALIDOffset, station construction, or solid skinning failed.
OCCTL_TOPOLOGY_INVALIDThe result could not be ingested into the output graph.

\par Thread Safety No. Allocates a new graph.

See also
occtl_topo_make_face_extrusion

◆ occtl_prim_make_cylindrical_hole()

occtl_status_t occtl_prim_make_cylindrical_hole ( occtl_graph_t graph,
const occtl_prim_cylindrical_hole_info_t info,
occtl_node_id_t out_shape 
)

Cuts a cylindrical hole feature into an existing shape.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]infoBorrows it. Must be non-NULL with a recognised struct_version.
[out]out_shapeBorrows it. Must be non-NULL. On success receives the new Shape NodeId; on failure set to OCCTL_NODE_ID_INVALID.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTAny pointer is NULL, p_next is non-NULL, axis contains non-finite components, with_control is not 0/1, radius is non-positive, axis.direction has zero length, p_from or p_to is non-finite, p_to <= p_from in BETWEEN_PARAMS mode, length is non-positive in BLIND mode, or kind is unknown.
OCCTL_VERSION_MISMATCHstruct_version is unrecognised.
OCCTL_NOT_FOUNDbase_shape refers to a removed / absent node.
OCCTL_GEOMETRY_INVALIDOCCT rejected the hole placement or failed to build the feature.
OCCTL_TOPOLOGY_INVALIDThe resulting topology was rejected.
OCCTL_INTERNALAn unexpected internal error occurred.

\par Thread Safety No.

See also
occtl_prim_make_feat_prism, occtl_prim_make_thick_solid

◆ occtl_prim_make_draft_prism()

occtl_status_t occtl_prim_make_draft_prism ( occtl_graph_t graph,
const occtl_prim_draft_prism_info_t info,
occtl_node_id_t out_shape 
)

Builds a tapered prism solid from one Face profile.

The result is inserted into graph as a new topology root. The input profile is not modified.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]infoBorrows it. Must be non-NULL with a recognised struct_version.
[out]out_shapeBorrows it. Must be non-NULL. On success receives the new Solid NodeId; on failure set to OCCTL_NODE_ID_INVALID.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTAny pointer is NULL, or height is non-positive.
OCCTL_VERSION_MISMATCHstruct_version is unrecognised.
OCCTL_NOT_FOUNDprofile refers to a removed / absent node.
OCCTL_WRONG_KINDprofile is not a Face.
OCCTL_GEOMETRY_INVALIDOCCT rejected the draft prism.
OCCTL_TOPOLOGY_INVALIDThe resulting topology was rejected.
OCCTL_INTERNALAn unexpected internal error occurred.

\par Thread Safety No.

See also
occtl_prim_make_prism

◆ occtl_prim_make_extrude_tapered()

occtl_status_t occtl_prim_make_extrude_tapered ( occtl_graph_t graph,
const occtl_prim_extrude_tapered_info_t info,
occtl_node_id_t out_shape 
)

Builds a tapered extrusion from one Face profile.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]infoBorrows it. Must be non-NULL with a recognised struct_version.
[out]out_shapeBorrows it. Must be non-NULL. On success receives the new Solid NodeId.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTAny pointer is NULL, p_next is non-NULL, or height is non-positive.
OCCTL_VERSION_MISMATCHstruct_version is unrecognised.
OCCTL_NOT_FOUNDprofile_face refers to a removed / absent node.
OCCTL_WRONG_KINDprofile_face is not a Face.
OCCTL_GEOMETRY_INVALIDOCCT rejected the tapered extrusion.
OCCTL_TOPOLOGY_INVALIDThe resulting topology was rejected.
OCCTL_INTERNALAn unexpected internal error occurred.

\par Thread Safety No.

See also
occtl_prim_make_draft_prism

◆ occtl_prim_make_extrude_until()

occtl_status_t occtl_prim_make_extrude_until ( occtl_graph_t graph,
const occtl_prim_extrude_until_info_t info,
occtl_node_id_t out_shape 
)

Builds a feature extrusion until a target shape.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]infoBorrows it. Must be non-NULL with a recognised struct_version.
[out]out_shapeBorrows it. Must be non-NULL. On success receives the new Shape NodeId.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTAny pointer is NULL, p_next is non-NULL, direction is zero, side / combine / modify is invalid, or limit is negative.
OCCTL_VERSION_MISMATCHstruct_version is unrecognised.
OCCTL_NOT_FOUNDA node id refers to a removed / absent node.
OCCTL_WRONG_KINDsketch_face is not a Face.
OCCTL_GEOMETRY_INVALIDOCCT rejected the feature extrusion.
OCCTL_TOPOLOGY_INVALIDThe resulting topology was rejected.
OCCTL_INTERNALAn unexpected internal error occurred.

\par Thread Safety No.

See also
occtl_prim_make_feat_prism, occtl_prim_make_draft_prism

◆ occtl_prim_make_face_from_boundary_curves()

occtl_status_t occtl_prim_make_face_from_boundary_curves ( occtl_graph_t graph,
const occtl_prim_face_from_boundary_curves_options_t options,
occtl_node_id_t out_face 
)

Builds a graph Face directly from boundary-curve surface filling.

The operation delegates surface construction to OCCT through occtl_surface_create_from_boundary_curves, delegates face construction to OCCT, and inserts the resulting Face topology into graph.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]optionsBorrows it. Must be non-NULL and carry a supported struct_version.
[out]out_faceBorrows it. Must be non-NULL. Receives the new Face.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTA required pointer is NULL, p_next is non-NULL, tolerance is invalid, or the embedded boundary-curve options are invalid.
OCCTL_VERSION_MISMATCHoptions or the embedded surface options have an unsupported struct_version.
OCCTL_GEOMETRY_INVALIDOCCT rejected the boundary curves or face build.
OCCTL_TOPOLOGY_INVALIDThe result could not be ingested as a Face.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

See also
occtl_prim_make_face_from_surface, occtl_surface_create_from_boundary_curves

◆ occtl_prim_make_face_from_curve_grid()

occtl_status_t occtl_prim_make_face_from_curve_grid ( occtl_graph_t graph,
const occtl_prim_face_from_curve_grid_options_t options,
occtl_node_id_t out_face 
)

Builds a graph Face directly from a curve-grid Gordon surface.

The operation delegates surface construction to OCCT through occtl_surface_create_from_curve_grid, delegates face construction to OCCT, and inserts the resulting Face topology into graph.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]optionsBorrows it. Must be non-NULL and carry a supported struct_version.
[out]out_faceBorrows it. Must be non-NULL. Receives the new Face.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTA required pointer is NULL, p_next is non-NULL, tolerance is invalid, or the embedded curve-grid options are invalid.
OCCTL_VERSION_MISMATCHoptions or the embedded surface options have an unsupported struct_version.
OCCTL_GEOMETRY_INVALIDOCCT rejected the curve grid or face build.
OCCTL_TOPOLOGY_INVALIDThe result could not be ingested as a Face.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

See also
occtl_prim_make_face_from_surface, occtl_surface_create_from_curve_grid

◆ occtl_prim_make_face_from_point_grid()

occtl_status_t occtl_prim_make_face_from_point_grid ( occtl_graph_t graph,
const occtl_prim_face_from_point_grid_options_t options,
occtl_node_id_t out_face 
)

Builds a graph Face directly from a point-grid B-spline surface.

The operation delegates surface fitting to OCCT through occtl_surface_create_from_point_grid, delegates face construction to OCCT, and inserts the resulting Face topology into graph.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]optionsBorrows it. Must be non-NULL and carry a supported struct_version.
[out]out_faceBorrows it. Must be non-NULL. Receives the new Face.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTA required pointer is NULL, p_next is non-NULL, tolerance is invalid, or the embedded point-grid surface options are invalid.
OCCTL_VERSION_MISMATCHoptions or the embedded surface options have an unsupported struct_version.
OCCTL_GEOMETRY_INVALIDOCCT rejected the point grid or face build.
OCCTL_TOPOLOGY_INVALIDThe result could not be ingested as a Face.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

See also
occtl_prim_make_face_from_surface, occtl_surface_create_from_point_grid

◆ occtl_prim_make_face_from_surface()

occtl_status_t occtl_prim_make_face_from_surface ( occtl_graph_t graph,
const occtl_prim_face_from_surface_options_t options,
occtl_node_id_t out_face 
)

Builds a Face from a surface handle and optional boundary wires.

The operation inserts a Face node into graph from a graph-owned surface rep and optional boundary Wires. The source surface handle and boundary wires are not modified.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]optionsBorrows it. Must be non-NULL and carry a supported struct_version.
[out]out_faceBorrows it. Must be non-NULL. Receives the new Face.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTA required pointer is NULL, p_next is non-NULL, tolerance is invalid, or inner wires are supplied without an outer wire.
OCCTL_VERSION_MISMATCHoptions has an unsupported struct_version.
OCCTL_NOT_FOUNDA boundary Wire node is invalid or removed.
OCCTL_WRONG_KINDA boundary node is not a Wire.
OCCTL_GEOMETRY_INVALIDOCCT rejected the surface/wire combination.
OCCTL_TOPOLOGY_INVALIDThe result could not be ingested as a Face.

\par Thread Safety No (mutates graph).

See also
occtl_topo_make_filling_patch, occtl_surface_create_interpolated

◆ occtl_prim_make_feat_draft_prism()

occtl_status_t occtl_prim_make_feat_draft_prism ( occtl_graph_t graph,
const occtl_prim_feat_draft_prism_info_t info,
occtl_node_id_t out_shape 
)

Builds a draft-prism feature on an existing body.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]infoBorrows it. Must be non-NULL with a recognised struct_version and NULL p_next.
[out]out_shapeBorrows it. Must be non-NULL. On success receives the new Shape NodeId; on failure set to OCCTL_NODE_ID_INVALID.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTAny pointer is NULL, p_next is non-NULL, length is non-positive for LENGTH/HEIGHT modes, taper_angle is not finite, or an enum value is unknown.
OCCTL_VERSION_MISMATCHstruct_version is unrecognised.
OCCTL_NOT_FOUNDA node id refers to a removed / absent node.
OCCTL_WRONG_KINDprofile_face or sketch_face is not a Face, or until_shape is required but has wrong kind.
OCCTL_GEOMETRY_INVALIDConstruction failed.
OCCTL_TOPOLOGY_INVALIDThe resulting topology was rejected.
OCCTL_INTERNALAn unexpected internal error occurred.

\par Thread Safety No.

See also
occtl_prim_make_feat_prism, occtl_prim_make_draft_prism

◆ occtl_prim_make_feat_prism()

occtl_status_t occtl_prim_make_feat_prism ( occtl_graph_t graph,
const occtl_prim_feat_prism_info_t info,
occtl_node_id_t out_shape 
)

Builds a feature prism — the canonical "extrude profile on existing body until …" operation.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]infoBorrows it. Must be non-NULL with a recognised struct_version.
[out]out_shapeBorrows it. Must be non-NULL. On success receives the new Shape NodeId; on failure set to OCCTL_NODE_ID_INVALID.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTAny pointer is NULL, or length is non-positive for LENGTH/HEIGHT modes, or direction has zero length.
OCCTL_VERSION_MISMATCHstruct_version is unrecognised.
OCCTL_NOT_FOUNDA node id refers to a removed / absent node.
OCCTL_WRONG_KINDsketch_face is not a Face, or until_shape is required but missing / has wrong kind.
OCCTL_GEOMETRY_INVALIDConstruction failed.
OCCTL_TOPOLOGY_INVALIDThe resulting topology was rejected.
OCCTL_INTERNALAn unexpected internal error occurred.

\par Thread Safety No.

See also
occtl_prim_make_prism

◆ occtl_prim_make_ruled_surface()

occtl_status_t occtl_prim_make_ruled_surface ( occtl_graph_t graph,
const occtl_prim_ruled_surface_info_t info,
occtl_node_id_t out_shape 
)

Builds a ruled Face or Shell between two Edge or Wire sections.

The result is inserted into graph as a new topology root. The input sections are not modified. Wire sections must be compatible for OCCT ruled-shell construction, including matching edge counts.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]infoBorrows it. Must be non-NULL with a recognised struct_version.
[out]out_shapeBorrows it. Must be non-NULL. On success receives the new Face or Shell NodeId; on failure set to OCCTL_NODE_ID_INVALID.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTAny pointer is NULL, p_next is non-NULL, or the sections do not have the same kind.
OCCTL_VERSION_MISMATCHstruct_version is unrecognised.
OCCTL_NOT_FOUNDA section refers to a removed / absent node.
OCCTL_WRONG_KINDA section is neither an Edge nor a Wire.
OCCTL_GEOMETRY_INVALIDOCCT rejected the ruled surface.
OCCTL_TOPOLOGY_INVALIDThe resulting topology was rejected.
OCCTL_INTERNALAn unexpected internal error occurred.

\par Thread Safety No.

See also
occtl_prim_make_loft, occtl_prim_make_planar_face

◆ occtl_prim_ruled_surface_info_init()

void occtl_prim_ruled_surface_info_init ( occtl_prim_ruled_surface_info_t info)

Runtime initialiser for occtl_prim_ruled_surface_info_t.

Sets all fields to OCCTL_PRIM_RULED_SURFACE_INFO_INIT.

Parameters
[out]infoBorrows it. NULL-tolerant; no-op when NULL.

\par Thread Safety Yes.

See also
occtl_prim_make_ruled_surface