Hi,
I'm from Dessia, a french start-up in enginneering. We needed a python package construct geometries and to make some computations 2D computations like areas, second moment area, intersections and so on. The package had to be lightweight, so we didn't wanted to use OpenCascade or such engine.
We developed volmdlr (Volume Modeler), an open source python package: https://github.com/Dessia-tech/volmdlr
The package make for now the computations in 2D. For 3D, we rely on FreeCAD with a binding: from our geometric description, we write a corresponding freecad script and we execute it. This allows to use python3 as the user must give the python2 path that can import FreeCAD as a lib.
Here is an example of a casing designed with our package: (Link to the script on github)
The inner contour is specified by points of the polygon and radii to round it's corners. Then these profiles are extruded. The upper "belt" interface with the screw holes is generated in the same way, and we sample the screw position by asking points on the contour at regular curvilinear absissa.
I'll show you soon some other examples generated with this package.
Using FreeCAD as a lib in a python package
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Using FreeCAD as a lib in a python package
- Attachments
-
- casing.fcstd
- (23.36 KiB) Downloaded 91 times
Re: Using FreeCAD as a lib in a python package
Thanks for sharing.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Using FreeCAD as a lib in a python package
Very cool! Looking forward to seeing more examples, as you said. Thanks!
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Using FreeCAD as a lib in a python package
@Msfd would you be open to featuring your project in the User Showcase subforum ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs