Author Topic: FreeCAD Macro to import polyline from a layer  (Read 6778 times)

Offline onekk

  • CNC Jedi
  • *****
  • Posts: 525
    • View Profile
FreeCAD Macro to import polyline from a layer
« on: January 05, 2018, 17:21:44 pm »
Hi to all, in the process of making some 3D model of some creations, I have developed a FreeCAD macro that import the polyline in a given layer 
Code: [Select]
layer_name = "Box"
to wires on the Draft Workbench of FreeCAD, it is rough but as the FreeCAD DXF importer don't work out of the box with CB files, it's better than editing all the polyline by hand.

It handles only polylines and suppose that they are outer profiles and parse the CB file using the XML parser of python.

It is supplied as is in the hope will work for someone else other than me.

It has to be imported and executed in the Macro Editor of FreeCAD, the wire could then be extruded to create a representation of the pieces of plywood (in my case) and then moved and assembled to form a 3D representation of the finished objects.
 

to be considered as a starting point for something much more elaborated ASA i learn more about FreeCAD.

It uses the "Tag" field of CB and the Polyline ID to name the FreeCAD Craft wire object

Regards

Carlo D.
Carlo D. (onekk)

eShapeoko #343 750x1000 mm + GRBL + bCNC + CamBam