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

#include <occtl_surfaces.h>

Collaboration diagram for occtl_surface_bspline:

Public Attributes

uint32_t struct_version
 
const void * p_next
 
int32_t u_degree
 
int32_t v_degree
 
int32_t is_rational
 
int32_t is_u_periodic
 
int32_t is_v_periodic
 
size_t u_pole_count
 
size_t v_pole_count
 
size_t u_knot_count
 
size_t v_knot_count
 
size_t u_flat_knot_count
 
size_t v_flat_knot_count
 
const occtl_point3_tpoles
 
const double * weights
 
const double * u_knots
 
const double * v_knots
 
const int32_t * u_multiplicities
 
const int32_t * v_multiplicities
 
const double * u_flat_knots
 
const double * v_flat_knots
 

Detailed Description

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.

Member Data Documentation

◆ is_rational

int32_t occtl_surface_bspline::is_rational

0 = non-rational; 1 = rational (NURBS) in U or V.

◆ is_u_periodic

int32_t occtl_surface_bspline::is_u_periodic

0/1.

◆ is_v_periodic

int32_t occtl_surface_bspline::is_v_periodic

0/1.

◆ p_next

const void* occtl_surface_bspline::p_next

Reserved for extensions; must be NULL.

◆ poles

const occtl_point3_t* occtl_surface_bspline::poles

Borrowed view pointers. Lifetime is tied to the parent surface rep and ends when the parent surface is removed from the graph or mutated. [out] Borrows it; row-major: index = u * v_pole_count + v; u_pole_count * v_pole_count elements.

◆ struct_version

uint32_t occtl_surface_bspline::struct_version

[in] Must be OCCTL_SURFACE_BSPLINE_VERSION_1.

◆ u_degree

int32_t occtl_surface_bspline::u_degree

Polynomial degree along U.

◆ u_flat_knot_count

size_t occtl_surface_bspline::u_flat_knot_count

Sum of U multiplicities (length of u_flat_knots).

◆ u_flat_knots

const double* occtl_surface_bspline::u_flat_knots

[out] Borrows it; u_flat_knot_count elements.

◆ u_knot_count

size_t occtl_surface_bspline::u_knot_count

Number of distinct U knot values.

◆ u_knots

const double* occtl_surface_bspline::u_knots

[out] Borrows it; u_knot_count distinct knots.

◆ u_multiplicities

const int32_t* occtl_surface_bspline::u_multiplicities

[out] Borrows it; u_knot_count multiplicities.

◆ u_pole_count

size_t occtl_surface_bspline::u_pole_count

Number of poles along U.

◆ v_degree

int32_t occtl_surface_bspline::v_degree

Polynomial degree along V.

◆ v_flat_knot_count

size_t occtl_surface_bspline::v_flat_knot_count

Sum of V multiplicities (length of v_flat_knots).

◆ v_flat_knots

const double* occtl_surface_bspline::v_flat_knots

[out] Borrows it; v_flat_knot_count elements.

◆ v_knot_count

size_t occtl_surface_bspline::v_knot_count

Number of distinct V knot values.

◆ v_knots

const double* occtl_surface_bspline::v_knots

[out] Borrows it; v_knot_count distinct knots.

◆ v_multiplicities

const int32_t* occtl_surface_bspline::v_multiplicities

[out] Borrows it; v_knot_count multiplicities.

◆ v_pole_count

size_t occtl_surface_bspline::v_pole_count

Number of poles along V.

◆ weights

const double* occtl_surface_bspline::weights

[out] Borrows it; same row-major layout as poles, or NULL when is_rational == 0.


The documentation for this struct was generated from the following file: