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

OCCT-Light: Types shared by 3D and 2D curve APIs. More...

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

Go to the source code of this file.

Classes

struct  occtl_curve_trimmed_create_info
 
struct  occtl_curve_bezier_segments_options
 

Macros

#define OCCTL_CURVE_TRIMMED_CREATE_INFO_VERSION_1   1u
 
#define OCCTL_CURVE_TRIMMED_CREATE_INFO_INIT    {OCCTL_CURVE_TRIMMED_CREATE_INFO_VERSION_1, NULL, {0}, 0.0, 1.0, 1}
 
#define OCCTL_CURVE_BEZIER_SEGMENTS_OPTIONS_VERSION_1   1u
 
#define OCCTL_CURVE_BEZIER_SEGMENTS_OPTIONS_INIT    {OCCTL_CURVE_BEZIER_SEGMENTS_OPTIONS_VERSION_1, NULL, 0, 0.0, 0.0, 1.0e-9}
 

Typedefs

typedef enum occtl_curve_kind occtl_curve_kind_t
 
typedef enum occtl_curve2d_tangency_qualifier occtl_curve2d_tangency_qualifier_t
 
typedef struct occtl_curve_trimmed_create_info occtl_curve_trimmed_create_info_t
 
typedef struct occtl_curve_bezier_segments_options occtl_curve_bezier_segments_options_t
 

Enumerations

enum  occtl_curve_kind {
  OCCTL_CURVE_KIND_LINE = 0 , OCCTL_CURVE_KIND_CIRCLE = 1 , OCCTL_CURVE_KIND_ELLIPSE = 2 , OCCTL_CURVE_KIND_HYPERBOLA = 3 ,
  OCCTL_CURVE_KIND_PARABOLA = 4 , OCCTL_CURVE_KIND_BSPLINE = 5 , OCCTL_CURVE_KIND_BEZIER = 6 , OCCTL_CURVE_KIND_TRIMMED = 7 ,
  OCCTL_CURVE_KIND_OFFSET = 8 , OCCTL_CURVE_KIND_UNDEFINED = 9 , OCCTL_CURVE_KIND_RESERVED_FUTURE = 0x7fffffff
}
 
enum  occtl_curve2d_tangency_qualifier {
  OCCTL_GEOM_TANGENCY_UNQUALIFIED = 0 , OCCTL_GEOM_TANGENCY_ENCLOSING = 1 , OCCTL_GEOM_TANGENCY_ENCLOSED = 2 , OCCTL_GEOM_TANGENCY_OUTSIDE = 3 ,
  OCCTL_GEOM_TANGENCY_NO_QUALIFIER = 4 , OCCTL_GEOM_TANGENCY_RESERVED_FUTURE = 0x7fffffff
}
 

Functions

void occtl_curve_trimmed_create_info_init (occtl_curve_trimmed_create_info_t *info)
 
void occtl_curve_bezier_segments_options_init (occtl_curve_bezier_segments_options_t *options)
 

Detailed Description

OCCT-Light: Types shared by 3D and 2D curve APIs.

Defines enums and create-info structs that apply to both 3D and 2D curve representations. Individual curve headers (§occtl_curves.h, §occtl_curves2d.h) include this common foundation plus their dimension- specific types and functions.

Typedef Documentation

◆ occtl_curve2d_tangency_qualifier_t

Qualifies which side relation a tangent-circle solution must have with an input 2D curve.

These values mirror OCCT's GccEnt_Position without exposing OCCT types in the C ABI. For line inputs, only UNQUALIFIED, ENCLOSED, and OUTSIDE are meaningful to OCCT.

◆ occtl_curve_bezier_segments_options_t

Options for decomposing a curve into adjacent Bezier segments.

Shared by occtl_curve_to_bezier_segments and occtl_curve2d_to_bezier_segments.

◆ occtl_curve_kind_t

Discriminates the underlying geometry of a curve representation (3D or 2D). Values are stable; new kinds are appended before OCCTL_CURVE_KIND_RESERVED_FUTURE.

◆ occtl_curve_trimmed_create_info_t

Versioned create-info struct for a trimmed curve (3D or 2D).

The constructor makes an internal deep copy of the basis curve; basis may be freed after the call returns.

Enumeration Type Documentation

◆ occtl_curve2d_tangency_qualifier

Qualifies which side relation a tangent-circle solution must have with an input 2D curve.

These values mirror OCCT's GccEnt_Position without exposing OCCT types in the C ABI. For line inputs, only UNQUALIFIED, ENCLOSED, and OUTSIDE are meaningful to OCCT.

Enumerator
OCCTL_GEOM_TANGENCY_UNQUALIFIED 

Accept every valid tangent solution.

OCCTL_GEOM_TANGENCY_ENCLOSING 

Solution encloses the input curve.

OCCTL_GEOM_TANGENCY_ENCLOSED 

Solution is enclosed by the input curve.

OCCTL_GEOM_TANGENCY_OUTSIDE 

Solution and input are mutually external.

OCCTL_GEOM_TANGENCY_NO_QUALIFIER 

Returned metadata only; invalid as input.

◆ occtl_curve_kind

Discriminates the underlying geometry of a curve representation (3D or 2D). Values are stable; new kinds are appended before OCCTL_CURVE_KIND_RESERVED_FUTURE.

Enumerator
OCCTL_CURVE_KIND_LINE 

Straight line.

OCCTL_CURVE_KIND_CIRCLE 

Full circle.

OCCTL_CURVE_KIND_ELLIPSE 

Ellipse.

OCCTL_CURVE_KIND_HYPERBOLA 

Hyperbola.

OCCTL_CURVE_KIND_PARABOLA 

Parabola.

OCCTL_CURVE_KIND_BSPLINE 

B-spline curve.

OCCTL_CURVE_KIND_BEZIER 

Bezier curve.

OCCTL_CURVE_KIND_TRIMMED 

Bounded section of a basis curve.

OCCTL_CURVE_KIND_OFFSET 

Offset of a basis curve.

OCCTL_CURVE_KIND_UNDEFINED 

Unknown or unrecognised subtype.

Function Documentation

◆ occtl_curve_bezier_segments_options_init()

void occtl_curve_bezier_segments_options_init ( occtl_curve_bezier_segments_options_t options)

Runtime initialiser for occtl_curve_bezier_segments_options_t.

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

\par Thread Safety Yes.

See also
occtl_curve_to_bezier_segments, occtl_curve2d_to_bezier_segments

◆ occtl_curve_trimmed_create_info_init()

void occtl_curve_trimmed_create_info_init ( occtl_curve_trimmed_create_info_t info)

Runtime initialiser for occtl_curve_trimmed_create_info_t.

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

\par Thread Safety Yes.

See also
occtl_curve_create_trimmed, occtl_curve2d_create_trimmed