CadQuery / cadquery

A python parametric CAD scripting framework based on OCCT
https://cadquery.readthedocs.io
Other
3.08k stars 286 forks source link

Scale issue with sweep function #307

Open timvw01 opened 4 years ago

timvw01 commented 4 years ago

Hello, i think i found a bug:

I try to make a pipe section with the following code:

image

When i adjust the parameters to be in mm, the code doesn't work anymore.

image

Seems like it is dependent on the absolute size of objects? Can we make it non-dimensional, for example by dividing the tolerance by the biggest dimension of the path (just a random idea..)

The code:

import cadquery as cq

r_pipe = 9500 #m
t_pipe = 500 #mm

pts = [
    (0, 0),
    (0, 8000),
    (3000, 17000),
    (7000, 23000),
]

path = cq.Workplane("XZ").polyline(pts)
section = cq.Workplane("XY").circle(r_pipe).circle(r_pipe-t_pipe)
sweep = section.sweep(path)
adam-urbanczyk commented 4 years ago

Confirmed.

On OCCT7.4 I'm getting StdFail_NotDone: BRep_API: command not done