Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STEP export of a swept tube with 90 angles leads to incorrect geometry #1678

Open
CasperH2O opened this issue Oct 5, 2024 · 1 comment
Open

Comments

@CasperH2O
Copy link

Hey there, would really like some help with this one, a fix or workaround would be appreciated. When I sweep a tube along a certain polyline path, it shows fine in CQ-Editor and the STL export. However the STEP export is broken. I also tried spline and bezier, those look fine.

Version information:
CQ-Editor: 0.3.0dev
Python: 3.11
CADquery: 2.4.0

Code to reproduce (I manually export the file from the UI, but a programmatical export is similar):

import cadquery as cq

# Create a circular profile (the inner and outer circles)
diameter_inner = 8
diameter_outer = 10

# Define the points for the spline path
pts = [
    (0, 0, 0),       # Start point
    (0, 15, 0),      
    (0, 15, 15),     
    (0, 25, 15)      
]

# Workplane on the XY plane
circle_profile = (
    cq.Workplane("XZ")
    .circle(diameter_outer / 2)
    .circle(diameter_inner / 2)
)

# Create a path for the sweep
#path = cq.Workplane("XY").spline(pts)
path = cq.Workplane("XY").polyline(pts)
#path = cq.Workplane("XY").bezier(pts)

# Sweep the profile along the path
swept_shape = circle_profile.sweep(path, transition='round')

# Display the results
show_object(circle_profile)
show_object(path)
show_object(swept_shape)

Shows the following in CQ Editor:

image

But a STEP Export leads to this:

image

@adam-urbanczyk
Copy link
Member

Confirmed, round-trip in CQ/OCP gives the same result:
afbeelding

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants