2 years ago

#66102

test-img

lobis

How to go from STEP geometry to CSG

I am trying to transform a solid created in a CAD program (saved in a STEP file) into a CSG object constructed with simple primitives.

I am not very familiar with the different geometry file formats but as far as I understand it should be possible to do, at least with some simple solids, since the information about the face shapes etc. is stored in a STEP file. I have found this issue https://github.com/tpaviot/pythonocc-core/issues/470 which proves you can extract some of this information. However I am not sure this is enough to achieve my goal.

As an example, I would like to go from the following CAD design / STEP file: Example input geometry

to a CSG description which should describe the geometry as a big cylinder with three smaller cylinders as subtractions.

Ideally I would use a python library for this purpose, perhaps this library is a good candidate.

However I am afraid this isn't theoretically possible since I am not finding much information online.

As a last resort I could just mesh the solid and generate a CSG description using a tessellated solid, but I want to use simple primitives such as boxes or cylinders whenever possible.

I would love to know if this is possible to do and if so, I would love some resources to read about this. Thanks!

python

cad

step

csg

0 Answers

Your Answer

Accepted video resources