OCCT-Light 0.1
C ABI and C++ veneer for multi-language CAD workflows
Loading...
Searching...
No Matches
occtl_prim_feature.h
Go to the documentation of this file.
1// Copyright (c) 2026 Capgemini Engineering Research and Development.
2//
3// This file is part of OCCT-Light software library.
4//
5// This library is free software; you can redistribute it and/or modify it under
6// the terms of the GNU Affero General Public License version 3 as published
7// by the Free Software Foundation, with an option to use any later version.
8// Consult the file LICENSE_AGPL_30.txt included in OCCT-Light distribution
9// for complete text of the license and disclaimer of any warranty.
10//
11// Alternatively, this file may be used under the terms of a commercial
12// license or contractual agreement.
13//
14// SPDX-License-Identifier: AGPL-3.0-or-later
15
21#ifndef OCCTL_PRIM_FEATURE_H
22#define OCCTL_PRIM_FEATURE_H
23
24#include "occtl_core.h"
25#include "occtl_curves2d.h"
26#include "occtl_geom.h"
27#include "occtl_surfaces.h"
28#include "occtl_topo.h"
29
30#ifdef __cplusplus
31extern "C"
32{
33#endif
34
35#define OCCTL_PRIM_FACE_FROM_SURFACE_OPTIONS_VERSION_1 1u
36
56
57#define OCCTL_PRIM_FACE_FROM_SURFACE_OPTIONS_INIT \
58 {OCCTL_PRIM_FACE_FROM_SURFACE_OPTIONS_VERSION_1, \
59 NULL, \
60 OCCTL_REP_ID_INVALID, \
61 OCCTL_NODE_ID_INVALID, \
62 NULL, \
63 0, \
64 1.0e-6}
65
78OCCTL_API void OCCTL_CALL
80
107OCCTL_API occtl_status_t OCCTL_CALL
110 occtl_node_id_t* out_face);
111
112#define OCCTL_PRIM_FACE_FROM_POINT_GRID_OPTIONS_VERSION_1 1u
113
128
129#define OCCTL_PRIM_FACE_FROM_POINT_GRID_OPTIONS_INIT \
130 {OCCTL_PRIM_FACE_FROM_POINT_GRID_OPTIONS_VERSION_1, \
131 NULL, \
132 OCCTL_SURFACE_POINT_GRID_CREATE_INFO_INIT, \
133 1.0e-6}
134
147OCCTL_API void OCCTL_CALL
149
177OCCTL_API occtl_status_t OCCTL_CALL
180 occtl_node_id_t* out_face);
181
182#define OCCTL_PRIM_FACE_FROM_BOUNDARY_CURVES_OPTIONS_VERSION_1 1u
183
198
199#define OCCTL_PRIM_FACE_FROM_BOUNDARY_CURVES_OPTIONS_INIT \
200 {OCCTL_PRIM_FACE_FROM_BOUNDARY_CURVES_OPTIONS_VERSION_1, \
201 NULL, \
202 OCCTL_SURFACE_BOUNDARY_CURVES_CREATE_INFO_INIT, \
203 1.0e-6}
204
219
247 occtl_graph_t* graph,
249 occtl_node_id_t* out_face);
250
251#define OCCTL_PRIM_FACE_FROM_CURVE_GRID_OPTIONS_VERSION_1 1u
252
266
267#define OCCTL_PRIM_FACE_FROM_CURVE_GRID_OPTIONS_INIT \
268 {OCCTL_PRIM_FACE_FROM_CURVE_GRID_OPTIONS_VERSION_1, \
269 NULL, \
270 OCCTL_SURFACE_CURVE_GRID_CREATE_INFO_INIT, \
271 1.0e-6}
272
285OCCTL_API void OCCTL_CALL
287
314OCCTL_API occtl_status_t OCCTL_CALL
317 occtl_node_id_t* out_face);
318
319#define OCCTL_PRIM_BRAKE_FORMED_OPTIONS_VERSION_1 1u
320
325{
328 OCCTL_PRIM_BRAKE_SIDE_RESERVED_FUTURE = 0x7fffffff
330
351
352#define OCCTL_PRIM_BRAKE_FORMED_OPTIONS_INIT \
353 {OCCTL_PRIM_BRAKE_FORMED_OPTIONS_VERSION_1, \
354 NULL, \
355 OCCTL_NODE_ID_INVALID, \
356 1.0, \
357 NULL, \
358 0, \
359 OCCTL_PRIM_BRAKE_SIDE_LEFT, \
360 OCCTL_TOPO_WIRE_OFFSET_2D_JOIN_ARC, \
361 0, \
362 1.0e-6}
363
376OCCTL_API void OCCTL_CALL
378
407OCCTL_API occtl_status_t OCCTL_CALL
410 occtl_graph_t** out_graph,
411 occtl_node_id_t* out_root);
412
413#define OCCTL_PRIM_DRAFT_PRISM_INFO_VERSION_1 1u
414
430
431#define OCCTL_PRIM_DRAFT_PRISM_INFO_INIT \
432 {OCCTL_PRIM_DRAFT_PRISM_INFO_VERSION_1, NULL, OCCTL_NODE_ID_INVALID, 1.0, 0.0}
433
446
474OCCTL_API occtl_status_t OCCTL_CALL
477 occtl_node_id_t* out_shape);
478
479#define OCCTL_PRIM_EXTRUDE_TAPERED_INFO_VERSION_1 1u
480
495
496#define OCCTL_PRIM_EXTRUDE_TAPERED_INFO_INIT \
497 {OCCTL_PRIM_EXTRUDE_TAPERED_INFO_VERSION_1, NULL, OCCTL_NODE_ID_INVALID, 1.0, 0.0}
498
510OCCTL_API void OCCTL_CALL
512
537OCCTL_API occtl_status_t OCCTL_CALL
540 occtl_node_id_t* out_shape);
541
542#define OCCTL_PRIM_RULED_SURFACE_INFO_VERSION_1 1u
543
558
559#define OCCTL_PRIM_RULED_SURFACE_INFO_INIT \
560 {OCCTL_PRIM_RULED_SURFACE_INFO_VERSION_1, NULL, OCCTL_NODE_ID_INVALID, OCCTL_NODE_ID_INVALID}
561
574
603OCCTL_API occtl_status_t OCCTL_CALL
606 occtl_node_id_t* out_shape);
607
622
629{
633 OCCTL_FEAT_COMBINE_RESERVED_FUTURE = 0x7fffffff
635
636#define OCCTL_PRIM_FEAT_PRISM_INFO_VERSION_1 1u
637
659
660#define OCCTL_PRIM_FEAT_PRISM_INFO_INIT \
661 {OCCTL_PRIM_FEAT_PRISM_INFO_VERSION_1, \
662 NULL, \
663 OCCTL_NODE_ID_INVALID, \
664 OCCTL_NODE_ID_INVALID, \
665 OCCTL_NODE_ID_INVALID, \
666 {0.0, 0.0, 1.0}, \
667 OCCTL_FEAT_FUSE, \
668 1, \
669 OCCTL_UNTIL_LENGTH, \
670 OCCTL_NODE_ID_INVALID, \
671 0.0}
672
685
711OCCTL_API occtl_status_t OCCTL_CALL
714 occtl_node_id_t* out_shape);
715
727
728#define OCCTL_PRIM_EXTRUDE_UNTIL_INFO_VERSION_1 1u
729
751
752#define OCCTL_PRIM_EXTRUDE_UNTIL_INFO_INIT \
753 {OCCTL_PRIM_EXTRUDE_UNTIL_INFO_VERSION_1, \
754 NULL, \
755 OCCTL_NODE_ID_INVALID, \
756 OCCTL_NODE_ID_INVALID, \
757 OCCTL_NODE_ID_INVALID, \
758 OCCTL_NODE_ID_INVALID, \
759 {0.0, 0.0, 1.0}, \
760 OCCTL_EXTRUDE_UNTIL_NEXT, \
761 OCCTL_FEAT_FUSE, \
762 1, \
763 0.0}
764
777
802OCCTL_API occtl_status_t OCCTL_CALL
805 occtl_node_id_t* out_shape);
806
807#define OCCTL_PRIM_FEAT_DRAFT_PRISM_INFO_VERSION_1 1u
808
831
832#define OCCTL_PRIM_FEAT_DRAFT_PRISM_INFO_INIT \
833 {OCCTL_PRIM_FEAT_DRAFT_PRISM_INFO_VERSION_1, \
834 NULL, \
835 OCCTL_NODE_ID_INVALID, \
836 OCCTL_NODE_ID_INVALID, \
837 OCCTL_NODE_ID_INVALID, \
838 0.0, \
839 OCCTL_FEAT_FUSE, \
840 1, \
841 OCCTL_UNTIL_LENGTH, \
842 OCCTL_NODE_ID_INVALID, \
843 0.0}
844
856OCCTL_API void OCCTL_CALL
858
887OCCTL_API occtl_status_t OCCTL_CALL
890 occtl_node_id_t* out_shape);
891
909
910#define OCCTL_PRIM_CYLINDRICAL_HOLE_INFO_VERSION_1 1u
911
933
934#define OCCTL_PRIM_CYLINDRICAL_HOLE_INFO_INIT \
935 {OCCTL_PRIM_CYLINDRICAL_HOLE_INFO_VERSION_1, \
936 NULL, \
937 OCCTL_NODE_ID_INVALID, \
938 {{0.0, 0.0, 0.0}, {0.0, 0.0, 1.0}}, \
939 0.0, \
940 OCCTL_CYLINDRICAL_HOLE_THROUGH_ALL, \
941 0.0, \
942 0.0, \
943 0.0, \
944 1}
945
957OCCTL_API void OCCTL_CALL
959
988OCCTL_API occtl_status_t OCCTL_CALL
991 occtl_node_id_t* out_shape);
992
993#ifdef __cplusplus
994}
995#endif
996
997#endif /* OCCTL_PRIM_FEATURE_H */
OCCT-Light: core public API.
#define OCCTL_API
Definition occtl_core.h:111
enum occtl_status occtl_status_t
OCCT-Light: 2D curve (pcurve) API on BRepGraph.
OCCT-Light: geometry primitive types and math utilities.
enum occtl_prim_until_kind occtl_prim_until_kind_t
enum occtl_prim_brake_side occtl_prim_brake_side_t
occtl_status_t occtl_prim_make_extrude_tapered(occtl_graph_t *graph, const occtl_prim_extrude_tapered_info_t *info, occtl_node_id_t *out_shape)
void occtl_prim_feat_prism_info_init(occtl_prim_feat_prism_info_t *info)
struct occtl_prim_draft_prism_info occtl_prim_draft_prism_info_t
struct occtl_prim_face_from_boundary_curves_options occtl_prim_face_from_boundary_curves_options_t
struct occtl_prim_cylindrical_hole_info occtl_prim_cylindrical_hole_info_t
void occtl_prim_face_from_surface_options_init(occtl_prim_face_from_surface_options_t *options)
struct occtl_prim_feat_prism_info occtl_prim_feat_prism_info_t
occtl_status_t occtl_prim_make_face_from_curve_grid(occtl_graph_t *graph, const occtl_prim_face_from_curve_grid_options_t *options, occtl_node_id_t *out_face)
void occtl_prim_face_from_curve_grid_options_init(occtl_prim_face_from_curve_grid_options_t *options)
occtl_status_t occtl_prim_make_draft_prism(occtl_graph_t *graph, const occtl_prim_draft_prism_info_t *info, occtl_node_id_t *out_shape)
void occtl_prim_face_from_point_grid_options_init(occtl_prim_face_from_point_grid_options_t *options)
void occtl_prim_cylindrical_hole_info_init(occtl_prim_cylindrical_hole_info_t *info)
occtl_status_t occtl_prim_make_face_from_surface(occtl_graph_t *graph, const occtl_prim_face_from_surface_options_t *options, occtl_node_id_t *out_face)
void occtl_prim_draft_prism_info_init(occtl_prim_draft_prism_info_t *info)
void occtl_prim_face_from_boundary_curves_options_init(occtl_prim_face_from_boundary_curves_options_t *options)
occtl_status_t occtl_prim_make_feat_prism(occtl_graph_t *graph, const occtl_prim_feat_prism_info_t *info, occtl_node_id_t *out_shape)
occtl_status_t occtl_prim_make_ruled_surface(occtl_graph_t *graph, const occtl_prim_ruled_surface_info_t *info, occtl_node_id_t *out_shape)
occtl_status_t occtl_prim_make_brake_formed(const occtl_graph_t *graph, const occtl_prim_brake_formed_options_t *options, occtl_graph_t **out_graph, occtl_node_id_t *out_root)
occtl_prim_extrude_until_side
Definition occtl_prim_feature.h:720
@ OCCTL_EXTRUDE_UNTIL_LAST
Definition occtl_prim_feature.h:722
@ OCCTL_EXTRUDE_UNTIL_PREVIOUS
Definition occtl_prim_feature.h:723
@ OCCTL_EXTRUDE_UNTIL_FIRST
Definition occtl_prim_feature.h:724
@ OCCTL_EXTRUDE_UNTIL_NEXT
Definition occtl_prim_feature.h:721
enum occtl_prim_feat_combine occtl_prim_feat_combine_t
occtl_status_t occtl_prim_make_feat_draft_prism(occtl_graph_t *graph, const occtl_prim_feat_draft_prism_info_t *info, occtl_node_id_t *out_shape)
void occtl_prim_ruled_surface_info_init(occtl_prim_ruled_surface_info_t *info)
void occtl_prim_brake_formed_options_init(occtl_prim_brake_formed_options_t *opts)
struct occtl_prim_extrude_until_info occtl_prim_extrude_until_info_t
struct occtl_prim_face_from_point_grid_options occtl_prim_face_from_point_grid_options_t
enum occtl_prim_cylindrical_hole_kind occtl_prim_cylindrical_hole_kind_t
struct occtl_prim_feat_draft_prism_info occtl_prim_feat_draft_prism_info_t
void occtl_prim_feat_draft_prism_info_init(occtl_prim_feat_draft_prism_info_t *info)
struct occtl_prim_extrude_tapered_info occtl_prim_extrude_tapered_info_t
struct occtl_prim_brake_formed_options occtl_prim_brake_formed_options_t
struct occtl_prim_face_from_curve_grid_options occtl_prim_face_from_curve_grid_options_t
enum occtl_prim_extrude_until_side occtl_prim_extrude_until_side_t
struct occtl_prim_ruled_surface_info occtl_prim_ruled_surface_info_t
occtl_prim_until_kind
Definition occtl_prim_feature.h:615
@ OCCTL_UNTIL_SHAPE
Definition occtl_prim_feature.h:617
@ OCCTL_UNTIL_LENGTH
Definition occtl_prim_feature.h:616
@ OCCTL_UNTIL_THRU_ALL
Definition occtl_prim_feature.h:618
@ OCCTL_UNTIL_HEIGHT
Definition occtl_prim_feature.h:619
occtl_status_t occtl_prim_make_cylindrical_hole(occtl_graph_t *graph, const occtl_prim_cylindrical_hole_info_t *info, occtl_node_id_t *out_shape)
occtl_status_t occtl_prim_make_face_from_boundary_curves(occtl_graph_t *graph, const occtl_prim_face_from_boundary_curves_options_t *options, occtl_node_id_t *out_face)
occtl_prim_feat_combine
Definition occtl_prim_feature.h:629
@ OCCTL_FEAT_SEPARATE
Definition occtl_prim_feature.h:630
@ OCCTL_FEAT_FUSE
Definition occtl_prim_feature.h:632
@ OCCTL_FEAT_CUT
Definition occtl_prim_feature.h:631
occtl_status_t occtl_prim_make_extrude_until(occtl_graph_t *graph, const occtl_prim_extrude_until_info_t *info, occtl_node_id_t *out_shape)
occtl_status_t occtl_prim_make_face_from_point_grid(occtl_graph_t *graph, const occtl_prim_face_from_point_grid_options_t *options, occtl_node_id_t *out_face)
occtl_prim_brake_side
Definition occtl_prim_feature.h:325
@ OCCTL_PRIM_BRAKE_SIDE_LEFT
Definition occtl_prim_feature.h:326
@ OCCTL_PRIM_BRAKE_SIDE_RIGHT
Definition occtl_prim_feature.h:327
void occtl_prim_extrude_tapered_info_init(occtl_prim_extrude_tapered_info_t *info)
void occtl_prim_extrude_until_info_init(occtl_prim_extrude_until_info_t *info)
struct occtl_prim_face_from_surface_options occtl_prim_face_from_surface_options_t
occtl_prim_cylindrical_hole_kind
Definition occtl_prim_feature.h:899
@ OCCTL_CYLINDRICAL_HOLE_BETWEEN_PARAMS
Definition occtl_prim_feature.h:902
@ OCCTL_CYLINDRICAL_HOLE_BLIND
Definition occtl_prim_feature.h:906
@ OCCTL_CYLINDRICAL_HOLE_THRU_NEXT
Definition occtl_prim_feature.h:904
@ OCCTL_CYLINDRICAL_HOLE_UNTIL_END
Definition occtl_prim_feature.h:905
@ OCCTL_CYLINDRICAL_HOLE_THROUGH_ALL
Definition occtl_prim_feature.h:900
OCCT-Light: surface geometry via graph + rep_id.
OCCT-Light: topology module public API.
enum occtl_topo_wire_offset_2d_join occtl_topo_wire_offset_2d_join_t
struct occtl_graph occtl_graph_t
Definition occtl_topo_types.h:152
Definition occtl_geom.h:111
Definition occtl_geom.h:98
Definition occtl_topo_types.h:50
Definition occtl_prim_feature.h:339
double thickness
Definition occtl_prim_feature.h:343
const void * p_next
Definition occtl_prim_feature.h:341
size_t station_width_count
Definition occtl_prim_feature.h:345
const double * station_widths
Definition occtl_prim_feature.h:344
occtl_topo_wire_offset_2d_join_t join
Definition occtl_prim_feature.h:347
occtl_node_id_t line
Definition occtl_prim_feature.h:342
uint32_t struct_version
Definition occtl_prim_feature.h:340
occtl_prim_brake_side_t side
Definition occtl_prim_feature.h:346
double tolerance
Definition occtl_prim_feature.h:349
int32_t approximate
Definition occtl_prim_feature.h:348
Definition occtl_prim_feature.h:921
uint32_t struct_version
Definition occtl_prim_feature.h:922
double p_to
Definition occtl_prim_feature.h:929
const void * p_next
Definition occtl_prim_feature.h:923
occtl_prim_cylindrical_hole_kind_t kind
Definition occtl_prim_feature.h:927
int32_t with_control
Definition occtl_prim_feature.h:931
occtl_node_id_t base_shape
Definition occtl_prim_feature.h:924
occtl_axis1_placement_t axis
Definition occtl_prim_feature.h:925
double length
Definition occtl_prim_feature.h:930
double radius
Definition occtl_prim_feature.h:926
double p_from
Definition occtl_prim_feature.h:928
Definition occtl_prim_feature.h:423
uint32_t struct_version
Definition occtl_prim_feature.h:424
occtl_node_id_t profile
Definition occtl_prim_feature.h:426
const void * p_next
Definition occtl_prim_feature.h:425
double taper_angle
Definition occtl_prim_feature.h:428
double height
Definition occtl_prim_feature.h:427
Definition occtl_prim_feature.h:488
double taper_angle
Definition occtl_prim_feature.h:493
uint32_t struct_version
Definition occtl_prim_feature.h:489
double height
Definition occtl_prim_feature.h:492
const void * p_next
Definition occtl_prim_feature.h:490
occtl_node_id_t profile_face
Definition occtl_prim_feature.h:491
Definition occtl_prim_feature.h:738
int32_t modify
Definition occtl_prim_feature.h:748
occtl_direction3_t direction
Definition occtl_prim_feature.h:745
occtl_node_id_t target_shape
Definition occtl_prim_feature.h:744
occtl_node_id_t sketch_face
Definition occtl_prim_feature.h:743
occtl_prim_extrude_until_side_t side
Definition occtl_prim_feature.h:746
double limit
Definition occtl_prim_feature.h:749
uint32_t struct_version
Definition occtl_prim_feature.h:739
occtl_prim_feat_combine_t combine
Definition occtl_prim_feature.h:747
occtl_node_id_t base_shape
Definition occtl_prim_feature.h:741
const void * p_next
Definition occtl_prim_feature.h:740
occtl_node_id_t profile
Definition occtl_prim_feature.h:742
Definition occtl_prim_feature.h:191
uint32_t struct_version
Definition occtl_prim_feature.h:192
const void * p_next
Definition occtl_prim_feature.h:193
double tolerance
Definition occtl_prim_feature.h:196
occtl_surface_boundary_curves_create_info_t surface
Definition occtl_prim_feature.h:195
Definition occtl_prim_feature.h:260
double tolerance
Definition occtl_prim_feature.h:264
const void * p_next
Definition occtl_prim_feature.h:262
occtl_surface_curve_grid_create_info_t surface
Definition occtl_prim_feature.h:263
uint32_t struct_version
Definition occtl_prim_feature.h:261
Definition occtl_prim_feature.h:122
occtl_surface_point_grid_create_info_t surface
Definition occtl_prim_feature.h:125
double tolerance
Definition occtl_prim_feature.h:126
uint32_t struct_version
Definition occtl_prim_feature.h:123
const void * p_next
Definition occtl_prim_feature.h:124
Definition occtl_prim_feature.h:46
double tolerance
Definition occtl_prim_feature.h:54
const void * p_next
Definition occtl_prim_feature.h:48
size_t inner_wire_count
Definition occtl_prim_feature.h:53
const occtl_node_id_t * inner_wires
Definition occtl_prim_feature.h:52
occtl_node_id_t outer_wire
Definition occtl_prim_feature.h:51
occtl_rep_id_t surface_id
Definition occtl_prim_feature.h:49
uint32_t struct_version
Definition occtl_prim_feature.h:47
Definition occtl_prim_feature.h:818
occtl_node_id_t profile_face
Definition occtl_prim_feature.h:822
double length
Definition occtl_prim_feature.h:829
occtl_node_id_t base_shape
Definition occtl_prim_feature.h:821
int32_t modify
Definition occtl_prim_feature.h:826
uint32_t struct_version
Definition occtl_prim_feature.h:819
occtl_prim_feat_combine_t combine
Definition occtl_prim_feature.h:825
const void * p_next
Definition occtl_prim_feature.h:820
occtl_prim_until_kind_t until_kind
Definition occtl_prim_feature.h:827
double taper_angle
Definition occtl_prim_feature.h:824
occtl_node_id_t sketch_face
Definition occtl_prim_feature.h:823
occtl_node_id_t until_shape
Definition occtl_prim_feature.h:828
Definition occtl_prim_feature.h:646
occtl_node_id_t base_shape
Definition occtl_prim_feature.h:649
occtl_direction3_t direction
Definition occtl_prim_feature.h:652
occtl_prim_until_kind_t until_kind
Definition occtl_prim_feature.h:655
occtl_node_id_t until_shape
Definition occtl_prim_feature.h:656
double length
Definition occtl_prim_feature.h:657
occtl_node_id_t sketch_face
Definition occtl_prim_feature.h:651
occtl_prim_feat_combine_t combine
Definition occtl_prim_feature.h:653
occtl_node_id_t profile
Definition occtl_prim_feature.h:650
uint32_t struct_version
Definition occtl_prim_feature.h:647
const void * p_next
Definition occtl_prim_feature.h:648
int32_t modify
Definition occtl_prim_feature.h:654
Definition occtl_prim_feature.h:552
const void * p_next
Definition occtl_prim_feature.h:554
occtl_node_id_t section_a
Definition occtl_prim_feature.h:555
occtl_node_id_t section_b
Definition occtl_prim_feature.h:556
uint32_t struct_version
Definition occtl_prim_feature.h:553
Definition occtl_core.h:251
Definition occtl_surfaces.h:1987
Definition occtl_surfaces.h:2119
Definition occtl_surfaces.h:1898