Math Engine Reference: Cad
문서 탐색
개요
Allocation-free curve, surface, mesh and neutral B-rep C contracts.
All views and result buffers are caller-owned and are borrowed only for the duration of a call. Coordinates use one caller-selected Cartesian frame and unit. The optional OCCT adapter never exposes an OCCT or C++ type here.
Every versioned output must be initialized before use. Operations validate all inputs before committing an output, so a failure leaves initialized results unchanged. Workspace pointers are borrowed, must be aligned for double, and may not overlap output arrays. Optional CAD shape handles own adapter-side resources until math_engine_cad_shape_release() is called.
- 실행 원본:
include/math_engine/math_engine_cad.h - 분류: 선형대수·공간·CAD
관련 public header
공개 API
Header 사용 시작
이 module의 public declaration을 사용하려면 installed SDK의 다음 header를 include한다.
#include <math_engine/math_engine_cad.h>
Type과 callback
math_engine_curve_kind_t
Allocation-free curve view의 수학적 곡선 종류다.
typedef enum math_engine_curve_kind {
MATH_ENGINE_CURVE_KIND_INVALID = 0, /**< 유효 curve representation이 없는 zero/sentinel이다. */
MATH_ENGINE_CURVE_KIND_BEZIER = 1, /**< Degree+1 control points의 Bernstein polynomial curve다. */
MATH_ENGINE_CURVE_KIND_HERMITE = 2, /**< Cubic =P0,T0,P1,T1= 네 vector의 endpoint/tangent curve다. */
MATH_ENGINE_CURVE_KIND_BSPLINE = 3, /**< Non-rational clamped knot/control-point B-spline이다. */
MATH_ENGINE_CURVE_KIND_NURBS = 4 /**< Positive weights를 갖는 rational B-spline curve다. */
} math_engine_curve_kind_t;
math_engine_curve_kind_t.MATH_ENGINE_CURVE_KIND_INVALID
유효 curve representation이 없는 zero/sentinel이다.
MATH_ENGINE_CURVE_KIND_INVALID = 0,
math_engine_curve_kind_t.MATH_ENGINE_CURVE_KIND_BEZIER
Degree+1 control points의 Bernstein polynomial curve다.
MATH_ENGINE_CURVE_KIND_BEZIER = 1,
math_engine_curve_kind_t.MATH_ENGINE_CURVE_KIND_HERMITE
Cubic
P0,T0,P1,T1네 vector의 endpoint/tangent curve다.MATH_ENGINE_CURVE_KIND_HERMITE = 2,
math_engine_curve_kind_t.MATH_ENGINE_CURVE_KIND_BSPLINE
Non-rational clamped knot/control-point B-spline이다.
MATH_ENGINE_CURVE_KIND_BSPLINE = 3,
math_engine_curve_kind_t.MATH_ENGINE_CURVE_KIND_NURBS
Positive weights를 갖는 rational B-spline curve다.
MATH_ENGINE_CURVE_KIND_NURBS = 4,
math_engine_surface_kind_t
Tensor-product surface view의 수학적 곡면 종류다.
typedef enum math_engine_surface_kind {
MATH_ENGINE_SURFACE_KIND_INVALID = 0, /**< 유효 surface representation이 없는 zero/sentinel이다. */
MATH_ENGINE_SURFACE_KIND_BEZIER = 1, /**< U/V degree의 tensor-product Bernstein patch다. */
MATH_ENGINE_SURFACE_KIND_BSPLINE = 2, /**< 두 knot vector를 쓰는 non-rational tensor B-spline이다. */
MATH_ENGINE_SURFACE_KIND_NURBS = 3 /**< Control point마다 positive weight가 있는 rational tensor surface다. */
} math_engine_surface_kind_t;
math_engine_surface_kind_t.MATH_ENGINE_SURFACE_KIND_INVALID
유효 surface representation이 없는 zero/sentinel이다.
MATH_ENGINE_SURFACE_KIND_INVALID = 0,
math_engine_surface_kind_t.MATH_ENGINE_SURFACE_KIND_BEZIER
U/V degree의 tensor-product Bernstein patch다.
MATH_ENGINE_SURFACE_KIND_BEZIER = 1,
math_engine_surface_kind_t.MATH_ENGINE_SURFACE_KIND_BSPLINE
두 knot vector를 쓰는 non-rational tensor B-spline이다.
MATH_ENGINE_SURFACE_KIND_BSPLINE = 2,
math_engine_surface_kind_t.MATH_ENGINE_SURFACE_KIND_NURBS
Control point마다 positive weight가 있는 rational tensor surface다.
MATH_ENGINE_SURFACE_KIND_NURBS = 3,
math_engine_intersection_kind_t
근사 교차 결과가 나타내는 feature 종류다.
typedef enum math_engine_intersection_kind {
MATH_ENGINE_INTERSECTION_KIND_INVALID = 0, /**< 교차 feature가 없는 zero/sentinel이다. */
MATH_ENGINE_INTERSECTION_KIND_POINT = 1, /**< 두 object가 isolated point에서 tolerance 내 만난다. */
MATH_ENGINE_INTERSECTION_KIND_TANGENT = 2, /**< 일차 방향이 평행한 접촉 point 후보다. */
MATH_ENGINE_INTERSECTION_KIND_OVERLAP = 3, /**< 두 parameter endpoint로 표현한 유한 overlap 구간이다. */
MATH_ENGINE_INTERSECTION_KIND_UNRESOLVED = 4 /**< Budget/tolerance 내 point와 overlap을 분류하지 못했다. */
} math_engine_intersection_kind_t;
math_engine_intersection_kind_t.MATH_ENGINE_INTERSECTION_KIND_INVALID
교차 feature가 없는 zero/sentinel이다.
MATH_ENGINE_INTERSECTION_KIND_INVALID = 0,
math_engine_intersection_kind_t.MATH_ENGINE_INTERSECTION_KIND_POINT
두 object가 isolated point에서 tolerance 내 만난다.
MATH_ENGINE_INTERSECTION_KIND_POINT = 1,
math_engine_intersection_kind_t.MATH_ENGINE_INTERSECTION_KIND_TANGENT
일차 방향이 평행한 접촉 point 후보다.
MATH_ENGINE_INTERSECTION_KIND_TANGENT = 2,
math_engine_intersection_kind_t.MATH_ENGINE_INTERSECTION_KIND_OVERLAP
두 parameter endpoint로 표현한 유한 overlap 구간이다.
MATH_ENGINE_INTERSECTION_KIND_OVERLAP = 3,
math_engine_intersection_kind_t.MATH_ENGINE_INTERSECTION_KIND_UNRESOLVED
Budget/tolerance 내 point와 overlap을 분류하지 못했다.
MATH_ENGINE_INTERSECTION_KIND_UNRESOLVED = 4,
math_engine_mesh_topology_t
Mesh 또는 neutral B-rep 검증에서 분류한 topology다.
typedef enum math_engine_mesh_topology {
MATH_ENGINE_MESH_TOPOLOGY_INVALID = 0, /**< Input/index/entity 구조가 유효 topology를 이루지 않는다. */
MATH_ENGINE_MESH_TOPOLOGY_WATERTIGHT_MANIFOLD = 1, /**< 모든 edge가 정확히 두 incident face/triangle을 갖는다. */
MATH_ENGINE_MESH_TOPOLOGY_MANIFOLD_WITH_BOUNDARY = 2, /**< 일부 edge가 하나의 incident face를 갖는 manifold다. */
MATH_ENGINE_MESH_TOPOLOGY_NON_MANIFOLD = 3 /**< 하나 이상의 edge/relation incidence가 manifold 조건을 위반한다. */
} math_engine_mesh_topology_t;
math_engine_mesh_topology_t.MATH_ENGINE_MESH_TOPOLOGY_INVALID
Input/index/entity 구조가 유효 topology를 이루지 않는다.
MATH_ENGINE_MESH_TOPOLOGY_INVALID = 0,
math_engine_mesh_topology_t.MATH_ENGINE_MESH_TOPOLOGY_WATERTIGHT_MANIFOLD
모든 edge가 정확히 두 incident face/triangle을 갖는다.
MATH_ENGINE_MESH_TOPOLOGY_WATERTIGHT_MANIFOLD = 1,
math_engine_mesh_topology_t.MATH_ENGINE_MESH_TOPOLOGY_MANIFOLD_WITH_BOUNDARY
일부 edge가 하나의 incident face를 갖는 manifold다.
MATH_ENGINE_MESH_TOPOLOGY_MANIFOLD_WITH_BOUNDARY = 2,
math_engine_mesh_topology_t.MATH_ENGINE_MESH_TOPOLOGY_NON_MANIFOLD
하나 이상의 edge/relation incidence가 manifold 조건을 위반한다.
MATH_ENGINE_MESH_TOPOLOGY_NON_MANIFOLD = 3,
math_engine_brep_entity_kind_t
Neutral B-rep 계층을 구성하는 entity 종류다.
typedef enum math_engine_brep_entity_kind {
MATH_ENGINE_BREP_ENTITY_INVALID = 0, /**< 유효한 neutral topology entity가 아닌 sentinel이다. */
MATH_ENGINE_BREP_ENTITY_VERTEX = 1, /**< 0차원 point geometry를 참조하는 leaf entity다. */
MATH_ENGINE_BREP_ENTITY_EDGE = 2, /**< Vertex child와 curve geometry를 연결하는 oriented edge다. */
MATH_ENGINE_BREP_ENTITY_WIRE = 3, /**< Ordered oriented edge loop/chain을 나타낸다. */
MATH_ENGINE_BREP_ENTITY_FACE = 4, /**< Wire bounds와 surface geometry를 갖는 oriented face다. */
MATH_ENGINE_BREP_ENTITY_SHELL = 5, /**< Oriented face collection을 나타낸다. */
MATH_ENGINE_BREP_ENTITY_SOLID = 6 /**< Closed shell collection으로 경계가 정해진 3D region이다. */
} math_engine_brep_entity_kind_t;
math_engine_brep_entity_kind_t.MATH_ENGINE_BREP_ENTITY_INVALID
유효한 neutral topology entity가 아닌 sentinel이다.
MATH_ENGINE_BREP_ENTITY_INVALID = 0,
math_engine_brep_entity_kind_t.MATH_ENGINE_BREP_ENTITY_VERTEX
0차원 point geometry를 참조하는 leaf entity다.
MATH_ENGINE_BREP_ENTITY_VERTEX = 1,
math_engine_brep_entity_kind_t.MATH_ENGINE_BREP_ENTITY_EDGE
Vertex child와 curve geometry를 연결하는 oriented edge다.
MATH_ENGINE_BREP_ENTITY_EDGE = 2,
math_engine_brep_entity_kind_t.MATH_ENGINE_BREP_ENTITY_WIRE
Ordered oriented edge loop/chain을 나타낸다.
MATH_ENGINE_BREP_ENTITY_WIRE = 3,
math_engine_brep_entity_kind_t.MATH_ENGINE_BREP_ENTITY_FACE
Wire bounds와 surface geometry를 갖는 oriented face다.
MATH_ENGINE_BREP_ENTITY_FACE = 4,
math_engine_brep_entity_kind_t.MATH_ENGINE_BREP_ENTITY_SHELL
Oriented face collection을 나타낸다.
MATH_ENGINE_BREP_ENTITY_SHELL = 5,
math_engine_brep_entity_kind_t.MATH_ENGINE_BREP_ENTITY_SOLID
Closed shell collection으로 경계가 정해진 3D region이다.
MATH_ENGINE_BREP_ENTITY_SOLID = 6,
math_engine_cad_format_t
선택적 CAD backend의 파일 교환 형식이다.
typedef enum math_engine_cad_format {
MATH_ENGINE_CAD_FORMAT_INVALID = 0, /**< Import/export 형식이 지정되지 않은 sentinel이다. */
MATH_ENGINE_CAD_FORMAT_STEP = 1, /**< ISO 10303 STEP exchange payload다. */
MATH_ENGINE_CAD_FORMAT_IGES = 2 /**< IGES exchange payload다. */
} math_engine_cad_format_t;
math_engine_cad_format_t.MATH_ENGINE_CAD_FORMAT_INVALID
Import/export 형식이 지정되지 않은 sentinel이다.
MATH_ENGINE_CAD_FORMAT_INVALID = 0,
math_engine_cad_format_t.MATH_ENGINE_CAD_FORMAT_STEP
ISO 10303 STEP exchange payload다.
MATH_ENGINE_CAD_FORMAT_STEP = 1,
math_engine_cad_format_t.MATH_ENGINE_CAD_FORMAT_IGES
IGES exchange payload다.
MATH_ENGINE_CAD_FORMAT_IGES = 2,
math_engine_cad_boolean_operation_t
두 CAD shape handle 사이의 boolean 연산이다.
typedef enum math_engine_cad_boolean_operation {
MATH_ENGINE_CAD_BOOLEAN_INVALID = 0, /**< Boolean 연산이 지정되지 않은 sentinel이다. */
MATH_ENGINE_CAD_BOOLEAN_UNION = 1, /**< 두 shape가 차지하는 영역의 합집합이다. */
MATH_ENGINE_CAD_BOOLEAN_INTERSECTION = 2, /**< 두 shape가 공유하는 영역의 교집합이다. */
MATH_ENGINE_CAD_BOOLEAN_DIFFERENCE = 3 /**< 첫 shape에서 둘째 shape 영역을 빼는 ordered difference다. */
} math_engine_cad_boolean_operation_t;
math_engine_cad_boolean_operation_t.MATH_ENGINE_CAD_BOOLEAN_INVALID
Boolean 연산이 지정되지 않은 sentinel이다.
MATH_ENGINE_CAD_BOOLEAN_INVALID = 0,
math_engine_cad_boolean_operation_t.MATH_ENGINE_CAD_BOOLEAN_UNION
두 shape가 차지하는 영역의 합집합이다.
MATH_ENGINE_CAD_BOOLEAN_UNION = 1,
math_engine_cad_boolean_operation_t.MATH_ENGINE_CAD_BOOLEAN_INTERSECTION
두 shape가 공유하는 영역의 교집합이다.
MATH_ENGINE_CAD_BOOLEAN_INTERSECTION = 2,
math_engine_cad_boolean_operation_t.MATH_ENGINE_CAD_BOOLEAN_DIFFERENCE
첫 shape에서 둘째 shape 영역을 빼는 ordered difference다.
MATH_ENGINE_CAD_BOOLEAN_DIFFERENCE = 3,
math_engine_trim_loop_f64_t
Surface parameter (u,v) 평면에서 방향을 가진 polygon trim loop다.
typedef struct math_engine_trim_loop_f64 {
const math_engine_vec2_f64_t* points; /**< Borrowed finite (u,v) polygon vertices; non-NULL, =point_count=개이며 surface 호출 return까지 유효하다. */
uint32_t point_count; /**< =points= element 수이며 닫힘 edge를 암시하는 3 이상의 값이다. */
int32_t orientation; /**< Outer/counter-oriented loop는 +1, hole/opposite loop는 -1인 strict 값이다. */
} math_engine_trim_loop_f64_t;
math_engine_trim_loop_f64_t.points
Borrowed finite (u,v) polygon vertices; non-NULL,
point_count개이며 surface 호출 return까지 유효하다.const math_engine_vec2_f64_t* points;
math_engine_trim_loop_f64_t.point_count
pointselement 수이며 닫힘 edge를 암시하는 3 이상의 값이다.uint32_t point_count;
math_engine_trim_loop_f64_t.orientation
Outer/counter-oriented loop는 +1, hole/opposite loop는 -1인 strict 값이다.
int32_t orientation;
math_engine_curve_view_f64_t
Hermite stores P0,T0,P1,T1. Other kinds store ordinary control points.
typedef struct math_engine_curve_view_f64 {
uint32_t struct_size; /**< Forward-compatible input byte 크기이며 V1 reader는 =sizeof= 이상을 요구한다. */
uint32_t struct_version; /**< =MATH_ENGINE_CURVE_VIEW_VERSION_1=이어야 한다. */
int32_t kind; /**< Control/weight/knot 해석을 정하는 =math_engine_curve_kind_t= 값이다. */
uint32_t degree; /**< Polynomial/spline degree; Hermite는 3, 그 밖에는 1..구현 mode ceiling이다. */
const math_engine_vec3_f64_t* control_points; /**< 필수 borrowed finite point/tangent 배열; =control_point_count=개이고 호출 return까지 유효하다. */
const double* weights; /**< NURBS에서 필수인 borrowed positive finite 배열 =control_point_count=개; 다른 kind에서는 nullable/무시된다. */
const double* knots; /**< B-spline/NURBS에서 필수 borrowed nondecreasing 배열 =knot_count=개; 다른 kind에서는 nullable/무시된다. */
uint32_t control_point_count; /**< Control/tangent element 수; Bezier=degree+1, Hermite=4, spline은 degree보다 크다. */
uint32_t knot_count; /**< Spline knot element 수이며 =control_point_count+degree+1=; 다른 kind에서는 무시된다. */
double parameter_min; /**< Curve domain의 finite 포함 하한이며 active knot domain 안에 있어야 한다. */
double parameter_max; /**< Curve domain의 finite 포함 상한이며 =parameter_min<parameter_max=다. */
uint64_t stable_id; /**< Curve 내용/revision을 caller가 식별하는 필수 nonzero stable ID다. */
uint64_t reserved[2]; /**< Caller가 0으로 두며 future ABI reader를 위해 무시하는 확장 word다. */
} math_engine_curve_view_f64_t;
math_engine_curve_view_f64_t.struct_size
Forward-compatible input byte 크기이며 V1 reader는
sizeof이상을 요구한다.uint32_t struct_size;
math_engine_curve_view_f64_t.struct_version
MATH_ENGINE_CURVE_VIEW_VERSION_1이어야 한다.uint32_t struct_version;
math_engine_curve_view_f64_t.kind
Control/weight/knot 해석을 정하는
math_engine_curve_kind_t값이다.int32_t kind;
math_engine_curve_view_f64_t.degree
Polynomial/spline degree; Hermite는 3, 그 밖에는 1..구현 mode ceiling이다.
uint32_t degree;
math_engine_curve_view_f64_t.control_points
필수 borrowed finite point/tangent 배열;
control_point_count개이고 호출 return까지 유효하다.const math_engine_vec3_f64_t* control_points;
math_engine_curve_view_f64_t.weights
NURBS에서 필수인 borrowed positive finite 배열
control_point_count개; 다른 kind에서는 nullable/무시된다.const double* weights;
math_engine_curve_view_f64_t.knots
B-spline/NURBS에서 필수 borrowed nondecreasing 배열
knot_count개; 다른 kind에서는 nullable/무시된다.const double* knots;
math_engine_curve_view_f64_t.control_point_count
Control/tangent element 수; Bezier=degree+1, Hermite=4, spline은 degree보다 크다.
uint32_t control_point_count;
math_engine_curve_view_f64_t.knot_count
Spline knot element 수이며
control_point_count+degree+1; 다른 kind에서는 무시된다.uint32_t knot_count;
math_engine_curve_view_f64_t.parameter_min
Curve domain의 finite 포함 하한이며 active knot domain 안에 있어야 한다.
double parameter_min;
math_engine_curve_view_f64_t.parameter_max
Curve domain의 finite 포함 상한이며
parameter_min<parameter_max다.double parameter_max;
math_engine_curve_view_f64_t.stable_id
Curve 내용/revision을 caller가 식별하는 필수 nonzero stable ID다.
uint64_t stable_id;
math_engine_curve_view_f64_t.reserved
Caller가 0으로 두며 future ABI reader를 위해 무시하는 확장 word다.
uint64_t reserved[2];
math_engine_curve_evaluation_f64_t
Curve 위치와 parameter에 대한 일차 미분, 오차와 provenance 결과다.
typedef struct math_engine_curve_evaluation_f64 {
uint32_t struct_size; /**< Caller가 exact evaluation record byte 크기로 미리 설정한다. */
uint32_t struct_version; /**< =MATH_ENGINE_CURVE_EVALUATION_VERSION_1=이어야 한다. */
uint32_t flags; /**< VALUE와 선택적 UNCERTAIN 등 공통 =MATH_ENGINE_RESULT_FLAG_*= bit다. */
int32_t certainty; /**< Result의 exact/approximate 신뢰도를 나타내는 geometry certainty enum 값이다. */
math_engine_vec3_f64_t point; /**< Curve control points와 같은 Cartesian frame/unit의 C(parameter)다. */
math_engine_vec3_f64_t first_derivative; /**< 같은 frame의 dC/dparameter; 단위는 coordinate/parameter다. */
double parameter; /**< 실제 평가/투영에 사용한 finite curve-domain parameter다. */
double rational_denominator; /**< NURBS homogeneous denominator; non-rational curve에서는 1이다. */
double residual; /**< 직접 평가는 0, 투영은 query-point 거리 등 model-unit residual이다. */
double error_bound; /**< Derivative/iterative 계산의 nonnegative model-unit 보수적 bound다. */
uint64_t stable_id; /**< 입력 curve의 =stable_id=를 provenance로 복사한다. */
uint64_t reserved[2]; /**< Library가 0으로 기록하고 caller가 무시하는 ABI 확장 word다. */
} math_engine_curve_evaluation_f64_t;
math_engine_curve_evaluation_f64_t.struct_size
Caller가 exact evaluation record byte 크기로 미리 설정한다.
uint32_t struct_size;
math_engine_curve_evaluation_f64_t.struct_version
MATH_ENGINE_CURVE_EVALUATION_VERSION_1이어야 한다.uint32_t struct_version;
math_engine_curve_evaluation_f64_t.flags
VALUE와 선택적 UNCERTAIN 등 공통
MATH_ENGINE_RESULT_FLAG_*bit다.uint32_t flags;
math_engine_curve_evaluation_f64_t.certainty
Result의 exact/approximate 신뢰도를 나타내는 geometry certainty enum 값이다.
int32_t certainty;
math_engine_curve_evaluation_f64_t.point
Curve control points와 같은 Cartesian frame/unit의 C(parameter)다.
math_engine_vec3_f64_t point;
math_engine_curve_evaluation_f64_t.first_derivative
같은 frame의 dC/dparameter; 단위는 coordinate/parameter다.
math_engine_vec3_f64_t first_derivative;
math_engine_curve_evaluation_f64_t.parameter
실제 평가/투영에 사용한 finite curve-domain parameter다.
double parameter;
math_engine_curve_evaluation_f64_t.rational_denominator
NURBS homogeneous denominator; non-rational curve에서는 1이다.
double rational_denominator;
math_engine_curve_evaluation_f64_t.residual
직접 평가는 0, 투영은 query-point 거리 등 model-unit residual이다.
double residual;
math_engine_curve_evaluation_f64_t.error_bound
Derivative/iterative 계산의 nonnegative model-unit 보수적 bound다.
double error_bound;
math_engine_curve_evaluation_f64_t.stable_id
입력 curve의
stable_id를 provenance로 복사한다.uint64_t stable_id;
math_engine_curve_evaluation_f64_t.reserved
Library가 0으로 기록하고 caller가 무시하는 ABI 확장 word다.
uint64_t reserved[2];
math_engine_surface_view_f64_t
Control points use row-major v * control_count_u + u order.
typedef struct math_engine_surface_view_f64 {
uint32_t struct_size; /**< Forward-compatible input byte 크기이며 V1 reader는 =sizeof= 이상을 요구한다. */
uint32_t struct_version; /**< =MATH_ENGINE_SURFACE_VIEW_VERSION_1=이어야 한다. */
int32_t kind; /**< Tensor control/weight/knot 해석을 정하는 surface-kind enum 값이다. */
uint32_t degree_u; /**< U basis degree의 nonzero 값이며 mode별 구현 ceiling 이하다. */
uint32_t degree_v; /**< V basis degree의 nonzero 값이며 mode별 구현 ceiling 이하다. */
uint32_t control_count_u; /**< 각 V row의 U control element 수이며 =degree_u=보다 크다. */
uint32_t control_count_v; /**< Control grid의 V row 수이며 =degree_v=보다 크다. */
uint32_t knot_count_u; /**< Spline U knot 수 =control_count_u+degree_u+1=; Bezier에서는 무시된다. */
uint32_t knot_count_v; /**< Spline V knot 수 =control_count_v+degree_v+1=; Bezier에서는 무시된다. */
const math_engine_vec3_f64_t* control_points; /**< 필수 borrowed finite row-major grid; 정확히 =control_count_u*control_count_v=개이고 호출 동안 유효하다. */
const double* weights; /**< NURBS에서 필수 borrowed positive grid-sized 배열; 다른 kind에서는 nullable/무시된다. */
const double* knots_u; /**< B-spline/NURBS에서 필수 borrowed U knot 배열 =knot_count_u=개; 호출 동안 유효하다. */
const double* knots_v; /**< B-spline/NURBS에서 필수 borrowed V knot 배열 =knot_count_v=개; 호출 동안 유효하다. */
const math_engine_trim_loop_f64_t* trim_loops; /**< Borrowed loop 배열; NULL은 =trim_loop_count==0=일 때만 허용되고 nested points도 호출 동안 유효하다. */
uint32_t trim_loop_count; /**< =trim_loops= element 수이며 trim이 없으면 0이다. */
uint32_t reserved32; /**< Caller가 0으로 두고 future ABI reader가 무시하는 확장 slot이다. */
double parameter_u_min; /**< Active U domain 안의 finite 포함 하한이다. */
double parameter_u_max; /**< Finite U 포함 상한이며 =parameter_u_min<parameter_u_max=다. */
double parameter_v_min; /**< Active V domain 안의 finite 포함 하한이다. */
double parameter_v_max; /**< Finite V 포함 상한이며 =parameter_v_min<parameter_v_max=다. */
uint64_t stable_id; /**< Surface geometry/revision을 caller가 식별하는 필수 nonzero ID다. */
uint64_t reserved[2]; /**< Caller가 0으로 두고 future ABI reader가 무시하는 확장 word다. */
} math_engine_surface_view_f64_t;
math_engine_surface_view_f64_t.struct_size
Forward-compatible input byte 크기이며 V1 reader는
sizeof이상을 요구한다.uint32_t struct_size;
math_engine_surface_view_f64_t.struct_version
MATH_ENGINE_SURFACE_VIEW_VERSION_1이어야 한다.uint32_t struct_version;
math_engine_surface_view_f64_t.kind
Tensor control/weight/knot 해석을 정하는 surface-kind enum 값이다.
int32_t kind;
math_engine_surface_view_f64_t.degree_u
U basis degree의 nonzero 값이며 mode별 구현 ceiling 이하다.
uint32_t degree_u;
math_engine_surface_view_f64_t.degree_v
V basis degree의 nonzero 값이며 mode별 구현 ceiling 이하다.
uint32_t degree_v;
math_engine_surface_view_f64_t.control_count_u
각 V row의 U control element 수이며
degree_u보다 크다.uint32_t control_count_u;
math_engine_surface_view_f64_t.control_count_v
Control grid의 V row 수이며
degree_v보다 크다.uint32_t control_count_v;
math_engine_surface_view_f64_t.knot_count_u
Spline U knot 수
control_count_u+degree_u+1; Bezier에서는 무시된다.uint32_t knot_count_u;
math_engine_surface_view_f64_t.knot_count_v
Spline V knot 수
control_count_v+degree_v+1; Bezier에서는 무시된다.uint32_t knot_count_v;
math_engine_surface_view_f64_t.control_points
필수 borrowed finite row-major grid; 정확히
control_count_u*control_count_v개이고 호출 동안 유효하다.const math_engine_vec3_f64_t* control_points;
math_engine_surface_view_f64_t.weights
NURBS에서 필수 borrowed positive grid-sized 배열; 다른 kind에서는 nullable/무시된다.
const double* weights;
math_engine_surface_view_f64_t.knots_u
B-spline/NURBS에서 필수 borrowed U knot 배열
knot_count_u개; 호출 동안 유효하다.const double* knots_u;
math_engine_surface_view_f64_t.knots_v
B-spline/NURBS에서 필수 borrowed V knot 배열
knot_count_v개; 호출 동안 유효하다.const double* knots_v;
math_engine_surface_view_f64_t.trim_loops
Borrowed loop 배열; NULL은 =trim_loop_count==0=일 때만 허용되고 nested points도 호출 동안 유효하다.
const math_engine_trim_loop_f64_t* trim_loops;
math_engine_surface_view_f64_t.trim_loop_count
trim_loopselement 수이며 trim이 없으면 0이다.uint32_t trim_loop_count;
math_engine_surface_view_f64_t.reserved32
Caller가 0으로 두고 future ABI reader가 무시하는 확장 slot이다.
uint32_t reserved32;
math_engine_surface_view_f64_t.parameter_u_min
Active U domain 안의 finite 포함 하한이다.
double parameter_u_min;
math_engine_surface_view_f64_t.parameter_u_max
Finite U 포함 상한이며
parameter_u_min<parameter_u_max다.double parameter_u_max;
math_engine_surface_view_f64_t.parameter_v_min
Active V domain 안의 finite 포함 하한이다.
double parameter_v_min;
math_engine_surface_view_f64_t.parameter_v_max
Finite V 포함 상한이며
parameter_v_min<parameter_v_max다.double parameter_v_max;
math_engine_surface_view_f64_t.stable_id
Surface geometry/revision을 caller가 식별하는 필수 nonzero ID다.
uint64_t stable_id;
math_engine_surface_view_f64_t.reserved
Caller가 0으로 두고 future ABI reader가 무시하는 확장 word다.
uint64_t reserved[2];
math_engine_surface_evaluation_f64_t
Surface 위치, u/v 미분, 단위 법선과 오차 결과다.
typedef struct math_engine_surface_evaluation_f64 {
uint32_t struct_size; /**< Caller가 exact surface-evaluation byte 크기로 미리 설정한다. */
uint32_t struct_version; /**< =MATH_ENGINE_SURFACE_EVALUATION_VERSION_1=이어야 한다. */
uint32_t flags; /**< VALUE와 선택적 UNCERTAIN 등 공통 result flag bit다. */
int32_t certainty; /**< 계산 신뢰도를 나타내는 geometry certainty enum 값이다. */
math_engine_vec3_f64_t point; /**< Surface control grid와 같은 Cartesian frame/unit의 S(u,v)다. */
math_engine_vec3_f64_t derivative_u; /**< 같은 frame의 partial dS/du; 단위는 coordinate/U다. */
math_engine_vec3_f64_t derivative_v; /**< 같은 frame의 partial dS/dv; 단위는 coordinate/V다. */
math_engine_vec3_f64_t unit_normal; /**< =normalize(derivative_u cross derivative_v)=인 dimensionless 방향이다. */
double parameter_u; /**< 실제 평가한 finite U-domain parameter다. */
double parameter_v; /**< 실제 평가한 finite V-domain parameter다. */
double rational_denominator; /**< NURBS homogeneous denominator; non-rational surface에서는 1이다. */
double residual; /**< 직접 평가는 0이며 iterative surface query가 있으면 model-unit residual이다. */
double error_bound; /**< Finite-difference derivative 등 근사의 nonnegative model-unit bound다. */
uint64_t stable_id; /**< 입력 surface의 stable ID를 provenance로 복사한다. */
uint64_t reserved[2]; /**< Library가 0으로 기록하고 caller가 무시하는 ABI 확장 word다. */
} math_engine_surface_evaluation_f64_t;
math_engine_surface_evaluation_f64_t.struct_size
Caller가 exact surface-evaluation byte 크기로 미리 설정한다.
uint32_t struct_size;
math_engine_surface_evaluation_f64_t.struct_version
MATH_ENGINE_SURFACE_EVALUATION_VERSION_1이어야 한다.uint32_t struct_version;
math_engine_surface_evaluation_f64_t.flags
VALUE와 선택적 UNCERTAIN 등 공통 result flag bit다.
uint32_t flags;
math_engine_surface_evaluation_f64_t.certainty
계산 신뢰도를 나타내는 geometry certainty enum 값이다.
int32_t certainty;
math_engine_surface_evaluation_f64_t.point
Surface control grid와 같은 Cartesian frame/unit의 S(u,v)다.
math_engine_vec3_f64_t point;
math_engine_surface_evaluation_f64_t.derivative_u
같은 frame의 partial dS/du; 단위는 coordinate/U다.
math_engine_vec3_f64_t derivative_u;
math_engine_surface_evaluation_f64_t.derivative_v
같은 frame의 partial dS/dv; 단위는 coordinate/V다.
math_engine_vec3_f64_t derivative_v;
math_engine_surface_evaluation_f64_t.unit_normal
normalize(derivative_u cross derivative_v)인 dimensionless 방향이다.math_engine_vec3_f64_t unit_normal;
math_engine_surface_evaluation_f64_t.parameter_u
실제 평가한 finite U-domain parameter다.
double parameter_u;
math_engine_surface_evaluation_f64_t.parameter_v
실제 평가한 finite V-domain parameter다.
double parameter_v;
math_engine_surface_evaluation_f64_t.rational_denominator
NURBS homogeneous denominator; non-rational surface에서는 1이다.
double rational_denominator;
math_engine_surface_evaluation_f64_t.residual
직접 평가는 0이며 iterative surface query가 있으면 model-unit residual이다.
double residual;
math_engine_surface_evaluation_f64_t.error_bound
Finite-difference derivative 등 근사의 nonnegative model-unit bound다.
double error_bound;
math_engine_surface_evaluation_f64_t.stable_id
입력 surface의 stable ID를 provenance로 복사한다.
uint64_t stable_id;
math_engine_surface_evaluation_f64_t.reserved
Library가 0으로 기록하고 caller가 무시하는 ABI 확장 word다.
uint64_t reserved[2];
math_engine_tessellation_options_f64_t
적응 tessellation의 segment 상한/하한과 model-unit 오차 허용값이다.
typedef struct math_engine_tessellation_options_f64 {
uint32_t struct_size; /**< Caller가 exact tessellation-options byte 크기로 설정한다. */
uint32_t struct_version; /**< =MATH_ENGINE_TESSELLATION_OPTIONS_VERSION_1=이어야 한다. */
uint32_t maximum_segments; /**< 출력 가능한 line segment 수의 nonzero 상한이며 minimum 이상이다. */
uint32_t minimum_segments; /**< Parameter domain을 처음 나누는 nonzero 하한이며 maximum 이하다. */
double approximation_tolerance; /**< Curve/surface 좌표와 같은 model unit의 finite positive chord-error 목표다. */
uint64_t reserved[2]; /**< Caller가 0으로 두어야 하는 ABI 확장 word 두 개다. */
} math_engine_tessellation_options_f64_t;
math_engine_tessellation_options_f64_t.struct_size
Caller가 exact tessellation-options byte 크기로 설정한다.
uint32_t struct_size;
math_engine_tessellation_options_f64_t.struct_version
MATH_ENGINE_TESSELLATION_OPTIONS_VERSION_1이어야 한다.uint32_t struct_version;
math_engine_tessellation_options_f64_t.maximum_segments
출력 가능한 line segment 수의 nonzero 상한이며 minimum 이상이다.
uint32_t maximum_segments;
math_engine_tessellation_options_f64_t.minimum_segments
Parameter domain을 처음 나누는 nonzero 하한이며 maximum 이하다.
uint32_t minimum_segments;
math_engine_tessellation_options_f64_t.approximation_tolerance
Curve/surface 좌표와 같은 model unit의 finite positive chord-error 목표다.
double approximation_tolerance;
math_engine_tessellation_options_f64_t.reserved
Caller가 0으로 두어야 하는 ABI 확장 word 두 개다.
uint64_t reserved[2];
math_engine_tessellation_result_f64_t
Tessellation의 실제 point/segment 수, 최대 오차와 결정적 fingerprint다.
typedef struct math_engine_tessellation_result_f64 {
uint32_t struct_size; /**< Caller가 exact tessellation-result byte 크기로 미리 설정한다. */
uint32_t struct_version; /**< =MATH_ENGINE_TESSELLATION_RESULT_VERSION_1=이어야 한다. */
uint32_t flags; /**< VALUE와 tolerance 미달 시 UNCERTAIN인 공통 result flag bit다. */
uint32_t point_count; /**< 성공 시 caller =out_points/out_parameters=에 쓴 element 수다. */
uint32_t segment_count; /**< Polyline의 연결 segment 수이며 nonempty curve에서 =point_count-1=이다. */
uint32_t refinement_count; /**< 초기 분할 뒤 수행한 deterministic subdivision 횟수다. */
double maximum_error_bound; /**< 모든 accepted segment chord error의 nonnegative model-unit 최대값이다. */
double residual; /**< Tolerance 초과분 또는 종료 진단의 nonnegative model-unit 값이다. */
uint64_t deterministic_fingerprint; /**< Ordered output points/parameters와 result metadata의 hash다. */
uint64_t reserved[2]; /**< Library가 0으로 기록하고 caller가 무시하는 ABI 확장 word다. */
} math_engine_tessellation_result_f64_t;
math_engine_tessellation_result_f64_t.struct_size
Caller가 exact tessellation-result byte 크기로 미리 설정한다.
uint32_t struct_size;
math_engine_tessellation_result_f64_t.struct_version
MATH_ENGINE_TESSELLATION_RESULT_VERSION_1이어야 한다.uint32_t struct_version;
math_engine_tessellation_result_f64_t.flags
VALUE와 tolerance 미달 시 UNCERTAIN인 공통 result flag bit다.
uint32_t flags;
math_engine_tessellation_result_f64_t.point_count
성공 시 caller
out_points/out_parameters에 쓴 element 수다.uint32_t point_count;
math_engine_tessellation_result_f64_t.segment_count
Polyline의 연결 segment 수이며 nonempty curve에서
point_count-1이다.uint32_t segment_count;
math_engine_tessellation_result_f64_t.refinement_count
초기 분할 뒤 수행한 deterministic subdivision 횟수다.
uint32_t refinement_count;
math_engine_tessellation_result_f64_t.maximum_error_bound
모든 accepted segment chord error의 nonnegative model-unit 최대값이다.
double maximum_error_bound;
math_engine_tessellation_result_f64_t.residual
Tolerance 초과분 또는 종료 진단의 nonnegative model-unit 값이다.
double residual;
math_engine_tessellation_result_f64_t.deterministic_fingerprint
Ordered output points/parameters와 result metadata의 hash다.
uint64_t deterministic_fingerprint;
math_engine_tessellation_result_f64_t.reserved
Library가 0으로 기록하고 caller가 무시하는 ABI 확장 word다.
uint64_t reserved[2];
math_engine_curve_intersection_f64_t
두 parameterized object 사이의 한 교차 또는 overlap 구간이다.
typedef struct math_engine_curve_intersection_f64 {
int32_t kind; /**< Point/tangent/overlap/unresolved =math_engine_intersection_kind_t= 값이다. */
uint32_t flags; /**< 유효 근사에는 VALUE|UNCERTAIN 등 공통 result bit가 설정된다. */
math_engine_vec3_f64_t point; /**< 두 입력과 같은 Cartesian frame/model unit의 대표 교차 좌표다. */
double parameter_a; /**< 첫 curve/object domain의 point 또는 overlap 시작 parameter다. */
double parameter_b; /**< 둘째 curve/object domain의 대응 point 또는 overlap 시작 parameter다. */
double parameter_a_end; /**< OVERLAP일 때 첫 domain 끝, isolated point에서는 시작과 같은 값이다. */
double parameter_b_end; /**< OVERLAP일 때 둘째 domain 끝, isolated point에서는 시작과 같은 값이다. */
double residual; /**< 두 평가 좌표 사이 거리 등 nonnegative model-unit residual이다. */
double error_bound; /**< Parameter subdivision과 tolerance에서 얻은 nonnegative model-unit bound다. */
uint64_t feature_id; /**< 입력 stable IDs와 parameter/residual을 묶는 결정적 feature 식별자다. */
} math_engine_curve_intersection_f64_t;
math_engine_curve_intersection_f64_t.kind
Point/tangent/overlap/unresolved
math_engine_intersection_kind_t값이다.int32_t kind;
math_engine_curve_intersection_f64_t.flags
유효 근사에는 VALUE|UNCERTAIN 등 공통 result bit가 설정된다.
uint32_t flags;
math_engine_curve_intersection_f64_t.point
두 입력과 같은 Cartesian frame/model unit의 대표 교차 좌표다.
math_engine_vec3_f64_t point;
math_engine_curve_intersection_f64_t.parameter_a
첫 curve/object domain의 point 또는 overlap 시작 parameter다.
double parameter_a;
math_engine_curve_intersection_f64_t.parameter_b
둘째 curve/object domain의 대응 point 또는 overlap 시작 parameter다.
double parameter_b;
math_engine_curve_intersection_f64_t.parameter_a_end
OVERLAP일 때 첫 domain 끝, isolated point에서는 시작과 같은 값이다.
double parameter_a_end;
math_engine_curve_intersection_f64_t.parameter_b_end
OVERLAP일 때 둘째 domain 끝, isolated point에서는 시작과 같은 값이다.
double parameter_b_end;
math_engine_curve_intersection_f64_t.residual
두 평가 좌표 사이 거리 등 nonnegative model-unit residual이다.
double residual;
math_engine_curve_intersection_f64_t.error_bound
Parameter subdivision과 tolerance에서 얻은 nonnegative model-unit bound다.
double error_bound;
math_engine_curve_intersection_f64_t.feature_id
입력 stable IDs와 parameter/residual을 묶는 결정적 feature 식별자다.
uint64_t feature_id;
math_engine_intersection_result_f64_t
교차 배열의 count, 필요 capacity와 근사 오차 요약이다.
typedef struct math_engine_intersection_result_f64 {
uint32_t struct_size; /**< Caller가 exact intersection-result byte 크기로 미리 설정한다. */
uint32_t struct_version; /**< =MATH_ENGINE_INTERSECTION_RESULT_VERSION_1=이어야 한다. */
uint32_t flags; /**< 0개면 MISS, 하나 이상이면 VALUE|UNCERTAIN인 공통 result bit다. */
uint32_t count; /**< 성공 시 =out_items=에 쓴 유효 intersection element 수다. */
uint32_t required_capacity; /**< 전체 후보를 담는 데 필요한 element 수; buffer 부족에서도 제공된다. */
uint32_t iteration_count; /**< Deterministic parameter subdivision/evaluation iteration 수다. */
double maximum_residual; /**< 반환 item residual의 nonnegative model-unit 최대값이다. */
double maximum_error_bound; /**< 반환 item approximation bound의 nonnegative 최대값이다. */
uint64_t deterministic_fingerprint; /**< Ordered =out_items[0..count)= bytes의 결정적 hash다. */
uint64_t reserved[2]; /**< Library가 0으로 기록하고 caller가 무시하는 ABI 확장 word다. */
} math_engine_intersection_result_f64_t;
math_engine_intersection_result_f64_t.struct_size
Caller가 exact intersection-result byte 크기로 미리 설정한다.
uint32_t struct_size;
math_engine_intersection_result_f64_t.struct_version
MATH_ENGINE_INTERSECTION_RESULT_VERSION_1이어야 한다.uint32_t struct_version;
math_engine_intersection_result_f64_t.flags
0개면 MISS, 하나 이상이면 VALUE|UNCERTAIN인 공통 result bit다.
uint32_t flags;
math_engine_intersection_result_f64_t.count
성공 시
out_items에 쓴 유효 intersection element 수다.uint32_t count;
math_engine_intersection_result_f64_t.required_capacity
전체 후보를 담는 데 필요한 element 수; buffer 부족에서도 제공된다.
uint32_t required_capacity;
math_engine_intersection_result_f64_t.iteration_count
Deterministic parameter subdivision/evaluation iteration 수다.
uint32_t iteration_count;
math_engine_intersection_result_f64_t.maximum_residual
반환 item residual의 nonnegative model-unit 최대값이다.
double maximum_residual;
math_engine_intersection_result_f64_t.maximum_error_bound
반환 item approximation bound의 nonnegative 최대값이다.
double maximum_error_bound;
math_engine_intersection_result_f64_t.deterministic_fingerprint
Ordered
out_items[0..count)bytes의 결정적 hash다.uint64_t deterministic_fingerprint;
math_engine_intersection_result_f64_t.reserved
Library가 0으로 기록하고 caller가 무시하는 ABI 확장 word다.
uint64_t reserved[2];
math_engine_bvh_node_f64_t
Optional mesh BVH의 내부 또는 triangle leaf node view다.
typedef struct math_engine_bvh_node_f64 {
math_engine_aabb3_f64_t bounds; /**< Mesh와 같은 frame/unit의 finite min<=max axis-aligned bounds다. */
uint32_t first_child_or_triangle; /**< Leaf(bit0=1)이면 첫 triangle, 아니면 첫 child node index다. */
uint32_t count; /**< 연속 triangle 또는 child node element 수이며 1 이상이다. */
uint32_t flags; /**< Bit 0이 leaf를 뜻하며 V1에서 다른 bit는 반드시 0이다. */
uint32_t reserved32; /**< Caller가 0으로 두고 traversal이 무시하는 ABI 확장 slot이다. */
} math_engine_bvh_node_f64_t;
math_engine_bvh_node_f64_t.bounds
Mesh와 같은 frame/unit의 finite min<=max axis-aligned bounds다.
math_engine_aabb3_f64_t bounds;
math_engine_bvh_node_f64_t.first_child_or_triangle
Leaf(bit0=1)이면 첫 triangle, 아니면 첫 child node index다.
uint32_t first_child_or_triangle;
math_engine_bvh_node_f64_t.count
연속 triangle 또는 child node element 수이며 1 이상이다.
uint32_t count;
math_engine_bvh_node_f64_t.flags
Bit 0이 leaf를 뜻하며 V1에서 다른 bit는 반드시 0이다.
uint32_t flags;
math_engine_bvh_node_f64_t.reserved32
Caller가 0으로 두고 traversal이 무시하는 ABI 확장 slot이다.
uint32_t reserved32;
math_engine_mesh_view_f64_t
Caller-owned vertex, 3*triangle index와 선택적 BVH의 borrowed mesh view다.
typedef struct math_engine_mesh_view_f64 {
uint32_t struct_size; /**< Forward-compatible input byte 크기이며 V1 reader는 =sizeof= 이상을 요구한다. */
uint32_t struct_version; /**< =MATH_ENGINE_MESH_VIEW_VERSION_1=이어야 한다. */
const math_engine_vec3_f64_t* vertices; /**< 필수 borrowed finite vertex 배열 =vertex_count=개; query/validation 호출 return까지 유효하다. */
const uint32_t* triangle_indices; /**< 필수 borrowed index 배열 정확히 =3*triangle_count=개; 각 값은 vertex_count 미만이다. */
uint32_t vertex_count; /**< =vertices= element 수이며 최소 3이다. */
uint32_t triangle_count; /**< Triangle 수이며 nonzero이고 index 배열 길이를 3배로 정한다. */
const math_engine_bvh_node_f64_t* bvh_nodes; /**< Optional borrowed node 배열; NULL은 =bvh_node_count==0=일 때만 허용되고 query 동안 유효하다. */
uint32_t bvh_node_count; /**< =bvh_nodes= element 수이며 BVH가 없으면 0이다. */
uint32_t bvh_root; /**< BVH가 있으면 =bvh_nodes= 안의 root index; 없으면 무시된다. */
uint64_t stable_id; /**< Mesh geometry/revision을 caller가 식별하는 필수 nonzero ID다. */
uint64_t reserved[2]; /**< Caller가 0으로 두고 future ABI reader가 무시하는 확장 word다. */
} math_engine_mesh_view_f64_t;
math_engine_mesh_view_f64_t.struct_size
Forward-compatible input byte 크기이며 V1 reader는
sizeof이상을 요구한다.uint32_t struct_size;
math_engine_mesh_view_f64_t.struct_version
MATH_ENGINE_MESH_VIEW_VERSION_1이어야 한다.uint32_t struct_version;
math_engine_mesh_view_f64_t.vertices
필수 borrowed finite vertex 배열
vertex_count개; query/validation 호출 return까지 유효하다.const math_engine_vec3_f64_t* vertices;
math_engine_mesh_view_f64_t.triangle_indices
필수 borrowed index 배열 정확히 =3*triangle_count=개; 각 값은 vertex_count 미만이다.
const uint32_t* triangle_indices;
math_engine_mesh_view_f64_t.vertex_count
verticeselement 수이며 최소 3이다.uint32_t vertex_count;
math_engine_mesh_view_f64_t.triangle_count
Triangle 수이며 nonzero이고 index 배열 길이를 3배로 정한다.
uint32_t triangle_count;
math_engine_mesh_view_f64_t.bvh_nodes
Optional borrowed node 배열; NULL은 =bvh_node_count==0=일 때만 허용되고 query 동안 유효하다.
const math_engine_bvh_node_f64_t* bvh_nodes;
math_engine_mesh_view_f64_t.bvh_node_count
bvh_nodeselement 수이며 BVH가 없으면 0이다.uint32_t bvh_node_count;
math_engine_mesh_view_f64_t.bvh_root
BVH가 있으면
bvh_nodes안의 root index; 없으면 무시된다.uint32_t bvh_root;
math_engine_mesh_view_f64_t.stable_id
Mesh geometry/revision을 caller가 식별하는 필수 nonzero ID다.
uint64_t stable_id;
math_engine_mesh_view_f64_t.reserved
Caller가 0으로 두고 future ABI reader가 무시하는 확장 word다.
uint64_t reserved[2];
math_engine_mesh_result_f64_t
Mesh topology 또는 query hit/miss를 같은 좌표 단위로 표현하는 결과다.
typedef struct math_engine_mesh_result_f64 {
uint32_t struct_size; /**< Caller가 exact mesh-result byte 크기로 미리 설정한다. */
uint32_t struct_version; /**< =MATH_ENGINE_MESH_RESULT_VERSION_1=이어야 한다. */
uint32_t flags; /**< Validation/query의 VALUE/MISS/UNCERTAIN 공통 result bit다. */
int32_t topology; /**< Validation의 mesh-topology enum; point query에서는 INVALID일 수 있다. */
uint32_t boundary_edge_count; /**< 정확히 한 triangle에 incident한 unique undirected edge 수다. */
uint32_t non_manifold_edge_count; /**< 둘보다 많은 triangle에 incident한 unique edge 수다. */
uint32_t degenerate_triangle_count; /**< Zero/near-zero area로 분류한 triangle 수다. */
uint32_t feature_triangle; /**< Hit/closest/contact triangle index; MISS 또는 validation-only면 =UINT32_MAX=다. */
math_engine_vec3_f64_t point; /**< Mesh와 같은 frame/model unit의 hit 또는 closest point다. */
math_engine_vec3_f64_t unit_normal; /**< Feature triangle의 dimensionless unit normal; 퇴화/MISS면 zero vector다. */
double parameter; /**< Raycast에서는 nonnegative ray t, 다른 query에서는 operation별 parameter다. */
double distance; /**< Query point/center에서 feature point까지의 nonnegative model-unit 거리다. */
double penetration; /**< Sphere contact overlap depth의 nonnegative model-unit 값; 분리/MISS면 0이다. */
double error_bound; /**< Query/tolerance 계산의 nonnegative model-unit 오차 bound다. */
uint64_t deterministic_fingerprint; /**< Topology 또는 feature 결과 logical fields의 결정적 hash다. */
uint64_t reserved[2]; /**< Library가 0으로 기록하고 caller가 무시하는 ABI 확장 word다. */
} math_engine_mesh_result_f64_t;
math_engine_mesh_result_f64_t.struct_size
Caller가 exact mesh-result byte 크기로 미리 설정한다.
uint32_t struct_size;
math_engine_mesh_result_f64_t.struct_version
MATH_ENGINE_MESH_RESULT_VERSION_1이어야 한다.uint32_t struct_version;
math_engine_mesh_result_f64_t.flags
Validation/query의 VALUE/MISS/UNCERTAIN 공통 result bit다.
uint32_t flags;
math_engine_mesh_result_f64_t.topology
Validation의 mesh-topology enum; point query에서는 INVALID일 수 있다.
int32_t topology;
math_engine_mesh_result_f64_t.boundary_edge_count
정확히 한 triangle에 incident한 unique undirected edge 수다.
uint32_t boundary_edge_count;
math_engine_mesh_result_f64_t.non_manifold_edge_count
둘보다 많은 triangle에 incident한 unique edge 수다.
uint32_t non_manifold_edge_count;
math_engine_mesh_result_f64_t.degenerate_triangle_count
Zero/near-zero area로 분류한 triangle 수다.
uint32_t degenerate_triangle_count;
math_engine_mesh_result_f64_t.feature_triangle
Hit/closest/contact triangle index; MISS 또는 validation-only면
UINT32_MAX다.uint32_t feature_triangle;
math_engine_mesh_result_f64_t.point
Mesh와 같은 frame/model unit의 hit 또는 closest point다.
math_engine_vec3_f64_t point;
math_engine_mesh_result_f64_t.unit_normal
Feature triangle의 dimensionless unit normal; 퇴화/MISS면 zero vector다.
math_engine_vec3_f64_t unit_normal;
math_engine_mesh_result_f64_t.parameter
Raycast에서는 nonnegative ray t, 다른 query에서는 operation별 parameter다.
double parameter;
math_engine_mesh_result_f64_t.distance
Query point/center에서 feature point까지의 nonnegative model-unit 거리다.
double distance;
math_engine_mesh_result_f64_t.penetration
Sphere contact overlap depth의 nonnegative model-unit 값; 분리/MISS면 0이다.
double penetration;
math_engine_mesh_result_f64_t.error_bound
Query/tolerance 계산의 nonnegative model-unit 오차 bound다.
double error_bound;
math_engine_mesh_result_f64_t.deterministic_fingerprint
Topology 또는 feature 결과 logical fields의 결정적 hash다.
uint64_t deterministic_fingerprint;
math_engine_mesh_result_f64_t.reserved
Library가 0으로 기록하고 caller가 무시하는 ABI 확장 word다.
uint64_t reserved[2];
math_engine_brep_entity_t
Neutral B-rep entity와 그 relation slice를 나타내는 pointer-free record다.
typedef struct math_engine_brep_entity {
uint64_t stable_id; /**< Model 안에서 유일한 필수 nonzero entity/revision ID다. */
uint64_t geometry_handle; /**< Caller geometry table의 opaque non-owning ID; 0이면 topology-only entity다. */
uint32_t first_relation; /**< =brep.relations=에서 이 parent의 contiguous slice 시작 index다. */
uint32_t relation_count; /**< Slice element 수이며 =first_relation+count<=brep.relation_count=다. */
int32_t kind; /**< Vertex..solid 중 하나인 =math_engine_brep_entity_kind_t= 값이다. */
int32_t orientation; /**< Underlying geometry와 같은 방향 +1 또는 반대 방향 -1이다. */
} math_engine_brep_entity_t;
math_engine_brep_entity_t.stable_id
Model 안에서 유일한 필수 nonzero entity/revision ID다.
uint64_t stable_id;
math_engine_brep_entity_t.geometry_handle
Caller geometry table의 opaque non-owning ID; 0이면 topology-only entity다.
uint64_t geometry_handle;
math_engine_brep_entity_t.first_relation
brep.relations에서 이 parent의 contiguous slice 시작 index다.uint32_t first_relation;
math_engine_brep_entity_t.relation_count
Slice element 수이며
first_relation+count<=brep.relation_count다.uint32_t relation_count;
math_engine_brep_entity_t.kind
Vertex..solid 중 하나인
math_engine_brep_entity_kind_t값이다.int32_t kind;
math_engine_brep_entity_t.orientation
Underlying geometry와 같은 방향 +1 또는 반대 방향 -1이다.
int32_t orientation;
math_engine_brep_relation_t
Parent/child entity index와 방향을 연결하는 pointer-free relation이다.
typedef struct math_engine_brep_relation {
uint32_t parent_index; /**< =entities= 안의 parent index이며 parent slice 소유자와 일치해야 한다. */
uint32_t child_index; /**< 허용 계층의 바로 아래 =entities= child index다. */
int32_t orientation; /**< Parent 안에서 child를 같은 방향 +1 또는 반대 방향 -1로 사용한다. */
uint32_t reserved32; /**< Caller가 0으로 두고 validator/healer가 무시하는 ABI 확장 slot이다. */
} math_engine_brep_relation_t;
math_engine_brep_relation_t.parent_index
entities안의 parent index이며 parent slice 소유자와 일치해야 한다.uint32_t parent_index;
math_engine_brep_relation_t.child_index
허용 계층의 바로 아래
entitieschild index다.uint32_t child_index;
math_engine_brep_relation_t.orientation
Parent 안에서 child를 같은 방향 +1 또는 반대 방향 -1로 사용한다.
int32_t orientation;
math_engine_brep_relation_t.reserved32
Caller가 0으로 두고 validator/healer가 무시하는 ABI 확장 slot이다.
uint32_t reserved32;
math_engine_brep_view_t
Caller-owned entity/relation 배열을 빌리는 versioned neutral B-rep view다.
typedef struct math_engine_brep_view {
uint32_t struct_size; /**< Forward-compatible input byte 크기이며 V1 reader는 =sizeof= 이상을 요구한다. */
uint32_t struct_version; /**< =MATH_ENGINE_BREP_VIEW_VERSION_1=이어야 한다. */
const math_engine_brep_entity_t* entities; /**< 필수 borrowed entity 배열 =entity_count=개; validation/serialize 호출 return까지 유효하다. */
const math_engine_brep_relation_t* relations; /**< Borrowed relation 배열; NULL은 =relation_count==0=일 때만 허용되고 호출 동안 유효하다. */
uint32_t entity_count; /**< =entities= element 수이며 nonzero다. */
uint32_t relation_count; /**< =relations= element 수이며 0일 수 있다. */
uint32_t root_entity_index; /**< Root face/shell/solid의 =entities= index이며 entity_count 미만이다. */
uint32_t reserved32; /**< Caller가 0으로 두고 future ABI reader가 무시하는 확장 slot이다. */
uint64_t model_id; /**< 전체 B-rep model/revision을 식별하는 필수 nonzero stable ID다. */
uint64_t reserved[2]; /**< Caller가 0으로 두고 future ABI reader가 무시하는 확장 word다. */
} math_engine_brep_view_t;
math_engine_brep_view_t.struct_size
Forward-compatible input byte 크기이며 V1 reader는
sizeof이상을 요구한다.uint32_t struct_size;
math_engine_brep_view_t.struct_version
MATH_ENGINE_BREP_VIEW_VERSION_1이어야 한다.uint32_t struct_version;
math_engine_brep_view_t.entities
필수 borrowed entity 배열
entity_count개; validation/serialize 호출 return까지 유효하다.const math_engine_brep_entity_t* entities;
math_engine_brep_view_t.relations
Borrowed relation 배열; NULL은 =relation_count==0=일 때만 허용되고 호출 동안 유효하다.
const math_engine_brep_relation_t* relations;
math_engine_brep_view_t.entity_count
entitieselement 수이며 nonzero다.uint32_t entity_count;
math_engine_brep_view_t.relation_count
relationselement 수이며 0일 수 있다.uint32_t relation_count;
math_engine_brep_view_t.root_entity_index
Root face/shell/solid의
entitiesindex이며 entity_count 미만이다.uint32_t root_entity_index;
math_engine_brep_view_t.reserved32
Caller가 0으로 두고 future ABI reader가 무시하는 확장 slot이다.
uint32_t reserved32;
math_engine_brep_view_t.model_id
전체 B-rep model/revision을 식별하는 필수 nonzero stable ID다.
uint64_t model_id;
math_engine_brep_view_t.reserved
Caller가 0으로 두고 future ABI reader가 무시하는 확장 word다.
uint64_t reserved[2];
math_engine_brep_result_t
Neutral B-rep 구조 오류, Euler characteristic와 healing action 수의 요약이다.
typedef struct math_engine_brep_result {
uint32_t struct_size; /**< Caller가 exact B-rep-result byte 크기로 미리 설정한다. */
uint32_t struct_version; /**< =MATH_ENGINE_BREP_RESULT_VERSION_1=이어야 한다. */
uint32_t flags; /**< Valid이면 VALUE, repair가 필요하면 VALUE|UNCERTAIN인 공통 result bit다. */
int32_t topology; /**< Entity/relation 검사에서 분류한 mesh-topology enum 값이다. */
uint32_t invalid_entity_count; /**< Kind/orientation/slice/root 규칙을 위반한 entity 수다. */
uint32_t invalid_relation_count; /**< Index/parent-child/orientation 규칙을 위반한 relation 수다. */
uint32_t duplicate_id_count; /**< 같은 nonzero =entity.stable_id=를 공유한 중복 횟수다. */
uint32_t healing_action_count; /**< Healing plan이 수정/삭제/재연결해야 한다고 판정한 action 수다. */
int64_t euler_characteristic; /**< Counted =V-E+F= signed topology invariant다. */
uint64_t deterministic_fingerprint; /**< Ordered entity/relation 검사 결과와 counts의 hash다. */
uint64_t reserved[2]; /**< Library가 0으로 기록하고 caller가 무시하는 ABI 확장 word다. */
} math_engine_brep_result_t;
math_engine_brep_result_t.struct_size
Caller가 exact B-rep-result byte 크기로 미리 설정한다.
uint32_t struct_size;
math_engine_brep_result_t.struct_version
MATH_ENGINE_BREP_RESULT_VERSION_1이어야 한다.uint32_t struct_version;
math_engine_brep_result_t.flags
Valid이면 VALUE, repair가 필요하면 VALUE|UNCERTAIN인 공통 result bit다.
uint32_t flags;
math_engine_brep_result_t.topology
Entity/relation 검사에서 분류한 mesh-topology enum 값이다.
int32_t topology;
math_engine_brep_result_t.invalid_entity_count
Kind/orientation/slice/root 규칙을 위반한 entity 수다.
uint32_t invalid_entity_count;
math_engine_brep_result_t.invalid_relation_count
Index/parent-child/orientation 규칙을 위반한 relation 수다.
uint32_t invalid_relation_count;
math_engine_brep_result_t.duplicate_id_count
같은 nonzero
entity.stable_id를 공유한 중복 횟수다.uint32_t duplicate_id_count;
math_engine_brep_result_t.healing_action_count
Healing plan이 수정/삭제/재연결해야 한다고 판정한 action 수다.
uint32_t healing_action_count;
math_engine_brep_result_t.euler_characteristic
Counted
V-E+Fsigned topology invariant다.int64_t euler_characteristic;
math_engine_brep_result_t.deterministic_fingerprint
Ordered entity/relation 검사 결과와 counts의 hash다.
uint64_t deterministic_fingerprint;
math_engine_brep_result_t.reserved
Library가 0으로 기록하고 caller가 무시하는 ABI 확장 word다.
uint64_t reserved[2];
math_engine_cad_backend_info_t
선택적 CAD backend의 가용성, version, operation과 runtime provenance다.
typedef struct math_engine_cad_backend_info {
uint32_t struct_size; /**< Caller가 exact backend-info byte 크기로 미리 설정한다. */
uint32_t struct_version; /**< =MATH_ENGINE_CAD_BACKEND_INFO_VERSION_1=이어야 한다. */
uint32_t available; /**< Optional adapter가 이 runtime에 포함됐으면 1, 아니면 0인 boolean이다. */
uint32_t dynamically_linked; /**< Backend/runtime dependencies를 동적 연결하면 1, 아니면 0이다. */
uint32_t occt_version_major; /**< Available일 때 linked OCCT semantic major, 아니면 0이다. */
uint32_t occt_version_minor; /**< Available일 때 linked OCCT semantic minor, 아니면 0이다. */
uint32_t occt_version_patch; /**< Available일 때 linked OCCT semantic patch, 아니면 0이다. */
uint32_t native_public_type_count; /**< Public C ABI에 노출된 backend-native type 수이며 경계 계약상 항상 0이다. */
uint64_t supported_operation_bits; /**< 개별 =MATH_ENGINE_CAD_OPERATION_*= bit의 OR이며 unknown bit는 0이다. */
uint64_t runtime_dependency_count; /**< 배포 provenance가 선언한 non-system runtime dependency 수다. */
uint64_t license_notice_count; /**< 배포와 함께 제공되는 backend/third-party notice 문서 수다. */
uint64_t reserved[2]; /**< Library가 0으로 기록하고 caller가 무시하는 ABI 확장 word다. */
} math_engine_cad_backend_info_t;
math_engine_cad_backend_info_t.struct_size
Caller가 exact backend-info byte 크기로 미리 설정한다.
uint32_t struct_size;
math_engine_cad_backend_info_t.struct_version
MATH_ENGINE_CAD_BACKEND_INFO_VERSION_1이어야 한다.uint32_t struct_version;
math_engine_cad_backend_info_t.available
Optional adapter가 이 runtime에 포함됐으면 1, 아니면 0인 boolean이다.
uint32_t available;
math_engine_cad_backend_info_t.dynamically_linked
Backend/runtime dependencies를 동적 연결하면 1, 아니면 0이다.
uint32_t dynamically_linked;
math_engine_cad_backend_info_t.occt_version_major
Available일 때 linked OCCT semantic major, 아니면 0이다.
uint32_t occt_version_major;
math_engine_cad_backend_info_t.occt_version_minor
Available일 때 linked OCCT semantic minor, 아니면 0이다.
uint32_t occt_version_minor;
math_engine_cad_backend_info_t.occt_version_patch
Available일 때 linked OCCT semantic patch, 아니면 0이다.
uint32_t occt_version_patch;
math_engine_cad_backend_info_t.native_public_type_count
Public C ABI에 노출된 backend-native type 수이며 경계 계약상 항상 0이다.
uint32_t native_public_type_count;
math_engine_cad_backend_info_t.supported_operation_bits
개별
MATH_ENGINE_CAD_OPERATION_*bit의 OR이며 unknown bit는 0이다.uint64_t supported_operation_bits;
math_engine_cad_backend_info_t.runtime_dependency_count
배포 provenance가 선언한 non-system runtime dependency 수다.
uint64_t runtime_dependency_count;
math_engine_cad_backend_info_t.license_notice_count
배포와 함께 제공되는 backend/third-party notice 문서 수다.
uint64_t license_notice_count;
math_engine_cad_backend_info_t.reserved
Library가 0으로 기록하고 caller가 무시하는 ABI 확장 word다.
uint64_t reserved[2];
math_engine_cad_shape_result_t
Adapter-owned shape handle, topology 수와 tessellation 필요 capacity 결과다.
typedef struct math_engine_cad_shape_result {
uint32_t struct_size; /**< Caller가 exact shape-result byte 크기로 미리 설정한다. */
uint32_t struct_version; /**< =MATH_ENGINE_CAD_SHAPE_RESULT_VERSION_1=이어야 한다. */
uint32_t flags; /**< Owned shape이면 VALUE, tessellation buffer 부족이면 PARTIAL 등 공통 bit다. */
uint32_t reserved32; /**< Library가 0으로 commit하고 caller가 무시하는 ABI 확장 slot이다. */
math_engine_geometry_handle_t shape; /**< Adapter-owned opaque handle; nonzero 성공값은 release 전까지 유효하며 caller가 정확히 한 번 해제한다. */
uint32_t vertex_count; /**< Shape topology vertex 수 또는 tessellation에서 실제 쓴 vertex element 수다. */
uint32_t edge_count; /**< Shape topology edge 수다. */
uint32_t face_count; /**< Shape topology face 수다. */
uint32_t solid_count; /**< Shape topology solid 수다. */
uint32_t required_vertex_capacity; /**< Tessellation 전체 vertex를 담는 데 필요한 output element 수다. */
uint32_t required_triangle_capacity; /**< Triangle index triplet 수가 아니라 필요한 triangle element 수다. */
double error_bound; /**< Healing/tessellation에 적용된 finite nonnegative model-unit tolerance/deflection이다. */
uint64_t deterministic_fingerprint; /**< Handle-independent topology counts와 operation 결과의 hash다. */
uint64_t reserved[2]; /**< Library가 0으로 기록하고 caller가 무시하는 ABI 확장 word다. */
} math_engine_cad_shape_result_t;
math_engine_cad_shape_result_t.struct_size
Caller가 exact shape-result byte 크기로 미리 설정한다.
uint32_t struct_size;
math_engine_cad_shape_result_t.struct_version
MATH_ENGINE_CAD_SHAPE_RESULT_VERSION_1이어야 한다.uint32_t struct_version;
math_engine_cad_shape_result_t.flags
Owned shape이면 VALUE, tessellation buffer 부족이면 PARTIAL 등 공통 bit다.
uint32_t flags;
math_engine_cad_shape_result_t.reserved32
Library가 0으로 commit하고 caller가 무시하는 ABI 확장 slot이다.
uint32_t reserved32;
math_engine_cad_shape_result_t.shape
Adapter-owned opaque handle; nonzero 성공값은 release 전까지 유효하며 caller가 정확히 한 번 해제한다.
math_engine_geometry_handle_t shape;
math_engine_cad_shape_result_t.vertex_count
Shape topology vertex 수 또는 tessellation에서 실제 쓴 vertex element 수다.
uint32_t vertex_count;
math_engine_cad_shape_result_t.edge_count
Shape topology edge 수다.
uint32_t edge_count;
math_engine_cad_shape_result_t.face_count
Shape topology face 수다.
uint32_t face_count;
math_engine_cad_shape_result_t.solid_count
Shape topology solid 수다.
uint32_t solid_count;
math_engine_cad_shape_result_t.required_vertex_capacity
Tessellation 전체 vertex를 담는 데 필요한 output element 수다.
uint32_t required_vertex_capacity;
math_engine_cad_shape_result_t.required_triangle_capacity
Triangle index triplet 수가 아니라 필요한 triangle element 수다.
uint32_t required_triangle_capacity;
math_engine_cad_shape_result_t.error_bound
Healing/tessellation에 적용된 finite nonnegative model-unit tolerance/deflection이다.
double error_bound;
math_engine_cad_shape_result_t.deterministic_fingerprint
Handle-independent topology counts와 operation 결과의 hash다.
uint64_t deterministic_fingerprint;
math_engine_cad_shape_result_t.reserved
Library가 0으로 기록하고 caller가 무시하는 ABI 확장 word다.
uint64_t reserved[2];
Macro와 constant
MATH_ENGINE_BREP_RESULT_VERSION_1
Neutral B-rep result V1 struct_version 에 기록하는 unsigned ABI 값 1이다.
#define MATH_ENGINE_BREP_RESULT_VERSION_1 UINT32_C(1)
MATH_ENGINE_BREP_VIEW_VERSION_1
Neutral B-rep view V1 struct_version 에 기록하는 unsigned ABI 값 1이다.
#define MATH_ENGINE_BREP_VIEW_VERSION_1 UINT32_C(1)
MATH_ENGINE_CAD_BACKEND_INFO_VERSION_1
Optional CAD backend info V1 struct_version 에 기록하는 unsigned ABI 값 1이다.
#define MATH_ENGINE_CAD_BACKEND_INFO_VERSION_1 UINT32_C(1)
MATH_ENGINE_CAD_OPERATION_BOOLEAN
Bit 2 (0x04): Shape union/intersection/difference가 지원된다.
#define MATH_ENGINE_CAD_OPERATION_BOOLEAN UINT64_C(0x04)
MATH_ENGINE_CAD_OPERATION_HEALING
Bit 3 (0x08): Tolerance 기반 shape healing이 지원된다.
#define MATH_ENGINE_CAD_OPERATION_HEALING UINT64_C(0x08)
MATH_ENGINE_CAD_OPERATION_IGES_IO
Bit 1 (0x02): IGES import/export operation이 runtime에서 지원된다.
#define MATH_ENGINE_CAD_OPERATION_IGES_IO UINT64_C(0x02)
MATH_ENGINE_CAD_OPERATION_STEP_IO
Bit 0 (0x01): STEP import/export operation이 runtime에서 지원된다.
#define MATH_ENGINE_CAD_OPERATION_STEP_IO UINT64_C(0x01)
MATH_ENGINE_CAD_OPERATION_TESSELLATION
Bit 4 (0x10): Adapter shape의 triangle tessellation이 지원된다.
#define MATH_ENGINE_CAD_OPERATION_TESSELLATION UINT64_C(0x10)
MATH_ENGINE_CAD_SHAPE_RESULT_VERSION_1
Adapter shape result V1 struct_version 에 기록하는 unsigned ABI 값 1이다.
#define MATH_ENGINE_CAD_SHAPE_RESULT_VERSION_1 UINT32_C(1)
MATH_ENGINE_CURVE_EVALUATION_VERSION_1
Curve evaluation V1 struct_version 에 기록하는 unsigned ABI 값 1이다.
#define MATH_ENGINE_CURVE_EVALUATION_VERSION_1 UINT32_C(1)
MATH_ENGINE_CURVE_VIEW_VERSION_1
Curve view V1 struct_version 에 기록하는 unsigned ABI 값 1이다.
#define MATH_ENGINE_CURVE_VIEW_VERSION_1 UINT32_C(1)
MATH_ENGINE_INTERSECTION_RESULT_VERSION_1
Intersection summary V1 struct_version 에 기록하는 unsigned ABI 값 1이다.
#define MATH_ENGINE_INTERSECTION_RESULT_VERSION_1 UINT32_C(1)
MATH_ENGINE_MESH_RESULT_VERSION_1
Mesh result V1 struct_version 에 기록하는 unsigned ABI 값 1이다.
#define MATH_ENGINE_MESH_RESULT_VERSION_1 UINT32_C(1)
MATH_ENGINE_MESH_VIEW_VERSION_1
Mesh view V1 struct_version 에 기록하는 unsigned ABI 값 1이다.
#define MATH_ENGINE_MESH_VIEW_VERSION_1 UINT32_C(1)
MATH_ENGINE_SURFACE_EVALUATION_VERSION_1
Surface evaluation V1 struct_version 에 기록하는 unsigned ABI 값 1이다.
#define MATH_ENGINE_SURFACE_EVALUATION_VERSION_1 UINT32_C(1)
MATH_ENGINE_SURFACE_VIEW_VERSION_1
Surface view V1 struct_version 에 기록하는 unsigned ABI 값 1이다.
#define MATH_ENGINE_SURFACE_VIEW_VERSION_1 UINT32_C(1)
MATH_ENGINE_TESSELLATION_OPTIONS_VERSION_1
Tessellation options V1 struct_version 에 기록하는 unsigned ABI 값 1이다.
#define MATH_ENGINE_TESSELLATION_OPTIONS_VERSION_1 UINT32_C(1)
MATH_ENGINE_TESSELLATION_RESULT_VERSION_1
Tessellation result V1 struct_version 에 기록하는 unsigned ABI 값 1이다.
#define MATH_ENGINE_TESSELLATION_RESULT_VERSION_1 UINT32_C(1)
Function
math_engine_curve_evaluation_f64_init
Curve 평가 결과를 version 1의 빈 상태로 초기화한다.
- 매개변수
out_result: 초기화할 caller-owned 결과. - 반환: 성공하면 OK, NULL이면 INVALID_ARGUMENT.
- Math Engine ownership:
out_result=caller - Math Engine nullable:
out_result=false - Math Engine thread_safety:
safe
MATH_ENGINE_API math_engine_status_t math_engine_curve_evaluation_f64_init(
math_engine_curve_evaluation_f64_t* out_result);
math_engine_surface_evaluation_f64_init
Surface 평가 결과를 version 1의 빈 상태로 초기화한다.
- 매개변수
out_result: 초기화할 caller-owned 결과. - 반환: 성공하면 OK, NULL이면 INVALID_ARGUMENT.
- Math Engine ownership:
out_result=caller - Math Engine nullable:
out_result=false - Math Engine thread_safety:
safe
MATH_ENGINE_API math_engine_status_t math_engine_surface_evaluation_f64_init(
math_engine_surface_evaluation_f64_t* out_result);
math_engine_tessellation_options_f64_init
Tessellation option을 4..64 segment와 1e-6 model-unit tolerance 기본값으로 초기화한다.
- 매개변수
out_options: 초기화할 caller-owned option. - 반환: 성공하면 OK, NULL이면 INVALID_ARGUMENT.
- Math Engine ownership:
out_options=caller - Math Engine nullable:
out_options=false - Math Engine thread_safety:
safe
MATH_ENGINE_API math_engine_status_t math_engine_tessellation_options_f64_init(
math_engine_tessellation_options_f64_t* out_options);
math_engine_tessellation_result_f64_init
Tessellation 결과를 version 1의 빈 상태로 초기화한다.
- 매개변수
out_result: 초기화할 caller-owned 결과. - 반환: 성공하면 OK, NULL이면 INVALID_ARGUMENT.
- Math Engine ownership:
out_result=caller - Math Engine nullable:
out_result=false - Math Engine thread_safety:
safe
MATH_ENGINE_API math_engine_status_t math_engine_tessellation_result_f64_init(
math_engine_tessellation_result_f64_t* out_result);
math_engine_intersection_result_f64_init
Intersection 결과를 version 1의 빈 상태로 초기화한다.
- 매개변수
out_result: 초기화할 caller-owned 결과. - 반환: 성공하면 OK, NULL이면 INVALID_ARGUMENT.
- Math Engine ownership:
out_result=caller - Math Engine nullable:
out_result=false - Math Engine thread_safety:
safe
MATH_ENGINE_API math_engine_status_t math_engine_intersection_result_f64_init(
math_engine_intersection_result_f64_t* out_result);
math_engine_mesh_result_f64_init
Mesh 결과를 invalid topology와 no-feature 상태로 초기화한다.
- 매개변수
out_result: 초기화할 caller-owned 결과. - 반환: 성공하면 OK, NULL이면 INVALID_ARGUMENT.
- Math Engine ownership:
out_result=caller - Math Engine nullable:
out_result=false - Math Engine thread_safety:
safe
MATH_ENGINE_API math_engine_status_t math_engine_mesh_result_f64_init(
math_engine_mesh_result_f64_t* out_result);
math_engine_brep_result_init
Neutral B-rep 결과를 invalid topology 상태로 초기화한다.
- 매개변수
out_result: 초기화할 caller-owned 결과. - 반환: 성공하면 OK, NULL이면 INVALID_ARGUMENT.
- Math Engine ownership:
out_result=caller - Math Engine nullable:
out_result=false - Math Engine thread_safety:
safe
MATH_ENGINE_API math_engine_status_t math_engine_brep_result_init(
math_engine_brep_result_t* out_result);
math_engine_cad_shape_result_init
CAD backend shape 결과를 null handle 상태로 초기화한다.
- 매개변수
out_result: 초기화할 caller-owned 결과. - 반환: 성공하면 OK, NULL이면 INVALID_ARGUMENT.
- Math Engine ownership:
out_result=caller - Math Engine nullable:
out_result=false - Math Engine thread_safety:
safe
MATH_ENGINE_API math_engine_status_t math_engine_cad_shape_result_init(
math_engine_cad_shape_result_t* out_result);
math_engine_curve_workspace_size_f64
Curve kind와 degree에 필요한 평가 scratch byte 수를 계산한다.
- 매개변수
curve: control point/weight/knot 배열을 빌리는 검증할 curve view. - 매개변수
out_bytes: 성공 시 필요한 byte 수를 받는 출력. 실패하면 보존된다. - 반환: 성공하면 OK, curve 검증 또는 크기 산술 오류면 해당 status.
- Math Engine ownership:
curve=borrowed out_bytes=caller - Math Engine nullable:
curve=false out_bytes=false - Math Engine thread_safety:
safe
MATH_ENGINE_API math_engine_status_t math_engine_curve_workspace_size_f64(
const math_engine_curve_view_f64_t* curve,
size_t* out_bytes);
math_engine_curve_evaluate_f64
Curve parameter에서 위치와 일차 미분을 계산한다.
- 매개변수
curve: caller-selected Cartesian frame/unit의 읽기 전용 curve view. - 매개변수
parameter: curve의 [parameter_min, parameter_max] domain 좌표. - 매개변수
context: FINANCE_FIXED가 아닌 mode와 tolerance/budget의 읽기 전용 context. - 매개변수
workspace: 필요한 크기의 double 정렬 caller scratch. - 매개변수
workspace_bytes: workspace의 byte 용량. - 매개변수
out_result: point/derivative/error를 받는 초기화된 출력. 실패하면 보존된다. - 반환: 성공하면 OK, domain·curve·mode·workspace·degeneracy 오류면 해당 status.
- Math Engine ownership:
curve=borrowed context=borrowed workspace=caller out_result=caller - Math Engine nullable:
curve=false context=false workspace=false out_result=false - Math Engine thread_safety:
safe
@details workspace는 curve backing arrays와 out_result에 겹치지 않아야 한다. Point와 derivative는 curve 좌표 단위를 따른다.
MATH_ENGINE_API math_engine_status_t math_engine_curve_evaluate_f64(
const math_engine_curve_view_f64_t* curve,
double parameter,
const math_engine_context_t* context,
void* workspace,
size_t workspace_bytes,
math_engine_curve_evaluation_f64_t* out_result);
math_engine_surface_workspace_size_f64
Surface degree에 필요한 평가 scratch byte 수를 계산한다.
- 매개변수
surface: control/weight/knot/trim 배열을 빌리는 검증할 surface view. - 매개변수
out_bytes: 성공 시 필요한 byte 수를 받는 출력. 실패하면 보존된다. - 반환: 성공하면 OK, surface 검증 또는 크기 산술 오류면 해당 status.
- Math Engine ownership:
surface=borrowed out_bytes=caller - Math Engine nullable:
surface=false out_bytes=false - Math Engine thread_safety:
safe
MATH_ENGINE_API math_engine_status_t math_engine_surface_workspace_size_f64(
const math_engine_surface_view_f64_t* surface,
size_t* out_bytes);
math_engine_surface_evaluate_f64
Surface (u,v)에서 위치, 유한차분 미분과 단위 법선을 계산한다.
- 매개변수
surface: caller-selected Cartesian frame/unit의 읽기 전용 surface view. - 매개변수
parameter_u: [parameter_u_min, parameter_u_max]의 u 좌표. - 매개변수
parameter_v: [parameter_v_min, parameter_v_max]의 v 좌표. - 매개변수
context: FINANCE_FIXED가 아닌 mode와 normal tolerance의 읽기 전용 context. - 매개변수
workspace: 필요한 크기의 double 정렬 caller scratch. - 매개변수
workspace_bytes: workspace byte 용량. - 매개변수
out_result: 평가 결과를 받는 초기화된 출력. 실패하면 보존된다. - 반환: 성공하면 OK, trim 밖·domain·mode·workspace·퇴화 법선 오류면 해당 status.
- Math Engine ownership:
surface=borrowed context=borrowed workspace=caller out_result=caller - Math Engine nullable:
surface=false context=false workspace=false out_result=false - Math Engine thread_safety:
safe
@details workspace는 surface backing arrays와 out_result에 겹치지 않아야 한다. Point와 error_bound는 surface 좌표 단위를 따른다.
MATH_ENGINE_API math_engine_status_t math_engine_surface_evaluate_f64(
const math_engine_surface_view_f64_t* surface,
double parameter_u,
double parameter_v,
const math_engine_context_t* context,
void* workspace,
size_t workspace_bytes,
math_engine_surface_evaluation_f64_t* out_result);
math_engine_curve_tessellation_workspace_size_f64
maximum_segments 기준 tessellation/projection/intersection scratch byte 수를 계산한다.
- 매개변수
maximum_segments: 0보다 큰 최대 segment 수. - 매개변수
out_bytes: 성공 시 필요한 byte 수를 받는 출력. 실패하면 보존된다. - 반환: 성공하면 OK, 0이면 INVALID_ARGUMENT, 크기 산술 overflow면 OVERFLOW.
- Math Engine ownership:
out_bytes=caller - Math Engine nullable:
out_bytes=false - Math Engine thread_safety:
safe
MATH_ENGINE_API math_engine_status_t math_engine_curve_tessellation_workspace_size_f64(
uint32_t maximum_segments,
size_t* out_bytes);
math_engine_curve_tessellate_f64
Curve를 tolerance를 만족하거나 segment 상한에 이를 때까지 결정적으로 세분한다.
- 매개변수
curve: 읽기 전용 curve view. - 매개변수
options: segment 범위와 model-unit approximation tolerance. - 매개변수
context: mode, 평가 budget과 선택적 cancel callback의 읽기 전용 context. - 매개변수
workspace: options.maximum_segments에 필요한 double 정렬 scratch. - 매개변수
workspace_bytes: workspace byte 용량. - 매개변수
out_points: curve 좌표 단위의 최대 output_capacity point 배열. - 매개변수
out_parameters: 각 point의 curve parameter 배열. - 매개변수
output_capacity: 두 출력 배열의 항목 capacity. maximum_segments+1 이상이어야 한다. - 매개변수
out_result: 실제 count, 오차와 fingerprint를 받는 초기화된 출력. - 반환: 성공하면 OK, 작은 buffer/workspace·budget·취소·curve 오류면 해당 status.
- Math Engine ownership:
curve=borrowed options=borrowed context=borrowed workspace=caller out_points=caller out_parameters=caller out_result=caller - Math Engine nullable:
curve=false options=false context=false workspace=false out_points=false out_parameters=false out_result=false - Math Engine thread_safety:
conditional
@details workspace는 입력과 모든 출력에 겹치지 않아야 한다. 실패하면 out_points/out_parameters/out_result를 보존하며 cancel callback state는 호출자가 동기화한다.
MATH_ENGINE_API math_engine_status_t math_engine_curve_tessellate_f64(
const math_engine_curve_view_f64_t* curve,
const math_engine_tessellation_options_f64_t* options,
const math_engine_context_t* context,
void* workspace,
size_t workspace_bytes,
math_engine_vec3_f64_t* out_points,
double* out_parameters,
uint32_t output_capacity,
math_engine_tessellation_result_f64_t* out_result);
math_engine_curve_project_point_f64
Uniform curve polyline에서 point의 최근접 parameter를 결정적으로 근사한다.
- 매개변수
curve: 읽기 전용 curve view. - 매개변수
point: curve와 같은 Cartesian frame/unit의 질의점. - 매개변수
options: 탐색 segment 수와 approximation tolerance. - 매개변수
context: mode, 평가 budget과 선택적 cancel callback의 읽기 전용 context. - 매개변수
workspace: options.maximum_segments에 필요한 double 정렬 scratch. - 매개변수
workspace_bytes: workspace byte 용량. - 매개변수
out_result: 최근접 curve 평가와 model-unit residual을 받는 초기화된 출력. - 반환: 성공하면 OK, 입력·workspace·budget·취소 오류면 해당 status.
- Math Engine ownership:
curve=borrowed point=borrowed options=borrowed context=borrowed workspace=caller out_result=caller - Math Engine nullable:
curve=false point=false options=false context=false workspace=false out_result=false - Math Engine thread_safety:
conditional
@details workspace는 입력 backing storage와 out_result에 겹치지 않아야 한다. 결과는 근사임을 UNCERTAIN flag로 표시하며 실패하면 보존된다.
MATH_ENGINE_API math_engine_status_t math_engine_curve_project_point_f64(
const math_engine_curve_view_f64_t* curve,
const math_engine_vec3_f64_t* point,
const math_engine_tessellation_options_f64_t* options,
const math_engine_context_t* context,
void* workspace,
size_t workspace_bytes,
math_engine_curve_evaluation_f64_t* out_result);
math_engine_curve_line_intersections_f64
Curve polyline과 무한 3D line의 point/overlap 교차를 근사한다.
- 매개변수
curve: 읽기 전용 curve view. - 매개변수
line: curve와 같은 Cartesian frame/unit의 원점과 0이 아닌 방향. - 매개변수
options: 교차 sampling segment 수와 model-unit tolerance. - 매개변수
context: mode, 평가 budget과 선택적 cancel callback의 읽기 전용 context. - 매개변수
workspace: options.maximum_segments에 필요한 double 정렬 scratch. - 매개변수
workspace_bytes: workspace byte 용량. - 매개변수
out_items: 교차 항목 배열. - 매개변수
output_capacity: 항목 capacity. options.maximum_segments 이상이어야 한다. - 매개변수
out_result: count와 최대 residual을 받는 초기화된 출력. - 반환: 성공하면 OK, 작은 buffer/workspace·퇴화 line·budget·취소 오류면 해당 status.
- Math Engine ownership:
curve=borrowed line=borrowed options=borrowed context=borrowed workspace=caller out_items=caller out_result=caller - Math Engine nullable:
curve=false line=false options=false context=false workspace=false out_items=false out_result=false - Math Engine thread_safety:
conditional
@details workspace는 입력/out_items/out_result에 겹치지 않아야 한다. 실패하면 out_result는 보존되며 out_items 내용은 지정되지 않는다.
MATH_ENGINE_API math_engine_status_t math_engine_curve_line_intersections_f64(
const math_engine_curve_view_f64_t* curve,
const math_engine_line3_f64_t* line,
const math_engine_tessellation_options_f64_t* options,
const math_engine_context_t* context,
void* workspace,
size_t workspace_bytes,
math_engine_curve_intersection_f64_t* out_items,
uint32_t output_capacity,
math_engine_intersection_result_f64_t* out_result);
math_engine_curve_curve_intersections_f64
두 curve의 uniform polyline segment 사이 교차를 결정적으로 근사한다.
- 매개변수
curve_a: 첫 읽기 전용 curve view. - 매개변수
curve_b: 둘째 읽기 전용 curve view. curve_a와 같은 frame/unit을 사용해야 한다. - 매개변수
options: 각 curve의 sampling segment 수와 model-unit tolerance. - 매개변수
context: mode, 평가 budget과 선택적 cancel callback의 읽기 전용 context. - 매개변수
workspace: options.maximum_segments에 필요한 double 정렬 scratch. - 매개변수
workspace_bytes: workspace byte 용량. - 매개변수
out_items: 교차 항목 배열. - 매개변수
output_capacity: 항목 capacity. options.maximum_segments 이상이어야 한다. - 매개변수
out_result: count, 반복 수와 최대 residual을 받는 초기화된 출력. - 반환: 성공하면 OK, buffer/workspace·budget·취소·curve 오류면 해당 status.
- Math Engine ownership:
curve_a=borrowed curve_b=borrowed options=borrowed context=borrowed workspace=caller out_items=caller out_result=caller - Math Engine nullable:
curve_a=false curve_b=false options=false context=false workspace=false out_items=false out_result=false - Math Engine thread_safety:
conditional
@details workspace는 입력/out_items/out_result에 겹치지 않아야 한다. 실패하면 out_result는 보존되지만 out_items는 부분 변경될 수 있다.
MATH_ENGINE_API math_engine_status_t math_engine_curve_curve_intersections_f64(
const math_engine_curve_view_f64_t* curve_a,
const math_engine_curve_view_f64_t* curve_b,
const math_engine_tessellation_options_f64_t* options,
const math_engine_context_t* context,
void* workspace,
size_t workspace_bytes,
math_engine_curve_intersection_f64_t* out_items,
uint32_t output_capacity,
math_engine_intersection_result_f64_t* out_result);
math_engine_curve_surface_intersections_f64
Curve polyline과 surface parameter grid의 교차를 결정적으로 근사한다.
- 매개변수
curve: 읽기 전용 curve view. - 매개변수
surface: curve와 같은 Cartesian frame/unit의 읽기 전용 surface view. - 매개변수
options: curve/grid 분할 상한과 model-unit tolerance. - 매개변수
context: mode, 평가 budget과 선택적 cancel callback의 읽기 전용 context. - 매개변수
workspace: options.maximum_segments에 필요한 double 정렬 scratch. - 매개변수
workspace_bytes: workspace byte 용량. - 매개변수
out_items: parameter_a에 curve parameter, parameter_b/parameter_b_end에 surface (u,v)를 담는 항목 배열. - 매개변수
output_capacity: 항목 capacity. options.maximum_segments 이상이어야 한다. - 매개변수
out_result: count, 반복 수와 최대 residual을 받는 초기화된 출력. - 반환: 성공하면 OK, buffer/workspace·mode·budget·취소·geometry 오류면 해당 status.
- Math Engine ownership:
curve=borrowed surface=borrowed options=borrowed context=borrowed workspace=caller out_items=caller out_result=caller - Math Engine nullable:
curve=false surface=false options=false context=false workspace=false out_items=false out_result=false - Math Engine thread_safety:
conditional
@details workspace는 입력/out_items/out_result에 겹치지 않아야 한다. 실패하면 out_result는 보존되지만 out_items는 부분 변경될 수 있다.
MATH_ENGINE_API math_engine_status_t math_engine_curve_surface_intersections_f64(
const math_engine_curve_view_f64_t* curve,
const math_engine_surface_view_f64_t* surface,
const math_engine_tessellation_options_f64_t* options,
const math_engine_context_t* context,
void* workspace,
size_t workspace_bytes,
math_engine_curve_intersection_f64_t* out_items,
uint32_t output_capacity,
math_engine_intersection_result_f64_t* out_result);
math_engine_mesh_validation_workspace_size_f64
triangle edge topology 검증에 필요한 scratch byte 수를 계산한다.
- 매개변수
triangle_count: 0보다 큰 triangle 수. - 매개변수
out_bytes: 성공 시 3*triangle_count edge record의 byte 수를 받는 출력. - 반환: 성공하면 OK, 0이면 INVALID_SIZE, 산술 overflow면 OVERFLOW.
- Math Engine ownership:
out_bytes=caller - Math Engine nullable:
out_bytes=false - Math Engine thread_safety:
safe
MATH_ENGINE_API math_engine_status_t math_engine_mesh_validation_workspace_size_f64(
uint32_t triangle_count,
size_t* out_bytes);
math_engine_mesh_validate_f64
Indexed triangle mesh의 퇴화 triangle, boundary와 non-manifold edge를 분류한다.
- 매개변수
mesh: 같은 Cartesian frame/unit의 vertex와 3*triangle index를 빌리는 view. - 매개변수
context: FINANCE_FIXED가 아닌 mode와 model-unit tolerance의 읽기 전용 context. - 매개변수
workspace: edge sort에 사용할 double 이상 정렬된 caller scratch. - 매개변수
workspace_bytes: workspace byte 용량. - 매개변수
out_result: topology count와 mesh fingerprint를 받는 초기화된 출력. - 반환: 성공하면 OK, view·mode·index·workspace 오류면 해당 status.
- Math Engine ownership:
mesh=borrowed context=borrowed workspace=caller out_result=caller - Math Engine nullable:
mesh=false context=false workspace=false out_result=false - Math Engine thread_safety:
separate_workspace
@details workspace는 mesh backing arrays와 out_result에 겹치지 않아야 한다. 실패하면 out_result는 보존되지만 workspace 내용은 지정되지 않는다.
MATH_ENGINE_API math_engine_status_t math_engine_mesh_validate_f64(
const math_engine_mesh_view_f64_t* mesh,
const math_engine_context_t* context,
void* workspace,
size_t workspace_bytes,
math_engine_mesh_result_f64_t* out_result);
math_engine_mesh_raycast_f64
Ray parameter 구간에서 가장 가까운 triangle hit를 찾는다.
- 매개변수
mesh: 읽기 전용 indexed triangle mesh view. - 매개변수
ray: mesh와 같은 frame/unit의 origin과 0이 아닌 direction. - 매개변수
parameter_min: 포함되는 최소 ray parameter. - 매개변수
parameter_max: 포함되는 최대 ray parameter. - 매개변수
context: mode와 intersection tolerance의 읽기 전용 context. - 매개변수
out_result: hit/miss, triangle index, point와 거리를 받는 초기화된 출력. - 반환: 성공하면 hit 또는 miss와 OK, 입력·mode·geometry 오류면 해당 status.
- Math Engine ownership:
mesh=borrowed ray=borrowed context=borrowed out_result=caller - Math Engine nullable:
mesh=false ray=false context=false out_result=false - Math Engine thread_safety:
safe
@details distance는 mesh 좌표 단위이고 parameter는 ray.direction scale에 따른다. 실패하면 out_result를 보존한다.
MATH_ENGINE_API math_engine_status_t math_engine_mesh_raycast_f64(
const math_engine_mesh_view_f64_t* mesh,
const math_engine_ray3_f64_t* ray,
double parameter_min,
double parameter_max,
const math_engine_context_t* context,
math_engine_mesh_result_f64_t* out_result);
math_engine_mesh_closest_point_f64
Mesh triangle 전체에서 질의점의 결정적 최근접점을 찾는다.
- 매개변수
mesh: 읽기 전용 indexed triangle mesh view. - 매개변수
point: mesh와 같은 frame/unit의 유한 질의점. - 매개변수
context: mode와 closest-point tolerance의 읽기 전용 context. - 매개변수
out_result: 최근접 point, triangle, distance와 normal을 받는 초기화된 출력. - 반환: 성공하면 OK, 입력·mode·geometry 오류면 해당 status.
- Math Engine ownership:
mesh=borrowed point=borrowed context=borrowed out_result=caller - Math Engine nullable:
mesh=false point=false context=false out_result=false - Math Engine thread_safety:
safe
@details 동일 거리에서는 낮은 triangle index를 선택한다. distance는 mesh 좌표 단위이며 실패하면 out_result를 보존한다.
MATH_ENGINE_API math_engine_status_t math_engine_mesh_closest_point_f64(
const math_engine_mesh_view_f64_t* mesh,
const math_engine_vec3_f64_t* point,
const math_engine_context_t* context,
math_engine_mesh_result_f64_t* out_result);
math_engine_mesh_sphere_contact_f64
Sphere 중심의 mesh 최근접점을 이용해 tolerance 포함 contact를 판정한다.
- 매개변수
mesh: 읽기 전용 indexed triangle mesh view. - 매개변수
sphere: mesh와 같은 frame/unit의 중심과 0 이상 radius. - 매개변수
context: mode와 contact tolerance의 읽기 전용 context. - 매개변수
out_result: contact/miss, point, normal과 penetration을 받는 초기화된 출력. - 반환: 성공하면 OK, sphere·mesh·mode·geometry 오류면 해당 status.
- Math Engine ownership:
mesh=borrowed sphere=borrowed context=borrowed out_result=caller - Math Engine nullable:
mesh=false sphere=false context=false out_result=false - Math Engine thread_safety:
safe
@details radius, distance와 penetration은 mesh 좌표 단위다. 실패하면 out_result를 보존한다.
MATH_ENGINE_API math_engine_status_t math_engine_mesh_sphere_contact_f64(
const math_engine_mesh_view_f64_t* mesh,
const math_engine_sphere3_f64_t* sphere,
const math_engine_context_t* context,
math_engine_mesh_result_f64_t* out_result);
math_engine_brep_validate
Neutral B-rep의 entity/relation 계층과 안정 ID 중복을 검사한다.
- 매개변수
brep: caller-owned entity/relation 배열을 빌리는 읽기 전용 view. - 매개변수
out_result: topology, 오류 count, Euler characteristic와 fingerprint 출력. - 반환: 구조 검사를 수행했으면 topology가 invalid여도 OK, view/ABI 오류면 해당 status.
- Math Engine ownership:
brep=borrowed out_result=caller - Math Engine nullable:
brep=false out_result=false - Math Engine thread_safety:
safe
@details 실패하면 out_result를 보존한다.
MATH_ENGINE_API math_engine_status_t math_engine_brep_validate(
const math_engine_brep_view_t* brep,
math_engine_brep_result_t* out_result);
math_engine_brep_healing_plan
Neutral B-rep을 변경하지 않고 필요한 구조 healing action 수를 산출한다.
- 매개변수
brep: caller-owned entity/relation 배열을 빌리는 읽기 전용 view. - 매개변수
out_result: 오류 count와 제안 healing action 수를 받는 출력. - 반환: 분석을 수행했으면 topology가 invalid여도 OK, view/ABI 오류면 해당 status.
- Math Engine ownership:
brep=borrowed out_result=caller - Math Engine nullable:
brep=false out_result=false - Math Engine thread_safety:
safe
@details 이 함수는 brep과 backing arrays를 수정하지 않으며 실패하면 out_result를 보존한다.
MATH_ENGINE_API math_engine_status_t math_engine_brep_healing_plan(
const math_engine_brep_view_t* brep,
math_engine_brep_result_t* out_result);
math_engine_brep_serialized_size
유효한 neutral B-rep의 MEBREP1 host-ABI wire byte 수를 계산한다.
- 매개변수
brep: 직렬화할 읽기 전용 B-rep view. - 매개변수
out_bytes: 성공 시 header+entity+relation byte 수를 받는 출력. - 반환: 성공하면 OK, topology invalid면 DEGENERATE, 크기 overflow면 OVERFLOW.
- Math Engine ownership:
brep=borrowed out_bytes=caller - Math Engine nullable:
brep=false out_bytes=false - Math Engine thread_safety:
safe
MATH_ENGINE_API math_engine_status_t math_engine_brep_serialized_size(
const math_engine_brep_view_t* brep,
size_t* out_bytes);
math_engine_brep_serialize
유효한 neutral B-rep을 MEBREP1 header와 raw public records로 직렬화한다.
- 매개변수
brep: 직렬화할 읽기 전용 B-rep view. - 매개변수
output: wire를 받을 caller-owned byte buffer. - 매개변수
output_bytes: output의 byte 용량. - 매개변수
out_written: 성공 시 기록한 byte 수를 받는 출력. 실패하면 보존된다. - 반환: 성공하면 OK, 작은 buffer면 INSUFFICIENT_BUFFER, overlap/검증 오류면 해당 status.
- Math Engine ownership:
brep=borrowed output=caller out_written=caller - Math Engine nullable:
brep=false output=false out_written=false - Math Engine thread_safety:
safe
@details output은 brep entity/relation 배열 및 out_written storage와 겹치면 안 된다. Wire의 integer와 record layout은 현재 host C ABI를 사용한다.
MATH_ENGINE_API math_engine_status_t math_engine_brep_serialize(
const math_engine_brep_view_t* brep,
void* output,
size_t output_bytes,
size_t* out_written);
math_engine_cad_backend_info_get
선택적 CAD backend의 build/runtime 가용성과 지원 operation을 조회한다.
- 매개변수
out_info: struct_size와 version을 미리 설정한 caller-owned 출력. - 반환: 성공하면 backend가 없어도 OK와 available=0, ABI 오류면 해당 status.
- Math Engine ownership:
out_info=caller - Math Engine nullable:
out_info=false - Math Engine thread_safety:
safe
@details 실패하면 out_info를 보존한다. Public C ABI에는 backend native type이 노출되지 않는다.
MATH_ENGINE_API math_engine_status_t math_engine_cad_backend_info_get(
math_engine_cad_backend_info_t* out_info);
math_engine_cad_shape_box_f64
두 대각 꼭짓점으로 axis-aligned solid box shape handle을 생성한다.
- 매개변수
minimum: caller-selected Cartesian frame/unit의 유한 최소 꼭짓점. - 매개변수
maximum: 각 축에서 minimum보다 큰 유한 최대 꼭짓점. - 매개변수
out_result: 새 adapter-owned shape handle과 topology count를 받는 초기화된 출력. - 반환: 성공하면 OK, backend가 없으면 UNSUPPORTED, 퇴화 box·backend 오류면 해당 status.
- Math Engine ownership:
minimum=borrowed maximum=borrowed out_result=caller - Math Engine nullable:
minimum=false maximum=false out_result=false - Math Engine thread_safety:
conditional
@details 성공한 result_shape는 math_engine_cad_shape_release()로 한 번 해제한다. 실패하면 out_result를 보존한다.
MATH_ENGINE_API math_engine_status_t math_engine_cad_shape_box_f64(
const math_engine_vec3_f64_t* minimum,
const math_engine_vec3_f64_t* maximum,
math_engine_cad_shape_result_t* out_result);
math_engine_cad_shape_import_utf8
NUL 종료 UTF-8 경로의 STEP 또는 IGES model을 새 shape handle로 가져온다.
- 매개변수
path: 읽을 비어 있지 않은 파일 경로. - 매개변수
format: STEP 또는 IGES. - 매개변수
out_result: 새 adapter-owned shape handle과 topology count를 받는 초기화된 출력. - 반환: 성공하면 OK, backend/format 미지원 또는 file/parse/backend 오류면 해당 status.
- Math Engine ownership:
path=borrowed out_result=caller - Math Engine nullable:
path=false out_result=false - Math Engine thread_safety:
conditional
@details 성공한 result_shape는 release로 해제한다. 실패하면 out_result를 보존한다.
MATH_ENGINE_API math_engine_status_t math_engine_cad_shape_import_utf8(
const char* path,
math_engine_cad_format_t format,
math_engine_cad_shape_result_t* out_result);
math_engine_cad_shape_export_utf8
기존 shape handle을 NUL 종료 UTF-8 경로의 STEP 또는 IGES 파일로 내보낸다.
- 매개변수
shape: 이 adapter가 발행하고 아직 해제하지 않은 borrowed handle. - 매개변수
path: 기록할 비어 있지 않은 파일 경로. - 매개변수
format: STEP 또는 IGES. - 반환: 성공하면 OK, stale handle·backend/format 미지원·writer 오류면 해당 status.
- Math Engine ownership:
shape=borrowed path=borrowed - Math Engine nullable:
shape=false path=false - Math Engine thread_safety:
conditional
@details 함수는 shape를 소비하지 않는다. 실패한 writer가 대상 파일을 생성하거나 부분 변경했을 수 있다.
MATH_ENGINE_API math_engine_status_t math_engine_cad_shape_export_utf8(
math_engine_geometry_handle_t shape,
const char* path,
math_engine_cad_format_t format);
math_engine_cad_shape_boolean
두 기존 shape의 union, intersection 또는 A-B difference를 새 handle로 계산한다.
- 매개변수
shape_a: 이 adapter가 발행한 첫 borrowed handle. - 매개변수
shape_b: 이 adapter가 발행한 둘째 borrowed handle. - 매개변수
operation: UNION, INTERSECTION 또는 DIFFERENCE. - 매개변수
out_result: 새 adapter-owned 결과 handle을 받는 초기화된 출력. - 반환: 성공하면 OK, stale handle·미지원 operation·미수렴·backend 오류면 해당 status.
- Math Engine ownership:
shape_a=borrowed shape_b=borrowed out_result=caller - Math Engine nullable:
shape_a=false shape_b=false out_result=false - Math Engine thread_safety:
conditional
@details 입력 handle은 소비되지 않는다. 성공한 result_shape는 별도로 release하며 실패하면 out_result를 보존한다.
MATH_ENGINE_API math_engine_status_t math_engine_cad_shape_boolean(
math_engine_geometry_handle_t shape_a,
math_engine_geometry_handle_t shape_b,
math_engine_cad_boolean_operation_t operation,
math_engine_cad_shape_result_t* out_result);
math_engine_cad_shape_heal
기존 shape에 양의 model-unit tolerance로 healing을 수행해 새 handle을 만든다.
- 매개변수
shape: 이 adapter가 발행한 borrowed input handle. - 매개변수
tolerance: caller model 좌표 단위의 유한한 양의 healing precision. - 매개변수
out_result: 새 adapter-owned healed handle을 받는 초기화된 출력. - 반환: 성공 또는 no-op이면 OK, stale handle·tolerance·backend 오류면 해당 status.
- Math Engine ownership:
shape=borrowed out_result=caller - Math Engine nullable:
shape=false out_result=false - Math Engine thread_safety:
conditional
@details 입력 shape는 소비되지 않는다. 성공한 result_shape는 별도로 release하며 실패하면 out_result를 보존한다.
MATH_ENGINE_API math_engine_status_t math_engine_cad_shape_heal(
math_engine_geometry_handle_t shape,
double tolerance,
math_engine_cad_shape_result_t* out_result);
math_engine_cad_shape_tessellate_f64
Shape를 linear/angular deflection으로 triangle soup에 tessellate한다.
- 매개변수
shape: 이 adapter가 발행한 borrowed handle. - 매개변수
linear_deflection: caller model 좌표 단위의 유한한 양의 chord deflection. - 매개변수
angular_deflection: radian 단위의 유한한 양의 angular deflection. - 매개변수
out_vertices: triangle마다 3개씩 중복된 vertex 출력. 두 capacity가 0인 질의에서는 NULL 가능하다. - 매개변수
vertex_capacity: out_vertices의 vector 항목 capacity. - 매개변수
out_triangle_indices: 각 triangle의 3개 index 출력. 질의에서는 NULL 가능하다. - 매개변수
triangle_capacity: 출력 가능한 triangle 수; index buffer는 3*triangle_capacity 항목이어야 한다. - 매개변수
out_result: 필요 capacity, topology 수와 error를 받는 초기화된 출력. - 반환: 성공/용량 질의면 OK, 작은 buffer면 INSUFFICIENT_BUFFER, backend 오류면 해당 status.
- Math Engine ownership:
shape=borrowed out_vertices=caller out_triangle_indices=caller out_result=caller - Math Engine nullable:
shape=false out_vertices=true out_triangle_indices=true out_result=false - Math Engine thread_safety:
conditional
@details 질의 모드는 두 pointer가 모두 NULL이고 두 capacity가 모두 0이어야 한다. 두 출력 배열과 out_result storage는 서로 겹치면 안 된다. 실패하면 out_result는 보존되지만 backend 실패 시 배열은 부분 변경될 수 있다.
MATH_ENGINE_API math_engine_status_t math_engine_cad_shape_tessellate_f64(
math_engine_geometry_handle_t shape,
double linear_deflection,
double angular_deflection,
math_engine_vec3_f64_t* out_vertices,
uint32_t vertex_capacity,
uint32_t* out_triangle_indices,
uint32_t triangle_capacity,
math_engine_cad_shape_result_t* out_result);
math_engine_cad_shape_release
Adapter-owned shape handle을 해제하고 즉시 stale 상태로 만든다.
- 매개변수
shape: 이 adapter가 발행하고 아직 해제하지 않은 owned handle. - 반환: 처음 해제하면 OK, 0·stale·foreign handle이면 INVALID_ARGUMENT, backend가 없으면 UNSUPPORTED.
- Math Engine ownership:
shape=caller - Math Engine nullable:
shape=false - Math Engine thread_safety:
conditional
@details 같은 handle의 다른 operation과 release를 동시에 호출하지 않는다.
MATH_ENGINE_API math_engine_status_t math_engine_cad_shape_release(
math_engine_geometry_handle_t shape);