How to create a section drawing in "dxf" format?

259 views
Skip to first unread message

Ben

unread,
Apr 21, 2021, 6:03:04 AM4/21/21
to CadQuery
Hi. 
I am planning to use CadQuery.
I want to make a cross-sectional view of a 3D model cut from various directions.
The format should be dxf.
Are there any APIs made to make this possible?
Could you ever see an example of this use?

Jeremy Wright

unread,
Apr 21, 2021, 6:10:39 AM4/21/21
to CadQuery
There is an example of exporting a section to DXF in the contrib repo: https://github.com/CadQuery/cadquery-contrib/blob/master/examples/tray.py#L104

I think section only works in the direction of the normal, so dynamically varying the section direction might be a challenge.

Adam Urbanczyk

unread,
Apr 21, 2021, 12:19:53 PM4/21/21
to CadQuery
The section is based on the current workplane (and an additional offset). You can create new wokrplanes by e.g. applying rotation (take a look at this example: https://cadquery.readthedocs.io/en/latest/examples.html#rotated-workplanes ).
Reply all
Reply to author
Forward
0 new messages