cadquery icon indicating copy to clipboard operation
cadquery copied to clipboard

Export/import docs

Open adam-urbanczyk opened this issue 5 years ago • 5 comments

Add a docs page about exporting and importing

  • STEP
  • STEP assy
  • XML OCAF assy
  • DXF
  • BREP
  • STL/AMF

adam-urbanczyk avatar Oct 03 '20 14:10 adam-urbanczyk

Hey! I'm new to CadQuery and I've looked everywhere for documentation or examples on how to export in STL format, or any format for that for that matter. I can't find anything explicit! Where can I find the answer? Thanks!

coosadog avatar Oct 14 '20 22:10 coosadog

@coosadog

Here are some docs: https://cadquery.readthedocs.io/en/latest/apireference.html?highlight=export#file-management-and-export

And here's an example from the test suite: https://github.com/CadQuery/cadquery/blob/master/tests/test_exporters.py#L45

jmwright avatar Oct 15 '20 00:10 jmwright

@coosadog Also, here's an example involving STL export of a simple thing I created last week to fix a toy for someone.

import cadquery as cq
from cadquery import exporters

diam = 5.0

coupler = (cq.Workplane().circle(diam).extrude(20.0)
          .faces(">Z").workplane(invert=True).circle(1.05).cutBlind(8.0)
          .faces("<Z").workplane(invert=True).circle(0.8).cutBlind(12.0)
          .edges("%CIRCLE").chamfer(0.15))

exporters.export(coupler, "/home/jwright/Downloads/coupler.stl", exporters.ExportTypes.STL)

jmwright avatar Oct 15 '20 01:10 jmwright

You are amazing and thank you! The doc made no sense at all. It wasn't detailed enough. I'm a software developer and expect more from the documentation. I'm sure you'll fix that. The examples weren't very helpful. I would think the examples that come with the download of the software would have that in them, but they don't. Thanks again for your help and examples!

On Wed, Oct 14, 2020 at 8:19 PM Jeremy Wright [email protected] wrote:

@coosadog https://github.com/coosadog Also, here's an example involving STL export of a simple thing I created last week to fix a toy for someone.

import cadquery as cqfrom cadquery import exporters diam = 5.0 coupler = (cq.Workplane().circle(diam).extrude(20.0) .faces(">Z").workplane(invert=True).circle(1.05).cutBlind(8.0) .faces("<Z").workplane(invert=True).circle(0.8).cutBlind(12.0) .edges("%CIRCLE").chamfer(0.15)) exporters.export(coupler, "/home/jwright/Downloads/coupler.stl", exporters.ExportTypes.STL)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/CadQuery/cadquery/issues/470#issuecomment-708828292, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABT66BVQ527CX7TFLLQ6ECTSKZE3BANCNFSM4SCWO52A .

coosadog avatar Oct 15 '20 02:10 coosadog

Partially done in #668, still need to do the assembly stuff.

marcus7070 avatar Apr 06 '21 01:04 marcus7070

Done, https://cadquery.readthedocs.io/en/latest/importexport.html#exporting-assemblies-to-step

adam-urbanczyk avatar Sep 06 '23 08:09 adam-urbanczyk