cadquery icon indicating copy to clipboard operation
cadquery copied to clipboard

Exported STEP model is not correct when tag is used

Open marpoleSim opened this issue 2 years ago • 1 comments

I followed the example https://cadquery.readthedocs.io/en/latest/examples.html#tagging-objects and can produce the result as expected in cq-editor. image

I then exported the model to a STEP file. Somehow, it gave the drillings instead. image

Here is the script I used. I'm wondering if this is an issue. Thanks in advance.

import cadquery as cq 

result = (cq.Workplane("XY")
          # create a triangular prism and tag it
          .polygon(3, 5).extrude(4).tag("prism")
          # create a sphere that obscures the prism
          .sphere(10)
          # create features based on the prism's faces
          .faces("<X", tag="prism").workplane().circle(1).cutThruAll()
          .faces(">X", tag="prism").faces(">Y").workplane().circle(1).cutThruAll()
          )
show_object(result)

cq.exporters.export(result, "result.step")

marpoleSim avatar Jun 08 '23 17:06 marpoleSim

Confirmed. AFAICT this is not related to tagging (same results when directly exporting the resulting compound), but rather smth wrong with the orientation of faces.

adam-urbanczyk avatar Jun 09 '23 16:06 adam-urbanczyk