jimy-byerley / pymadcad

Simple yet powerful CAD (Computer Aided Design) library, written with Python.
https://madcad.netlify.app/
GNU Lesser General Public License v3.0
208 stars 16 forks source link

Parasolid save of the CAD #9

Closed Boreas3 closed 2 years ago

Boreas3 commented 2 years ago

Hello everyone,

I am searching for the possibility to save the created CAD into a Parasolid file?

Thanks for your help.

jimy-byerley commented 2 years ago

Hello and welcome here ! By Parasolid files I assume you mean .step files or solid edge files or solidworks files ? If yes, I have bad news.

I only have a little experience with these file formats (I only know the solidworks side I mean). But I suspect those formats will never be compatible with madcad :-/ ... And there is strong reasons: The trick is that

So sadly, madcad cannot output something else than meshes, and most parasolid derivatives cannot load them.

There is advantages and downsides to both, but mainly here is a summary: triangular meshes are

Just out of curiosity: what exactly was your purpose in exporting to a parasolid file ?

Boreas3 commented 2 years ago

Hello! I thank you for your response. In fact, I would have wanted to use this python library to generate CAD that could be in the CFD solver (CFX from Ansys). This would have been an alternative to the parametric cad software that I currently am using for my work. For some geometries (like a volute for turbocompressor/turboexpander), the way cad is generated with madcad was attracting me. But If you are telling me that it would be very tricky to generate such file formats, then I will stick to the conventional way to make CAD!

Again, I thank you of having taken the time to answer me.

Have a great day!

PeterMoresco commented 2 years ago

If you wish, there's a way to convert from mesh(STL, OBJ) to STEP using FreeCAD, it's very straightforward, and also FreeCAD is free and OpenSource. One can generate the geometries there too, or using OpenSCAD one can generate the solid right away. If you're using the Ansys suite, SpaceClaim is able to convert meshes into solids.

jimy-byerley commented 2 years ago

Greate news @PeterMoresco ! I wasn't aware of this function of FreeCAD and of the existence of SpaceClaim. It is good news that there is holes in that wall between B-rep and mesh

Boreas3 commented 2 years ago

I thank you both for your responses. indeed, it seems that there are ways to perform what I am looking for!

jimy-byerley commented 2 years ago

I close this topic, but feel free to reopen if you see new problems in the conversion. Also tell me if it works fine :)