From 1280d74355752159c1e5e41bd22e7354cab6abf3 Mon Sep 17 00:00:00 2001 From: Dominick Date: Thu, 5 Sep 2024 19:43:22 -0600 Subject: [PATCH] feat: gtransform API (#181) * feat: gtransform API * fmt * clangfmt --- crates/opencascade-sys/include/wrapper.hxx | 1 + crates/opencascade-sys/src/lib.rs | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/crates/opencascade-sys/include/wrapper.hxx b/crates/opencascade-sys/include/wrapper.hxx index b887019..fad6e6d 100644 --- a/crates/opencascade-sys/include/wrapper.hxx +++ b/crates/opencascade-sys/include/wrapper.hxx @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include diff --git a/crates/opencascade-sys/src/lib.rs b/crates/opencascade-sys/src/lib.rs index d9a9bf2..6586521 100644 --- a/crates/opencascade-sys/src/lib.rs +++ b/crates/opencascade-sys/src/lib.rs @@ -1003,10 +1003,17 @@ pub mod ffi { pub fn SetRotation(self: Pin<&mut gp_Trsf>, axis: &gp_Ax1, angle: f64); pub fn SetScale(self: Pin<&mut gp_Trsf>, point: &gp_Pnt, scale: f64); pub fn SetTranslation(self: Pin<&mut gp_Trsf>, point1: &gp_Pnt, point2: &gp_Pnt); + pub fn Value(self: &gp_Trsf, the_row: i32, the_col: i32) -> f64; #[cxx_name = "SetTranslationPart"] pub fn set_translation_vec(self: Pin<&mut gp_Trsf>, translation: &gp_Vec); + type gp_GTrsf; + #[cxx_name = "construct_unique"] + pub fn new_gp_GTrsf() -> UniquePtr; + pub fn SetValue(self: Pin<&mut gp_GTrsf>, the_row: i32, the_col: i32, the_value: f64); + pub fn Value(self: &gp_GTrsf, the_row: i32, the_col: i32) -> f64; + type BRepBuilderAPI_MakeSolid; #[cxx_name = "construct_unique"] @@ -1045,6 +1052,19 @@ pub mod ffi { pub fn Build(self: Pin<&mut BRepBuilderAPI_Transform>, progress: &Message_ProgressRange); pub fn IsDone(self: &BRepBuilderAPI_Transform) -> bool; + type BRepBuilderAPI_GTransform; + + #[cxx_name = "construct_unique"] + pub fn BRepBuilderAPI_GTransform_ctor( + shape: &TopoDS_Shape, + transform: &gp_GTrsf, + copy: bool, + ) -> UniquePtr; + + pub fn Shape(self: Pin<&mut BRepBuilderAPI_GTransform>) -> &TopoDS_Shape; + pub fn Build(self: Pin<&mut BRepBuilderAPI_GTransform>, progress: &Message_ProgressRange); + pub fn IsDone(self: &BRepBuilderAPI_GTransform) -> bool; + // Topology Explorer type TopExp_Explorer; type TopAbs_ShapeEnum;