Skip to content

Commit

Permalink
feat: gtransform API (#181)
Browse files Browse the repository at this point in the history
* feat: gtransform API

* fmt

* clangfmt
  • Loading branch information
DSchroer authored Sep 6, 2024
1 parent 7ebaba5 commit 1280d74
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/opencascade-sys/include/wrapper.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <BRepAlgoAPI_Cut.hxx>
#include <BRepAlgoAPI_Fuse.hxx>
#include <BRepAlgoAPI_Section.hxx>
#include <BRepBuilderAPI_GTransform.hxx>
#include <BRepBuilderAPI_MakeEdge.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
#include <BRepBuilderAPI_MakeShapeOnMesh.hxx>
Expand Down
20 changes: 20 additions & 0 deletions crates/opencascade-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<gp_GTrsf>;
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"]
Expand Down Expand Up @@ -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<BRepBuilderAPI_GTransform>;

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;
Expand Down

0 comments on commit 1280d74

Please sign in to comment.