bschwind / opencascade-rs

Rust bindings to the OpenCascade CAD Kernel
GNU Lesser General Public License v2.1
116 stars 22 forks source link

add make solid and shell constructors #157

Closed DSchroer closed 10 months ago

DSchroer commented 11 months ago

Using the shape constructed from a Triangulation. Its possible to build and shell and solid via the TopoDS_Builder API and use it as a full BRep object.

bschwind commented 11 months ago

Hey @DSchroer, sorry for the delay on this one, work got busy last week.

Can I get more context on these additions? It might be interesting to add example code that demonstrates what you're using these APIs for. Seems like you're creating OpenCascade Shells and Shapes from a triangle mesh?

DSchroer commented 11 months ago

Yeah. The use of this is to build up a TopoDS_Shape from a set of triangle faces. Essentially import an STL and build a usable shape for modeling.

bschwind commented 11 months ago

Essentially import an STL and build a usable shape for modeling

Interesting! Does it try to extract features like cylindrical drill holes and such, or does it just treat every polygon edge as a TopoDS_Edge? Something in between?

DSchroer commented 11 months ago

Does it try to extract features like cylindrical drill holes and such, or does it just treat every polygon edge as a TopoDS_Edge?

It just builds a mesh out of a bunch of triangular faces. So nothing fancy but it at least allows a bit of interop between existing models and the BREP world.