• Login
sketchucation logo sketchucation
  • Login
ℹ️ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

MSPhysics 1.0.3 (16 October 2017)

Scheduled Pinned Locked Moved Plugins
920 Posts 170 Posters 882.8k Views
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.
  • A Offline
    Anton_S
    last edited by 27 Jul 2016, 00:53

    Thanks for feedback, faust. I'll see what I can do about it. I was thinking about saving replay data into a separate file (that would be placed right where the model is), but hesitated because I was worried that two files would make it inconvenient. However, right now I'm thinking that saving Replay data into a separate file won't be a bad idea. You have any thoughts about it?

    1 Reply Last reply Reply Quote 0
    • F Offline
      faust07
      last edited by 27 Jul 2016, 07:06

      Yes that is a good idea. These data should possibly be stored in a subdirectory with a copy of the model to ensure that the model geometry and the replay data match later. A warning that by changing the Physics-relevant geometry no replay is possible, would be good.

      1 Reply Last reply Reply Quote 0
      • A Offline
        Anton_S
        last edited by 28 Jul 2016, 22:40

        Faust, I'm thinking of making it simpler. The file would be stored at the same location of the model, named [model_name].mspr. It will load whenever the associated model is opened, and be written to whenever the associated model is closed (if replay data is changed). If for instance the geometry doesn't match or the data becomes corrupt, it will display an error message, and then erase the associated mspr file. I want to avoid creating subdirectories and saving copies of the model because it might make it a little complicated. If the user wants to make changes to the model, they could first make a copy of the model and the associated mspr file, then proceed making changes.

        1 Reply Last reply Reply Quote 0
        • A Offline
          Anton_S
          last edited by 29 Jul 2016, 03:46

          Okay faust, I updated it. Upgrade to 0.9.2 and replay data would be saved to a separate file.

          1 Reply Last reply Reply Quote 0
          • J Offline
            junaramaro
            last edited by 29 Jul 2016, 12:15

            my sketchup 2016 crashes when starting the simulation... don't know if i'm just wrong... without putting any parameters...i just click the play button... then boom, a bug splat T^T....

            1 Reply Last reply Reply Quote 0
            • F Offline
              faust07
              last edited by 29 Jul 2016, 14:32

              Anton, regarding separate replay data file:
              after long tests and reducing my ice-mountain-model to the minimum the following results:
              Small models with moderate simulations work very well (up to 15 - 20 Mb mspreplay file size).
              Large models with much physics simulated and emitted objects (mspreplay files larger 20 Mb) work until you save and exit the model.
              Opening the model again, crashes or stops during loading the replay data. The replay file is then lost.
              The completely reduced file example (in my post with questions and examples) after saving Replay data, exit and reopen the model Replay runs but nothing happens.
              In the test file you can see an other problem too - the viewport problem with emitted objects if you try it often enough. Running the simulation the viewport goes, comes back, running replay the viewport stays away. (think that some emitted object fly into space with high speed before end of its lifetime ...)
              Thanks for your efforts!

              1 Reply Last reply Reply Quote 0
              • A Offline
                Anton_S
                last edited by 29 Jul 2016, 21:24

                Junaramaro, more details would be preferred, like OS version, SU version, and of course the model that crashed.


                Faust, thanks for testing. I'll see what I can do there.

                1 Reply Last reply Reply Quote 0
                • M Offline
                  micceo
                  last edited by 31 Jul 2016, 14:13

                  Hi! Curious about this plugin but can't get it started.
                  I'm on SketchUp 2016, 16.1.1449 64 bit, Windows 10 Version 1511 (10586. 494)

                  Tried the .exe-setup and the .rbz, but it ends with the same error.

                  **```
                  Error Loading File C;/Users/Användaren/AppData/Roaming/SketchUp/SketchUp 2016/SketchUp/Plugins/MSPhysics/main.rb
                  Error; #<Exception; An exception occurred while loading MSPhysics library. The exception occurred due to one or more of the following reasons;

                  • Encoding;;CompatibilityError; incompatible character encodings; Windows-1252 and UTF-8
                  • Encoding;;CompatibilityError; incompatible character encodings; Windows-1252 and UTF-8

                  C;/Program Files/SketchUp/SketchUp 2016/Tools/extensions.rb;197;in require' C;/Program Files/SketchUp/SketchUp 2016/Tools/extensions.rb;197;in load'
                  C;/Users/Användaren/AppData/Roaming/SketchUp/SketchUp 2016/SketchUp/Plugins/MSPhysics.rb;90;in register_extension' C;/Users/Användaren/AppData/Roaming/SketchUp/SketchUp 2016/SketchUp/Plugins/MSPhysics.rb;90;in <module;MSPhysics>'
                  C;/Users/Användaren/AppData/Roaming/SketchUp/SketchUp 2016/SketchUp/Plugins/MSPhysics.rb;72;in `<top (required)>'

                  
                  Plugin dir
                  **```
                   Directory of C;\Users\Användaren\AppData\Roaming\SketchUp\SketchUp 2016\SketchUp\Plugins
                  
                  2016-07-31  14;17    <DIR>          .
                  2016-07-31  14;17    <DIR>          ..
                  2016-07-31  14;13    <DIR>          ams_Lib
                  2016-07-31  14;18             1 577 ams_Lib.rb
                  2016-07-16  20;17    <DIR>          as_flatten
                  2016-07-16  20;17             3 070 as_flatten.rb
                  2016-07-31  14;13    <DIR>          MSPhysics
                  2016-07-31  14;17             3 498 MSPhysics.rb
                  2016-07-26  17;59             3 498 MSPhysics.rbx
                  2016-07-31  14;05    <DIR>          SketchUcation
                  2016-07-31  14;05             5 508 SketchUcation.rb
                  2016-05-21  00;35    <DIR>          su_advancedcameratools
                  2016-02-24  12;28             1 715 su_advancedcameratools.rb
                  2016-05-21  00;35    <DIR>          su_dynamiccomponents
                  2016-02-24  12;28             1 780 su_dynamiccomponents.rb
                  2016-05-21  00;35    <DIR>          su_sandbox
                  2016-02-24  12;28             1 706 su_sandbox.rb
                  2016-05-21  00;35    <DIR>          su_trimble_connect
                  2016-02-24  12;28             1 339 su_trimble_connect.rb
                  2016-05-21  00;35    <DIR>          su_webtextures
                  2016-02-24  12;28             1 299 su_webtextures.rb
                  
                   Directory of C;\Users\Användaren\AppData\Roaming\SketchUp\SketchUp 2016\SketchUp\Plugins\MSPhysics
                  
                  2016-07-31  14;13    <DIR>          .
                  2016-07-31  14;13    <DIR>          ..
                  2016-07-31  14;17            53 883 body.rb
                  2016-07-31  14;17            16 487 body_context.rb
                  2016-07-31  14;17             5 978 CHANGELOG.md
                  2016-07-31  14;17            24 128 collision.rb
                  2016-07-31  14;17             8 561 common_context.rb
                  2016-07-31  14;17             1 269 contact.rb
                  2016-07-31  14;17               230 controller_context.rb
                  2016-07-31  14;17             9 154 control_panel.rb
                  2016-07-31  14;13    <DIR>          css
                  2016-07-31  14;17           100 030 dialog.rb
                  2016-07-31  14;17             1 174 djoint_angular_gear.rb
                  2016-07-31  14;17             1 166 djoint_linear_gear.rb
                  2016-07-31  14;17             1 206 djoint_rack_and_pinion.rb
                  2016-07-31  14;17             6 759 double_joint.rb
                  2016-07-31  14;17             2 682 Examples.md
                  2016-07-31  14;13    <DIR>          external
                  2016-07-31  14;17             1 992 FAQ.md
                  2016-07-31  14;17               613 hit.rb
                  2016-07-31  14;13    <DIR>          html
                  2016-07-31  14;13    <DIR>          images
                  2016-07-31  14;17             6 904 joint.rb
                  2016-07-31  14;17             5 022 joint_ball_and_socket.rb
                  2016-07-31  14;17            48 285 joint_connection_tool.rb
                  2016-07-31  14;17             5 729 joint_corkscrew.rb
                  2016-07-31  14;17            10 167 joint_curvy_piston.rb
                  2016-07-31  14;17             7 951 joint_curvy_slider.rb
                  2016-07-31  14;17               677 joint_fixed.rb
                  2016-07-31  14;17             7 489 joint_hinge.rb
                  2016-07-31  14;17             4 307 joint_motor.rb
                  2016-07-31  14;17             5 645 joint_piston.rb
                  2016-07-31  14;17             5 645 joint_servo.rb
                  2016-07-31  14;17             3 513 joint_slider.rb
                  2016-07-31  14;17             5 683 joint_spring.rb
                  2016-07-31  14;17             7 322 joint_tool.rb
                  2016-07-31  14;17             5 900 joint_universal.rb
                  2016-07-31  14;17             2 819 joint_up_vector.rb
                  2016-07-31  14;13    <DIR>          js
                  2016-07-31  14;17             1 107 LICENCE.txt
                  2016-07-31  14;17             1 649 LICENSE.FLAC.txt
                  2016-07-31  14;17            25 892 LICENSE.mikmod.txt
                  2016-07-31  14;17                59 LICENSE.modplug.txt
                  2016-07-31  14;17               950 LICENSE.NewtonDynamics.txt
                  2016-07-31  14;17             1 625 LICENSE.ogg-vorbis.txt
                  2016-07-31  14;17            25 873 LICENSE.smpeg.txt
                  2016-07-31  14;17            49 927 main.rb
                  2016-07-31  14;17             3 945 material.rb
                  2016-07-31  14;17             1 424 materials.rb
                  2016-07-31  14;13    <DIR>          models
                  2016-07-31  14;17             4 881 MSPhysics.hash
                  2016-07-31  14;13    <DIR>          osx32
                  2016-07-31  14;13    <DIR>          osx64
                  2016-07-31  14;17            15 179 Overview.md
                  2016-07-31  14;17               428 README-SDL.txt
                  2016-07-31  14;17             1 019 README-SDL_mixer.txt
                  2016-07-31  14;17             2 948 README.md
                  2016-07-31  14;17           120 465 replay.rb
                  2016-07-31  14;17            10 556 scene_data.rb
                  2016-07-31  14;17               753 script_exception.rb
                  2016-07-31  14;17            12 618 settings.rb
                  2016-07-31  14;17           135 307 simulation.rb
                  2016-07-31  14;17             1 011 TODO.md
                  2016-07-31  14;13    <DIR>          win32
                  2016-07-31  14;13    <DIR>          win64
                  2016-07-31  14;17            14 115 world.rb
                  ```**
                  1 Reply Last reply Reply Quote 0
                  • TIGT Offline
                    TIG Moderator
                    last edited by 31 Jul 2016, 16:52

                    You have a non-ASCII character in your Windows user-name [Användaren]
                    This is a well known and long running problem with Ruby.
                    Although the newer Ruby with v2016 is more forgiving, there are still some issues...

                    It's recommended you always avoid accents in your Windows user-name...

                    Can you try with an alternative user-name ?

                    The extension's author might be able to "force encoding" to UTF-8 for any strings it uses, like the user-path name etc - when in >=v2015...
                    But that's his fix for the future...

                    TIG

                    1 Reply Last reply Reply Quote 0
                    • M Offline
                      micceo
                      last edited by 31 Jul 2016, 17:30

                      I had "ä" as a suspected but didn't try another account.
                      Searched the forums here, but no hit on UTF-8 or Windows-1252.
                      Thank you for the swift response. I'll try out with another user account.

                      1 Reply Last reply Reply Quote 0
                      • R Offline
                        Ralphxyz
                        last edited by 1 Aug 2016, 00:14

                        @micceo said:

                        Hi! Curious about this plugin but can't get it started.
                        I'm on SketchUp 2016, 16.1.1449 64 bit, Windows 10 Version 1511 (10586. 494)

                        Tried the .exe-setup and the .rbz, but it ends with the same error.

                        micceo, I had this problem! The solution was to use the 2015 Sketchup folder not the 2016 folder!

                        re: /AppData/Roaming/SketchUp/SketchUp 2016/SketchUp/Plugins/MSPhysics/

                        Had to be: /AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/MSPhysics/

                        This was for Sketchup 15 PRO!

                        Ralph

                        1 Reply Last reply Reply Quote 0
                        • A Offline
                          Anton_S
                          last edited by 1 Aug 2016, 01:54

                          Ralph, you probably had another issue because I can reproduce this with SU2016 and Win10 on a custom-created account, named, Användaren.

                          TIG, MSPhysics does have path.force_encoding('UTF-8') if RUBY_VERSION !~ /1.8/. However, it could be the case that I missed it somewhere. I'll check it out.

                          Micceo, I'll look into it. Thanks for reporting.

                          Anton

                          1 Reply Last reply Reply Quote 0
                          • TIGT Offline
                            TIG Moderator
                            last edited by 1 Aug 2016, 11:18

                            Looks like the error occurs when setting up the extension.
                            Try forcing the encoding of the file path you pass to the extension making code in the loader RB...

                            TIG

                            1 Reply Last reply Reply Quote 0
                            • pilouP Offline
                              pilou
                              last edited by 2 Aug 2016, 01:12

                              I have that in French 2016 Make (Windows 10)

                              @unknownuser said:

                              Erreur de chargement du fichier C:/Users/AppData/Roaming/SketchUp/SketchUp 2016/SketchUp/Plugins/MSPhysics/main.rb
                              Error: #<NoMethodError: undefined method sdl_used?' for MSPhysics:Module> C:/Users/AppData/Roaming/SketchUp/SketchUp 2016/SketchUp/Plugins/MSPhysics/main.rb:475:in <top (required)>'
                              C:/Program Files/SketchUp/SketchUp_Fr 2016/Tools/extensions.rb:197:in require' C:/Program Files/SketchUp/SketchUp_Fr 2016/Tools/extensions.rb:197:in load'
                              C:/Users/AppData/Roaming/SketchUp/SketchUp 2016/SketchUp/Plugins/MSPhysics.rb:90:in register_extension' C:/Users/AppData/Roaming/SketchUp/SketchUp 2016/SketchUp/Plugins/MSPhysics.rb:90:in module:MSPhysics'
                              C:/Users/AppData/Roaming/SketchUp/SketchUp 2016/SketchUp/Plugins/MSPhysics.rb:72:in `<top (required)>'

                              Curious because works fine in French 2015 Make! (Windows 10)

                              Frenchy Pilou
                              Is beautiful that please without concept!
                              My Little site :)

                              1 Reply Last reply Reply Quote 0
                              • A Offline
                                Anton_S
                                last edited by 2 Aug 2016, 08:35

                                TIG, yes, the error occurred while loaded main.rb, which occurs during registration, and I was able to fix it through trial and error.

                                In case anyone is interested what went wrong, here it is. So, msp_lib.so, the c extension of MSPhysics, is dependent on other dlls, like newton.dll and SDL2.dll. In order to load msp_lib.so it is necessary to first load the required dlls, or specify the path where the dlls are to be found when msp_lib.so is loaded. The ENV['PATH'] variable does just that. It contains a list of paths where the required dlls are to be searched for. Instead of manually loading the required dlls, I append another path to the ENV['PATH'] variable. That way when msp_lib.so is loaded, it knows where to find newton.dll, SDL2.dll, and all the other required dlls, and loads them automatically. Now, here is where to problem came in. The ENV['PATH'] variable accepts paths formatted in Windows-1252 encoding (very similar to ASCII-8BIT encoding). The path I appended was formatted with UTF-8 encoding. It worked without concerns when non-special characters were used; however, as reported, compatibility errors arise when they are used. The fix seemed pretty straightforward, I had to force encode the appended path with ASCII-8BIT encoding. Yet, after that, the path seemed invalid; A different error displayed, saying, "The specified module could not be found," meaning the required dlls could not be found, which indicated that the appended path was corrupted. So, I tried encoding it with Windows-1252, just to see if it it will fix the error, however the path still remained invalid. The only thing that fixed it was unpacking from Unicode and repacking to Chars: path.unpack('U*').pack('C*'), which is by default encoded to ASCII-8BIT. I don't know if this is a universal fix, but it does fix the Encoding::CompatibilityError on an account named, Användaren. What's strange is that force_encoding('ASCII-8BIT') improperly converts from UTF-8 to ASCII-8BIT. Whereas ideally, it should do the same thing as the unpack(U*').pack('C*') does. Anyway, glad that didn't took forever to fix.

                                I will upload it soon. Once again thanks for reporting.

                                Anton

                                1 Reply Last reply Reply Quote 0
                                • A Offline
                                  Anton_S
                                  last edited by 3 Aug 2016, 01:39

                                  Micceo, it's fixed now. Update to 0.9.3.

                                  Faust, I fixed the crash that would occur when loading large replay files.

                                  Anton

                                  1 Reply Last reply Reply Quote 0
                                  • F Offline
                                    faust07
                                    last edited by 3 Aug 2016, 16:33

                                    Anton, saving and loading large simulations works great now! Thank you so much!
                                    I've illustrated the Truster problem on start of a simulation with little GIF-films in the post "MSPhysics tests and questions" ...

                                    1 Reply Last reply Reply Quote 0
                                    • I Offline
                                      ITman496
                                      last edited by 7 Aug 2016, 03:58

                                      This is amazing! Using it to design all sorts of mechanical systems for things I make!

                                      Question, though. I've messed around with the corkscrew and the curvy joints.. Is there an elegant way to simulate a threaded rod actuating a nut? Such as a lead screw? A constraint where you set the ratio of rotations to a certain unit of distance, so that if I have a gear assembly turning a bolt, it can crank a threaded rod that is linked to a piston constraint back and forth? Or vice versa? That appears to be the only thing I can't figure out how to do, other then that, this is the best plugin I've ever downloaded. Nice nice work!

                                      EDIT: after talking to the author!

                                      Simply link a joint to another joint and it is very self explanatory after that!

                                      1 Reply Last reply Reply Quote 0
                                      • MALAISEM Offline
                                        MALAISE
                                        last edited by 19 Aug 2016, 17:08

                                        Hello Guys

                                        Does someone try to export some animation in png files, to merge them into an avi file (Makeavi) ?
                                        When starting the MSPhysics, animating the SKP file then using MSPhysics export to pictures, only the 60 first are generated.

                                        I followed step by step explanations but unsuccessfull, just an "fixed movie" AVI file is made...

                                        Any help appreciated.

                                        Pierre


                                        drafty (w.i.p) sketchup model

                                        La Connaissance n'a de valeur que partagée

                                        1 Reply Last reply Reply Quote 0
                                        • F Offline
                                          faust07
                                          last edited by 20 Aug 2016, 18:20

                                          @ Malaise: there is an object (with the name "echantillon") in your model on z = -5580 m. It is connected to a slider. In my tests it courses the model running out of the viewport. It could be the reason for the export problem.

                                          1 Reply Last reply Reply Quote 0
                                          • 1
                                          • 2
                                          • 18
                                          • 19
                                          • 20
                                          • 21
                                          • 22
                                          • 45
                                          • 46
                                          • 20 / 46
                                          • First post
                                            Last post
                                          Buy SketchPlus
                                          Buy SUbD
                                          Buy WrapR
                                          Buy eBook
                                          Buy Modelur
                                          Buy Vertex Tools
                                          Buy SketchCuisine
                                          Buy FormFonts

                                          Advertisement