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

Origin of the workplane of non centered box. #642

Closed
ikeji opened this issue Feb 15, 2021 · 2 comments
Closed

Origin of the workplane of non centered box. #642

ikeji opened this issue Feb 15, 2021 · 2 comments
Labels
question Further information is requested

Comments

@ikeji
Copy link

ikeji commented Feb 15, 2021

I wrote this code:

length = 80.0
height = 60.0
thickness = 10.0
center_hole_dia = 22.0

result = (cq.Workplane("XY").box(length, height, thickness,(False,False,False))
    .faces(">Z").workplane().hole(center_hole_dia))

I run this code in CQ-Editor that download from CI.
https://github.com/jmwright/CQ-editor/actions

When I run this code in CQ-Editor build 48 (build on Mon, 30 Nov 2020 19:14:31 GMT),
It created this model.

build48

When I run this code in CQ-Editor build 50 (build on Wed, 20 Jan 2021 18:43:37 GMT),
it created this model.

build50

Is this change intended?
I'm afraid this change back again?

@adam-urbanczyk
Copy link
Member

Yes, take a look at changes.md and #532 - the default centerOption changed. You can go back to the old behavior like so:

length = 80.0
height = 60.0
thickness = 10.0
center_hole_dia = 22.0

result = (cq.Workplane("XY").box(length, height, thickness,(False,False,False))
    .faces(">Z").workplane(centerOption='CenterOfMass').hole(center_hole_dia))

@adam-urbanczyk adam-urbanczyk added the question Further information is requested label Feb 15, 2021
@ikeji
Copy link
Author

ikeji commented Feb 15, 2021

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants