Possible offset2D bug
- Dominant language
- Python
- Stars
- 5.8k
- Forks
- 541
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 5
Description
In this scenario I am trying to transfer an offset wire from a cylinder to a box. Performing a 2D offset I would expect that the dimensions of the wire will change but that it will remain on the same plane as the original wire. This is not the case as the offset2D operation changes the z component of the wire by 10 points (as much as the dimension of the box). The seems to be that the location of the wire does not match the CenterOfBoundBox. I am currently correcting it using `center-offset.CenterofBoundBox()` but it feels more of a hack than the intended behaviour. Shouldn't the location of a wire and its center be at least coplanar?
``` python
from cadquery import *
from cadquery.selectors import *
from math import *
from dataclasses import dataclass
box = Workplane('XY').box(10,10,10, centered=(True,True,False))
cylinder = box.faces('>Z').workplane(offset = 1).cylinder(10,5, centered=(True, True, False), combine=False)
center = box.faces('>Z').val().CenterOfBoundBox()
wire = cylinder.wires('Z').add(wire_loc).toPending().cutBlind(-1)
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.