sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Mess in model after SketchyPhysics usage.

    Scheduled Pinned Locked Moved SketchyPhysics
    9 Posts 3 Posters 953 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      munkey
      last edited by

      Hello. After using sketchyphysics for some little geometry in one specific scene I didn't notice, that the rest of my model is also affected by sketchyphysics and started moving (see attachment). What is worse, I saved model with this mess and didn't make a copy.

      I would like to ask - is there any way to reset the model to the time before SP animation? I don' think so, as it is saved.

      Ok, I think I have to reset the groups to their previous position manually. But I don't want even to imagine to do this with protractor, as the groups are "twisted" in every possible angle. Is there any plugin or ruby to make this easier for me?

      Thanks for any help!


      messy mess.

      1 Reply Last reply Reply Quote 0
      • mitcorbM Offline
        mitcorb
        last edited by

        This may not be much help, but: Each group can be pivoted on itself after activating the Move tool. You probably know this.
        Is there not some initial scene or frame that is saved? I don't know. Just an idea.

        I take the slow, deliberate approach in my aimless wandering.

        1 Reply Last reply Reply Quote 0
        • M Offline
          munkey
          last edited by

          @mitcorb said:

          This may not be much help, but: Each group can be pivoted on itself after activating the Move tool. You probably know this.
          Is there not some initial scene or frame that is saved? I don't know. Just an idea.

          You probably mean the 4 red protractors on each side - yes i know about it and it helps a bit but... what I need is some kind of ruby/plugin which would let me pick foe example 2 points of a component/group and align it to next 2 points. I don't have an idea if there is somethink like this...
          Unfortunately there is no initial scene or anything...

          @unknownuser said:

          Oh man, don't save while you run the simulation!
          I guess you could try undo if you still have it open, but I'm guessing not...

          Ok, I can give you a small code that will reset everything to the default positions, but this means all objects will be moved to the center.

          Just click SELECT ALL, then copy it into Ruby Console and hit Enter:
          CODE: SELECT ALL
          t=Geom::Transformation.new();
          Sketchup.active_model.entities.each{|ent|if(ent.class==Sketchup::Group or ent.class==Sketchup::ComponentInstance);ent.transformation=t1;end}

          And if you are unhappy with the results you can still undo it.

          I know I screwed it... and next time I will try to be more careful. I forgot to press the "reset physics simulation" and saved it with this geometry being screwed & fallen to the very bottom.

          I tried the thing with the console, but somehow nothing happend. Maybe there is an mistake in this code? I never used Ruby Console before. But thanks for trying to help!

          1 Reply Last reply Reply Quote 0
          • mitcorbM Offline
            mitcorb
            last edited by

            It is unfortunate that SP does not have a mechanism to automatically save initial state.
            Of course, I do not have SP, and of course I don't have ESP, either. 💚

            I take the slow, deliberate approach in my aimless wandering.

            1 Reply Last reply Reply Quote 0
            • M Offline
              Mr.K.1
              last edited by

              Oh sorry I left a minor mistake in the code, try it now, should work.

              1 Reply Last reply Reply Quote 0
              • M Offline
                Mr.K.1
                last edited by

                Oh man, don't save while you run the simulation!
                I guess you could try undo if you still have it open, but I'm guessing not...

                Ok, I can give you a small code that will reset everything to the default positions, but this means all objects will be moved to the center.

                Just click SELECT ALL, then copy it into Ruby Console and hit Enter:

                t=Geom;;Transformation.new();Sketchup.active_model.entities.each{|ent|if(ent.class==Sketchup;;Group or ent.class==Sketchup;;ComponentInstance);ent.transformation=t;end}
                

                And if you are unhappy with the results you can still undo it.

                1 Reply Last reply Reply Quote 0
                • M Offline
                  munkey
                  last edited by

                  @mitcorb said:

                  It is unfortunate that SP does not have a mechanism to automatically save initial state.
                  Of course, I do not have SP, and of course I don't have ESP, either. 💚

                  What is ESP?

                  1 Reply Last reply Reply Quote 0
                  • M Offline
                    munkey
                    last edited by

                    @unknownuser said:

                    Oh sorry I left a minor mistake in the code, try it now, should work.

                    Thanks a lot, Mr.K.! It worked now. I don't know how could I help you, so in the meantime you have to be satisfied with the warm feeling! 😄 Thanks.

                    1 Reply Last reply Reply Quote 0
                    • mitcorbM Offline
                      mitcorb
                      last edited by

                      ExtraSensoryPerception--I got none of that.

                      I take the slow, deliberate approach in my aimless wandering.

                      1 Reply Last reply Reply Quote 0
                      • 1 / 1
                      • First post
                        Last post
                      Buy SketchPlus
                      Buy SUbD
                      Buy WrapR
                      Buy eBook
                      Buy Modelur
                      Buy Vertex Tools
                      Buy SketchCuisine
                      Buy FormFonts

                      Advertisement