-
Notifications
You must be signed in to change notification settings - Fork 300
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
Extrude with taper on any Workplane return a wrong extrude length #1383
Comments
It's because the sides converge to a point before they get to the extruded length. The zlen can be calculated via the cosine of the taper angle as long as there is not a point convergence. import cadquery as cq
from math import cos, radians
a = list(range(0,30))
for angle in a:
part = cq.Workplane('XY').rect(100.0,100.0).extrude(100.0, taper = angle)
bb = part.val().BoundingBox()
print(str(angle) + " : " + str(bb.zlen) + " : " + str(100.0 * cos(radians(angle)))) Outputs:
|
I think we need to fix this. Me expectation was that this param is height, that is confirmed by the docstring:
|
Fix for incorrect tapered extrude height found in #1383
@trunglebao This has been fixed in the latest commit, (see linked PR) but the CI system will need a few hours to build and deploy. |
Generic use of the extrude(until = x, taper = y) command will result in extrude length less than x.
Running the code above create a bunch of extrude with height 1, with taper ranging from 0 to 60 degree.
Plotting the taper angle (0 to 60 degree) with resulted extrude height (suppose to be 1):
Only taper = 0 return the correct height = 1, the rest is all less than 1.
Any thought/alternative solution to get the correct height?
Thanks!
The text was updated successfully, but these errors were encountered: