Very Odd Bug
-
Edit: Problem solved. Thank you for stopping by to lend a hand.
Stupid Programmer Trick # 38,298,987,234
The first component to start moving was shorted by one second. Had nothing to do with the quadrant.
In this script:
load( Sketchup.find_support_file('sketch_talk.rb', 'Plugins/ruby_console_pro/') ) n box o, [20,20,0], 10 box1 = g 'box1' m box1, [20,20,30], 0, 20 none box o, [-20,-20,0], 10 box2 = g 'box2' m box2, [-20,-20,30], 4, 20 none box o, [-20,20,0], 10 box3 = g 'box3' m box3, [-20,20,30], 8, 20 none box o, [20,-20,0], 10 box4 = g 'box4' m box4, [20,-20,30], 12, 20 none gofour boxes are created in the four rg quadrants. Translating SketchTalk to English, that's:
n # select all, delete (quickie File/New) box o, [20,20,0], 10 # Rectangle, origin to [20,20,0], PushPull up 10 box1 = g 'box1' # Create ComponentInstance named 'box1' m box1, [20,20,30], 0, 20 # schedule a future move during seconds 1 through 19 none # unselect everything ... go # begin the scheduled movesEach box schedules a move, 20 units out into its quadrant and 30 units up the blue axis. They move, which is great.
But the box in the positive r, positive g quadrant doesn't quite do a full move. The move code is quite simple-minded. It divides the move vector into distance per frame. It has nothing to do with quadrants.
def create_amcis() # convert registrants into actionable, movable CIs for reg in @@registrants duration = reg.stop - reg.start frames = duration * $sketch_talk_fps r = reg.vector[0].to_f() / frames g = reg.vector[1].to_f() / frames b = reg.vector[2].to_f() / frames reg.actionable = Con_Amci.new( reg, r, g, b ) end # registrant loop end # of create_amcis()The move vector is [20,20,30]. Actual move is speed-dependent:
5 sec. [16,16,24]
10 sec. [18,18,27]
20 sec. [19,19,28.5]
40 sec. [19.5,19.5,29.25]The other three boxes animate happily to a full [20,20,30]. Shuffling the box order doesn't change the behavior. The box in the positive red, positive green quadrant doesn't do a full move.
-
Glad we helped

-
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