CadQuery / CadQuery/cadquery

Issue creating STEP file after revolving arc

Open
#1,338 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
5.8k
Forks
541
Avg merge
3d 2h
Merged PRs (30d)
5

Description

I'm new to CadQuery and have run into a repeated issue creating STEP files while trying to revolve arcs. It appears to be an issue with the export function itself and possibly OpenCascade, but I was wondering if anyone has experienced anything similar or sees something I am doing wrong!

I've tried both methods of creating a sketch and revolving it as one solid body, as well as creating a body and then revolving a sketch to cut it. Both have caused the same error. The revolve -> step conversion works fine for anything from 0-287 degrees, but as soon as I pass 288-360 the error occurs (see images), and has done so consistently on multiple different projects.

Here is a simple code I wrote to test for errors after I kept seeing it come up elsewhere:
import cadquery as cq
result = (cq.Workplane("front")
.lineTo(2.0, 0)
.threePointArc((1.0, 1.0), (0.0, 0.0))
.close()
.revolve(360, (0, 0), (0, 1))
)
cq.exporters.export(result, 'C:Path/result.step')

Here are some images after opening the STEP files in FreeCAD. Each worked as expected in the native CQ-editor, but created problems when opening in other apps.
Rotating 287 degrees: Note that this worked as expected
![image](https://github.com/CadQuery/cadquery/assets/135037958/f078e92d-a6da-43c5-b531-55bf89bcd159)

Rotating 288 degrees: Note that this created what seems like the inverse of the revolve?
![image](https://github.com/CadQuery/cadquery/assets/135037958/f4178505-454d-4211-a661-0c47ec0d7f8b)

Rotating 360 degrees: Note that this created a full revolve, but also created a torus not as expected
![image](https://github.com/CadQuery/cadquery/assets/135037958/57a31d4d-0a03-4ff4-9f5e-d0823fabd28f)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.