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

Hole not at the current workplane #1709

Open
davidedelvento opened this issue Nov 23, 2024 · 5 comments
Open

Hole not at the current workplane #1709

davidedelvento opened this issue Nov 23, 2024 · 5 comments
Labels
question Further information is requested

Comments

@davidedelvento
Copy link

The following

a = Workplane("XY")
a = a.box(9, 20, 4)
a = a.faces("<Y")
a = a.workplane()
a = a.rect(4,4).extrude(13)
a = a.faces(">X")
a = a.hole(2)

generates

image

in which the hole is rotated 90 degrees from the current workplane.

Is this a bug or am I doing something incorrect?

@adam-urbanczyk
Copy link
Member

You changed the workplane here a = a.faces("<Y"). So the hole direction looks OK I think.

@adam-urbanczyk adam-urbanczyk added the question Further information is requested label Nov 23, 2024
@davidedelvento
Copy link
Author

You changed the workplane here a = a.faces("<Y"). So the hole direction looks OK I think.

Thanks, but I changed it back later with a.faces(">X")! Why does that change the position but not the orientation? Or rather how do I change also the orientation which is what I need?

@adam-urbanczyk
Copy link
Member

Are you maybe confusing workplane and selection?

@davidedelvento
Copy link
Author

Are you maybe confusing workplane and selection?

Possibly. But https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Workplane.hole says

The surface of the hole is at the current workplane.

Arguably "the surface" is ambiguous but I understood it as the "surface" that one would drill through during the manufacturing.

Can you please clarify?

@davidedelvento
Copy link
Author

Okay so adding a workplane fixes the issue, as below

a = Workplane("XY")
a = a.box(9, 20, 4)
a = a.faces("<Y")
a = a.workplane()
a = a.rect(4,4).extrude(13)
a = a.faces(">X").workplane()
a = a.hole(2)

I am probably still a bit confused between workplane and selection, but at least I can move forward and learn.

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