Open greyltc opened 2 years ago
Try useLocalCoordinates=True
. The first output is correct because the rarray
points will be in XY in global coordinates.
The above is a contrived example specifically to illustrate the bug, not to achieve any final geometry that I want.
@lorenzncode, are you aware of any usage of eachpoint(...,useLocalCoordinates=False)
in the wild today where it's working as expected?
"global XY coordinates" are (0,0,0) at the center of the axis cross. (A) doesn't put the boxes there, so why is it correct?
Is it incorrect or not according to your expectations @greyltc ?
@adam-urbanczyk @lorenzncode This issue is just meant to give an example of what is fixed by #1097
I believe @greyltc is saying that the current behavior does not match expectations.
Is it incorrect or not according to your expectations @greyltc ?
I've tried to keep my expectations of how I think eachpoint(...,useLocalCoordinates=False)
should work out of this for now. My PR and this issue are filed against how I think the original author intended eachpoint(...,useLocalCoordinates=False)
to work.
I'll post a separate issue on how I believe there's a mismatch between what the documentation says and what the code actually does when eachpoint(...,useLocalCoordinates=False)
is called to not muddy the waters here :-).
I've made https://github.com/CadQuery/cadquery/issues/1099 which covers my expectations based on the docs and how each()
works. If the PR associated with that one is merged, this issue and its PR are obsolete.
I'm not sure that the current implemntation is correct, but what you write contradicts with the screenshot @greyltc .
what you write contradicts with the screenshot
@adam-urbanczyk You mean what I wrote in https://github.com/CadQuery/cadquery/issues/1099 contradicts what's here?
https://github.com/CadQuery/cadquery/issues/1099 is meant to be an entirely separate issue from this one (they just happen to occur on the same line). Solving https://github.com/CadQuery/cadquery/issues/1099 (in the way I imagine it should be solved, as in https://github.com/CadQuery/cadquery/pull/1100) makes this whole issue (and its solution) obsolete.
If you agree that https://github.com/CadQuery/cadquery/issues/1099 describes a real problem, then probably ignore this issue. If you disagree that https://github.com/CadQuery/cadquery/issues/1099 is a problem, then consider this issue.
The rarray
points are:
Vector: (99.0, 99.0, 59.0)
Vector: (99.0, 99.0, 99.0)
Vector: (99.0, 99.0, 139.0)
Maybe I got it wrong and @greyltc is correct to expect the boxes to vary in Z here.
On the contradiction: @greyltc you suggest in one of the comments that the objects should be centered around (0,0,0), but it is clearly not the case in the screenshot B. Could you give a definitive description of what is the desired behavior?
AFAICT screenshot A shows the correct behavior and B is just useLocalCoordinates=True
.
For example, the output of
is (A) but it should be (B)
Luckily https://github.com/CadQuery/cadquery/pull/1097 fixes it!