Move! bug?
-
Does everyone know this but me...

First, the API docs for the Group.move! method:
@unknownuser said:
move!
This method is the same as the transform! method except that it does not record the move in an undo operation. This method is useful for transparently moving things during an animation.This code tells a different story. It seems that grp2 is moved to an absolute position even if a Vector is used for the Transformation object. My expectation is that both groups would be moved 3 times, leaving a trail of numbers.
require "sketchup.rb" puts Time.now grp1 = Sketchup.active_model.selection[0] grp2 = Sketchup.active_model.selection[1] v1 = Geom;;Vector3d.new(X_AXIS) v2 = Geom;;Vector3d.new(X_AXIS) v1.length = grp1.bounds.width * 2 v2.length = grp2.bounds.width * 2 tr1 = Geom;;Transformation.new(v1) tr2 = Geom;;Transformation.new(v2) 3.times do |i| grp1.transform! tr1 grp2.move! tr2 Sketchup.active_model.entities.add_text "g1-#{i+1}", grp1.transformation.origin Sketchup.active_model.entities.add_text "g2-#{i+1}", grp2.transformation.origin end
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement