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

OCCT-Light: surface geometry via graph + rep_id. More...

#include <stddef.h>
#include <stdint.h>
#include "occtl_core.h"
#include "occtl_geom.h"
Include dependency graph for occtl_surfaces.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  occtl_surface_revolution_create_info
 
struct  occtl_surface_extrusion_create_info
 
struct  occtl_surface_rectangular_trimmed_create_info
 
struct  occtl_surface_offset_create_info
 
struct  occtl_surface_bspline_create_info
 
struct  occtl_surface_bezier_create_info
 
struct  occtl_surface_bspline
 
struct  occtl_surface_interpolated_info
 
struct  occtl_surface_approximated_info
 
struct  occtl_surface_point_grid_create_info
 
struct  occtl_surface_boundary_curves_create_info
 
struct  occtl_surface_gordon_create_info
 
struct  occtl_surface_curve_grid_create_info
 

Macros

#define OCCTL_SURFACE_REVOLUTION_CREATE_INFO_VERSION_1   1u
 
#define OCCTL_SURFACE_REVOLUTION_CREATE_INFO_INIT
 
#define OCCTL_SURFACE_EXTRUSION_CREATE_INFO_VERSION_1   1u
 
#define OCCTL_SURFACE_EXTRUSION_CREATE_INFO_INIT    {OCCTL_SURFACE_EXTRUSION_CREATE_INFO_VERSION_1, NULL, OCCTL_REP_ID_INVALID, {0.0, 0.0, 1.0}}
 
#define OCCTL_SURFACE_RECTANGULAR_TRIMMED_CREATE_INFO_VERSION_1   1u
 
#define OCCTL_SURFACE_RECTANGULAR_TRIMMED_CREATE_INFO_INIT
 
#define OCCTL_SURFACE_OFFSET_CREATE_INFO_VERSION_1   1u
 
#define OCCTL_SURFACE_OFFSET_CREATE_INFO_INIT    {OCCTL_SURFACE_OFFSET_CREATE_INFO_VERSION_1, NULL, OCCTL_REP_ID_INVALID, 0.0}
 
#define OCCTL_SURFACE_BSPLINE_CREATE_INFO_VERSION_1   1u
 
#define OCCTL_SURFACE_BSPLINE_CREATE_INFO_INIT
 
#define OCCTL_SURFACE_BEZIER_CREATE_INFO_VERSION_1   1u
 
#define OCCTL_SURFACE_BEZIER_CREATE_INFO_INIT    {OCCTL_SURFACE_BEZIER_CREATE_INFO_VERSION_1, NULL, NULL, 0, 0, NULL}
 
#define OCCTL_SURFACE_BSPLINE_VERSION_1   1u
 
#define OCCTL_SURFACE_BSPLINE_INIT
 
#define OCCTL_SURFACE_INTERPOLATED_INFO_VERSION_1   1u
 
#define OCCTL_SURFACE_INTERPOLATED_INFO_INIT    {OCCTL_SURFACE_INTERPOLATED_INFO_VERSION_1, NULL, NULL, 0, 0, 0}
 
#define OCCTL_SURFACE_APPROXIMATED_INFO_VERSION_1   1u
 
#define OCCTL_SURFACE_APPROXIMATED_INFO_INIT    {OCCTL_SURFACE_APPROXIMATED_INFO_VERSION_1, NULL, NULL, 0, 0, 1, 3, 1e-3}
 
#define OCCTL_SURFACE_POINT_GRID_CREATE_INFO_VERSION_1   1u
 
#define OCCTL_SURFACE_POINT_GRID_CREATE_INFO_INIT
 
#define OCCTL_SURFACE_BOUNDARY_CURVES_CREATE_INFO_VERSION_1   1u
 
#define OCCTL_SURFACE_BOUNDARY_CURVES_CREATE_INFO_INIT
 
#define OCCTL_SURFACE_GORDON_CREATE_INFO_VERSION_1   1u
 
#define OCCTL_SURFACE_GORDON_CREATE_INFO_INIT    {OCCTL_SURFACE_GORDON_CREATE_INFO_VERSION_1, NULL, NULL, 0, NULL, 0, 1.0e-7, 0}
 
#define OCCTL_SURFACE_CURVE_GRID_CREATE_INFO_VERSION_1   1u
 
#define OCCTL_SURFACE_CURVE_GRID_CREATE_INFO_INIT    {OCCTL_SURFACE_CURVE_GRID_CREATE_INFO_VERSION_1, NULL, NULL, 0, NULL, 0, 1.0e-7, 0}
 

Typedefs

typedef enum occtl_surface_kind occtl_surface_kind_t
 
typedef struct occtl_surface_revolution_create_info occtl_surface_revolution_create_info_t
 
typedef struct occtl_surface_extrusion_create_info occtl_surface_extrusion_create_info_t
 
typedef struct occtl_surface_rectangular_trimmed_create_info occtl_surface_rectangular_trimmed_create_info_t
 
typedef struct occtl_surface_offset_create_info occtl_surface_offset_create_info_t
 
typedef struct occtl_surface_bspline_create_info occtl_surface_bspline_create_info_t
 
typedef struct occtl_surface_bezier_create_info occtl_surface_bezier_create_info_t
 
typedef struct occtl_surface_bspline occtl_surface_bspline_t
 
typedef struct occtl_surface_interpolated_info occtl_surface_interpolated_info_t
 
typedef struct occtl_surface_approximated_info occtl_surface_approximated_info_t
 
typedef enum occtl_surface_point_grid_mode occtl_surface_point_grid_mode_t
 
typedef struct occtl_surface_point_grid_create_info occtl_surface_point_grid_create_info_t
 
typedef enum occtl_surface_filling_style occtl_surface_filling_style_t
 
typedef struct occtl_surface_boundary_curves_create_info occtl_surface_boundary_curves_create_info_t
 
typedef struct occtl_surface_gordon_create_info occtl_surface_gordon_create_info_t
 
typedef struct occtl_surface_curve_grid_create_info occtl_surface_curve_grid_create_info_t
 

Enumerations

enum  occtl_surface_kind {
  OCCTL_SURFACE_KIND_PLANE = 0 , OCCTL_SURFACE_KIND_CYLINDRICAL = 1 , OCCTL_SURFACE_KIND_CONICAL = 2 , OCCTL_SURFACE_KIND_SPHERICAL = 3 ,
  OCCTL_SURFACE_KIND_TOROIDAL = 4 , OCCTL_SURFACE_KIND_BSPLINE = 5 , OCCTL_SURFACE_KIND_BEZIER = 6 , OCCTL_SURFACE_KIND_REVOLUTION = 7 ,
  OCCTL_SURFACE_KIND_EXTRUSION = 8 , OCCTL_SURFACE_KIND_RECTANGULAR_TRIMMED , OCCTL_SURFACE_KIND_OFFSET = 10 , OCCTL_SURFACE_KIND_UNDEFINED = 11 ,
  OCCTL_SURFACE_KIND_RESERVED_FUTURE = 0x7fffffff
}
 
enum  occtl_surface_point_grid_mode { OCCTL_SURFACE_POINT_GRID_MODE_APPROXIMATE = 0 , OCCTL_SURFACE_POINT_GRID_MODE_INTERPOLATE = 1 , OCCTL_SURFACE_POINT_GRID_MODE_RESERVED_FUTURE = 0x7fffffff }
 
enum  occtl_surface_filling_style { OCCTL_SURFACE_FILLING_STRETCH = 0 , OCCTL_SURFACE_FILLING_COONS = 1 , OCCTL_SURFACE_FILLING_CURVED = 2 , OCCTL_SURFACE_FILLING_RESERVED_FUTURE = 0x7fffffff }
 

Functions

occtl_status_t occtl_surface_create_plane (occtl_graph_t *graph, occtl_rep_id_t *out_id, occtl_geom_plane_t plane)
 
occtl_status_t occtl_surface_create_cylinder (occtl_graph_t *graph, occtl_rep_id_t *out_id, occtl_geom_cylindrical_surface_t cylinder)
 
occtl_status_t occtl_surface_create_cone (occtl_graph_t *graph, occtl_rep_id_t *out_id, occtl_geom_conical_surface_t cone)
 
occtl_status_t occtl_surface_create_sphere (occtl_graph_t *graph, occtl_rep_id_t *out_id, occtl_geom_spherical_surface_t sphere)
 
occtl_status_t occtl_surface_create_torus (occtl_graph_t *graph, occtl_rep_id_t *out_id, occtl_geom_toroidal_surface_t torus)
 
void occtl_surface_revolution_create_info_init (occtl_surface_revolution_create_info_t *info)
 
occtl_status_t occtl_surface_create_revolution (occtl_graph_t *graph, occtl_rep_id_t *out_id, const occtl_surface_revolution_create_info_t *info)
 
void occtl_surface_extrusion_create_info_init (occtl_surface_extrusion_create_info_t *info)
 
occtl_status_t occtl_surface_create_extrusion (occtl_graph_t *graph, occtl_rep_id_t *out_id, const occtl_surface_extrusion_create_info_t *info)
 
void occtl_surface_rectangular_trimmed_create_info_init (occtl_surface_rectangular_trimmed_create_info_t *info)
 
occtl_status_t occtl_surface_create_rectangular_trimmed (occtl_graph_t *graph, occtl_rep_id_t *out_id, const occtl_surface_rectangular_trimmed_create_info_t *info)
 
void occtl_surface_offset_create_info_init (occtl_surface_offset_create_info_t *info)
 
occtl_status_t occtl_surface_create_offset (occtl_graph_t *graph, occtl_rep_id_t *out_id, const occtl_surface_offset_create_info_t *info)
 
void occtl_surface_bspline_create_info_init (occtl_surface_bspline_create_info_t *info)
 
occtl_status_t occtl_surface_create_bspline (occtl_graph_t *graph, occtl_rep_id_t *out_id, const occtl_surface_bspline_create_info_t *info)
 
void occtl_surface_bezier_create_info_init (occtl_surface_bezier_create_info_t *info)
 
occtl_status_t occtl_surface_create_bezier (occtl_graph_t *graph, occtl_rep_id_t *out_id, const occtl_surface_bezier_create_info_t *info)
 
occtl_status_t occtl_surface_create_bezier_grid (occtl_graph_t *graph, occtl_rep_id_t *out_id, const occtl_surface_bezier_create_info_t *info)
 
occtl_status_t occtl_surface_reverse (occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_rep_id_t *out_id)
 
occtl_status_t occtl_surface_transformed (occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_transform_t transform, occtl_rep_id_t *out_id)
 
occtl_status_t occtl_surface_translated (occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_vector3_t delta, occtl_rep_id_t *out_id)
 
occtl_status_t occtl_surface_rotated (occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_axis1_placement_t axis, double angle, occtl_rep_id_t *out_id)
 
occtl_status_t occtl_surface_scaled (occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_point3_t origin, double factor, occtl_rep_id_t *out_id)
 
occtl_status_t occtl_surface_area (const occtl_graph_t *graph, occtl_rep_id_t surface_id, double *out_area)
 
occtl_status_t occtl_surface_project_point (const occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_point3_t point, double *out_u, double *out_v, double *out_distance)
 
occtl_status_t occtl_surface_uv_of_point (const occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_point3_t point, double *out_u, double *out_v)
 
occtl_status_t occtl_surface_kind (const occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_surface_kind_t *out_kind)
 
occtl_status_t occtl_surface_is_u_periodic (const occtl_graph_t *graph, occtl_rep_id_t surface_id, int32_t *out_is_periodic)
 
occtl_status_t occtl_surface_is_v_periodic (const occtl_graph_t *graph, occtl_rep_id_t surface_id, int32_t *out_is_periodic)
 
occtl_status_t occtl_surface_is_closed (const occtl_graph_t *graph, occtl_rep_id_t surface_id, int32_t *out_is_closed)
 
occtl_status_t occtl_surface_is_periodic (const occtl_graph_t *graph, occtl_rep_id_t surface_id, int32_t *out_is_periodic)
 
occtl_status_t occtl_surface_continuity (occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_geom_continuity_t *out_continuity)
 
occtl_status_t occtl_surface_parameter_range (const occtl_graph_t *graph, occtl_rep_id_t surface_id, double *out_u_min, double *out_u_max, double *out_v_min, double *out_v_max)
 
occtl_status_t occtl_surface_as_plane (const occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_geom_plane_t *out_plane)
 
occtl_status_t occtl_surface_as_cylinder (occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_geom_cylindrical_surface_t *out_cylinder)
 
occtl_status_t occtl_surface_as_cone (const occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_geom_conical_surface_t *out_cone)
 
occtl_status_t occtl_surface_as_sphere (occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_geom_spherical_surface_t *out_sphere)
 
occtl_status_t occtl_surface_as_torus (const occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_geom_toroidal_surface_t *out_torus)
 
occtl_status_t occtl_surface_as_revolution (const occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_axis1_placement_t *out_axis)
 
occtl_status_t occtl_surface_as_extrusion (const occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_vector3_t *out_direction)
 
occtl_status_t occtl_surface_as_rectangular_trimmed (const occtl_graph_t *graph, occtl_rep_id_t surface_id, double *out_u_first, double *out_u_last, double *out_v_first, double *out_v_last)
 
occtl_status_t occtl_surface_as_offset (const occtl_graph_t *graph, occtl_rep_id_t surface_id, double *out_offset)
 
occtl_status_t occtl_surface_bspline_u_degree (const occtl_graph_t *graph, occtl_rep_id_t surface_id, int32_t *out_degree)
 
occtl_status_t occtl_surface_bspline_v_degree (const occtl_graph_t *graph, occtl_rep_id_t surface_id, int32_t *out_degree)
 
occtl_status_t occtl_surface_bspline_u_pole_count (const occtl_graph_t *graph, occtl_rep_id_t surface_id, size_t *out_count)
 
occtl_status_t occtl_surface_bspline_v_pole_count (const occtl_graph_t *graph, occtl_rep_id_t surface_id, size_t *out_count)
 
occtl_status_t occtl_surface_bspline_is_rational (const occtl_graph_t *graph, occtl_rep_id_t surface_id, int32_t *out_is_rational)
 
occtl_status_t occtl_surface_bspline_u_knot_count (const occtl_graph_t *graph, occtl_rep_id_t surface_id, size_t *out_count)
 
occtl_status_t occtl_surface_bspline_v_knot_count (const occtl_graph_t *graph, occtl_rep_id_t surface_id, size_t *out_count)
 
occtl_status_t occtl_surface_bezier_u_degree (const occtl_graph_t *graph, occtl_rep_id_t surface_id, int32_t *out_degree)
 
occtl_status_t occtl_surface_bezier_v_degree (const occtl_graph_t *graph, occtl_rep_id_t surface_id, int32_t *out_degree)
 
occtl_status_t occtl_surface_bezier_u_pole_count (const occtl_graph_t *graph, occtl_rep_id_t surface_id, size_t *out_count)
 
occtl_status_t occtl_surface_bezier_v_pole_count (const occtl_graph_t *graph, occtl_rep_id_t surface_id, size_t *out_count)
 
occtl_status_t occtl_surface_bezier_is_rational (const occtl_graph_t *graph, occtl_rep_id_t surface_id, int32_t *out_is_rational)
 
occtl_status_t occtl_surface_bspline_poles (const occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_point3_t *out_buf, size_t capacity, size_t *out_count)
 
occtl_status_t occtl_surface_bspline_u_knots (const occtl_graph_t *graph, occtl_rep_id_t surface_id, double *out_buf, size_t capacity, size_t *out_count)
 
occtl_status_t occtl_surface_bspline_v_knots (const occtl_graph_t *graph, occtl_rep_id_t surface_id, double *out_buf, size_t capacity, size_t *out_count)
 
occtl_status_t occtl_surface_bspline_u_multiplicities (occtl_graph_t *graph, occtl_rep_id_t surface_id, int32_t *out_buf, size_t capacity, size_t *out_count)
 
occtl_status_t occtl_surface_bspline_v_multiplicities (occtl_graph_t *graph, occtl_rep_id_t surface_id, int32_t *out_buf, size_t capacity, size_t *out_count)
 
occtl_status_t occtl_surface_bspline_weights (const occtl_graph_t *graph, occtl_rep_id_t surface_id, double *out_buf, size_t capacity, size_t *out_count)
 
occtl_status_t occtl_surface_bspline_u_flat_knots (const occtl_graph_t *graph, occtl_rep_id_t surface_id, double *out_buf, size_t capacity, size_t *out_count)
 
occtl_status_t occtl_surface_bspline_v_flat_knots (const occtl_graph_t *graph, occtl_rep_id_t surface_id, double *out_buf, size_t capacity, size_t *out_count)
 
occtl_status_t occtl_surface_bspline_poles_view (occtl_graph_t *graph, occtl_rep_id_t surface_id, const occtl_point3_t **out_data, size_t *out_u_count, size_t *out_v_count)
 
void occtl_surface_bspline_init (occtl_surface_bspline_t *out)
 
occtl_status_t occtl_surface_as_bspline (const occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_surface_bspline_t *out)
 
occtl_status_t occtl_surface_eval_d0 (const occtl_graph_t *graph, occtl_rep_id_t surface_id, double u, double v, occtl_point3_t *out_point)
 
occtl_status_t occtl_surface_eval_d1 (const occtl_graph_t *graph, occtl_rep_id_t surface_id, double u, double v, occtl_point3_t *out_point, occtl_vector3_t *out_d1u, occtl_vector3_t *out_d1v)
 
occtl_status_t occtl_surface_eval_d2 (const occtl_graph_t *graph, occtl_rep_id_t surface_id, double u, double v, occtl_point3_t *out_point, occtl_vector3_t *out_d1u, occtl_vector3_t *out_d1v, occtl_vector3_t *out_d2u, occtl_vector3_t *out_d2v, occtl_vector3_t *out_d2uv)
 
occtl_status_t occtl_surface_eval_d3 (const occtl_graph_t *graph, occtl_rep_id_t surface_id, double u, double v, occtl_point3_t *out_point, occtl_vector3_t *out_d1u, occtl_vector3_t *out_d1v, occtl_vector3_t *out_d2u, occtl_vector3_t *out_d2v, occtl_vector3_t *out_d2uv, occtl_vector3_t *out_d3u, occtl_vector3_t *out_d3v, occtl_vector3_t *out_d3uuv, occtl_vector3_t *out_d3uvv)
 
occtl_status_t occtl_surface_eval_dn (const occtl_graph_t *graph, occtl_rep_id_t surface_id, double u, double v, int32_t nu, int32_t nv, occtl_vector3_t *out_derivative)
 
void occtl_surface_interpolated_info_init (occtl_surface_interpolated_info_t *info)
 
occtl_status_t occtl_surface_create_interpolated (occtl_graph_t *graph, const occtl_surface_interpolated_info_t *info, occtl_rep_id_t *out_id)
 
void occtl_surface_approximated_info_init (occtl_surface_approximated_info_t *info)
 
occtl_status_t occtl_surface_create_approximated (occtl_graph_t *graph, const occtl_surface_approximated_info_t *info, occtl_rep_id_t *out_id)
 
void occtl_surface_point_grid_create_info_init (occtl_surface_point_grid_create_info_t *info)
 
occtl_status_t occtl_surface_create_from_point_grid (occtl_graph_t *graph, occtl_rep_id_t *out_id, const occtl_surface_point_grid_create_info_t *info)
 
void occtl_surface_boundary_curves_create_info_init (occtl_surface_boundary_curves_create_info_t *info)
 
occtl_status_t occtl_surface_create_from_boundary_curves (occtl_graph_t *graph, occtl_rep_id_t *out_id, const occtl_surface_boundary_curves_create_info_t *info)
 
void occtl_surface_gordon_create_info_init (occtl_surface_gordon_create_info_t *info)
 
occtl_status_t occtl_surface_create_gordon (occtl_graph_t *graph, occtl_rep_id_t *out_id, const occtl_surface_gordon_create_info_t *info)
 
void occtl_surface_curve_grid_create_info_init (occtl_surface_curve_grid_create_info_t *info)
 
occtl_status_t occtl_surface_create_from_curve_grid (occtl_graph_t *graph, occtl_rep_id_t *out_id, const occtl_surface_curve_grid_create_info_t *info)
 
occtl_status_t occtl_surface_intersect_curve (const occtl_graph_t *graph, occtl_rep_id_t surface_id, occtl_rep_id_t curve_id, occtl_point3_t *out_buf, size_t capacity, size_t *out_count)
 
occtl_status_t occtl_surface_surface_intersect (occtl_graph_t *graph, occtl_rep_id_t surface_a, occtl_rep_id_t surface_b, double tolerance, occtl_rep_id_t **out_ids, size_t *out_count)
 

Detailed Description

OCCT-Light: surface geometry via graph + rep_id.

Surface geometry is accessed and created through the BRepGraph topology DAG using occtl_rep_id_t identifiers. Every surface function takes an occtl_graph_t* as the first argument followed by the surface's rep id.

Constructors and query functions write output rep ids into caller-provided slots. The caller passes the graph that owns the surface representation; all rep ids are scoped to that graph instance.

Macro Definition Documentation

◆ OCCTL_SURFACE_BOUNDARY_CURVES_CREATE_INFO_INIT

#define OCCTL_SURFACE_BOUNDARY_CURVES_CREATE_INFO_INIT
Value:
{OCCTL_SURFACE_BOUNDARY_CURVES_CREATE_INFO_VERSION_1, \
NULL, \
NULL, \
0, \
@ OCCTL_SURFACE_FILLING_STRETCH
Definition occtl_surfaces.h:1974

◆ OCCTL_SURFACE_BSPLINE_CREATE_INFO_INIT

#define OCCTL_SURFACE_BSPLINE_CREATE_INFO_INIT
Value:
{OCCTL_SURFACE_BSPLINE_CREATE_INFO_VERSION_1, \
NULL, \
NULL, \
0, \
0, \
NULL, \
NULL, \
NULL, \
0, \
NULL, \
NULL, \
0, \
0, \
0, \
0, \
0}

◆ OCCTL_SURFACE_BSPLINE_INIT

#define OCCTL_SURFACE_BSPLINE_INIT
Value:
{OCCTL_SURFACE_BSPLINE_VERSION_1, \
NULL, \
0, \
0, \
0, \
0, \
0, \
0, \
0, \
0, \
0, \
0, \
0, \
NULL, \
NULL, \
NULL, \
NULL, \
NULL, \
NULL, \
NULL, \
NULL}

◆ OCCTL_SURFACE_POINT_GRID_CREATE_INFO_INIT

#define OCCTL_SURFACE_POINT_GRID_CREATE_INFO_INIT
Value:
{OCCTL_SURFACE_POINT_GRID_CREATE_INFO_VERSION_1, \
NULL, \
NULL, \
0, \
0, \
1, \
3, \
0, \
1e-3}
@ OCCTL_SURFACE_POINT_GRID_MODE_APPROXIMATE
Definition occtl_surfaces.h:1885

◆ OCCTL_SURFACE_RECTANGULAR_TRIMMED_CREATE_INFO_INIT

#define OCCTL_SURFACE_RECTANGULAR_TRIMMED_CREATE_INFO_INIT
Value:
{OCCTL_SURFACE_RECTANGULAR_TRIMMED_CREATE_INFO_VERSION_1, \
NULL, \
OCCTL_REP_ID_INVALID, \
0.0, \
1.0, \
0.0, \
1.0, \
1, \
1}

◆ OCCTL_SURFACE_REVOLUTION_CREATE_INFO_INIT

#define OCCTL_SURFACE_REVOLUTION_CREATE_INFO_INIT
Value:
{ \
OCCTL_SURFACE_REVOLUTION_CREATE_INFO_VERSION_1, NULL, OCCTL_REP_ID_INVALID, \
{ \
{0, 0, 0}, {0, 0, 1} \
} \
}

Typedef Documentation

◆ occtl_surface_approximated_info_t

Versioned create-info struct for surface approximation.

Fits a B-spline surface to the given point grid within tolerance using OCCT's GeomAPI_PointsToBSplineSurface.

◆ occtl_surface_bezier_create_info_t

Versioned create-info struct for Bezier surface construction.

Poles are stored row-major: index = u * v_pole_count + v.

◆ occtl_surface_boundary_curves_create_info_t

Versioned create-info struct for a B-spline surface from boundary curves.

Builds a filled B-spline surface from two, three, or four contiguous boundary curves. Input curves are specified as rep ids in the graph.

◆ occtl_surface_bspline_create_info_t

Versioned create-info struct for B-spline surface construction.

Poles are stored row-major: index = u * v_pole_count + v. U and V knot sequences are each in compact form (distinct + multiplicities).

◆ occtl_surface_bspline_t

Aggregate inspection view of a B-spline surface.

Read-only snapshot of every field a caller typically needs in the same pass: scalars (U/V degree, periodicity, rational flag, per-direction counts) plus borrowed pointers into the underlying OCCT storage for the pole grid, weight grid, distinct U/V knots, U/V multiplicities, and the expanded U/V flat knot sequences. One call replaces ~16 atomized accessors; pair with occtl_surface_as_bspline.

Pointers in out borrow from the surface rep and are valid while the rep exists in the graph.

The pole and weight grids are stored row-major with U as the major (slow-varying) axis: element (u_index, v_index) is at poles[u_index * v_pole_count + v_index]. This layout matches occtl_surface_bspline_create_info_t so values flow round-trip without reshuffling.

The caller declares the layout version they understand in struct_version before the call; the library fills only fields up to that version. The weights pointer is set to NULL when is_rational is 0.

◆ occtl_surface_curve_grid_create_info_t

Versioned create-info struct for curve-grid surface construction.

Builds a B-spline surface from an intersecting grid of U-direction and V-direction curves. This is a binding-friendly semantic wrapper over OCCT's Gordon surface construction.

◆ occtl_surface_extrusion_create_info_t

Versioned create-info for a surface of linear extrusion.

The profile curve is swept along direction to form the surface.

◆ occtl_surface_filling_style_t

◆ occtl_surface_gordon_create_info_t

Versioned create-info struct for Gordon surface construction.

Builds a B-spline surface interpolating a network of profile and guide curves. Profiles and guides are specified as rep id arrays; each array must contain at least two valid entries.

◆ occtl_surface_interpolated_info_t

Versioned create-info struct for surface interpolation.

Interpolates a B-spline surface passing through the given grid of points. Points are stored row-major: index = u * v_point_count + v. Uses OCCT's GeomAPI_PointsToBSplineSurface internally with uniform parameters.

◆ occtl_surface_kind_t

Discriminates the underlying geometry of a surface rep.

◆ occtl_surface_offset_create_info_t

Versioned create-info for an offset surface.

◆ occtl_surface_point_grid_create_info_t

Versioned create-info struct for point-grid surface construction.

Builds a B-spline surface from a row-major point grid. Approximation mode uses degree range and tolerance. Interpolation mode uses only the point grid and U periodic flag.

◆ occtl_surface_point_grid_mode_t

Selects the OCCT point-grid fitting algorithm.

◆ occtl_surface_rectangular_trimmed_create_info_t

Versioned create-info for a rectangular-trimmed surface.

Trims the basis surface to the parametric box [u_first, u_last] x [v_first, v_last]. When trim_u is non-zero the trim is applied in U; when trim_v is non-zero it is applied in V.

◆ occtl_surface_revolution_create_info_t

Versioned create-info for a surface of revolution.

The profile curve is rotated 2pi around axis to form the surface. The basis must be a valid curve rep id in the graph.

Enumeration Type Documentation

◆ occtl_surface_filling_style

Filling style for occtl_surface_create_from_boundary_curves.

Enumerator
OCCTL_SURFACE_FILLING_STRETCH 

Flattest OCCT filling style.

OCCTL_SURFACE_FILLING_COONS 

Coons-style rounded patch.

OCCTL_SURFACE_FILLING_CURVED 

Most rounded OCCT filling style.

◆ occtl_surface_kind

Discriminates the underlying geometry of a surface rep.

Enumerator
OCCTL_SURFACE_KIND_PLANE 

Infinite plane.

OCCTL_SURFACE_KIND_CYLINDRICAL 

Cylindrical surface.

OCCTL_SURFACE_KIND_CONICAL 

Conical surface.

OCCTL_SURFACE_KIND_SPHERICAL 

Spherical surface.

OCCTL_SURFACE_KIND_TOROIDAL 

Toroidal surface.

OCCTL_SURFACE_KIND_BSPLINE 

B-spline surface.

OCCTL_SURFACE_KIND_BEZIER 

Bezier surface.

OCCTL_SURFACE_KIND_REVOLUTION 

Surface of revolution.

OCCTL_SURFACE_KIND_EXTRUSION 

Surface of linear extrusion.

OCCTL_SURFACE_KIND_RECTANGULAR_TRIMMED 

Rectangular UV-bounded section of a basis surface.

OCCTL_SURFACE_KIND_OFFSET 

Offset of a basis surface.

OCCTL_SURFACE_KIND_UNDEFINED 

Unknown or unrecognised subtype.

◆ occtl_surface_point_grid_mode

Selects the OCCT point-grid fitting algorithm.

Enumerator
OCCTL_SURFACE_POINT_GRID_MODE_APPROXIMATE 

Fit within tolerance.

OCCTL_SURFACE_POINT_GRID_MODE_INTERPOLATE 

Pass through every point.

Function Documentation

◆ occtl_surface_approximated_info_init()

void occtl_surface_approximated_info_init ( occtl_surface_approximated_info_t info)

Runtime initialiser for occtl_surface_approximated_info_t.

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

\par Thread Safety Yes.

See also
occtl_surface_create_approximated

◆ occtl_surface_area()

occtl_status_t occtl_surface_area ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
double *  out_area 
)

Computes the surface area over the full bounded UV parameter domain.

Unbounded surfaces, such as an infinite plane, cannot produce a finite area.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[out]out_areaReceives the surface area. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_area is NULL, or surface_id is invalid.
OCCTL_GEOMETRY_INVALIDThe surface is invalid or unbounded.

\par Thread Safety Yes.

◆ occtl_surface_as_bspline()

occtl_status_t occtl_surface_as_bspline ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
occtl_surface_bspline_t out 
)

Fills a caller-allocated occtl_surface_bspline_t with a complete read-only inspection view of the underlying B-spline surface.

Pointers in out borrow from the surface rep and are valid while the rep exists in the graph.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid; kind must be OCCTL_SURFACE_KIND_BSPLINE.
[in,out]outBorrows it. Caller-allocated; must be non-NULL. The caller sets struct_version on entry; the library fills the remaining fields on success and leaves them unchanged on failure.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out is NULL, or surface_id is invalid.
OCCTL_VERSION_MISMATCHout->struct_version is not supported.
OCCTL_WRONG_KINDSurface is not a B-spline surface.

\par Thread Safety Yes (read-only).

See also
occtl_surface_bspline_init, occtl_surface_bspline_poles_view, occtl_surface_bspline_u_degree, occtl_surface_bspline_u_pole_count

◆ occtl_surface_as_cone()

occtl_status_t occtl_surface_as_cone ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
occtl_geom_conical_surface_t out_cone 
)

Extracts conical surface data.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid; kind must be OCCTL_SURFACE_KIND_CONICAL.
[out]out_coneBorrows it (caller-allocated slot). Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_cone is NULL, or surface_id is invalid.
OCCTL_WRONG_KINDSurface is not a conical surface.

\par Thread Safety Yes.

See also
occtl_surface_kind

◆ occtl_surface_as_cylinder()

occtl_status_t occtl_surface_as_cylinder ( occtl_graph_t graph,
occtl_rep_id_t  surface_id,
occtl_geom_cylindrical_surface_t out_cylinder 
)

Extracts cylindrical surface data.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid; kind must be OCCTL_SURFACE_KIND_CYLINDRICAL.
[out]out_cylinderBorrows it (caller-allocated slot). Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_cylinder is NULL, or surface_id is invalid.
OCCTL_WRONG_KINDSurface is not a cylindrical surface.

\par Thread Safety Yes.

See also
occtl_surface_kind

◆ occtl_surface_as_extrusion()

occtl_status_t occtl_surface_as_extrusion ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
occtl_vector3_t out_direction 
)

Extracts the direction of a surface of linear extrusion.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid; kind must be OCCTL_SURFACE_KIND_EXTRUSION.
[out]out_directionExtrusion direction. May be NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL or surface_id is invalid.
OCCTL_WRONG_KINDSurface is not a surface of linear extrusion.

\par Thread Safety Yes.

See also
occtl_surface_kind

◆ occtl_surface_as_offset()

occtl_status_t occtl_surface_as_offset ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
double *  out_offset 
)

Extracts the signed offset distance of an offset surface.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid; kind must be OCCTL_SURFACE_KIND_OFFSET.
[out]out_offsetSigned offset distance. May be NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL or surface_id is invalid.
OCCTL_WRONG_KINDSurface is not an offset surface.

\par Thread Safety Yes.

See also
occtl_surface_kind

◆ occtl_surface_as_plane()

occtl_status_t occtl_surface_as_plane ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
occtl_geom_plane_t out_plane 
)

Extracts plane data from a surface rep.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid; kind must be OCCTL_SURFACE_KIND_PLANE.
[out]out_planeBorrows it (caller-allocated slot). Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_plane is NULL, or surface_id is invalid.
OCCTL_WRONG_KINDSurface is not a plane.

\par Thread Safety Yes.

See also
occtl_surface_kind

◆ occtl_surface_as_rectangular_trimmed()

occtl_status_t occtl_surface_as_rectangular_trimmed ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
double *  out_u_first,
double *  out_u_last,
double *  out_v_first,
double *  out_v_last 
)

Extracts the parametric trim bounds of a rectangular-trimmed surface.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid; kind must be OCCTL_SURFACE_KIND_RECTANGULAR_TRIMMED.
[out]out_u_firstFirst U trim bound. May be NULL.
[out]out_u_lastLast U trim bound. May be NULL.
[out]out_v_firstFirst V trim bound. May be NULL.
[out]out_v_lastLast V trim bound. May be NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL or surface_id is invalid.
OCCTL_WRONG_KINDSurface is not a rectangular-trimmed surface.

\par Thread Safety Yes.

See also
occtl_surface_kind

◆ occtl_surface_as_revolution()

occtl_status_t occtl_surface_as_revolution ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
occtl_axis1_placement_t out_axis 
)

Extracts the rotation axis of a surface of revolution.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid; kind must be OCCTL_SURFACE_KIND_REVOLUTION.
[out]out_axisRotation axis. May be NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL or surface_id is invalid.
OCCTL_WRONG_KINDSurface is not a surface of revolution.

\par Thread Safety Yes.

See also
occtl_surface_kind

◆ occtl_surface_as_sphere()

occtl_status_t occtl_surface_as_sphere ( occtl_graph_t graph,
occtl_rep_id_t  surface_id,
occtl_geom_spherical_surface_t out_sphere 
)

Extracts spherical surface data.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid; kind must be OCCTL_SURFACE_KIND_SPHERICAL.
[out]out_sphereBorrows it (caller-allocated slot). Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_sphere is NULL, or surface_id is invalid.
OCCTL_WRONG_KINDSurface is not a spherical surface.

\par Thread Safety Yes.

See also
occtl_surface_kind

◆ occtl_surface_as_torus()

occtl_status_t occtl_surface_as_torus ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
occtl_geom_toroidal_surface_t out_torus 
)

Extracts toroidal surface data.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid; kind must be OCCTL_SURFACE_KIND_TOROIDAL.
[out]out_torusBorrows it (caller-allocated slot). Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_torus is NULL, or surface_id is invalid.
OCCTL_WRONG_KINDSurface is not a toroidal surface.

\par Thread Safety Yes.

See also
occtl_surface_kind

◆ occtl_surface_bezier_create_info_init()

void occtl_surface_bezier_create_info_init ( occtl_surface_bezier_create_info_t info)

Runtime initialiser for occtl_surface_bezier_create_info_t.

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

\par Thread Safety Yes.

See also
occtl_surface_create_bezier

◆ occtl_surface_bezier_is_rational()

occtl_status_t occtl_surface_bezier_is_rational ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
int32_t *  out_is_rational 
)

Returns non-zero if the Bezier surface is rational (in U or V).

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[out]out_is_rationalReceives 1 if rational; 0 otherwise. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_is_rational is NULL, or surface_id is invalid.
OCCTL_WRONG_KINDSurface is not a Bezier.

\par Thread Safety Yes.

◆ occtl_surface_bezier_u_degree()

occtl_status_t occtl_surface_bezier_u_degree ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
int32_t *  out_degree 
)

Returns the U degree of a Bezier surface.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[out]out_degreeReceives the U degree. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_degree is NULL, or surface_id is invalid.
OCCTL_WRONG_KINDSurface is not a Bezier.

\par Thread Safety Yes.

◆ occtl_surface_bezier_u_pole_count()

occtl_status_t occtl_surface_bezier_u_pole_count ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
size_t *  out_count 
)

Returns the number of poles in the U direction of a Bezier surface.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[out]out_countReceives the U pole count. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL, or surface_id is invalid.
OCCTL_WRONG_KINDSurface is not a Bezier.

\par Thread Safety Yes.

◆ occtl_surface_bezier_v_degree()

occtl_status_t occtl_surface_bezier_v_degree ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
int32_t *  out_degree 
)

Returns the V degree of a Bezier surface.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[out]out_degreeReceives the V degree. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_degree is NULL, or surface_id is invalid.
OCCTL_WRONG_KINDSurface is not a Bezier.

\par Thread Safety Yes.

◆ occtl_surface_bezier_v_pole_count()

occtl_status_t occtl_surface_bezier_v_pole_count ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
size_t *  out_count 
)

Returns the number of poles in the V direction of a Bezier surface.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[out]out_countReceives the V pole count. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL, or surface_id is invalid.
OCCTL_WRONG_KINDSurface is not a Bezier.

\par Thread Safety Yes.

◆ occtl_surface_boundary_curves_create_info_init()

void occtl_surface_boundary_curves_create_info_init ( occtl_surface_boundary_curves_create_info_t info)

Runtime initialiser for occtl_surface_boundary_curves_create_info_t.

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

\par Thread Safety Yes.

See also
occtl_surface_create_from_boundary_curves

◆ occtl_surface_bspline_create_info_init()

void occtl_surface_bspline_create_info_init ( occtl_surface_bspline_create_info_t info)

Runtime initialiser for occtl_surface_bspline_create_info_t.

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

\par Thread Safety Yes.

See also
occtl_surface_create_bspline

◆ occtl_surface_bspline_init()

void occtl_surface_bspline_init ( occtl_surface_bspline_t out)

Runtime initialiser for occtl_surface_bspline_t.

Sets struct_version and zeroes all other fields. Use instead of the _INIT macro when C macros are not available (e.g. C# P/Invoke).

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

\par Thread Safety Yes.

See also
occtl_surface_as_bspline

◆ occtl_surface_bspline_is_rational()

occtl_status_t occtl_surface_bspline_is_rational ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
int32_t *  out_is_rational 
)

Returns non-zero if the B-spline surface is rational.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[out]out_is_rationalReceives 1 if rational; 0 otherwise. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_is_rational is NULL, or surface_id is invalid.
OCCTL_WRONG_KINDSurface is not a B-spline.

\par Thread Safety Yes.

◆ occtl_surface_bspline_poles()

occtl_status_t occtl_surface_bspline_poles ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
occtl_point3_t out_buf,
size_t  capacity,
size_t *  out_count 
)

Extracts the poles of a B-spline surface. Two-call pattern.

Poles are returned row-major: index = u * v_pole_count + v.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid; kind must be OCCTL_SURFACE_KIND_BSPLINE.
[out]out_bufMay be NULL on sizing call.
[in]capacityElements out_buf can hold.
[out]out_countRequired count (= u_pole_count * v_pole_count). Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL, or surface_id is invalid.
OCCTL_WRONG_KINDNot a B-spline.
OCCTL_BUFFER_TOO_SMALLBuffer too small.

\par Thread Safety Yes.

◆ occtl_surface_bspline_poles_view()

occtl_status_t occtl_surface_bspline_poles_view ( occtl_graph_t graph,
occtl_rep_id_t  surface_id,
const occtl_point3_t **  out_data,
size_t *  out_u_count,
size_t *  out_v_count 
)

Zero-copy view of the poles array of a B-spline surface.

Returns a direct pointer into the OCCT internal storage and the U / V pole counts. Layout is row-major: index = u * v_pole_count + v. Valid only while the surface rep is alive in the graph and no mutating call has been made on it.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid; kind must be OCCTL_SURFACE_KIND_BSPLINE.
[out]out_dataReceives a borrowed pointer to the pole array. Must be non-NULL.
[out]out_u_countReceives the number of poles in U. Must be non-NULL.
[out]out_v_countReceives the number of poles in V. Must be non-NULL.
Return values
OCCTL_OK
OCCTL_INVALID_ARGUMENTAny out-pointer is NULL, or surface_id is invalid.
OCCTL_WRONG_KINDSurface is not a B-spline.
OCCTL_INTERNALOCCT's internal pole array is not contiguous row-major (does not occur with current OCCT; reported defensively if a future OCCT version changes the layout).

\par Thread Safety Yes (read-only).

◆ occtl_surface_bspline_u_degree()

occtl_status_t occtl_surface_bspline_u_degree ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
int32_t *  out_degree 
)

Returns the U degree of a B-spline surface.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[out]out_degreeReceives the U degree. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_degree is NULL, or surface_id is invalid.
OCCTL_WRONG_KINDSurface is not a B-spline.

\par Thread Safety Yes.

◆ occtl_surface_bspline_u_flat_knots()

occtl_status_t occtl_surface_bspline_u_flat_knots ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
double *  out_buf,
size_t  capacity,
size_t *  out_count 
)

Extracts the expanded (flat) U knot sequence of a B-spline surface. Two-call pattern.

The flat sequence repeats each distinct knot value by its multiplicity. Its length equals sum(u_multiplicities), which is the standard B-spline knot vector consumed by most numerical libraries.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid; kind must be OCCTL_SURFACE_KIND_BSPLINE.
[out]out_bufMay be NULL on the sizing call.
[in]capacityNumber of double elements out_buf can hold.
[out]out_countReceives the required count. Must be non-NULL.
Return values
OCCTL_OKOn success (including the sizing call).
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL, or surface_id is invalid.
OCCTL_WRONG_KINDHandle is not a B-spline.
OCCTL_BUFFER_TOO_SMALLcapacity is smaller than *out_count.

\par Thread Safety Yes.

See also
occtl_surface_bspline_u_knots, occtl_surface_bspline_u_multiplicities, occtl_surface_bspline_v_flat_knots

◆ occtl_surface_bspline_u_knot_count()

occtl_status_t occtl_surface_bspline_u_knot_count ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
size_t *  out_count 
)

Returns the number of distinct U knot values of a B-spline surface.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[out]out_countReceives the U knot count. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL, or surface_id is invalid.
OCCTL_WRONG_KINDSurface is not a B-spline.

\par Thread Safety Yes.

◆ occtl_surface_bspline_u_knots()

occtl_status_t occtl_surface_bspline_u_knots ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
double *  out_buf,
size_t  capacity,
size_t *  out_count 
)

Extracts the distinct U knot values of a B-spline surface. Two-call pattern.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[out]out_bufMay be NULL on sizing call.
[in]capacityElements out_buf can hold.
[out]out_countRequired count. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL, or surface_id is invalid.
OCCTL_WRONG_KINDNot a B-spline.
OCCTL_BUFFER_TOO_SMALLBuffer too small.

\par Thread Safety Yes.

◆ occtl_surface_bspline_u_multiplicities()

occtl_status_t occtl_surface_bspline_u_multiplicities ( occtl_graph_t graph,
occtl_rep_id_t  surface_id,
int32_t *  out_buf,
size_t  capacity,
size_t *  out_count 
)

Extracts the U knot multiplicities of a B-spline surface. Two-call pattern.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[out]out_bufMay be NULL on sizing call.
[in]capacityElements out_buf can hold.
[out]out_countRequired count. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL, or surface_id is invalid.
OCCTL_WRONG_KINDNot a B-spline.
OCCTL_BUFFER_TOO_SMALLBuffer too small.

\par Thread Safety Yes.

◆ occtl_surface_bspline_u_pole_count()

occtl_status_t occtl_surface_bspline_u_pole_count ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
size_t *  out_count 
)

Returns the number of poles in the U direction of a B-spline surface.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[out]out_countReceives the U pole count. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL, or surface_id is invalid.
OCCTL_WRONG_KINDSurface is not a B-spline.

\par Thread Safety Yes.

◆ occtl_surface_bspline_v_degree()

occtl_status_t occtl_surface_bspline_v_degree ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
int32_t *  out_degree 
)

Returns the V degree of a B-spline surface.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[out]out_degreeReceives the V degree. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_degree is NULL, or surface_id is invalid.
OCCTL_WRONG_KINDSurface is not a B-spline.

\par Thread Safety Yes.

◆ occtl_surface_bspline_v_flat_knots()

occtl_status_t occtl_surface_bspline_v_flat_knots ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
double *  out_buf,
size_t  capacity,
size_t *  out_count 
)

Extracts the expanded (flat) V knot sequence of a B-spline surface. Two-call pattern.

The flat sequence repeats each distinct knot value by its multiplicity. Its length equals sum(v_multiplicities), which is the standard B-spline knot vector consumed by most numerical libraries.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid; kind must be OCCTL_SURFACE_KIND_BSPLINE.
[out]out_bufMay be NULL on the sizing call.
[in]capacityNumber of double elements out_buf can hold.
[out]out_countReceives the required count. Must be non-NULL.
Return values
OCCTL_OKOn success (including the sizing call).
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL, or surface_id is invalid.
OCCTL_WRONG_KINDHandle is not a B-spline.
OCCTL_BUFFER_TOO_SMALLcapacity is smaller than *out_count.

\par Thread Safety Yes.

See also
occtl_surface_bspline_v_knots, occtl_surface_bspline_v_multiplicities, occtl_surface_bspline_u_flat_knots

◆ occtl_surface_bspline_v_knot_count()

occtl_status_t occtl_surface_bspline_v_knot_count ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
size_t *  out_count 
)

Returns the number of distinct V knot values of a B-spline surface.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[out]out_countReceives the V knot count. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL, or surface_id is invalid.
OCCTL_WRONG_KINDSurface is not a B-spline.

\par Thread Safety Yes.

◆ occtl_surface_bspline_v_knots()

occtl_status_t occtl_surface_bspline_v_knots ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
double *  out_buf,
size_t  capacity,
size_t *  out_count 
)

Extracts the distinct V knot values of a B-spline surface. Two-call pattern.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[out]out_bufMay be NULL on sizing call.
[in]capacityElements out_buf can hold.
[out]out_countRequired count. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL, or surface_id is invalid.
OCCTL_WRONG_KINDNot a B-spline.
OCCTL_BUFFER_TOO_SMALLBuffer too small.

\par Thread Safety Yes.

◆ occtl_surface_bspline_v_multiplicities()

occtl_status_t occtl_surface_bspline_v_multiplicities ( occtl_graph_t graph,
occtl_rep_id_t  surface_id,
int32_t *  out_buf,
size_t  capacity,
size_t *  out_count 
)

Extracts the V knot multiplicities of a B-spline surface. Two-call pattern.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[out]out_bufMay be NULL on sizing call.
[in]capacityElements out_buf can hold.
[out]out_countRequired count. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL, or surface_id is invalid.
OCCTL_WRONG_KINDNot a B-spline.
OCCTL_BUFFER_TOO_SMALLBuffer too small.

\par Thread Safety Yes.

◆ occtl_surface_bspline_v_pole_count()

occtl_status_t occtl_surface_bspline_v_pole_count ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
size_t *  out_count 
)

Returns the number of poles in the V direction of a B-spline surface.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[out]out_countReceives the V pole count. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL, or surface_id is invalid.
OCCTL_WRONG_KINDSurface is not a B-spline.

\par Thread Safety Yes.

◆ occtl_surface_bspline_weights()

occtl_status_t occtl_surface_bspline_weights ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
double *  out_buf,
size_t  capacity,
size_t *  out_count 
)

Extracts the per-pole weights of a rational B-spline surface. Two-call pattern.

Layout matches the poles array: row-major index = u * v_pole_count + v.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[out]out_bufOutput buffer, or NULL for sizing.
[in]capacityCapacity of out_buf in doubles.
[out]out_countRequired/filled double count. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_count is NULL, or surface_id is invalid.
OCCTL_WRONG_KINDNot a B-spline or surface is non-rational.
OCCTL_BUFFER_TOO_SMALLBuffer too small.

\par Thread Safety Yes.

◆ occtl_surface_continuity()

occtl_status_t occtl_surface_continuity ( occtl_graph_t graph,
occtl_rep_id_t  surface_id,
occtl_geom_continuity_t out_continuity 
)

Returns the continuity class of the surface.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[out]out_continuityReceives the continuity class. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_continuity is NULL, or surface_id is invalid.

\par Thread Safety Yes.

◆ occtl_surface_create_approximated()

occtl_status_t occtl_surface_create_approximated ( occtl_graph_t graph,
const occtl_surface_approximated_info_t info,
occtl_rep_id_t out_id 
)

Fits a B-spline surface rep to the given point grid within tolerance.

Uses OCCT's GeomAPI_PointsToBSplineSurface (approximation mode).

Parameters
[in]graphGraph that will own the rep. Must be non-NULL.
[in]infoVersioned create-info. Must be non-NULL.
[out]out_idReceives the rep id. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, out_id, or info is NULL, required fields are NULL / too small, degree range is invalid, or tolerance is negative.
OCCTL_VERSION_MISMATCHUnsupported struct_version.
OCCTL_GEOMETRY_INVALIDApproximation failed.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

See also
occtl_surface_approximated_info_init

◆ occtl_surface_create_bezier()

occtl_status_t occtl_surface_create_bezier ( occtl_graph_t graph,
occtl_rep_id_t out_id,
const occtl_surface_bezier_create_info_t info 
)

Creates a Bezier surface rep in the graph.

Parameters
[in]graphGraph that will own the rep. Must be non-NULL.
[out]out_idReceives the rep id. Must be non-NULL.
[in]infoBorrows it. Versioned create-info. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, out_id, or info is NULL.
OCCTL_VERSION_MISMATCHUnsupported struct_version.
OCCTL_GEOMETRY_INVALIDOCCT rejected the definition.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

◆ occtl_surface_create_bezier_grid()

occtl_status_t occtl_surface_create_bezier_grid ( occtl_graph_t graph,
occtl_rep_id_t out_id,
const occtl_surface_bezier_create_info_t info 
)

Creates a Bezier surface from a row-major pole grid.

This is the grid-facing alias for occtl_surface_create_bezier. It uses the same create-info struct: poles are laid out as u * v_pole_count + v, and weights may be NULL for a non-rational Bezier surface.

Parameters
[in]graphGraph that will own the rep. Must be non-NULL.
[out]out_idReceives the rep id. Must be non-NULL.
[in]infoBorrows it. Versioned create-info. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, out_id, or info is NULL, or the pole grid is invalid.
OCCTL_VERSION_MISMATCHUnsupported struct_version.
OCCTL_GEOMETRY_INVALIDOCCT rejected the definition.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

See also
occtl_surface_bezier_create_info_init, occtl_surface_create_bezier, occtl_surface_create_from_point_grid

◆ occtl_surface_create_bspline()

occtl_status_t occtl_surface_create_bspline ( occtl_graph_t graph,
occtl_rep_id_t out_id,
const occtl_surface_bspline_create_info_t info 
)

Creates a B-spline surface rep in the graph.

Parameters
[in]graphGraph that will own the rep. Must be non-NULL.
[out]out_idReceives the rep id. Must be non-NULL.
[in]infoVersioned create-info. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, out_id, or info is NULL, required arrays are NULL, or periodic flags are not 0/1.
OCCTL_VERSION_MISMATCHUnsupported struct_version.
OCCTL_GEOMETRY_INVALIDOCCT rejected the definition.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

◆ occtl_surface_create_cone()

occtl_status_t occtl_surface_create_cone ( occtl_graph_t graph,
occtl_rep_id_t out_id,
occtl_geom_conical_surface_t  cone 
)

Creates a conical surface rep in the graph.

Parameters
[in]graphGraph that will own the rep. Must be non-NULL.
[out]out_idReceives the rep id of the new surface. Must be non-NULL.
[in]coneCone data. semi_angle must be in (0, pi/2).
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_id is NULL.
OCCTL_GEOMETRY_INVALIDInvalid semi_angle.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

◆ occtl_surface_create_cylinder()

occtl_status_t occtl_surface_create_cylinder ( occtl_graph_t graph,
occtl_rep_id_t out_id,
occtl_geom_cylindrical_surface_t  cylinder 
)

Creates a cylindrical surface rep in the graph.

Parameters
[in]graphGraph that will own the rep. Must be non-NULL.
[out]out_idReceives the rep id of the new surface. Must be non-NULL.
[in]cylinderCylinder data. radius must be > 0.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_id is NULL.
OCCTL_GEOMETRY_INVALIDradius is not positive.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

◆ occtl_surface_create_extrusion()

occtl_status_t occtl_surface_create_extrusion ( occtl_graph_t graph,
occtl_rep_id_t out_id,
const occtl_surface_extrusion_create_info_t info 
)

Creates a surface of linear extrusion rep in the graph.

Parameters
[in]graphGraph that will own the rep. Must be non-NULL.
[out]out_idReceives the rep id. Must be non-NULL.
[in]infoVersioned create-info. Must be non-NULL. The basis must be a valid curve rep id.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, out_id, or info is NULL, or info->basis is invalid.
OCCTL_VERSION_MISMATCHUnsupported struct_version.
OCCTL_GEOMETRY_INVALIDdirection has zero length.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

◆ occtl_surface_create_from_boundary_curves()

occtl_status_t occtl_surface_create_from_boundary_curves ( occtl_graph_t graph,
occtl_rep_id_t out_id,
const occtl_surface_boundary_curves_create_info_t info 
)

Creates a B-spline surface rep from contiguous boundary curves.

Uses OCCT's GeomFill_BSplineCurves. The input curves must form a compatible boundary loop or strip accepted by OCCT.

Parameters
[in]graphGraph that will own the rep. Must be non-NULL.
[out]out_idReceives the rep id. Must be non-NULL.
[in]infoBorrows it. Must be non-NULL with a recognised struct_version.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, out_id, or info is NULL, p_next is non-NULL, curves is NULL, curve_count is not 2, 3, or 4, an array entry is invalid, or style is unknown.
OCCTL_VERSION_MISMATCHstruct_version is unrecognised.
OCCTL_GEOMETRY_INVALIDOCCT rejected the boundary curves.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

See also
occtl_surface_boundary_curves_create_info_init, occtl_surface_create_gordon

◆ occtl_surface_create_from_curve_grid()

occtl_status_t occtl_surface_create_from_curve_grid ( occtl_graph_t graph,
occtl_rep_id_t out_id,
const occtl_surface_curve_grid_create_info_t info 
)

Creates a B-spline surface rep from an intersecting U/V curve grid.

Uses OCCT's GeomFill_Gordon. The input curves must form a compatible network where each U-direction curve intersects each V-direction curve.

Parameters
[in]graphGraph that will own the rep. Must be non-NULL.
[out]out_idReceives the rep id. Must be non-NULL.
[in]infoBorrows it. Must be non-NULL with a recognised struct_version.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, out_id, or info is NULL, p_next is non-NULL, a curve array is NULL / too small, an array entry is invalid, tolerance is non-positive, or parallel is not 0/1.
OCCTL_VERSION_MISMATCHstruct_version is unrecognised.
OCCTL_GEOMETRY_INVALIDOCCT rejected the curve network.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

See also
occtl_surface_curve_grid_create_info_init, occtl_surface_create_gordon

◆ occtl_surface_create_from_point_grid()

occtl_status_t occtl_surface_create_from_point_grid ( occtl_graph_t graph,
occtl_rep_id_t out_id,
const occtl_surface_point_grid_create_info_t info 
)

Creates a B-spline surface rep from a row-major point grid.

This is the broad point-grid constructor. It delegates to OCCT's GeomAPI_PointsToBSplineSurface in approximation or interpolation mode.

Parameters
[in]graphGraph that will own the rep. Must be non-NULL.
[out]out_idReceives the rep id. Must be non-NULL.
[in]infoBorrows it. Must be non-NULL with a recognised struct_version.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, out_id, or info is NULL, p_next is non-NULL, the point grid is NULL / too small, the mode is unknown, degree range is invalid, or tolerance is negative.
OCCTL_VERSION_MISMATCHstruct_version is unrecognised.
OCCTL_GEOMETRY_INVALIDOCCT rejected the point grid.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

See also
occtl_surface_point_grid_create_info_init, occtl_surface_create_interpolated, occtl_surface_create_approximated

◆ occtl_surface_create_gordon()

occtl_status_t occtl_surface_create_gordon ( occtl_graph_t graph,
occtl_rep_id_t out_id,
const occtl_surface_gordon_create_info_t info 
)

Creates a Gordon B-spline surface rep from a profile/guide curve network.

Uses OCCT's GeomFill_Gordon. The input curves must form a compatible intersecting network; non-rational curve networks are the OCCT-supported target for this constructor.

Parameters
[in]graphGraph that will own the rep. Must be non-NULL.
[out]out_idReceives the rep id. Must be non-NULL.
[in]infoBorrows it. Must be non-NULL with a recognised struct_version.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, out_id, or info is NULL, p_next is non-NULL, a curve array is NULL / too small, an array entry is invalid, tolerance is non-positive, or parallel is not 0/1.
OCCTL_VERSION_MISMATCHstruct_version is unrecognised.
OCCTL_GEOMETRY_INVALIDOCCT rejected the curve network.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

See also
occtl_surface_gordon_create_info_init, occtl_surface_create_interpolated

◆ occtl_surface_create_interpolated()

occtl_status_t occtl_surface_create_interpolated ( occtl_graph_t graph,
const occtl_surface_interpolated_info_t info,
occtl_rep_id_t out_id 
)

Creates a B-spline surface rep that interpolates (passes through) the given point grid.

Uses OCCT's GeomAPI_PointsToBSplineSurface with uniform parameters. When is_u_periodic is set, the surface is made periodic in U.

Parameters
[in]graphGraph that will own the rep. Must be non-NULL.
[in]infoVersioned create-info. Must be non-NULL.
[out]out_idReceives the rep id. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, out_id, or info is NULL, required fields are NULL / too small, or is_u_periodic is not 0/1.
OCCTL_VERSION_MISMATCHUnsupported struct_version.
OCCTL_GEOMETRY_INVALIDInterpolation failed.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

See also
occtl_surface_interpolated_info_init

◆ occtl_surface_create_offset()

occtl_status_t occtl_surface_create_offset ( occtl_graph_t graph,
occtl_rep_id_t out_id,
const occtl_surface_offset_create_info_t info 
)

Creates an offset surface rep in the graph.

Parameters
[in]graphGraph that will own the rep. Must be non-NULL.
[out]out_idReceives the rep id. Must be non-NULL.
[in]infoBorrows it. Versioned create-info. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, out_id, or info is NULL, or info->basis is invalid.
OCCTL_VERSION_MISMATCHUnsupported struct_version.
OCCTL_GEOMETRY_INVALIDBasis surface is invalid for offsetting.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

◆ occtl_surface_create_plane()

occtl_status_t occtl_surface_create_plane ( occtl_graph_t graph,
occtl_rep_id_t out_id,
occtl_geom_plane_t  plane 
)

Creates a plane surface rep in the graph.

Parameters
[in]graphGraph that will own the rep. Must be non-NULL.
[out]out_idReceives the rep id of the new surface. Must be non-NULL.
[in]planePlane data.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_id is NULL.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

◆ occtl_surface_create_rectangular_trimmed()

occtl_status_t occtl_surface_create_rectangular_trimmed ( occtl_graph_t graph,
occtl_rep_id_t out_id,
const occtl_surface_rectangular_trimmed_create_info_t info 
)

Creates a rectangular-trimmed surface rep in the graph.

Parameters
[in]graphGraph that will own the rep. Must be non-NULL.
[out]out_idReceives the rep id. Must be non-NULL.
[in]infoBorrows it. Versioned create-info. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, out_id, or info is NULL, or info->basis is invalid.
OCCTL_VERSION_MISMATCHUnsupported struct_version.
OCCTL_GEOMETRY_INVALIDBasis surface or trim parameters are invalid.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

◆ occtl_surface_create_revolution()

occtl_status_t occtl_surface_create_revolution ( occtl_graph_t graph,
occtl_rep_id_t out_id,
const occtl_surface_revolution_create_info_t info 
)

Creates a surface of revolution rep in the graph.

Parameters
[in]graphGraph that will own the rep. Must be non-NULL.
[out]out_idReceives the rep id. Must be non-NULL.
[in]infoVersioned create-info. Must be non-NULL. The basis must be a valid curve rep id.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, out_id, or info is NULL, or info->basis is invalid.
OCCTL_VERSION_MISMATCHUnsupported struct_version.
OCCTL_GEOMETRY_INVALIDOCCT rejected the parameters.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

◆ occtl_surface_create_sphere()

occtl_status_t occtl_surface_create_sphere ( occtl_graph_t graph,
occtl_rep_id_t out_id,
occtl_geom_spherical_surface_t  sphere 
)

Creates a spherical surface rep in the graph.

Parameters
[in]graphGraph that will own the rep. Must be non-NULL.
[out]out_idReceives the rep id of the new surface. Must be non-NULL.
[in]sphereSphere data. radius must be > 0.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_id is NULL.
OCCTL_GEOMETRY_INVALIDradius is not positive.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

◆ occtl_surface_create_torus()

occtl_status_t occtl_surface_create_torus ( occtl_graph_t graph,
occtl_rep_id_t out_id,
occtl_geom_toroidal_surface_t  torus 
)

Creates a toroidal surface rep in the graph.

Parameters
[in]graphGraph that will own the rep. Must be non-NULL.
[out]out_idReceives the rep id of the new surface. Must be non-NULL.
[in]torusTorus data. Both radii must be > 0 and major > minor.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_id is NULL.
OCCTL_GEOMETRY_INVALIDInvalid radii.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

◆ occtl_surface_curve_grid_create_info_init()

void occtl_surface_curve_grid_create_info_init ( occtl_surface_curve_grid_create_info_t info)

Runtime initialiser for occtl_surface_curve_grid_create_info_t.

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

\par Thread Safety Yes.

See also
occtl_surface_create_from_curve_grid

◆ occtl_surface_eval_d0()

occtl_status_t occtl_surface_eval_d0 ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
double  u,
double  v,
occtl_point3_t out_point 
)

Evaluates the surface at (u, v).

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[in]uU parameter.
[in]vV parameter.
[out]out_pointReceives the point on the surface. May be NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL or surface_id is invalid.
OCCTL_OUT_OF_RANGE(u, v) is outside the parameter domain.

\par Thread Safety Yes.

◆ occtl_surface_eval_d1()

occtl_status_t occtl_surface_eval_d1 ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
double  u,
double  v,
occtl_point3_t out_point,
occtl_vector3_t out_d1u,
occtl_vector3_t out_d1v 
)

Evaluates the surface and its first-order partial derivatives at (u, v).

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[in]uU parameter.
[in]vV parameter.
[out]out_pointReceives the point. May be NULL.
[out]out_d1uReceives dS/du. May be NULL.
[out]out_d1vReceives dS/dv. May be NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL or surface_id is invalid.
OCCTL_OUT_OF_RANGEParameter is outside the domain.

\par Thread Safety Yes.

◆ occtl_surface_eval_d2()

occtl_status_t occtl_surface_eval_d2 ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
double  u,
double  v,
occtl_point3_t out_point,
occtl_vector3_t out_d1u,
occtl_vector3_t out_d1v,
occtl_vector3_t out_d2u,
occtl_vector3_t out_d2v,
occtl_vector3_t out_d2uv 
)

Evaluates the surface and its first- and second-order partial derivatives at (u, v).

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[in]uU parameter.
[in]vV parameter.
[out]out_pointReceives the point. May be NULL.
[out]out_d1uReceives dS/du. May be NULL.
[out]out_d1vReceives dS/dv. May be NULL.
[out]out_d2uReceives d2S/du2. May be NULL.
[out]out_d2vReceives d2S/dv2. May be NULL.
[out]out_d2uvReceives d2S/dudv. May be NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL or surface_id is invalid.
OCCTL_OUT_OF_RANGEParameter is outside the domain.

\par Thread Safety Yes.

◆ occtl_surface_eval_d3()

occtl_status_t occtl_surface_eval_d3 ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
double  u,
double  v,
occtl_point3_t out_point,
occtl_vector3_t out_d1u,
occtl_vector3_t out_d1v,
occtl_vector3_t out_d2u,
occtl_vector3_t out_d2v,
occtl_vector3_t out_d2uv,
occtl_vector3_t out_d3u,
occtl_vector3_t out_d3v,
occtl_vector3_t out_d3uuv,
occtl_vector3_t out_d3uvv 
)

Evaluates the surface and its first-, second-, and third-order partial derivatives at (u, v).

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[in]uU parameter.
[in]vV parameter.
[out]out_pointReceives the point. May be NULL.
[out]out_d1uReceives dS/du. May be NULL.
[out]out_d1vReceives dS/dv. May be NULL.
[out]out_d2uReceives d2S/du2. May be NULL.
[out]out_d2vReceives d2S/dv2. May be NULL.
[out]out_d2uvReceives d2S/dudv. May be NULL.
[out]out_d3uReceives d3S/du3. May be NULL.
[out]out_d3vReceives d3S/dv3. May be NULL.
[out]out_d3uuvReceives d3S/du2dv. May be NULL.
[out]out_d3uvvReceives d3S/dudv2. May be NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL or surface_id is invalid.
OCCTL_OUT_OF_RANGEParameter is outside the domain.

\par Thread Safety Yes.

◆ occtl_surface_eval_dn()

occtl_status_t occtl_surface_eval_dn ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
double  u,
double  v,
int32_t  nu,
int32_t  nv,
occtl_vector3_t out_derivative 
)

Returns a partial derivative vector at (u, v).

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[in]uU parameter.
[in]vV parameter.
[in]nuDerivative order in U (>= 0).
[in]nvDerivative order in V (>= 0).
[out]out_derivativeReceives d^(nu+nv)S / du^nu dv^nv. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_derivative is NULL, or surface_id is invalid.
OCCTL_OUT_OF_RANGEParameter is outside the domain.

\par Thread Safety Yes.

◆ occtl_surface_extrusion_create_info_init()

void occtl_surface_extrusion_create_info_init ( occtl_surface_extrusion_create_info_t info)

Runtime initialiser for occtl_surface_extrusion_create_info_t.

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

\par Thread Safety Yes.

◆ occtl_surface_gordon_create_info_init()

void occtl_surface_gordon_create_info_init ( occtl_surface_gordon_create_info_t info)

Runtime initialiser for occtl_surface_gordon_create_info_t.

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

\par Thread Safety Yes.

See also
occtl_surface_create_gordon

◆ occtl_surface_interpolated_info_init()

void occtl_surface_interpolated_info_init ( occtl_surface_interpolated_info_t info)

Runtime initialiser for occtl_surface_interpolated_info_t.

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

\par Thread Safety Yes.

See also
occtl_surface_create_interpolated

◆ occtl_surface_intersect_curve()

occtl_status_t occtl_surface_intersect_curve ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
occtl_rep_id_t  curve_id,
occtl_point3_t out_buf,
size_t  capacity,
size_t *  out_count 
)

Computes intersection points between a curve rep and a surface rep.

Uses OCCT's GeomAPI_IntCS. Output uses the two-call buffer pattern: call with out_buf == NULL to learn the required count, allocate, then call again with a buffer of at least that size.

Parameters
[in]graphGraph containing both reps. Must be non-NULL.
[in]curve_idCurve rep id. Must be valid.
[in]surface_idSurface rep id. Must be valid.
[out]out_bufBuffer to receive intersection points. May be NULL on sizing call.
[in]capacityNumber of elements out_buf can hold.
[out]out_countReceives the number of intersection points. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, out_count is NULL, or a rep id is invalid.
OCCTL_BUFFER_TOO_SMALLcapacity < *out_count.

\par Thread Safety Yes.

See also
occtl_surface_surface_intersect

◆ occtl_surface_is_closed()

occtl_status_t occtl_surface_is_closed ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
int32_t *  out_is_closed 
)

Returns non-zero if the surface is closed in both U and V directions.

Convenience over separate U and V closed checks. A surface is closed when IsUClosed() and IsVClosed() are both true.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[out]out_is_closedReceives 1 if closed in both U and V, 0 otherwise. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_is_closed is NULL, or surface_id is invalid.

\par Thread Safety Yes.

◆ occtl_surface_is_periodic()

occtl_status_t occtl_surface_is_periodic ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
int32_t *  out_is_periodic 
)

Returns non-zero if the surface is periodic in either U or V direction.

Convenience over separate U and V periodic checks. A surface is periodic when IsUPeriodic() or IsVPeriodic() is true.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[out]out_is_periodicReceives 1 if periodic in either U or V, 0 otherwise. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_is_periodic is NULL, or surface_id is invalid.

\par Thread Safety Yes.

◆ occtl_surface_is_u_periodic()

occtl_status_t occtl_surface_is_u_periodic ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
int32_t *  out_is_periodic 
)

Returns non-zero if the surface is periodic in the U direction.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[out]out_is_periodicReceives 1 if U-periodic, 0 otherwise. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_is_periodic is NULL, or surface_id is invalid.

\par Thread Safety Yes.

◆ occtl_surface_is_v_periodic()

occtl_status_t occtl_surface_is_v_periodic ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
int32_t *  out_is_periodic 
)

Returns non-zero if the surface is periodic in the V direction.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[out]out_is_periodicReceives 1 if V-periodic, 0 otherwise. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_is_periodic is NULL, or surface_id is invalid.

\par Thread Safety Yes.

◆ occtl_surface_kind()

occtl_status_t occtl_surface_kind ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
occtl_surface_kind_t out_kind 
)

Returns the kind of geometry of a surface rep.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[out]out_kindReceives the surface kind. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_kind is NULL, or surface_id is invalid.

\par Thread Safety Yes.

◆ occtl_surface_offset_create_info_init()

void occtl_surface_offset_create_info_init ( occtl_surface_offset_create_info_t info)

Runtime initialiser for occtl_surface_offset_create_info_t.

Sets all fields to OCCTL_SURFACE_OFFSET_CREATE_INFO_INIT.

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

\par Thread Safety Yes.

See also
occtl_surface_create_offset

◆ occtl_surface_parameter_range()

occtl_status_t occtl_surface_parameter_range ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
double *  out_u_min,
double *  out_u_max,
double *  out_v_min,
double *  out_v_max 
)

Returns the parameter range of the surface.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[out]out_u_minStart U parameter. May be NULL.
[out]out_u_maxEnd U parameter. May be NULL.
[out]out_v_minStart V parameter. May be NULL.
[out]out_v_maxEnd V parameter. May be NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph is NULL or surface_id is invalid.

\par Thread Safety Yes.

◆ occtl_surface_point_grid_create_info_init()

void occtl_surface_point_grid_create_info_init ( occtl_surface_point_grid_create_info_t info)

Runtime initialiser for occtl_surface_point_grid_create_info_t.

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

\par Thread Safety Yes.

See also
occtl_surface_create_from_point_grid

◆ occtl_surface_project_point()

occtl_status_t occtl_surface_project_point ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
occtl_point3_t  point,
double *  out_u,
double *  out_v,
double *  out_distance 
)

Projects a 3D point onto the surface and returns the closest UV coordinates.

Uses OCCT's GeomAPI_ProjectPointOnSurf.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[in]pointPoint to project.
[out]out_uReceives the U parameter of the closest point. Must be non-NULL.
[out]out_vReceives the V parameter of the closest point. Must be non-NULL.
[out]out_distanceReceives the shortest distance. May be NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, out_u, or out_v is NULL, or surface_id is invalid.

\par Thread Safety Yes.

◆ occtl_surface_rectangular_trimmed_create_info_init()

void occtl_surface_rectangular_trimmed_create_info_init ( occtl_surface_rectangular_trimmed_create_info_t info)

Runtime initialiser for occtl_surface_rectangular_trimmed_create_info_t.

Sets all fields to OCCTL_SURFACE_RECTANGULAR_TRIMMED_CREATE_INFO_INIT.

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

\par Thread Safety Yes.

◆ occtl_surface_reverse()

occtl_status_t occtl_surface_reverse ( occtl_graph_t graph,
occtl_rep_id_t  surface_id,
occtl_rep_id_t out_id 
)

Creates a new surface rep that is the U-reversed copy of surface_id.

Parameters
[in]graphGraph that owns both surfaces. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[out]out_idReceives the rep id of the reversed surface. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_id is NULL, or surface_id is invalid.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

◆ occtl_surface_revolution_create_info_init()

void occtl_surface_revolution_create_info_init ( occtl_surface_revolution_create_info_t info)

Runtime initialiser for occtl_surface_revolution_create_info_t.

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

\par Thread Safety Yes.

◆ occtl_surface_rotated()

occtl_status_t occtl_surface_rotated ( occtl_graph_t graph,
occtl_rep_id_t  surface_id,
occtl_axis1_placement_t  axis,
double  angle,
occtl_rep_id_t out_id 
)

Creates a new surface rep by rotating surface_id.

Parameters
[in]graphGraph that will own the new rep. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[in]axisRotation axis.
[in]angleRotation angle in radians.
[out]out_idReceives the rep id of the rotated surface. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_id is NULL, or surface_id is invalid.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

◆ occtl_surface_scaled()

occtl_status_t occtl_surface_scaled ( occtl_graph_t graph,
occtl_rep_id_t  surface_id,
occtl_point3_t  origin,
double  factor,
occtl_rep_id_t out_id 
)

Creates a new surface rep by scaling surface_id about origin.

Parameters
[in]graphGraph that will own the new rep. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[in]originOrigin point for scaling.
[in]factorScale factor; must be non-zero.
[out]out_idReceives the rep id of the scaled surface. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_id is NULL, or surface_id is invalid.
OCCTL_GEOMETRY_INVALIDfactor is zero.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

◆ occtl_surface_surface_intersect()

occtl_status_t occtl_surface_surface_intersect ( occtl_graph_t graph,
occtl_rep_id_t  surface_a,
occtl_rep_id_t  surface_b,
double  tolerance,
occtl_rep_id_t **  out_ids,
size_t *  out_count 
)

Computes intersection curves between two surfaces.

Uses OCCT's GeomAPI_IntSS. Returns an array of intersection rep ids. The array itself is allocated by the function; the caller must free it with free().

Parameters
[in]graphGraph containing both surfaces. Must be non-NULL.
[in]surface_aFirst surface rep id. Must be valid.
[in]surface_bSecond surface rep id. Must be valid.
[in]toleranceIntersection tolerance in 3D.
[out]out_idsReceives a caller-owned array of curve rep ids. Must be non-NULL. Free with free().
[out]out_countReceives the number of intersection curves. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, out_ids, or out_count is NULL, or a surface rep id is invalid.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety Yes.

See also
occtl_surface_intersect_curve

◆ occtl_surface_transformed()

occtl_status_t occtl_surface_transformed ( occtl_graph_t graph,
occtl_rep_id_t  surface_id,
occtl_transform_t  transform,
occtl_rep_id_t out_id 
)

Creates a new surface rep by applying a 3D transform to surface_id.

Parameters
[in]graphGraph that will own the new rep. Must be non-NULL.
[in]surface_idSource surface rep id. Must be valid.
[in]transformTransform to apply.
[out]out_idReceives the rep id of the transformed surface. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_id is NULL, or surface_id is invalid.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

◆ occtl_surface_translated()

occtl_status_t occtl_surface_translated ( occtl_graph_t graph,
occtl_rep_id_t  surface_id,
occtl_vector3_t  delta,
occtl_rep_id_t out_id 
)

Creates a new surface rep by translating surface_id.

Parameters
[in]graphGraph that will own the new rep. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[in]deltaTranslation vector.
[out]out_idReceives the rep id of the translated surface. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph or out_id is NULL, or surface_id is invalid.
OCCTL_OUT_OF_MEMORYAllocation failed.

\par Thread Safety No (mutates graph).

◆ occtl_surface_uv_of_point()

occtl_status_t occtl_surface_uv_of_point ( const occtl_graph_t graph,
occtl_rep_id_t  surface_id,
occtl_point3_t  point,
double *  out_u,
double *  out_v 
)

Returns the UV coordinates on the surface nearest to a given 3D point.

Convenience function equivalent to occtl_surface_project_point with out_distance = NULL.

Parameters
[in]graphGraph containing the surface. Must be non-NULL.
[in]surface_idSurface rep id. Must be valid.
[in]pointPoint to find UV for.
[out]out_uReceives the U parameter. Must be non-NULL.
[out]out_vReceives the V parameter. Must be non-NULL.
Return values
OCCTL_OKOn success.
OCCTL_INVALID_ARGUMENTgraph, out_u, or out_v is NULL, or surface_id is invalid.

\par Thread Safety Yes.