Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add BRepBuilderAPI_MakeShapeOnMesh #156

Merged
merged 2 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crates/opencascade-sys/include/wrapper.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <BRepAlgoAPI_Section.hxx>
#include <BRepBuilderAPI_MakeEdge.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
#include <BRepBuilderAPI_MakeShapeOnMesh.hxx>
#include <BRepBuilderAPI_MakeVertex.hxx>
#include <BRepBuilderAPI_MakeWire.hxx>
#include <BRepBuilderAPI_Transform.hxx>
Expand Down
36 changes: 36 additions & 0 deletions crates/opencascade-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -907,6 +907,20 @@ pub mod ffi {
#[cxx_name = "SetTranslationPart"]
pub fn set_translation_vec(self: Pin<&mut gp_Trsf>, translation: &gp_Vec);

type BRepBuilderAPI_MakeShapeOnMesh;

#[cxx_name = "construct_unique"]
pub fn BRepBuilderAPI_MakeShapeOnMesh_ctor(
mesh: &Handle_Poly_Triangulation,
) -> UniquePtr<BRepBuilderAPI_MakeShapeOnMesh>;

pub fn Shape(self: Pin<&mut BRepBuilderAPI_MakeShapeOnMesh>) -> &TopoDS_Shape;
pub fn Build(
self: Pin<&mut BRepBuilderAPI_MakeShapeOnMesh>,
progress: &Message_ProgressRange,
);
pub fn IsDone(self: &BRepBuilderAPI_MakeShapeOnMesh) -> bool;

type BRepBuilderAPI_Transform;

#[cxx_name = "construct_unique"]
Expand Down Expand Up @@ -1065,18 +1079,38 @@ pub mod ffi {
pub fn TopLoc_Location_Transformation(location: &TopLoc_Location) -> UniquePtr<gp_Trsf>;

type Handle_Poly_Triangulation;
#[cxx_name = "construct_unique"]
pub fn Handle_Poly_Triangulation_ctor(
triangulation: &Handle_Poly_Triangulation,
) -> UniquePtr<Handle_Poly_Triangulation>;

pub fn IsNull(self: &Handle_Poly_Triangulation) -> bool;
#[cxx_name = "handle_try_deref"]
pub fn Handle_Poly_Triangulation_Get(
handle: &Handle_Poly_Triangulation,
) -> Result<&Poly_Triangulation>;

type Poly_Triangulation;
#[cxx_name = "construct_unique"]
pub fn Poly_Triangulation_ctor(
nb_nodes: i32,
nb_triangles: i32,
has_uv: bool,
has_normals: bool,
) -> UniquePtr<Poly_Triangulation>;
pub fn NbNodes(self: &Poly_Triangulation) -> i32;
pub fn NbTriangles(self: &Poly_Triangulation) -> i32;
pub fn HasNormals(self: &Poly_Triangulation) -> bool;
pub fn HasUVNodes(self: &Poly_Triangulation) -> bool;
pub fn Triangle(self: &Poly_Triangulation, index: i32) -> &Poly_Triangle;
pub fn SetTriangle(
self: Pin<&mut Poly_Triangulation>,
index: i32,
triangle: &Poly_Triangle,
);
pub fn SetNode(self: Pin<&mut Poly_Triangulation>, index: i32, node: &gp_Pnt);
pub fn SetNormal(self: Pin<&mut Poly_Triangulation>, index: i32, dir: &gp_Dir);
pub fn SetUVNode(self: Pin<&mut Poly_Triangulation>, index: i32, uv: &gp_Pnt2d);
pub fn Poly_Triangulation_Normal(
triangulation: &Poly_Triangulation,
index: i32,
Expand All @@ -1091,6 +1125,8 @@ pub mod ffi {
) -> UniquePtr<gp_Pnt2d>;

type Poly_Triangle;
#[cxx_name = "construct_unique"]
pub fn Poly_Triangle_ctor(node1: i32, node2: i32, node3: i32) -> UniquePtr<Poly_Triangle>;
pub fn Value(self: &Poly_Triangle, index: i32) -> i32;

type Poly_Connect;
Expand Down