Transformation help req'd!
-
How to I stop the transformation for the "left leaf" from influencing the "right leaf" ?
is there some type of reset statement available? TIAgroup=entities.add_group entities=group.entities #----left leaf left=entities.add_face($pt00, $pt4, $pt5, $pt33) left.pushpull $ddthick #rotation is about point $pt000 and about the blue axis 80 degrees t=Geom;;Transformation.rotation($pt000,Geom;;Vector3d.new(0,0,1), -pi*0.8888/2) group.move!(t) group=entities.add_group entities=group.entities #----right leaf right=entities.add_face($pt4, $pt11, $pt22, $pt5) right.pushpull $ddthick
-
OK, after playing with your snippet of code for a bit, I think the problem is that the first leaf is being created in its own group. Then the 2nd leaf is being made in a group inside the first group. So when you transform the first group, you are altering where your points for the right leaf will be made.
So change your code so that the right leaf is being made inside the model entities, not inside the left leaf group entities. Look at this code for some subtle changes.
group=entities.add_group g_entities=group.entities #----left leaf left=g_entities.add_face($pt00, $pt4, $pt5, $pt33) left.pushpull $ddthick #rotation is about point $pt000 and about the blue axis 80 degrees t=Geom;;Transformation.rotation($pt000,Geom;;Vector3d.new(0,0,1), -pi*0.8888/2) group.move!(t) group=entities.add_group g_entities=group.entities #----right leaf right=g_entities.add_face($pt4, $pt11, $pt22, $pt5) right.pushpull $ddthick
Essentially I just separated your entities variable into 2. "entities" now holds the model entities. g_entities now holds the group entities. This way when you create your second group, it is being made inside the model entities, not inside the previous group.
Chris
-
Thanks for shining a light on this for me Chris, I need to get new batteries
Advertisement