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

OCCT-Light: sweep, loft, offset, and thickening 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_sweep.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  occtl_prim_prism_info
 
struct  occtl_prim_twist_extrusion_info
 
struct  occtl_prim_extrude_twist_info
 
struct  occtl_prim_revol_info
 
struct  occtl_prim_pipe_info
 
struct  occtl_prim_loft_info
 
struct  occtl_prim_pipe_shell_info
 
struct  occtl_prim_pipe_shell_linear_law_info
 
struct  occtl_prim_pipe_shell_interpolated_law_info
 
struct  occtl_prim_offset_shape_info
 
struct  occtl_prim_thick_solid_info
 

Macros

#define OCCTL_PRIM_PRISM_INFO_VERSION_1   1u
 
#define OCCTL_PRIM_PRISM_INFO_INIT    {OCCTL_PRIM_PRISM_INFO_VERSION_1, NULL, OCCTL_NODE_ID_INVALID, {0.0, 0.0, 0.0}, 0, 1}
 
#define OCCTL_PRIM_TWIST_EXTRUSION_INFO_VERSION_1   1u
 
#define OCCTL_PRIM_TWIST_EXTRUSION_INFO_INIT
 
#define OCCTL_PRIM_EXTRUDE_TWIST_INFO_VERSION_1   1u
 
#define OCCTL_PRIM_EXTRUDE_TWIST_INFO_INIT
 
#define OCCTL_PRIM_REVOL_INFO_VERSION_1   1u
 
#define OCCTL_PRIM_REVOL_INFO_INIT
 
#define OCCTL_PRIM_PIPE_INFO_VERSION_1   1u
 
#define OCCTL_PRIM_PIPE_INFO_INIT    {OCCTL_PRIM_PIPE_INFO_VERSION_1, NULL, OCCTL_NODE_ID_INVALID, OCCTL_NODE_ID_INVALID}
 
#define OCCTL_PRIM_LOFT_INFO_VERSION_1   1u
 
#define OCCTL_PRIM_LOFT_INFO_INIT   {OCCTL_PRIM_LOFT_INFO_VERSION_1, NULL, NULL, 0, 0, 0, 1.0e-6}
 
#define OCCTL_PRIM_PIPE_SHELL_INFO_VERSION_1   1u
 
#define OCCTL_PRIM_PIPE_SHELL_INFO_INIT
 
#define OCCTL_PRIM_PIPE_SHELL_LINEAR_LAW_INFO_VERSION_1   1u
 
#define OCCTL_PRIM_PIPE_SHELL_LINEAR_LAW_INFO_INIT
 
#define OCCTL_PRIM_PIPE_SHELL_INTERPOLATED_LAW_INFO_VERSION_1   1u
 
#define OCCTL_PRIM_PIPE_SHELL_INTERPOLATED_LAW_INFO_INIT
 
#define OCCTL_PRIM_OFFSET_SHAPE_INFO_VERSION_1   1u
 
#define OCCTL_PRIM_OFFSET_SHAPE_INFO_INIT
 
#define OCCTL_PRIM_THICK_SOLID_INFO_VERSION_1   1u
 
#define OCCTL_PRIM_THICK_SOLID_INFO_INIT
 

Typedefs

typedef struct occtl_prim_prism_info occtl_prim_prism_info_t
 
typedef struct occtl_prim_twist_extrusion_info occtl_prim_twist_extrusion_info_t
 
typedef struct occtl_prim_extrude_twist_info occtl_prim_extrude_twist_info_t
 
typedef struct occtl_prim_revol_info occtl_prim_revol_info_t
 
typedef struct occtl_prim_pipe_info occtl_prim_pipe_info_t
 
typedef struct occtl_prim_loft_info occtl_prim_loft_info_t
 
typedef enum occtl_prim_pipe_mode occtl_prim_pipe_mode_t
 
typedef enum occtl_prim_pipe_transition occtl_prim_pipe_transition_t
 
typedef struct occtl_prim_pipe_shell_info occtl_prim_pipe_shell_info_t
 
typedef struct occtl_prim_pipe_shell_linear_law_info occtl_prim_pipe_shell_linear_law_info_t
 
typedef struct occtl_prim_pipe_shell_interpolated_law_info occtl_prim_pipe_shell_interpolated_law_info_t
 
typedef enum occtl_prim_offset_mode occtl_prim_offset_mode_t
 
typedef struct occtl_prim_offset_shape_info occtl_prim_offset_shape_info_t
 
typedef struct occtl_prim_thick_solid_info occtl_prim_thick_solid_info_t
 

Enumerations

enum  occtl_prim_pipe_mode {
  OCCTL_PIPE_MODE_CORRECTED_FRENET = 0 , OCCTL_PIPE_MODE_FRENET = 1 , OCCTL_PIPE_MODE_DISCRETE = 2 , OCCTL_PIPE_MODE_CONSTANT_AXIS ,
  OCCTL_PIPE_MODE_CONSTANT_BINORMAL , OCCTL_PIPE_MODE_RESERVED_FUTURE = 0x7fffffff
}
 
enum  occtl_prim_pipe_transition { OCCTL_PIPE_TRANSITION_MODIFIED = 0 , OCCTL_PIPE_TRANSITION_RIGHT_CORNER = 1 , OCCTL_PIPE_TRANSITION_ROUND_CORNER = 2 , OCCTL_PIPE_TRANSITION_RESERVED_FUTURE = 0x7fffffff }
 
enum  occtl_prim_offset_mode { OCCTL_OFFSET_MODE_SKIN = 0 , OCCTL_OFFSET_MODE_PIPE = 1 , OCCTL_OFFSET_MODE_RECTO_VERSO = 2 , OCCTL_OFFSET_MODE_RESERVED_FUTURE = 0x7fffffff }
 

Functions

void occtl_prim_prism_info_init (occtl_prim_prism_info_t *info)
 
occtl_status_t occtl_prim_make_prism (occtl_graph_t *graph, const occtl_prim_prism_info_t *info, occtl_node_id_t *out_shape)
 
void occtl_prim_twist_extrusion_info_init (occtl_prim_twist_extrusion_info_t *info)
 
occtl_status_t occtl_prim_make_twist_extrusion (occtl_graph_t *graph, const occtl_prim_twist_extrusion_info_t *info, occtl_node_id_t *out_shape)
 
void occtl_prim_extrude_twist_info_init (occtl_prim_extrude_twist_info_t *info)
 
occtl_status_t occtl_prim_make_extrude_twist (occtl_graph_t *graph, const occtl_prim_extrude_twist_info_t *info, occtl_node_id_t *out_shape)
 
void occtl_prim_revol_info_init (occtl_prim_revol_info_t *info)
 
occtl_status_t occtl_prim_make_revol (occtl_graph_t *graph, const occtl_prim_revol_info_t *info, occtl_node_id_t *out_shape)
 
void occtl_prim_pipe_info_init (occtl_prim_pipe_info_t *info)
 
occtl_status_t occtl_prim_make_pipe (occtl_graph_t *graph, const occtl_prim_pipe_info_t *info, occtl_node_id_t *out_shape)
 
void occtl_prim_loft_info_init (occtl_prim_loft_info_t *info)
 
occtl_status_t occtl_prim_make_loft (occtl_graph_t *graph, const occtl_prim_loft_info_t *info, occtl_node_id_t *out_shape)
 
void occtl_prim_pipe_shell_info_init (occtl_prim_pipe_shell_info_t *info)
 
occtl_status_t occtl_prim_make_pipe_shell (occtl_graph_t *graph, const occtl_prim_pipe_shell_info_t *info, occtl_node_id_t *out_shape)
 
void occtl_prim_pipe_shell_linear_law_info_init (occtl_prim_pipe_shell_linear_law_info_t *info)
 
occtl_status_t occtl_prim_make_pipe_shell_linear_law (occtl_graph_t *graph, const occtl_prim_pipe_shell_linear_law_info_t *info, occtl_node_id_t *out_shape)
 
void occtl_prim_pipe_shell_interpolated_law_info_init (occtl_prim_pipe_shell_interpolated_law_info_t *info)
 
occtl_status_t occtl_prim_make_pipe_shell_interpolated_law (occtl_graph_t *graph, const occtl_prim_pipe_shell_interpolated_law_info_t *info, occtl_node_id_t *out_shape)
 
void occtl_prim_offset_shape_info_init (occtl_prim_offset_shape_info_t *info)
 
occtl_status_t occtl_prim_make_offset_shape (occtl_graph_t *graph, const occtl_prim_offset_shape_info_t *info, occtl_node_id_t *out_shape)
 
void occtl_prim_thick_solid_info_init (occtl_prim_thick_solid_info_t *info)
 
occtl_status_t occtl_prim_make_thick_solid (occtl_graph_t *graph, const occtl_prim_thick_solid_info_t *info, occtl_node_id_t *out_solid)
 

Detailed Description

OCCT-Light: sweep, loft, offset, and thickening construction API.

Macro Definition Documentation

◆ OCCTL_PRIM_EXTRUDE_TWIST_INFO_INIT

#define OCCTL_PRIM_EXTRUDE_TWIST_INFO_INIT
Value:
{OCCTL_PRIM_EXTRUDE_TWIST_INFO_VERSION_1, \
NULL, \
{{0.0, 0.0, 0.0}, {0.0, 0.0, 1.0}}, \
1.0, \
0.0, \
9, \
1, \
1, \
1.0e-6}
#define OCCTL_NODE_ID_INVALID
Definition occtl_topo_types.h:138

◆ OCCTL_PRIM_OFFSET_SHAPE_INFO_INIT

#define OCCTL_PRIM_OFFSET_SHAPE_INFO_INIT
Value:
{OCCTL_PRIM_OFFSET_SHAPE_INFO_VERSION_1, \
NULL, \
0.0, \
1.0e-3, \
0, \
0, \
0}
@ OCCTL_OFFSET_MODE_SKIN
Definition occtl_prim_sweep.h:774
@ OCCTL_OFFSET_JOIN_ARC
Definition occtl_topo_build.h:209

◆ OCCTL_PRIM_PIPE_SHELL_INFO_INIT

#define OCCTL_PRIM_PIPE_SHELL_INFO_INIT
Value:
{OCCTL_PRIM_PIPE_SHELL_INFO_VERSION_1, \
NULL, \
NULL, \
0, \
{{0.0, 0.0, 0.0}, {0.0, 0.0, 1.0}, {1.0, 0.0, 0.0}}, \
{0.0, 0.0, 1.0}, \
0, \
0, \
0}
@ OCCTL_PIPE_TRANSITION_MODIFIED
Definition occtl_prim_sweep.h:480
@ OCCTL_PIPE_MODE_CORRECTED_FRENET
Definition occtl_prim_sweep.h:463

◆ OCCTL_PRIM_PIPE_SHELL_INTERPOLATED_LAW_INFO_INIT

#define OCCTL_PRIM_PIPE_SHELL_INTERPOLATED_LAW_INFO_INIT
Value:
{OCCTL_PRIM_PIPE_SHELL_INTERPOLATED_LAW_INFO_VERSION_1, \
NULL, \
NULL, \
NULL, \
0, \
{{0.0, 0.0, 0.0}, {0.0, 0.0, 1.0}, {1.0, 0.0, 0.0}}, \
{0.0, 0.0, 1.0}, \
0, \
0, \
0}

◆ OCCTL_PRIM_PIPE_SHELL_LINEAR_LAW_INFO_INIT

#define OCCTL_PRIM_PIPE_SHELL_LINEAR_LAW_INFO_INIT
Value:
{OCCTL_PRIM_PIPE_SHELL_LINEAR_LAW_INFO_VERSION_1, \
NULL, \
1.0, \
1.0, \
{{0.0, 0.0, 0.0}, {0.0, 0.0, 1.0}, {1.0, 0.0, 0.0}}, \
{0.0, 0.0, 1.0}, \
0, \
0, \
0}

◆ OCCTL_PRIM_REVOL_INFO_INIT

#define OCCTL_PRIM_REVOL_INFO_INIT
Value:
{OCCTL_PRIM_REVOL_INFO_VERSION_1, \
NULL, \
{{0.0, 0.0, 0.0}, {0.0, 0.0, 1.0}}, \
0}
#define OCCTL_TWO_PI
Definition occtl_core.h:42

◆ OCCTL_PRIM_THICK_SOLID_INFO_INIT

#define OCCTL_PRIM_THICK_SOLID_INFO_INIT
Value:
{OCCTL_PRIM_THICK_SOLID_INFO_VERSION_1, \
NULL, \
NULL, \
0, \
0.0, \
1.0e-3, \
0, \
0, \
0}

◆ OCCTL_PRIM_TWIST_EXTRUSION_INFO_INIT

#define OCCTL_PRIM_TWIST_EXTRUSION_INFO_INIT
Value:
{OCCTL_PRIM_TWIST_EXTRUSION_INFO_VERSION_1, \
NULL, \
{{0.0, 0.0, 0.0}, {0.0, 0.0, 1.0}}, \
1.0, \
0.0, \
9, \
1, \
1, \
1.0e-6}

Typedef Documentation

◆ occtl_prim_extrude_twist_info_t

Info for occtl_prim_make_extrude_twist.

Semantic wrapper for twisted extrusion of one closed Wire profile. Delegates to occtl_prim_make_twist_extrusion.

◆ occtl_prim_loft_info_t

Info for occtl_prim_make_loft.

Builds a shell or solid passing through a sequence of section wires. The first and last sections may be Vertices (degenerate sections); every other section must be a Wire. sections / section_count form a borrowed array; the implementation does not retain a pointer past the call.

◆ occtl_prim_offset_mode_t

Offset construction mode.

◆ occtl_prim_offset_shape_info_t

Info for occtl_prim_make_offset_shape.

Builds an offset version of shape (wire / face / shell / solid) at the given offset distance using a join-based offset (each face is offset and the gaps bridged according to join).

◆ occtl_prim_pipe_info_t

Info for occtl_prim_make_pipe.

Sweeps profile along spine_wire (a G1-continuous wire of graph). The angle between profile and spine is preserved along the sweep.

◆ occtl_prim_pipe_shell_info_t

Info for occtl_prim_make_pipe_shell.

Sweeps one or more profiles along a spine wire with explicit control over the trihedron rule and corner transition. Each profile must be of a sweepable kind (Vertex / Edge / Wire / Face / Shell / Compound) and live in the same graph as spine_wire.

◆ occtl_prim_pipe_shell_interpolated_law_info_t

Info for occtl_prim_make_pipe_shell_interpolated_law.

Sweeps one profile along a spine wire while scaling the profile by an interpolated law. parameters and scales are parallel arrays of sample_count values; parameters are normalized over the spine domain and must be strictly increasing from 0.0 to 1.0. Scales must be finite and positive.

The profile must be sweepable (Vertex / Edge / Wire / Face / Shell / Compound) and live in the same graph as spine_wire.

◆ occtl_prim_pipe_shell_linear_law_info_t

Info for occtl_prim_make_pipe_shell_linear_law.

Sweeps one profile along a spine wire while scaling the profile linearly from scale_first at the spine start to scale_last at the spine end. The profile must be sweepable (Vertex / Edge / Wire / Face / Shell / Compound) and live in the same graph as spine_wire.

◆ occtl_prim_pipe_transition_t

Corner-transition mode for occtl_prim_make_pipe_shell.

Selects how the sweep handles discontinuities in the spine's tangent.

◆ occtl_prim_prism_info_t

Info for occtl_prim_make_prism.

Linearly extrudes profile by vector direction. The profile may be a Vertex, Edge, Wire, Face, or Shell of graph; the result kind is one step higher in dimension (Vertex→Edge, Edge→Face, Wire→Shell, Face→Solid, Shell→CompSolid).

◆ occtl_prim_revol_info_t

Info for occtl_prim_make_revol.

Revolves profile around axis by angle radians. Like prism, the result kind is one step higher in dimension. The default angle is 2*pi (full revolution).

◆ occtl_prim_thick_solid_info_t

Info for occtl_prim_make_thick_solid.

Hollows solid by offsetting its boundary by offset (use a negative value to hollow inward, leaving a thin wall). Faces in closing_faces are removed from the offset boundary, producing open ends.

◆ occtl_prim_twist_extrusion_info_t

Info for occtl_prim_make_twist_extrusion.

Builds a twisted extrusion from one closed Wire section along axis.direction, rotating each generated section around axis. Face profiles with inner wires should be decomposed before calling.

Enumeration Type Documentation

◆ occtl_prim_offset_mode

Offset construction mode.

Enumerator
OCCTL_OFFSET_MODE_SKIN 

Default. Single offset surface along all faces.

OCCTL_OFFSET_MODE_PIPE 

Pipe-style offset (reserved; advanced use).

OCCTL_OFFSET_MODE_RECTO_VERSO 

Offset on both sides (free-form surface only).

◆ occtl_prim_pipe_mode

Enumerator
OCCTL_PIPE_MODE_CORRECTED_FRENET 

Default. Frenet trihedron with C0 correction.

OCCTL_PIPE_MODE_FRENET 

Raw Frenet trihedron (no correction).

OCCTL_PIPE_MODE_DISCRETE 

Discrete trihedron — robust on non-smooth spines.

OCCTL_PIPE_MODE_CONSTANT_AXIS 

Fixed local frame given by occtl_prim_pipe_shell_info_t::mode_axis.

OCCTL_PIPE_MODE_CONSTANT_BINORMAL 

Fixed binormal direction given by occtl_prim_pipe_shell_info_t::mode_binormal.

◆ occtl_prim_pipe_transition

Corner-transition mode for occtl_prim_make_pipe_shell.

Selects how the sweep handles discontinuities in the spine's tangent.

Enumerator
OCCTL_PIPE_TRANSITION_MODIFIED 

Default. Transform the profile across the corner.

OCCTL_PIPE_TRANSITION_RIGHT_CORNER 

Insert a sharp corner.

OCCTL_PIPE_TRANSITION_ROUND_CORNER 

Insert a rounded corner.

Function Documentation

◆ occtl_prim_extrude_twist_info_init()

void occtl_prim_extrude_twist_info_init ( occtl_prim_extrude_twist_info_t info)

Runtime initialiser for occtl_prim_extrude_twist_info_t.

Sets all fields to OCCTL_PRIM_EXTRUDE_TWIST_INFO_INIT.

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

\par Thread Safety Yes.

See also
occtl_prim_make_extrude_twist

◆ occtl_prim_loft_info_init()

void occtl_prim_loft_info_init ( occtl_prim_loft_info_t info)

Runtime initialiser for occtl_prim_loft_info_t.

Sets all fields to OCCTL_PRIM_LOFT_INFO_INIT.

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

\par Thread Safety Yes.

See also
occtl_prim_make_loft

◆ occtl_prim_make_extrude_twist()

occtl_status_t occtl_prim_make_extrude_twist ( occtl_graph_t graph,
const occtl_prim_extrude_twist_info_t info,
occtl_node_id_t out_shape 
)

Builds a twisted extrusion from a closed Wire 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 Shape NodeId.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTAny pointer is NULL, p_next is non-NULL, axis direction is zero, height is zero, section_count < 2, or pres3d <= 0.
OCCTL_VERSION_MISMATCHstruct_version is unrecognised.
OCCTL_NOT_FOUNDprofile_wire refers to a removed / absent node or cannot be reconstructed.
OCCTL_WRONG_KINDprofile_wire is not a Wire.
OCCTL_GEOMETRY_INVALIDOCCT rejected the generated sections.
OCCTL_TOPOLOGY_INVALIDThe resulting topology was rejected.
OCCTL_INTERNALAn unexpected internal error occurred.

\par Thread Safety No.

See also
occtl_prim_make_twist_extrusion

◆ occtl_prim_make_loft()

occtl_status_t occtl_prim_make_loft ( occtl_graph_t graph,
const occtl_prim_loft_info_t info,
occtl_node_id_t out_shape 
)

Builds a loft (skin) through the sequence of section wires / vertices.

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 argument is NULL, or p_next is non-NULL, or is_solid / ruled is not 0/1, or pres3d is non-positive, or section_count < 2, or sections is NULL while section_count > 0.
OCCTL_VERSION_MISMATCHstruct_version is unrecognised.
OCCTL_NOT_FOUNDA section id refers to a removed / absent node.
OCCTL_WRONG_KINDA section is neither Wire nor Vertex, or a Vertex appears at a non-endpoint position.
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_loft_info_init

◆ occtl_prim_make_offset_shape()

occtl_status_t occtl_prim_make_offset_shape ( occtl_graph_t graph,
const occtl_prim_offset_shape_info_t info,
occtl_node_id_t out_shape 
)

Builds an offset 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.
OCCTL_VERSION_MISMATCHstruct_version is unrecognised.
OCCTL_NOT_FOUNDshape refers to a removed / absent node.
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_thick_solid

◆ occtl_prim_make_pipe()

occtl_status_t occtl_prim_make_pipe ( occtl_graph_t graph,
const occtl_prim_pipe_info_t info,
occtl_node_id_t out_shape 
)

Builds a pipe by sweeping info->profile along info->spine_wire.

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 argument is NULL.
OCCTL_VERSION_MISMATCHstruct_version is unrecognised.
OCCTL_NOT_FOUNDA node id refers to a removed / absent node.
OCCTL_WRONG_KINDspine_wire is not a Wire, or profile is a Solid / CompSolid / Compound / Product / Occurrence / CoEdge.
OCCTL_GEOMETRY_INVALIDConstruction failed (non-G1 spine, etc.).
OCCTL_TOPOLOGY_INVALIDThe resulting topology was rejected.
OCCTL_INTERNALAn unexpected internal error occurred.

\par Thread Safety No.

See also
occtl_prim_pipe_info_init

◆ occtl_prim_make_pipe_shell()

occtl_status_t occtl_prim_make_pipe_shell ( occtl_graph_t graph,
const occtl_prim_pipe_shell_info_t info,
occtl_node_id_t out_shape 
)

Builds a rich pipe-shell sweep with explicit mode / transition / contact control.

The simpler occtl_prim_make_pipe entry point is preferred when none of the advanced options are needed; this richer variant exposes the full set of trihedron, transition, contact, and correction options.

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 profile_count < 1, or the constant-binormal mode is selected with a zero-length direction.
OCCTL_VERSION_MISMATCHstruct_version is unrecognised.
OCCTL_NOT_FOUNDA node id refers to a removed / absent node.
OCCTL_WRONG_KINDspine_wire is not a Wire, or a profile is of a kind that cannot be swept.
OCCTL_GEOMETRY_INVALIDConstruction failed (incompatible profiles, degenerate spine, …).
OCCTL_TOPOLOGY_INVALIDThe resulting topology was rejected.
OCCTL_INTERNALAn unexpected internal error occurred.

\par Thread Safety No.

See also
occtl_prim_make_pipe

◆ occtl_prim_make_pipe_shell_interpolated_law()

occtl_status_t occtl_prim_make_pipe_shell_interpolated_law ( occtl_graph_t graph,
const occtl_prim_pipe_shell_interpolated_law_info_t info,
occtl_node_id_t out_shape 
)

Builds a pipe-shell sweep with interpolated profile-scale evolution.

This exposes OCCT's law-driven pipe-shell mode for profiles whose scale changes through multiple stations without requiring callers to build many separate profile sections.

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, fewer than two samples are supplied, samples are non-finite, parameters are not strictly increasing from 0.0 to 1.0, a scale is non-positive, or constant-binormal mode is selected with a zero-length direction.
OCCTL_VERSION_MISMATCHstruct_version is unrecognised.
OCCTL_NOT_FOUNDA node id refers to a removed / absent node.
OCCTL_WRONG_KINDspine_wire is not a Wire, or profile is of a kind that cannot be swept.
OCCTL_GEOMETRY_INVALIDConstruction failed (incompatible profile, degenerate spine, or invalid law result).
OCCTL_TOPOLOGY_INVALIDThe resulting topology was rejected.
OCCTL_INTERNALAn unexpected internal error occurred.

\par Thread Safety No.

See also
occtl_prim_make_pipe_shell_linear_law

◆ occtl_prim_make_pipe_shell_linear_law()

occtl_status_t occtl_prim_make_pipe_shell_linear_law ( occtl_graph_t graph,
const occtl_prim_pipe_shell_linear_law_info_t info,
occtl_node_id_t out_shape 
)

Builds a pipe-shell sweep with linearly scaled profile evolution.

This exposes OCCT's law-driven pipe-shell mode for tapered, expanding, or necked sweep forms without forcing callers to sample many intermediate profiles manually.

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, either scale is non-finite or non-positive, or constant-binormal mode is selected with a zero-length direction.
OCCTL_VERSION_MISMATCHstruct_version is unrecognised.
OCCTL_NOT_FOUNDA node id refers to a removed / absent node.
OCCTL_WRONG_KINDspine_wire is not a Wire, or profile is of a kind that cannot be swept.
OCCTL_GEOMETRY_INVALIDConstruction failed (incompatible profile, degenerate spine, or invalid law result).
OCCTL_TOPOLOGY_INVALIDThe resulting topology was rejected.
OCCTL_INTERNALAn unexpected internal error occurred.

\par Thread Safety No.

See also
occtl_prim_make_pipe_shell

◆ occtl_prim_make_prism()

occtl_status_t occtl_prim_make_prism ( occtl_graph_t graph,
const occtl_prim_prism_info_t info,
occtl_node_id_t out_shape 
)

Builds a linear extrusion of info->profile by info->direction.

The profile is resolved from its NodeId, extruded, and the resulting topology appended to the same graph.

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 argument is NULL, or direction has zero length.
OCCTL_VERSION_MISMATCHstruct_version is unrecognised.
OCCTL_NOT_FOUNDprofile refers to a removed / absent node.
OCCTL_WRONG_KINDprofile is of a kind that cannot be extruded (Solid, CompSolid, Compound, Product, Occurrence, CoEdge).
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_revol, occtl_prim_make_pipe

◆ occtl_prim_make_revol()

occtl_status_t occtl_prim_make_revol ( occtl_graph_t graph,
const occtl_prim_revol_info_t info,
occtl_node_id_t out_shape 
)

Builds a revolution of info->profile around info->axis by info->angle.

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 argument is NULL, or the axis direction has zero length.
OCCTL_VERSION_MISMATCHstruct_version is unrecognised.
OCCTL_NOT_FOUNDprofile refers to a removed / absent node.
OCCTL_WRONG_KINDprofile is of a kind that cannot be revolved.
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_pipe

◆ occtl_prim_make_thick_solid()

occtl_status_t occtl_prim_make_thick_solid ( occtl_graph_t graph,
const occtl_prim_thick_solid_info_t info,
occtl_node_id_t out_solid 
)

Builds a thick-walled hollow Solid.

Parameters
[in,out]graphBorrows it. Must be non-NULL.
[in]infoBorrows it. Must be non-NULL with a recognised struct_version.
[out]out_solidBorrows 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 closing_faces is NULL while count > 0.
OCCTL_VERSION_MISMATCHstruct_version is unrecognised.
OCCTL_NOT_FOUNDA node id refers to a removed / absent node.
OCCTL_WRONG_KINDsolid is not a Solid, or a closing face is not a Face.
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_offset_shape

◆ occtl_prim_make_twist_extrusion()

occtl_status_t occtl_prim_make_twist_extrusion ( occtl_graph_t graph,
const occtl_prim_twist_extrusion_info_t info,
occtl_node_id_t out_shape 
)

Builds a twisted extrusion from a closed Wire profile.

The result is inserted into graph as a new Shell or Solid 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 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, axis direction is zero, height is zero, section_count < 2, or pres3d <= 0.
OCCTL_VERSION_MISMATCHstruct_version is unrecognised.
OCCTL_NOT_FOUNDprofile_wire refers to a removed / absent node or cannot be reconstructed.
OCCTL_WRONG_KINDprofile_wire is not a Wire.
OCCTL_GEOMETRY_INVALIDOCCT rejected the generated sections.
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_loft

◆ occtl_prim_offset_shape_info_init()

void occtl_prim_offset_shape_info_init ( occtl_prim_offset_shape_info_t info)

Runtime initialiser for occtl_prim_offset_shape_info_t.

Sets all fields to OCCTL_PRIM_OFFSET_SHAPE_INFO_INIT.

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

\par Thread Safety Yes.

See also
occtl_prim_make_offset_shape

◆ occtl_prim_pipe_info_init()

void occtl_prim_pipe_info_init ( occtl_prim_pipe_info_t info)

Runtime initialiser for occtl_prim_pipe_info_t.

Sets all fields to OCCTL_PRIM_PIPE_INFO_INIT.

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

\par Thread Safety Yes.

See also
occtl_prim_make_pipe

◆ occtl_prim_pipe_shell_info_init()

void occtl_prim_pipe_shell_info_init ( occtl_prim_pipe_shell_info_t info)

Runtime initialiser for occtl_prim_pipe_shell_info_t.

Sets all fields to OCCTL_PRIM_PIPE_SHELL_INFO_INIT.

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

\par Thread Safety Yes.

See also
occtl_prim_make_pipe_shell

◆ occtl_prim_pipe_shell_interpolated_law_info_init()

void occtl_prim_pipe_shell_interpolated_law_info_init ( occtl_prim_pipe_shell_interpolated_law_info_t info)

Runtime initialiser for occtl_prim_pipe_shell_interpolated_law_info_t.

Sets all fields to OCCTL_PRIM_PIPE_SHELL_INTERPOLATED_LAW_INFO_INIT.

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

\par Thread Safety Yes.

See also
occtl_prim_make_pipe_shell_interpolated_law

◆ occtl_prim_pipe_shell_linear_law_info_init()

void occtl_prim_pipe_shell_linear_law_info_init ( occtl_prim_pipe_shell_linear_law_info_t info)

Runtime initialiser for occtl_prim_pipe_shell_linear_law_info_t.

Sets all fields to OCCTL_PRIM_PIPE_SHELL_LINEAR_LAW_INFO_INIT.

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

\par Thread Safety Yes.

See also
occtl_prim_make_pipe_shell_linear_law

◆ occtl_prim_prism_info_init()

void occtl_prim_prism_info_init ( occtl_prim_prism_info_t info)

Runtime initialiser for occtl_prim_prism_info_t.

Sets all fields to OCCTL_PRIM_PRISM_INFO_INIT.

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

\par Thread Safety Yes.

See also
occtl_prim_make_prism

◆ occtl_prim_revol_info_init()

void occtl_prim_revol_info_init ( occtl_prim_revol_info_t info)

Runtime initialiser for occtl_prim_revol_info_t.

Sets all fields to OCCTL_PRIM_REVOL_INFO_INIT.

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

\par Thread Safety Yes.

See also
occtl_prim_make_revol

◆ occtl_prim_thick_solid_info_init()

void occtl_prim_thick_solid_info_init ( occtl_prim_thick_solid_info_t info)

Runtime initialiser for occtl_prim_thick_solid_info_t.

Sets all fields to OCCTL_PRIM_THICK_SOLID_INFO_INIT.

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

\par Thread Safety Yes.

See also
occtl_prim_make_thick_solid

◆ occtl_prim_twist_extrusion_info_init()

void occtl_prim_twist_extrusion_info_init ( occtl_prim_twist_extrusion_info_t info)

Runtime initialiser for occtl_prim_twist_extrusion_info_t.

Sets all fields to OCCTL_PRIM_TWIST_EXTRUSION_INFO_INIT.

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

\par Thread Safety Yes.

See also
occtl_prim_make_twist_extrusion