Page 1 of 1

Issue #6928 - Computed placement wrong when cloning

Posted: Fri May 27, 2022 10:30 am
by smurfix
Hi,

So I'm in the Parts module. I add a cube and position it based on some formula or other.

Then I go to Parts Design and click Dolly to create a clone, then move the clone around, based on some other formula.

Then I change some variables used in these formulas. Oops, my model is now broken.

The problem is that the clone's original Placement is stored in the copy, using absolute values, not the original formula. Thus, when I change some of the variables which my positioning is based on, the original moves where it's supposed to, but the clone doesn't: its placement is relative to the initial position of the original instead of its current position.

My preferred fix would be for the clone not to have two placements in the first place. It should default to the placement of its parent, using its formulae if applicable, and that's it.

V0.19.

To reproduce:
  • create a variable "off", set it to 1cm
  • create a variable "len", set to 2cm
  • create a cube
  • position the cube with x=off
  • set the cube's x-length to "len"
  • clone the cube
  • position the clone with x="len" so that you now have two consecutive cubes
  • now change "len" and/or change "off"
  • observe that the two cubes no longer align
  • tear out hair
  • either: edit the clone so that its internal "clone###.Placement.Position.x" contains "off" instead of the constant 1
  • or: zero the clone's internal placement entirely and set the body's placement.position.x to "off+len"
  • either way, observe that this construction now works
  • … do the same thing with the umpteen other objects you used to compose your parameterized construction …
I assume that this is a bug and I should go to github and file an issue.

Re: Computed placement wrong when cloning

Posted: Sat May 28, 2022 5:59 pm
by Kunda1
Haven't looked at the details of this post. But I'm curious why it was
1. Not tested on v 0.20dev first?
2. Made into a GitHub ticket without community vetting?

Re: Computed placement wrong when cloning

Posted: Sun May 29, 2022 5:37 am
by adrianinsaval
What's the gihub issue number?

Re: Computed placement wrong when cloning

Posted: Sun May 29, 2022 7:11 pm
by Kunda1
adrianinsaval wrote: Sun May 29, 2022 5:37 am What's the gihub issue number?
issue #6928

Re: Issue #6928 - Computed placement wrong when cloning

Posted: Mon Jun 27, 2022 11:56 am
by Kunda1
Updated title to reflect open ticket