CadQuery / CadQuery/cadquery

Different workplane origin position after cut solid and after cutBlind

Open
#1,487 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
5.8k
Forks
541
Avg merge
3d 2h
Merged PRs (30d)
5

Description

Hello,

I am trying to cut some figure from base figure horizontally and then make some drawings on a vertical surface of the same base figure and I have noted, that when I take vertical workplane of the solid, horizontal position of the center is different, depending on how I have made a cut - either with cutBlind or cutting extruded solid of the same shape.

My simplified code:
~~~python
box1 = (
cq.Workplane("XY")
.rect(6, 10, centered=(False, True))
.extrude(4)
)

box1_cutBlind = (
box1.faces("Z").workplane()
.rect(4, 3, centered=(False, True))
)

#show_object(box1_cutBlind)
#show_object(box1_cutSolid)
show_object(box1)
#show_object(box2_v1)
show_object(box2_v2)
~~~

box1: either box1_cutBlind and box1_cutSolid visually give the same result. "offset" param tunes horizontal position of the cut solid. Then box2_v2 draws a rectangle on the top face of the original box1, one of the edges of the rect is placed on the 0 position of X.

So, tuning 'offset' param would move horizontal position of the cut solid on axes X. With box1_cutBlind this would also move topmost rectangle along the X axes. With box1_cutSolid option the topmost rectangle would always stay on the 0 position on axes X.
![Снимок экрана от 2024-01-08 23-18-08](https://github.com/CadQuery/cadquery/assets/1653222/71ce0c07-515f-41da-adb9-3ad23fb7f2ac)
![Снимок экрана от 2024-01-08 23-18-14](https://github.com/CadQuery/cadquery/assets/1653222/15323ee3-4de9-4921-8939-a233a66552a7)
![Снимок экрана от 2024-01-08 23-18-21](https://github.com/CadQuery/cadquery/assets/1653222/e8491e75-624d-4060-bbf8-08bcaf92c470)
![Снимок экрана от 2024-01-08 23-18-27](https://github.com/CadQuery/cadquery/assets/1653222/438a120d-5217-4b3c-ba24-b66ff0583905)
![Снимок экрана от 2024-01-08 23-18-44](https://github.com/CadQuery/cadquery/assets/1653222/d7470187-14d8-4d89-888f-9bc6ddbd78c0)
![Снимок экрана от 2024-01-08 23-18-54](https://github.com/CadQuery/cadquery/assets/1653222/3e9c23b6-04c5-403a-9a38-cfbf316c6b40)
![Снимок экрана от 2024-01-08 23-18-59](https://github.com/CadQuery/cadquery/assets/1653222/b34179cc-7964-4417-a7f0-816d92cc8e52)
![Снимок экрана от 2024-01-08 23-19-04](https://github.com/CadQuery/cadquery/assets/1653222/e81125f1-ebca-453f-9f52-ad656bd93db1)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.