opencascade_sys/
lib.rs

1#[cxx::bridge]
2pub mod ffi {
3    #[repr(u32)]
4    #[derive(Debug)]
5    pub enum TopAbs_ShapeEnum {
6        TopAbs_COMPOUND,
7        TopAbs_COMPSOLID,
8        TopAbs_SOLID,
9        TopAbs_SHELL,
10        TopAbs_FACE,
11        TopAbs_WIRE,
12        TopAbs_EDGE,
13        TopAbs_VERTEX,
14        TopAbs_SHAPE,
15    }
16
17    #[repr(u32)]
18    pub enum TopAbs_Orientation {
19        TopAbs_FORWARD,
20        TopAbs_REVERSED,
21        TopAbs_INTERNAL,
22        TopAbs_EXTERNAL,
23    }
24
25    #[derive(Debug)]
26    #[repr(u32)]
27    pub enum IFSelect_ReturnStatus {
28        IFSelect_RetVoid,
29        IFSelect_RetDone,
30        IFSelect_RetError,
31        IFSelect_RetFail,
32        IFSelect_RetStop,
33    }
34
35    #[derive(Debug)]
36    #[repr(u32)]
37    pub enum BOPAlgo_GlueEnum {
38        BOPAlgo_GlueOff,
39        BOPAlgo_GlueShift,
40        BOPAlgo_GlueFull,
41    }
42
43    unsafe extern "C++" {
44        // https://github.com/dtolnay/cxx/issues/280
45
46        // OCCT Includes
47        include!("opencascade-sys/include/wrapper.hxx");
48
49        // Runtime
50        type Message_ProgressRange;
51
52        #[cxx_name = "construct_unique"]
53        pub fn Message_ProgressRange_ctor() -> UniquePtr<Message_ProgressRange>;
54
55        // Handles
56        type HandleStandardType;
57        type HandleGeomCurve;
58        type HandleGeomTrimmedCurve;
59        type HandleGeomSurface;
60        type HandleGeomBezierSurface;
61        type HandleGeomPlane;
62        type HandleGeom2d_Curve;
63        type HandleGeom2d_Ellipse;
64        type HandleGeom2d_TrimmedCurve;
65        type HandleGeom_CylindricalSurface;
66
67        pub fn DynamicType(surface: &HandleGeomSurface) -> &HandleStandardType;
68        pub fn type_name(handle: &HandleStandardType) -> String;
69
70        #[cxx_name = "construct_unique"]
71        pub fn new_HandleGeomCurve_from_HandleGeom_TrimmedCurve(
72            trimmed_curve_handle: &HandleGeomTrimmedCurve,
73        ) -> UniquePtr<HandleGeomCurve>;
74
75        pub fn new_HandleGeomPlane_from_HandleGeomSurface(
76            geom_surface_handle: &HandleGeomSurface,
77        ) -> UniquePtr<HandleGeomPlane>;
78
79        pub fn IsNull(self: &HandleStandardType) -> bool;
80        pub fn IsNull(self: &HandleGeomCurve) -> bool;
81        pub fn IsNull(self: &HandleGeomTrimmedCurve) -> bool;
82        pub fn IsNull(self: &HandleGeomSurface) -> bool;
83        pub fn IsNull(self: &HandleGeomBezierSurface) -> bool;
84        pub fn IsNull(self: &HandleGeomPlane) -> bool;
85        pub fn IsNull(self: &HandleGeom2d_Curve) -> bool;
86        pub fn IsNull(self: &HandleGeom2d_Ellipse) -> bool;
87        pub fn IsNull(self: &HandleGeom2d_TrimmedCurve) -> bool;
88        pub fn IsNull(self: &HandleGeom_CylindricalSurface) -> bool;
89
90        pub fn HandleGeomCurve_Value(curve: &HandleGeomCurve, u: f64) -> UniquePtr<gp_Pnt>;
91
92        // Collections
93        type TopTools_ListOfShape;
94
95        #[cxx_name = "construct_unique"]
96        pub fn new_list_of_shape() -> UniquePtr<TopTools_ListOfShape>;
97        pub fn shape_list_append_face(list: Pin<&mut TopTools_ListOfShape>, face: &TopoDS_Face);
98        pub fn Size(self: &TopTools_ListOfShape) -> i32;
99
100        #[cxx_name = "list_to_vector"]
101        pub fn shape_list_to_vector(
102            list: &TopTools_ListOfShape,
103        ) -> UniquePtr<CxxVector<TopoDS_Shape>>;
104
105        type TopTools_IndexedMapOfShape;
106
107        #[cxx_name = "construct_unique"]
108        pub fn new_indexed_map_of_shape() -> UniquePtr<TopTools_IndexedMapOfShape>;
109        pub fn Extent(self: &TopTools_IndexedMapOfShape) -> i32;
110        pub fn FindKey(self: &TopTools_IndexedMapOfShape, index: i32) -> &TopoDS_Shape;
111
112        pub fn map_shapes(
113            shape: &TopoDS_Shape,
114            shape_type: TopAbs_ShapeEnum,
115            shape_map: Pin<&mut TopTools_IndexedMapOfShape>,
116        );
117
118        type TopTools_IndexedDataMapOfShapeListOfShape;
119
120        #[cxx_name = "construct_unique"]
121        pub fn new_indexed_data_map_of_shape_list_of_shape(
122        ) -> UniquePtr<TopTools_IndexedDataMapOfShapeListOfShape>;
123        pub fn Extent(self: &TopTools_IndexedDataMapOfShapeListOfShape) -> i32;
124        pub fn FindKey(
125            self: &TopTools_IndexedDataMapOfShapeListOfShape,
126            index: i32,
127        ) -> &TopoDS_Shape;
128        pub fn FindFromIndex(
129            self: &TopTools_IndexedDataMapOfShapeListOfShape,
130            index: i32,
131        ) -> &TopTools_ListOfShape;
132        pub fn FindIndex(
133            self: &TopTools_IndexedDataMapOfShapeListOfShape,
134            shape: &TopoDS_Shape,
135        ) -> i32;
136        pub fn FindFromKey<'a>(
137            self: &'a TopTools_IndexedDataMapOfShapeListOfShape,
138            shape: &'a TopoDS_Shape,
139        ) -> &'a TopTools_ListOfShape;
140
141        pub fn map_shapes_and_ancestors(
142            shape: &TopoDS_Shape,
143            parent_type: TopAbs_ShapeEnum,
144            child_type: TopAbs_ShapeEnum,
145            shape_data_map: Pin<&mut TopTools_IndexedDataMapOfShapeListOfShape>,
146        );
147        pub fn map_shapes_and_unique_ancestors(
148            shape: &TopoDS_Shape,
149            parent_type: TopAbs_ShapeEnum,
150            child_type: TopAbs_ShapeEnum,
151            shape_data_map: Pin<&mut TopTools_IndexedDataMapOfShapeListOfShape>,
152        );
153
154        type TColgp_Array1OfDir;
155        #[cxx_name = "construct_unique"]
156        pub fn TColgp_Array1OfDir_ctor(
157            lower_bound: i32,
158            upper_bound: i32,
159        ) -> UniquePtr<TColgp_Array1OfDir>;
160        pub fn Length(self: &TColgp_Array1OfDir) -> i32;
161        pub fn TColgp_Array1OfDir_Value(
162            array: &TColgp_Array1OfDir,
163            index: i32,
164        ) -> UniquePtr<gp_Dir>;
165
166        type TColgp_Array2OfPnt;
167        #[cxx_name = "construct_unique"]
168        pub fn TColgp_Array2OfPnt_ctor(
169            row_lower: i32,
170            row_upper: i32,
171            column_lower: i32,
172            column_upper: i32,
173        ) -> UniquePtr<TColgp_Array2OfPnt>;
174        pub fn SetValue(self: Pin<&mut TColgp_Array2OfPnt>, row: i32, column: i32, item: &gp_Pnt);
175
176        // Geometry
177        type Geom_TrimmedCurve;
178        type Geom_CylindricalSurface;
179        type Geom_BezierSurface;
180        type Geom2d_Ellipse;
181        type Geom2d_Curve;
182        type Geom2d_TrimmedCurve;
183
184        pub fn handle_geom_plane_location(plane: &HandleGeomPlane) -> &gp_Pnt;
185
186        pub fn Geom_CylindricalSurface_ctor(
187            axis: &gp_Ax3,
188            radius: f64,
189        ) -> UniquePtr<HandleGeom_CylindricalSurface>;
190        pub fn cylinder_to_surface(
191            cylinder_handle: &HandleGeom_CylindricalSurface,
192        ) -> UniquePtr<HandleGeomSurface>;
193
194        pub fn Geom_BezierSurface_ctor(
195            poles: &TColgp_Array2OfPnt,
196        ) -> UniquePtr<HandleGeomBezierSurface>;
197        pub fn bezier_to_surface(
198            bezier_handle: &HandleGeomBezierSurface,
199        ) -> UniquePtr<HandleGeomSurface>;
200
201        pub fn Geom2d_Ellipse_ctor(
202            axis: &gp_Ax2d,
203            major_radius: f64,
204            minor_radius: f64,
205        ) -> UniquePtr<HandleGeom2d_Ellipse>;
206        pub fn ellipse_to_HandleGeom2d_Curve(
207            ellipse: &HandleGeom2d_Ellipse,
208        ) -> UniquePtr<HandleGeom2d_Curve>;
209        pub fn Geom2d_TrimmedCurve_ctor(
210            curve_handle: &HandleGeom2d_Curve,
211            u1: f64,
212            u2: f64,
213        ) -> UniquePtr<HandleGeom2d_TrimmedCurve>;
214        pub fn HandleGeom2d_TrimmedCurve_to_curve(
215            trimmed_curve: &HandleGeom2d_TrimmedCurve,
216        ) -> UniquePtr<HandleGeom2d_Curve>;
217
218        pub fn ellipse_value(ellipse: &HandleGeom2d_Ellipse, u: f64) -> UniquePtr<gp_Pnt2d>;
219
220        // Points
221        type gp_Pnt;
222        type gp_Pnt2d;
223
224        #[cxx_name = "construct_unique"]
225        pub fn new_point(x: f64, y: f64, z: f64) -> UniquePtr<gp_Pnt>;
226
227        pub fn X(self: &gp_Pnt) -> f64;
228        pub fn Y(self: &gp_Pnt) -> f64;
229        pub fn Z(self: &gp_Pnt) -> f64;
230        pub fn Distance(self: &gp_Pnt, other: &gp_Pnt) -> f64;
231        pub fn Transform(self: Pin<&mut gp_Pnt>, transform: &gp_Trsf);
232
233        #[cxx_name = "construct_unique"]
234        pub fn new_point_2d(x: f64, y: f64) -> UniquePtr<gp_Pnt2d>;
235
236        pub fn X(self: &gp_Pnt2d) -> f64;
237        pub fn Y(self: &gp_Pnt2d) -> f64;
238        pub fn Distance(self: &gp_Pnt2d, other: &gp_Pnt2d) -> f64;
239
240        type gp_Vec;
241
242        #[cxx_name = "construct_unique"]
243        pub fn new_vec(x: f64, y: f64, z: f64) -> UniquePtr<gp_Vec>;
244
245        pub fn X(self: &gp_Vec) -> f64;
246        pub fn Y(self: &gp_Vec) -> f64;
247        pub fn Z(self: &gp_Vec) -> f64;
248
249        // Segments
250        type GC_MakeSegment;
251        type GCE2d_MakeSegment;
252
253        #[cxx_name = "construct_unique"]
254        pub fn GC_MakeSegment_point_point(p1: &gp_Pnt, p2: &gp_Pnt) -> UniquePtr<GC_MakeSegment>;
255
256        pub fn GC_MakeSegment_Value(arc: &GC_MakeSegment) -> UniquePtr<HandleGeomTrimmedCurve>;
257        pub fn GCE2d_MakeSegment_point_point(
258            p1: &gp_Pnt2d,
259            p2: &gp_Pnt2d,
260        ) -> UniquePtr<HandleGeom2d_TrimmedCurve>;
261
262        // Lines
263        type gp_Lin;
264
265        #[cxx_name = "construct_unique"]
266        pub fn gp_Lin_ctor(point: &gp_Pnt, dir: &gp_Dir) -> UniquePtr<gp_Lin>;
267
268        // Arcs
269        type GC_MakeArcOfCircle;
270
271        #[cxx_name = "construct_unique"]
272        pub fn GC_MakeArcOfCircle_point_point_point(
273            p1: &gp_Pnt,
274            p2: &gp_Pnt,
275            p3: &gp_Pnt,
276        ) -> UniquePtr<GC_MakeArcOfCircle>;
277
278        pub fn GC_MakeArcOfCircle_Value(
279            arc: &GC_MakeArcOfCircle,
280        ) -> UniquePtr<HandleGeomTrimmedCurve>;
281
282        // Circles
283        type gp_Circ;
284
285        #[cxx_name = "construct_unique"]
286        pub fn gp_Circ_ctor(axis: &gp_Ax2, radius: f64) -> UniquePtr<gp_Circ>;
287
288        // Shapes
289        type TopoDS_Vertex;
290        type TopoDS_Edge;
291        type TopoDS_Wire;
292        type TopoDS_Face;
293        type TopoDS_Shell;
294        type TopoDS_Solid;
295        type TopoDS_Shape;
296
297        #[cxx_name = "construct_unique"]
298        pub fn TopoDS_Face_ctor() -> UniquePtr<TopoDS_Face>;
299
300        pub fn cast_vertex_to_shape(wire: &TopoDS_Vertex) -> &TopoDS_Shape;
301        pub fn cast_edge_to_shape(wire: &TopoDS_Edge) -> &TopoDS_Shape;
302        pub fn cast_wire_to_shape(wire: &TopoDS_Wire) -> &TopoDS_Shape;
303        pub fn cast_face_to_shape(wire: &TopoDS_Face) -> &TopoDS_Shape;
304        pub fn cast_solid_to_shape(wire: &TopoDS_Solid) -> &TopoDS_Shape;
305        pub fn cast_compound_to_shape(wire: &TopoDS_Compound) -> &TopoDS_Shape;
306
307        pub fn TopoDS_cast_to_vertex(shape: &TopoDS_Shape) -> &TopoDS_Vertex;
308        pub fn TopoDS_cast_to_wire(shape: &TopoDS_Shape) -> &TopoDS_Wire;
309        pub fn TopoDS_cast_to_edge(shape: &TopoDS_Shape) -> &TopoDS_Edge;
310        pub fn TopoDS_cast_to_face(shape: &TopoDS_Shape) -> &TopoDS_Face;
311        pub fn TopoDS_cast_to_solid(shape: &TopoDS_Shape) -> &TopoDS_Solid;
312        pub fn TopoDS_cast_to_compound(shape: &TopoDS_Shape) -> &TopoDS_Compound;
313
314        #[cxx_name = "Move"]
315        pub fn translate(
316            self: Pin<&mut TopoDS_Shape>,
317            position: &TopLoc_Location,
318            raise_exception: bool,
319        );
320
321        #[cxx_name = "Location"]
322        pub fn set_global_translation(
323            self: Pin<&mut TopoDS_Shape>,
324            translation: &TopLoc_Location,
325            raise_exception: bool,
326        );
327
328        #[cxx_name = "construct_unique"]
329        pub fn TopoDS_Vertex_to_owned(shape: &TopoDS_Vertex) -> UniquePtr<TopoDS_Vertex>;
330
331        #[cxx_name = "construct_unique"]
332        pub fn TopoDS_Edge_to_owned(shape: &TopoDS_Edge) -> UniquePtr<TopoDS_Edge>;
333
334        #[cxx_name = "construct_unique"]
335        pub fn TopoDS_Wire_to_owned(shape: &TopoDS_Wire) -> UniquePtr<TopoDS_Wire>;
336
337        #[cxx_name = "construct_unique"]
338        pub fn TopoDS_Face_to_owned(shape: &TopoDS_Face) -> UniquePtr<TopoDS_Face>;
339
340        #[cxx_name = "construct_unique"]
341        pub fn TopoDS_Shell_to_owned(shape: &TopoDS_Shell) -> UniquePtr<TopoDS_Shell>;
342
343        #[cxx_name = "construct_unique"]
344        pub fn TopoDS_Solid_to_owned(shape: &TopoDS_Solid) -> UniquePtr<TopoDS_Solid>;
345
346        #[cxx_name = "construct_unique"]
347        pub fn TopoDS_Compound_to_owned(shape: &TopoDS_Compound) -> UniquePtr<TopoDS_Compound>;
348
349        #[cxx_name = "construct_unique"]
350        pub fn TopoDS_Shape_to_owned(shape: &TopoDS_Shape) -> UniquePtr<TopoDS_Shape>;
351
352        pub fn IsNull(self: &TopoDS_Shape) -> bool;
353        pub fn IsEqual(self: &TopoDS_Shape, other: &TopoDS_Shape) -> bool;
354        pub fn ShapeType(self: &TopoDS_Shape) -> TopAbs_ShapeEnum;
355
356        type TopAbs_Orientation;
357        pub fn Orientation(self: &TopoDS_Shape) -> TopAbs_Orientation;
358        pub fn Orientation(self: &TopoDS_Face) -> TopAbs_Orientation;
359
360        // Compound Shapes
361        type TopoDS_Compound;
362        pub fn TopoDS_Compound_as_shape(
363            compound: UniquePtr<TopoDS_Compound>,
364        ) -> UniquePtr<TopoDS_Shape>;
365
366        type BRep_Builder;
367        type TopoDS_Builder;
368
369        #[cxx_name = "construct_unique"]
370        pub fn TopoDS_Compound_ctor() -> UniquePtr<TopoDS_Compound>;
371
372        #[cxx_name = "construct_unique"]
373        pub fn BRep_Builder_ctor() -> UniquePtr<BRep_Builder>;
374
375        pub fn BRep_Builder_upcast_to_topods_builder(builder: &BRep_Builder) -> &TopoDS_Builder;
376        pub fn MakeCompound(self: &TopoDS_Builder, compound: Pin<&mut TopoDS_Compound>);
377        pub fn Add(self: &TopoDS_Builder, shape: Pin<&mut TopoDS_Shape>, compound: &TopoDS_Shape);
378
379        // BRepBuilder
380        type BRepBuilderAPI_MakeVertex;
381        #[cxx_name = "construct_unique"]
382        pub fn BRepBuilderAPI_MakeVertex_gp_Pnt(
383            point: &gp_Pnt,
384        ) -> UniquePtr<BRepBuilderAPI_MakeVertex>;
385
386        pub fn Vertex(self: Pin<&mut BRepBuilderAPI_MakeVertex>) -> &TopoDS_Vertex;
387
388        type BRepBuilderAPI_MakeEdge;
389
390        #[cxx_name = "construct_unique"]
391        pub fn BRepBuilderAPI_MakeEdge_HandleGeomCurve(
392            geom_curve_handle: &HandleGeomCurve,
393        ) -> UniquePtr<BRepBuilderAPI_MakeEdge>;
394
395        #[cxx_name = "construct_unique"]
396        pub fn BRepBuilderAPI_MakeEdge_circle(
397            circle: &gp_Circ,
398        ) -> UniquePtr<BRepBuilderAPI_MakeEdge>;
399
400        #[cxx_name = "construct_unique"]
401        pub fn BRepBuilderAPI_MakeEdge_gp_Pnt_gp_Pnt(
402            p1: &gp_Pnt,
403            p2: &gp_Pnt,
404        ) -> UniquePtr<BRepBuilderAPI_MakeEdge>;
405
406        #[cxx_name = "construct_unique"]
407        pub fn BRepBuilderAPI_MakeEdge_CurveSurface2d(
408            curve_handle: &HandleGeom2d_Curve,
409            surface_handle: &HandleGeomSurface,
410        ) -> UniquePtr<BRepBuilderAPI_MakeEdge>;
411
412        pub fn Vertex1(self: &BRepBuilderAPI_MakeEdge) -> &TopoDS_Vertex;
413        pub fn Edge(self: Pin<&mut BRepBuilderAPI_MakeEdge>) -> &TopoDS_Edge;
414        pub fn Build(self: Pin<&mut BRepBuilderAPI_MakeEdge>, progress: &Message_ProgressRange);
415        pub fn IsDone(self: &BRepBuilderAPI_MakeEdge) -> bool;
416
417        type BRepBuilderAPI_MakeWire;
418
419        #[cxx_name = "construct_unique"]
420        pub fn BRepBuilderAPI_MakeWire_ctor() -> UniquePtr<BRepBuilderAPI_MakeWire>;
421
422        #[cxx_name = "construct_unique"]
423        pub fn BRepBuilderAPI_MakeWire_edge_edge(
424            edge_1: &TopoDS_Edge,
425            edge_2: &TopoDS_Edge,
426        ) -> UniquePtr<BRepBuilderAPI_MakeWire>;
427
428        #[cxx_name = "construct_unique"]
429        pub fn BRepBuilderAPI_MakeWire_edge_edge_edge(
430            edge_1: &TopoDS_Edge,
431            edge_2: &TopoDS_Edge,
432            edge_3: &TopoDS_Edge,
433        ) -> UniquePtr<BRepBuilderAPI_MakeWire>;
434
435        pub fn Shape(self: Pin<&mut BRepBuilderAPI_MakeWire>) -> &TopoDS_Shape;
436        pub fn Wire(self: Pin<&mut BRepBuilderAPI_MakeWire>) -> &TopoDS_Wire;
437        pub fn Build(self: Pin<&mut BRepBuilderAPI_MakeWire>, progress: &Message_ProgressRange);
438        pub fn IsDone(self: &BRepBuilderAPI_MakeWire) -> bool;
439
440        type BRepBuilderAPI_MakeFace;
441
442        #[cxx_name = "construct_unique"]
443        pub fn BRepBuilderAPI_MakeFace_wire(
444            wire: &TopoDS_Wire,
445            only_plane: bool,
446        ) -> UniquePtr<BRepBuilderAPI_MakeFace>;
447        #[cxx_name = "construct_unique"]
448        pub fn BRepBuilderAPI_MakeFace_surface(
449            surface: &HandleGeomSurface,
450            edge_tolerance: f64,
451        ) -> UniquePtr<BRepBuilderAPI_MakeFace>;
452
453        pub fn Face(self: &BRepBuilderAPI_MakeFace) -> &TopoDS_Face;
454        pub fn Shape(self: Pin<&mut BRepBuilderAPI_MakeFace>) -> &TopoDS_Shape;
455        pub fn Build(self: Pin<&mut BRepBuilderAPI_MakeFace>, progress: &Message_ProgressRange);
456        pub fn IsDone(self: &BRepBuilderAPI_MakeFace) -> bool;
457
458        // BRepAdaptor
459        type BRepAdaptor_Curve;
460
461        #[cxx_name = "construct_unique"]
462        pub fn BRepAdaptor_Curve_ctor(edge: &TopoDS_Edge) -> UniquePtr<BRepAdaptor_Curve>;
463        pub fn FirstParameter(self: &BRepAdaptor_Curve) -> f64;
464        pub fn LastParameter(self: &BRepAdaptor_Curve) -> f64;
465        pub fn BRepAdaptor_Curve_value(curve: &BRepAdaptor_Curve, u: f64) -> UniquePtr<gp_Pnt>;
466
467        // Primitives
468        type BRepPrimAPI_MakePrism;
469
470        #[cxx_name = "construct_unique"]
471        pub fn BRepPrimAPI_MakePrism_ctor(
472            shape: &TopoDS_Shape,
473            vec: &gp_Vec,
474            copy: bool,
475            canonize: bool,
476        ) -> UniquePtr<BRepPrimAPI_MakePrism>;
477
478        pub fn Shape(self: Pin<&mut BRepPrimAPI_MakePrism>) -> &TopoDS_Shape;
479        pub fn Build(self: Pin<&mut BRepPrimAPI_MakePrism>, progress: &Message_ProgressRange);
480        pub fn IsDone(self: &BRepPrimAPI_MakePrism) -> bool;
481
482        type BRepFeat_MakeDPrism;
483
484        #[cxx_name = "construct_unique"]
485        pub fn BRepFeat_MakeDPrism_ctor(
486            shape: &TopoDS_Shape,
487            profile_base: &TopoDS_Face,
488            sketch_base: &TopoDS_Face,
489            angle: f64,
490            fuse: i32, // 0 = subtractive, 1 = additive
491            modify: bool,
492        ) -> UniquePtr<BRepFeat_MakeDPrism>;
493
494        #[cxx_name = "Perform"]
495        pub fn perform_until_face(self: Pin<&mut BRepFeat_MakeDPrism>, until: &TopoDS_Shape);
496
497        #[cxx_name = "Perform"]
498        pub fn perform_with_height(self: Pin<&mut BRepFeat_MakeDPrism>, height: f64);
499        pub fn Shape(self: Pin<&mut BRepFeat_MakeDPrism>) -> &TopoDS_Shape;
500
501        type BRepPrimAPI_MakeRevol;
502
503        #[cxx_name = "construct_unique"]
504        pub fn BRepPrimAPI_MakeRevol_ctor(
505            shape: &TopoDS_Shape,
506            axis: &gp_Ax1,
507            angle: f64,
508            copy: bool,
509        ) -> UniquePtr<BRepPrimAPI_MakeRevol>;
510
511        pub fn Shape(self: Pin<&mut BRepPrimAPI_MakeRevol>) -> &TopoDS_Shape;
512        pub fn Build(self: Pin<&mut BRepPrimAPI_MakeRevol>, progress: &Message_ProgressRange);
513        pub fn IsDone(self: &BRepPrimAPI_MakeRevol) -> bool;
514
515        #[rust_name = "add_edge"]
516        pub fn Add(self: Pin<&mut BRepBuilderAPI_MakeWire>, edge: &TopoDS_Edge);
517
518        #[rust_name = "add_wire"]
519        pub fn Add(self: Pin<&mut BRepBuilderAPI_MakeWire>, wire: &TopoDS_Wire);
520
521        type BRepPrimAPI_MakeCylinder;
522
523        #[cxx_name = "construct_unique"]
524        pub fn BRepPrimAPI_MakeCylinder_ctor(
525            coord_system: &gp_Ax2,
526            radius: f64,
527            height: f64,
528        ) -> UniquePtr<BRepPrimAPI_MakeCylinder>;
529
530        pub fn Shape(self: Pin<&mut BRepPrimAPI_MakeCylinder>) -> &TopoDS_Shape;
531        pub fn Build(self: Pin<&mut BRepPrimAPI_MakeCylinder>, progress: &Message_ProgressRange);
532        pub fn IsDone(self: &BRepPrimAPI_MakeCylinder) -> bool;
533
534        type BRepPrimAPI_MakeBox;
535
536        #[cxx_name = "construct_unique"]
537        pub fn BRepPrimAPI_MakeBox_ctor(
538            point: &gp_Pnt,
539            dx: f64,
540            dy: f64,
541            dz: f64,
542        ) -> UniquePtr<BRepPrimAPI_MakeBox>;
543
544        pub fn Shape(self: Pin<&mut BRepPrimAPI_MakeBox>) -> &TopoDS_Shape;
545        pub fn Build(self: Pin<&mut BRepPrimAPI_MakeBox>, progress: &Message_ProgressRange);
546        pub fn IsDone(self: &BRepPrimAPI_MakeBox) -> bool;
547
548        type BRepPrimAPI_MakeSphere;
549
550        #[cxx_name = "construct_unique"]
551        pub fn BRepPrimAPI_MakeSphere_ctor(r: f64) -> UniquePtr<BRepPrimAPI_MakeSphere>;
552
553        pub fn Shape(self: Pin<&mut BRepPrimAPI_MakeSphere>) -> &TopoDS_Shape;
554        pub fn Build(self: Pin<&mut BRepPrimAPI_MakeSphere>, progress: &Message_ProgressRange);
555        pub fn IsDone(self: &BRepPrimAPI_MakeSphere) -> bool;
556
557        // BRepLib
558        pub fn BRepLibBuildCurves3d(shape: &TopoDS_Shape) -> bool;
559
560        // Fillets
561        type BRepFilletAPI_MakeFillet;
562
563        #[cxx_name = "construct_unique"]
564        pub fn BRepFilletAPI_MakeFillet_ctor(
565            shape: &TopoDS_Shape,
566        ) -> UniquePtr<BRepFilletAPI_MakeFillet>;
567
568        #[rust_name = "add_edge"]
569        pub fn Add(self: Pin<&mut BRepFilletAPI_MakeFillet>, radius: f64, edge: &TopoDS_Edge);
570        pub fn Shape(self: Pin<&mut BRepFilletAPI_MakeFillet>) -> &TopoDS_Shape;
571        pub fn Build(self: Pin<&mut BRepFilletAPI_MakeFillet>, progress: &Message_ProgressRange);
572        pub fn IsDone(self: &BRepFilletAPI_MakeFillet) -> bool;
573
574        type BRepFilletAPI_MakeFillet2d;
575
576        #[cxx_name = "construct_unique"]
577        pub fn BRepFilletAPI_MakeFillet2d_ctor(
578            face: &TopoDS_Face,
579        ) -> UniquePtr<BRepFilletAPI_MakeFillet2d>;
580
581        pub fn BRepFilletAPI_MakeFillet2d_add_fillet(
582            make_fillet: Pin<&mut BRepFilletAPI_MakeFillet2d>,
583            vertex: &TopoDS_Vertex,
584            radius: f64,
585        ) -> UniquePtr<TopoDS_Edge>;
586        pub fn BRepFilletAPI_MakeFillet2d_add_chamfer(
587            make_fillet: Pin<&mut BRepFilletAPI_MakeFillet2d>,
588            edge1: &TopoDS_Edge,
589            edge2: &TopoDS_Edge,
590            distance1: f64,
591            distance2: f64,
592        ) -> UniquePtr<TopoDS_Edge>;
593        pub fn BRepFilletAPI_MakeFillet2d_add_chamfer_angle(
594            make_fillet: Pin<&mut BRepFilletAPI_MakeFillet2d>,
595            edge: &TopoDS_Edge,
596            vertex: &TopoDS_Vertex,
597            distance: f64,
598            angle: f64,
599        ) -> UniquePtr<TopoDS_Edge>;
600        pub fn Build(self: Pin<&mut BRepFilletAPI_MakeFillet2d>, progress: &Message_ProgressRange);
601        pub fn Shape(self: Pin<&mut BRepFilletAPI_MakeFillet2d>) -> &TopoDS_Shape;
602        pub fn IsDone(self: &BRepFilletAPI_MakeFillet2d) -> bool;
603
604        // Chamfers
605        type BRepFilletAPI_MakeChamfer;
606
607        #[cxx_name = "construct_unique"]
608        pub fn BRepFilletAPI_MakeChamfer_ctor(
609            shape: &TopoDS_Shape,
610        ) -> UniquePtr<BRepFilletAPI_MakeChamfer>;
611
612        #[rust_name = "add_edge"]
613        pub fn Add(self: Pin<&mut BRepFilletAPI_MakeChamfer>, distance: f64, edge: &TopoDS_Edge);
614        pub fn Shape(self: Pin<&mut BRepFilletAPI_MakeChamfer>) -> &TopoDS_Shape;
615        pub fn Build(self: Pin<&mut BRepFilletAPI_MakeChamfer>, progress: &Message_ProgressRange);
616        pub fn IsDone(self: &BRepFilletAPI_MakeChamfer) -> bool;
617
618        // Solids
619        type BRepOffsetAPI_MakeThickSolid;
620
621        #[cxx_name = "construct_unique"]
622        pub fn BRepOffsetAPI_MakeThickSolid_ctor() -> UniquePtr<BRepOffsetAPI_MakeThickSolid>;
623
624        pub fn MakeThickSolidByJoin(
625            make_thick_solid: Pin<&mut BRepOffsetAPI_MakeThickSolid>,
626            shape: &TopoDS_Shape,
627            closing_faces: &TopTools_ListOfShape,
628            offset: f64,
629            tolerance: f64,
630        );
631        pub fn Shape(self: Pin<&mut BRepOffsetAPI_MakeThickSolid>) -> &TopoDS_Shape;
632        pub fn Build(
633            self: Pin<&mut BRepOffsetAPI_MakeThickSolid>,
634            progress: &Message_ProgressRange,
635        );
636        pub fn IsDone(self: &BRepOffsetAPI_MakeThickSolid) -> bool;
637
638        // Lofting
639        type BRepOffsetAPI_ThruSections;
640
641        #[cxx_name = "construct_unique"]
642        pub fn BRepOffsetAPI_ThruSections_ctor(
643            is_solid: bool,
644        ) -> UniquePtr<BRepOffsetAPI_ThruSections>;
645
646        pub fn AddWire(self: Pin<&mut BRepOffsetAPI_ThruSections>, wire: &TopoDS_Wire);
647        pub fn CheckCompatibility(self: Pin<&mut BRepOffsetAPI_ThruSections>, check: bool);
648        pub fn Shape(self: Pin<&mut BRepOffsetAPI_ThruSections>) -> &TopoDS_Shape;
649        pub fn Build(self: Pin<&mut BRepOffsetAPI_ThruSections>, progress: &Message_ProgressRange);
650        pub fn IsDone(self: &BRepOffsetAPI_ThruSections) -> bool;
651
652        // Boolean Operations
653        type BRepAlgoAPI_Fuse;
654        type BOPAlgo_GlueEnum;
655
656        #[cxx_name = "construct_unique"]
657        pub fn BRepAlgoAPI_Fuse_ctor(
658            shape_1: &TopoDS_Shape,
659            shape_2: &TopoDS_Shape,
660        ) -> UniquePtr<BRepAlgoAPI_Fuse>;
661
662        pub fn Shape(self: Pin<&mut BRepAlgoAPI_Fuse>) -> &TopoDS_Shape;
663        pub fn Build(self: Pin<&mut BRepAlgoAPI_Fuse>, progress: &Message_ProgressRange);
664        pub fn IsDone(self: &BRepAlgoAPI_Fuse) -> bool;
665        pub fn SectionEdges(self: Pin<&mut BRepAlgoAPI_Fuse>) -> &TopTools_ListOfShape;
666        pub fn SetGlue(self: Pin<&mut BRepAlgoAPI_Fuse>, glue: BOPAlgo_GlueEnum);
667
668        type BRepAlgoAPI_Cut;
669
670        #[cxx_name = "construct_unique"]
671        pub fn BRepAlgoAPI_Cut_ctor(
672            shape_1: &TopoDS_Shape,
673            shape_2: &TopoDS_Shape,
674        ) -> UniquePtr<BRepAlgoAPI_Cut>;
675
676        pub fn Shape(self: Pin<&mut BRepAlgoAPI_Cut>) -> &TopoDS_Shape;
677        pub fn Build(self: Pin<&mut BRepAlgoAPI_Cut>, progress: &Message_ProgressRange);
678        pub fn IsDone(self: &BRepAlgoAPI_Cut) -> bool;
679        pub fn Generated<'a>(
680            self: Pin<&'a mut BRepAlgoAPI_Cut>,
681            shape: &'a TopoDS_Shape,
682        ) -> &'a TopTools_ListOfShape;
683        pub fn SectionEdges(self: Pin<&mut BRepAlgoAPI_Cut>) -> &TopTools_ListOfShape;
684
685        type BRepAlgoAPI_Common;
686
687        #[cxx_name = "construct_unique"]
688        pub fn BRepAlgoAPI_Common_ctor(
689            shape_1: &TopoDS_Shape,
690            shape_2: &TopoDS_Shape,
691        ) -> UniquePtr<BRepAlgoAPI_Common>;
692
693        pub fn Shape(self: Pin<&mut BRepAlgoAPI_Common>) -> &TopoDS_Shape;
694        pub fn Build(self: Pin<&mut BRepAlgoAPI_Common>, progress: &Message_ProgressRange);
695        pub fn IsDone(self: &BRepAlgoAPI_Common) -> bool;
696
697        type BRepAlgoAPI_Section;
698
699        #[cxx_name = "construct_unique"]
700        pub fn BRepAlgoAPI_Section_ctor(
701            shape_1: &TopoDS_Shape,
702            shape_2: &TopoDS_Shape,
703        ) -> UniquePtr<BRepAlgoAPI_Section>;
704
705        pub fn Shape(self: Pin<&mut BRepAlgoAPI_Section>) -> &TopoDS_Shape;
706        pub fn Build(self: Pin<&mut BRepAlgoAPI_Section>, progress: &Message_ProgressRange);
707        pub fn IsDone(self: &BRepAlgoAPI_Section) -> bool;
708
709        // Geometric processor
710        type gp_Ax1;
711        type gp_Ax2;
712        type gp_Ax3;
713        type gp_Dir;
714        type gp_Dir2d;
715        type gp_Ax2d;
716        pub fn gp_OX() -> &'static gp_Ax1;
717        pub fn gp_OY() -> &'static gp_Ax1;
718        pub fn gp_OZ() -> &'static gp_Ax1;
719        pub fn gp_DZ() -> &'static gp_Dir;
720
721        pub fn X(self: &gp_Dir) -> f64;
722        pub fn Y(self: &gp_Dir) -> f64;
723        pub fn Z(self: &gp_Dir) -> f64;
724
725        #[cxx_name = "construct_unique"]
726        pub fn gp_Ax1_ctor(origin: &gp_Pnt, main_dir: &gp_Dir) -> UniquePtr<gp_Ax1>;
727
728        #[cxx_name = "construct_unique"]
729        pub fn gp_Ax2_ctor(origin: &gp_Pnt, main_dir: &gp_Dir) -> UniquePtr<gp_Ax2>;
730
731        #[cxx_name = "construct_unique"]
732        pub fn gp_Ax3_from_gp_Ax2(axis: &gp_Ax2) -> UniquePtr<gp_Ax3>;
733
734        #[cxx_name = "construct_unique"]
735        pub fn gp_Dir_ctor(x: f64, y: f64, z: f64) -> UniquePtr<gp_Dir>;
736
737        #[cxx_name = "construct_unique"]
738        pub fn gp_Dir2d_ctor(x: f64, y: f64) -> UniquePtr<gp_Dir2d>;
739
740        #[cxx_name = "construct_unique"]
741        pub fn gp_Ax2d_ctor(point: &gp_Pnt2d, dir: &gp_Dir2d) -> UniquePtr<gp_Ax2d>;
742
743        // Geometry Querying
744        type GeomAPI_ProjectPointOnSurf;
745
746        #[cxx_name = "construct_unique"]
747        pub fn GeomAPI_ProjectPointOnSurf_ctor(
748            origin: &gp_Pnt,
749            surface: &HandleGeomSurface,
750        ) -> UniquePtr<GeomAPI_ProjectPointOnSurf>;
751        pub fn LowerDistanceParameters(self: &GeomAPI_ProjectPointOnSurf, u: &mut f64, v: &mut f64);
752
753        // Transforms
754        type gp_Trsf;
755
756        #[cxx_name = "construct_unique"]
757        pub fn new_transform() -> UniquePtr<gp_Trsf>;
758
759        #[rust_name = "set_mirror_axis"]
760        pub fn SetMirror(self: Pin<&mut gp_Trsf>, axis: &gp_Ax1);
761        pub fn SetRotation(self: Pin<&mut gp_Trsf>, axis: &gp_Ax1, angle: f64);
762        pub fn SetScale(self: Pin<&mut gp_Trsf>, point: &gp_Pnt, scale: f64);
763        pub fn SetTranslation(self: Pin<&mut gp_Trsf>, point1: &gp_Pnt, point2: &gp_Pnt);
764
765        #[cxx_name = "SetTranslationPart"]
766        pub fn set_translation_vec(self: Pin<&mut gp_Trsf>, translation: &gp_Vec);
767
768        type BRepBuilderAPI_Transform;
769
770        #[cxx_name = "construct_unique"]
771        pub fn BRepBuilderAPI_Transform_ctor(
772            shape: &TopoDS_Shape,
773            transform: &gp_Trsf,
774            copy: bool,
775        ) -> UniquePtr<BRepBuilderAPI_Transform>;
776
777        pub fn Shape(self: Pin<&mut BRepBuilderAPI_Transform>) -> &TopoDS_Shape;
778        pub fn Build(self: Pin<&mut BRepBuilderAPI_Transform>, progress: &Message_ProgressRange);
779        pub fn IsDone(self: &BRepBuilderAPI_Transform) -> bool;
780
781        // Topology Explorer
782        type TopExp_Explorer;
783        type TopAbs_ShapeEnum;
784
785        #[cxx_name = "construct_unique"]
786        pub fn TopExp_Explorer_ctor(
787            shape: &TopoDS_Shape,
788            to_find: TopAbs_ShapeEnum,
789        ) -> UniquePtr<TopExp_Explorer>;
790
791        pub fn More(self: &TopExp_Explorer) -> bool;
792        pub fn Next(self: Pin<&mut TopExp_Explorer>);
793        pub fn ExplorerCurrentShape(explorer: &TopExp_Explorer) -> UniquePtr<TopoDS_Shape>;
794        pub fn Current(self: &TopExp_Explorer) -> &TopoDS_Shape;
795
796        pub fn TopExp_FirstVertex(edge: &TopoDS_Edge) -> UniquePtr<TopoDS_Vertex>;
797        pub fn TopExp_LastVertex(edge: &TopoDS_Edge) -> UniquePtr<TopoDS_Vertex>;
798        pub fn TopExp_EdgeVertices(
799            edge: &TopoDS_Edge,
800            vertex_first: Pin<&mut TopoDS_Vertex>,
801            vertex_last: Pin<&mut TopoDS_Vertex>,
802        );
803        pub fn TopExp_WireVertices(
804            wire: &TopoDS_Wire,
805            vertex_first: Pin<&mut TopoDS_Vertex>,
806            vertex_last: Pin<&mut TopoDS_Vertex>,
807        );
808        pub fn TopExp_CommonVertex(
809            edge_1: &TopoDS_Edge,
810            edge_2: &TopoDS_Edge,
811            vertex: Pin<&mut TopoDS_Vertex>,
812        ) -> bool;
813
814        pub fn BRep_Tool_Surface(face: &TopoDS_Face) -> UniquePtr<HandleGeomSurface>;
815        pub fn BRep_Tool_Curve(
816            edge: &TopoDS_Edge,
817            first: &mut f64,
818            last: &mut f64,
819        ) -> UniquePtr<HandleGeomCurve>;
820        pub fn BRep_Tool_Pnt(vertex: &TopoDS_Vertex) -> UniquePtr<gp_Pnt>;
821        pub fn BRep_Tool_Triangulation(
822            face: &TopoDS_Face,
823            location: Pin<&mut TopLoc_Location>,
824        ) -> UniquePtr<Handle_Poly_Triangulation>;
825
826        type BRepIntCurveSurface_Inter;
827
828        #[cxx_name = "construct_unique"]
829        pub fn BRepIntCurveSurface_Inter_ctor() -> UniquePtr<BRepIntCurveSurface_Inter>;
830        pub fn Init(
831            self: Pin<&mut BRepIntCurveSurface_Inter>,
832            shape: &TopoDS_Shape,
833            line: &gp_Lin,
834            tolerance: f64,
835        );
836        pub fn More(self: &BRepIntCurveSurface_Inter) -> bool;
837        pub fn Next(self: Pin<&mut BRepIntCurveSurface_Inter>);
838        pub fn BRepIntCurveSurface_Inter_face(
839            intersector: &BRepIntCurveSurface_Inter,
840        ) -> UniquePtr<TopoDS_Face>;
841        pub fn BRepIntCurveSurface_Inter_point(
842            intersector: &BRepIntCurveSurface_Inter,
843        ) -> UniquePtr<gp_Pnt>;
844
845        // BRepFeat
846        type BRepFeat_MakeCylindricalHole;
847        pub fn BRepFeat_MakeCylindricalHole_ctor() -> UniquePtr<BRepFeat_MakeCylindricalHole>;
848        pub fn Init(
849            self: Pin<&mut BRepFeat_MakeCylindricalHole>,
850            shape: &TopoDS_Shape,
851            axis: &gp_Ax1,
852        );
853        pub fn Perform(self: Pin<&mut BRepFeat_MakeCylindricalHole>, radius: f64);
854        pub fn Build(self: Pin<&mut BRepFeat_MakeCylindricalHole>);
855        pub fn Shape(self: &BRepFeat_MakeCylindricalHole) -> &TopoDS_Shape;
856
857        // Data Import
858        type STEPControl_Reader;
859        type IFSelect_ReturnStatus;
860
861        #[cxx_name = "construct_unique"]
862        pub fn STEPControl_Reader_ctor() -> UniquePtr<STEPControl_Reader>;
863
864        pub fn read_step(
865            reader: Pin<&mut STEPControl_Reader>,
866            filename: String,
867        ) -> IFSelect_ReturnStatus;
868        pub fn TransferRoots(
869            self: Pin<&mut STEPControl_Reader>,
870            progress: &Message_ProgressRange,
871        ) -> i32;
872        pub fn one_shape(reader: &STEPControl_Reader) -> UniquePtr<TopoDS_Shape>;
873
874        // Data Export
875        type STEPControl_Writer;
876
877        #[cxx_name = "construct_unique"]
878        pub fn STEPControl_Writer_ctor() -> UniquePtr<STEPControl_Writer>;
879
880        pub fn transfer_shape(
881            writer: Pin<&mut STEPControl_Writer>,
882            shape: &TopoDS_Shape,
883        ) -> IFSelect_ReturnStatus;
884        pub fn write_step(
885            writer: Pin<&mut STEPControl_Writer>,
886            filename: String,
887        ) -> IFSelect_ReturnStatus;
888
889        type StlAPI_Writer;
890
891        #[cxx_name = "construct_unique"]
892        pub fn StlAPI_Writer_ctor() -> UniquePtr<StlAPI_Writer>;
893
894        // pub fn Write(self: Pin<&mut StlAPI_Writer>, shape: &TopoDS_Shape, filename: &c_char) -> bool;
895        pub fn write_stl(
896            writer: Pin<&mut StlAPI_Writer>,
897            shape: &TopoDS_Shape,
898            filename: String,
899        ) -> bool;
900
901        // Triangulation
902        type BRepMesh_IncrementalMesh;
903
904        #[cxx_name = "construct_unique"]
905        pub fn BRepMesh_IncrementalMesh_ctor(
906            shape: &TopoDS_Shape,
907            deflection: f64,
908        ) -> UniquePtr<BRepMesh_IncrementalMesh>;
909
910        pub fn Shape(self: &BRepMesh_IncrementalMesh) -> &TopoDS_Shape;
911        pub fn IsDone(self: &BRepMesh_IncrementalMesh) -> bool;
912
913        type TopLoc_Location;
914        #[cxx_name = "construct_unique"]
915        pub fn TopLoc_Location_ctor() -> UniquePtr<TopLoc_Location>;
916
917        #[cxx_name = "construct_unique"]
918        pub fn TopLoc_Location_from_transform(transform: &gp_Trsf) -> UniquePtr<TopLoc_Location>;
919
920        pub fn TopLoc_Location_Transformation(location: &TopLoc_Location) -> UniquePtr<gp_Trsf>;
921
922        type Handle_Poly_Triangulation;
923        pub fn IsNull(self: &Handle_Poly_Triangulation) -> bool;
924        #[cxx_name = "handle_try_deref"]
925        pub fn Handle_Poly_Triangulation_Get(
926            handle: &Handle_Poly_Triangulation,
927        ) -> Result<&Poly_Triangulation>;
928
929        type Poly_Triangulation;
930        pub fn NbNodes(self: &Poly_Triangulation) -> i32;
931        pub fn NbTriangles(self: &Poly_Triangulation) -> i32;
932        pub fn HasNormals(self: &Poly_Triangulation) -> bool;
933        pub fn HasUVNodes(self: &Poly_Triangulation) -> bool;
934        pub fn Triangle(self: &Poly_Triangulation, index: i32) -> &Poly_Triangle;
935        pub fn Poly_Triangulation_Normal(
936            triangulation: &Poly_Triangulation,
937            index: i32,
938        ) -> UniquePtr<gp_Dir>;
939        pub fn Poly_Triangulation_Node(
940            triangulation: &Poly_Triangulation,
941            index: i32,
942        ) -> UniquePtr<gp_Pnt>;
943        pub fn Poly_Triangulation_UV(
944            triangulation: &Poly_Triangulation,
945            index: i32,
946        ) -> UniquePtr<gp_Pnt2d>;
947
948        type Poly_Triangle;
949        pub fn Value(self: &Poly_Triangle, index: i32) -> i32;
950
951        type Poly_Connect;
952        #[cxx_name = "construct_unique"]
953        pub fn Poly_Connect_ctor(
954            triangulation: &Handle_Poly_Triangulation,
955        ) -> UniquePtr<Poly_Connect>;
956
957        pub fn compute_normals(face: &TopoDS_Face, triangulation: &Handle_Poly_Triangulation);
958
959        // Edge approximation
960        type GCPnts_TangentialDeflection;
961
962        #[cxx_name = "construct_unique"]
963        pub fn GCPnts_TangentialDeflection_ctor(
964            curve: &BRepAdaptor_Curve,
965            angular_deflection: f64,
966            curvature_deflection: f64,
967        ) -> UniquePtr<GCPnts_TangentialDeflection>;
968        pub fn NbPoints(self: &GCPnts_TangentialDeflection) -> i32;
969        pub fn GCPnts_TangentialDeflection_Value(
970            approximator: &GCPnts_TangentialDeflection,
971            index: i32,
972        ) -> UniquePtr<gp_Pnt>;
973
974        // Shape Properties
975        type GProp_GProps;
976        #[cxx_name = "construct_unique"]
977        pub fn GProp_GProps_ctor() -> UniquePtr<GProp_GProps>;
978        pub fn Mass(self: &GProp_GProps) -> f64;
979        pub fn StaticMoments(self: &GProp_GProps, lx: &mut f64, ly: &mut f64, lz: &mut f64);
980        pub fn MomentOfInertia(self: &GProp_GProps, axis: &gp_Ax1) -> f64;
981        pub fn RadiusOfGyration(self: &GProp_GProps, axis: &gp_Ax1) -> f64;
982        pub fn GProp_GProps_CentreOfMass(props: &GProp_GProps) -> UniquePtr<gp_Pnt>;
983
984        pub fn BRepGProp_LinearProperties(shape: &TopoDS_Shape, props: Pin<&mut GProp_GProps>);
985        pub fn BRepGProp_SurfaceProperties(shape: &TopoDS_Shape, props: Pin<&mut GProp_GProps>);
986        pub fn BRepGProp_VolumeProperties(shape: &TopoDS_Shape, props: Pin<&mut GProp_GProps>);
987
988        type BRepGProp_Face;
989
990        #[cxx_name = "construct_unique"]
991        pub fn BRepGProp_Face_ctor(face: &TopoDS_Face) -> UniquePtr<BRepGProp_Face>;
992        pub fn Normal(
993            self: &BRepGProp_Face,
994            u: f64,
995            v: f64,
996            point: Pin<&mut gp_Pnt>,
997            normal: Pin<&mut gp_Vec>,
998        );
999
1000        // BRepTools
1001        pub fn outer_wire(face: &TopoDS_Face) -> UniquePtr<TopoDS_Wire>;
1002
1003        // Cleaning
1004        type ShapeUpgrade_UnifySameDomain;
1005
1006        #[cxx_name = "construct_unique"]
1007        pub fn ShapeUpgrade_UnifySameDomain_ctor(
1008            shape: &TopoDS_Shape,
1009            unify_edges: bool,
1010            unify_faces: bool,
1011            concat_b_splines: bool,
1012        ) -> UniquePtr<ShapeUpgrade_UnifySameDomain>;
1013        pub fn AllowInternalEdges(self: Pin<&mut ShapeUpgrade_UnifySameDomain>, allow: bool);
1014        pub fn Build(self: Pin<&mut ShapeUpgrade_UnifySameDomain>);
1015        pub fn Shape(self: &ShapeUpgrade_UnifySameDomain) -> &TopoDS_Shape;
1016    }
1017}