Welcome! Log In Create A New Profile

Advanced

Import CSG file from OpenSCAD to FreeCAD.

Posted by KeithSloan 
Import CSG file from OpenSCAD to FreeCAD.
March 16, 2012 04:13AM
I have made a first pass at a OpenSCAD CSG importer for FreeCAD [sourceforge.net] Which is an Open Source 3D Cad package.

Having imported in FreeCAD, then one can use FreeCAD to either modify the design or export to STEP/Iges formats
for loading in other 3D CAD graphics software

Details are at [www.sloan-home.co.uk]

I am looking for relatively small files that ImportCSG fails to import, so that I can improve the python importer.
If you find such files please email them to me. My email address is in the header of the python scripts.

Reprap users users of FreeCAD may also be interested in this importer for GCODE [www.thingiverse.com]
Be warned do not follow the install instructions explicitly as this will disable all the FreeCAD importers
other than GCODE. You have to modify the InitGui.py file instead.
Re: Import CSG file from OpenSCAD to FreeCAD.
March 27, 2012 01:36PM
Keith,

I admire the considerable effort you have put in to this project and what you have achieved in such short space of time. Thank you!

As you have the ability, I can't help but wonder why you don't instead write a STEP or IGES exporter for openSCAD? Or perhaps even a standalone openSCAD CSG to IGES/STEP translator if converting directly between those formats made more sense? Is doing so really that much more complex than what you have achieved to date?

I see that writing an IGES exporter is in the openSCAD project 'todo list' anyway - and both IGES and STEP formats contain native support for CSG entities. Additionally, FreeCAD is capable of importing IGES and STEP - together, of course, with most other mainstream CAD software.

Searching for solutions, I came across the site of Walter Heger, an IBM engineer: http://wheger.tripod.com/step/
Here's an excerpt from that page: "I wrote software to convert Constructive Solid Geometry (a description of 3D CAD using solid primatives (rectangular solid, cylinder, sphere) and operations on them [union, intersection and subtraction]) to a Facetted Boundary Representation (describing the geometry [point, line, plane] and topology [vertex, edge, loop, face, shell]) using Euler Boolean operations."

Some or maybe all his source code is available for download - perhaps you might find it useful or inspiring.

Which ever way you enable CSG data to escape the clutches of openSCAD in a quality-lossless form, I shall be truly grateful!

Keep up the great work,
Hamish
Re: Import CSG file from OpenSCAD to FreeCAD.
March 27, 2012 05:02PM
Once you load something into FreeCAD you can use FreeCAD to export to IGES or STEP. The exports for IGES and STEP already exist for FreeCAD
Sorry, only registered users may post in this forum.

Click here to login