CadQuery / CadQuery/cadquery

Offset2D of circle changes Z-plane

Open
#896 7 comments 0 reactions 0 assignees View on GitHub
OCC kernel issue
Dominant language
Python
Stars
5.8k
Forks
541
Avg merge
3d 2h
Merged PRs (30d)
5

Description

I am trying to make two concentric circles on the top face of a box for further extrusion. However this code produces two circles with the right offset, but in different Z planes.

```
r = cq.Workplane("XY")
r = r.box(1,1,1)
r = r.faces(">Z")
r = r.circle(0.75)
r = r.tag("c")

r = r.offset2D(0.1)
show_object(r)

r = r.wires(tag="c")
show_object(r)
```
![offset](https://user-images.githubusercontent.com/171090/135772955-f8102844-43dd-4ae0-a51f-90328d038e57.png)

I found a similar issue in FreeCAD ([https://tracker.freecadweb.org/view.php?id=3020](https://tracker.freecadweb.org/view.php?id=3020)) and it seems they had to manipulate the location before executing the offset2d operation: https://github.com/FreeCAD/FreeCAD/commit/dbc09e3a2342af8784045d3d0ae3565ec869bef6

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.