Reader small image

You're reading from  FreeCAD

Product typeBook
Published inSep 2012
PublisherPackt
ISBN-139781849518864
Edition1st Edition
Concepts
Right arrow
Authors (2):
Brad Collette
Brad Collette
author image
Brad Collette

Brad Collette once designed software for a big company but doesn't like to remember that. These days, he is an entrepreneur, hobbyist, jack-of-all-trades, and a gentleman farmer. He is engaged in a multi-year project to raise two hacker sons. He has contributed to numerous open source projects and is an organizing member of Columbia Gadget Works, central Missouri's finest hackerspace.
Read more about Brad Collette

Daniel Falck
Daniel Falck
author image
Daniel Falck

Daniel Falck has over 25 years experience in manufacturing, machining, CAD, CAM, and computer programming. He has worked for Gibson Guitar doing design and prototyping for over 14 years. Currently, he runs the Prototype machine shop at King Cycle Group, in Portland, Oregon (USA), where bicycle components are manufactured. His home shop is full of CNC machining equipment that he uses to create guitar parts for customers, using open source software running on Linux. Over the past 10 years he has worked with open source manufacturing software such as Linuxcnc, APT360, HeeksCAD, FreeCAD, and a myriad of specialized python scripts.
Read more about Daniel Falck

View More author details
Right arrow

Importing data (Should know)


Sometimes it is desirable to use geometry that was created in other CAD or modeling programs. FreeCAD can import a wide variety of file types. DXF, STEP, STL, SVG, VRML, Collada, and IDF are just some of the file formats that it can use.

In this recipe, we will open a DXF file and use the geometry in it to form a 3D solid.

Getting ready

You should have a DXF file produced by a CAD program such as QCAD, LibreCAD, Draftsight, or AutoCAD available to produce a DXF file.

  1. In FreeCAD, open the Draft workbench and then select Preferences from the Edit menu.

  2. In the Preferences dialog, click on the Draft icon and then click on the Import/Export tab.

  3. Under DXF format options, change Import style to None (fastest).

  4. Uncheck all the other boxes in that same section. Click on Apply and then OK.

Create some geometry in another CAD program. For this example, we will use DraftSight to create a simple shape. The following is a polyline rectangle with four fillets and a circle:

The lines and arcs in this drawing are a polyline. These will translate nicely into FreeCAD and help us create a solid to subtract the circle from.

Save the file as an ASCII type dxf (don't save as Binary).

How to do it...

  1. In FreeCAD, select Import from the File menu.

  2. Select the dxf file that you want to import.

  3. In the Combo View, look at the Project tab and expand the icons.

  4. Switch to the Draft workbench so that we can Upgrade the Circle with the icon that looks like an arrow pointing upward.

  5. Select the geometry labeled as Polyline and use the Part workbench with the Extrude icon to extrude it into a solid.

  6. Extrude the geometry labeled Circle into a solid. Make sure that its height is the same as the solid made from Polyline.

  7. Select the solid that you created from Polyline and then the solid created by Circle.

  8. Use the Boolean Cut operation in Part workbench to subtract the Circle solid from the Polyline solid.

How it works...

DXF importing relies on code within the Draft workbench, so its settings are controlled from Draft preferences. The dxf polyline imported in as a face that could be extruded in the Part workbench. The Draft workbench has tools for changing other 2D geometry into faces, using the Upgrade tool, which allows the Part workbench to make solids from them. Faces will extrude as solids, whereas a closed shape without a face will just extrude into a thin object that looks like walls.

Previous PageNext Chapter
You have been reading a chapter from
FreeCAD
Published in: Sep 2012Publisher: PacktISBN-13: 9781849518864
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (2)

author image
Brad Collette

Brad Collette once designed software for a big company but doesn't like to remember that. These days, he is an entrepreneur, hobbyist, jack-of-all-trades, and a gentleman farmer. He is engaged in a multi-year project to raise two hacker sons. He has contributed to numerous open source projects and is an organizing member of Columbia Gadget Works, central Missouri's finest hackerspace.
Read more about Brad Collette

author image
Daniel Falck

Daniel Falck has over 25 years experience in manufacturing, machining, CAD, CAM, and computer programming. He has worked for Gibson Guitar doing design and prototyping for over 14 years. Currently, he runs the Prototype machine shop at King Cycle Group, in Portland, Oregon (USA), where bicycle components are manufactured. His home shop is full of CNC machining equipment that he uses to create guitar parts for customers, using open source software running on Linux. Over the past 10 years he has worked with open source manufacturing software such as Linuxcnc, APT360, HeeksCAD, FreeCAD, and a myriad of specialized python scripts.
Read more about Daniel Falck