Skip to content

Commit

Permalink
Merge pull request #419 from CadQuery/README-update
Browse files Browse the repository at this point in the history
Mention DXF export in the README
  • Loading branch information
jmwright authored Aug 3, 2020
2 parents de515ab + d3bf618 commit cc1f8f3
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ CadQuery is often compared to [OpenSCAD](http://www.openscad.org/). Like OpenSCA
### Key features
* Build 3D models with scripts that are as close as possible to how you would describe the object to a human.
* Create parametric models that can be very easily customized by end users.
* Output high quality (loss-less) CAD formats like STEP in addition to STL and AMF.
* Output high quality (loss-less) CAD formats like STEP and DXF in addition to STL and AMF.
* Provide a non-proprietary, plain text model format that can be edited and executed with only a web browser.
* Offer advanced modeling capabilities such as fillets, curvelinear extrudes, parametric curves and lofts.

Expand Down
32 changes: 32 additions & 0 deletions doc/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,38 @@ The finished product looks like this:

.. image:: _static/quickstart/005.png

Exporting
=========

If you want to fabricate a physical object you need to export the result to STL or DXF. Additionally, exporting as STEP for post-processing in another CAD tool is also possible.

This can be easily accomplished using the :py:meth:`cadquery.exporters.export` function:

.. code-block:: python
:linenos:
:emphasize-lines: 13
height = 60.0
width = 80.0
thickness = 10.0
diameter = 22.0
padding = 12.0
# make the base
result = cq.Workplane("XY").box(height, width, thickness)\
.faces(">Z").workplane().hole(diameter)\
.faces(">Z").workplane() \
.rect(height - padding, width - padding, forConstruction=True)\
.vertices().cboreHole(2.4, 4.4, 2.1)\
.edges("|Z").fillet(2.0)
# Render the solid
show_object(result)
# Export
cq.exporters.export(result,'result.stl')
cq.exporters.export(result.section(),'result.dxf')
cq.exporters.export(result,'result.step')
Done!
============
Expand Down

0 comments on commit cc1f8f3

Please sign in to comment.