Question about "open" groups.
-
@unknownuser said:
I had a similar issue recently and I simply had to tell the user that the operation he was trying to perform was not allowed while in Group edit. This was because of the bugs dealing with working with groups and being out of context when in group/component edit.
That's the way the ball bounces.
Thats disappointing.
Thanks Todd.
-
I found a work around but its a little gross. I don't fully trust observers not to crash Sketchup.
I put a entityObserver on my lattice group and then in onChangeEntity I store the current transformation in an attribute. Then when a user moves a point I check to see if the group is open (via observer) and if so I transform my control points by the inverse of the stored transform. That gives me a group relative point. whew.
Thanks for the help.
Chris -
I figured it out!
If your group is open, get any entity in the group, and do this:
entity.parent.origin
That will give you the origin of the group's transformation. Viola!
Todd
-
@unknownuser said:
I figured it out!
If your group is open, get any entity in the group, and do this:
entity.parent.origin
That will give you the origin of the group's transformation. Viola!
Todd
When I try that the parent is ComponentDefinition and that doesn't have .origin. Did I miss a step?
Chris
-
Oops. Sorry.
entity.parent.insertion_point
Todd
-
@unknownuser said:
Oops. Sorry.
entity.parent.insertion_point
Todd
Ah! That does seem to work. Its only a point though, any way to get the rest of the transformation?
Thanks Todd!
-
My hat of guessing says...
tr = Geom::Transformation.new(entity.parent.insertion_point)
Todd
-
...but I don't think that will take care of any rotation.
-
@unknownuser said:
...but I don't think that will take care of any rotation.
Yeah without rotation it doesn't help. But the observer method seems to be working fine so far.
Chris
-
I did check with Google on this topic yesterday, and they see it as a flaw.
Todd
Advertisement