by Anton_S » Thu Apr 20, 2017 3:59 am
Hi, Faust, faust07 wrote:A little issue in "Export Replay To SkIndigo" (MSPhysics 1.0.0.WIP7) - some components of the scene disappear during and after the export process. They are not deleted, but optically hidden and re-emerge only after the zoom out or the scene change
This is probably due to some groups falling too far away from the camera. There may be an object that falls through the floor into infinity. If you search for a falling object, you may very likely find it. faust07 wrote:What is the progress of the final version 1.0.0 of MSPhysics?
I'm currently improving the algorithm of CurvySlider joint for a more optimal behavior with looped curves. I also need to figure out why long cylindrical rods go crazy when interacting with buoyancy or simply applied an irregular torque. This could be the issue of the physics engine, but I need to verify it before reporting it there. Then, I can't seem to get around on improving the functionality of geared joints with parent bodies. I need to rethink the approach on utilizing geared joints for making differential and other geared systems. I just need to find time to think on it for a bit so it's simple yet powerful. I might as well lay it of to the post 1.0.0 releases. Either way, I intended to release MSPhysics sometime in the beginning of May. That's the story. Regards, Anton
-
Anton_S
- PluginStore Author

-
- Posts: 1204
- Joined: Tue Nov 23, 2010 9:15 pm
- Name: Anton
- Operating system: Windows
- SketchUp version: 2018
- License type: Pro
- SketchUp use: hobby
- Level of SketchUp: Advanced
by ecati » Thu Apr 20, 2017 3:21 pm
Hi, Anton. I work on a machine design. As you can see in the attached file, I want to move the pieces. I used the piston and servo. The piston works the way I want it. But I have not been able to rotate all the parts together with the servo. I need your help and your suggestions. Thank you.
-

ecati
-
- Posts: 62
- Joined: Fri Nov 25, 2016 4:43 pm
- Name: Necati Abaylı
- Operating system: Windows
- SketchUp version: 2017
- License type: Pro
- SketchUp use: hobby
- Level of SketchUp: Beginner
by Anton_S » Fri Apr 21, 2017 2:52 am
Hello, Ecati, To rotate everything with the servo joint, you have to move the two hinges and the piston inside the yellow, main body group. That way the hinges and the piston will have a parent body, which will allow them to move relative to it. Also, convex decomposition is not necessary there. When a joint, with a specific parent, is connected to a child body, the child body is by default set to be non-collideable with the parent body. Here is how your model should ultimately be: makine.skp Regards, Anton
-
Anton_S
- PluginStore Author

-
- Posts: 1204
- Joined: Tue Nov 23, 2010 9:15 pm
- Name: Anton
- Operating system: Windows
- SketchUp version: 2018
- License type: Pro
- SketchUp use: hobby
- Level of SketchUp: Advanced
by ecati » Fri Apr 21, 2017 7:49 am
Hi, Anton, First of all thank you very much. I do not want to bother you with such simple questions. But I have not found a tutorial that will answer my questions. If I'm not wrong, you're preparing a tutorial, are not you? Now, how can I bring the green piston into its original position with a spring after it is pulled out? Thank you.
-

ecati
-
- Posts: 62
- Joined: Fri Nov 25, 2016 4:43 pm
- Name: Necati Abaylı
- Operating system: Windows
- SketchUp version: 2017
- License type: Pro
- SketchUp use: hobby
- Level of SketchUp: Beginner
by BallBearing » Sun Apr 23, 2017 2:54 pm
I got the worm gear to do it's work quite nicely (MSPhysics & Sketchy). Just making the collision mesh groups is time consuming. I wonder if there exist possibility for something like in Blender & mesh collision option? The collision frame is not so super exact... WormDriveSimu.gif GroupsNCompound.png
-
BallBearing
-
- Posts: 84
- Joined: Sat Nov 15, 2014 10:41 am
- Name: martin diamond
- Operating system: Linux
- SketchUp version: 2016
- License type: Free/Make
- SketchUp use: other
- Level of SketchUp: Intermediate
by gilles » Sun Apr 23, 2017 3:19 pm
ecati wrote:Hi, Anton, First of all thank you very much. I do not want to bother you with such simple questions. But I have not found a tutorial that will answer my questions. If I'm not wrong, you're preparing a tutorial, are not you? Now, how can I bring the green piston into its original position with a spring after it is pulled out? Thank you.
Cut the piston from it's context escape the context then paste in place.
" c'est curieux chez les marins ce besoin de faire des phrases "
-

gilles
- Top SketchUcator
-
- Posts: 1300
- Joined: Mon Apr 07, 2008 10:29 am
- Location: france
- Operating system: Mac
- SketchUp version: 2015
- License type: Free/Make
- SketchUp use: other
- Level of SketchUp: Intermediate
by ecati » Sun Apr 23, 2017 8:59 pm
Collision problem. When the first part is moved, it enters into the second part and the third part escapes from the center. How is this prevented? To see the animation, clik on the picture please.
-

ecati
-
- Posts: 62
- Joined: Fri Nov 25, 2016 4:43 pm
- Name: Necati Abaylı
- Operating system: Windows
- SketchUp version: 2017
- License type: Pro
- SketchUp use: hobby
- Level of SketchUp: Beginner
by Anton_S » Mon Apr 24, 2017 12:18 am
Hi, Ecati, ecati wrote:I do not want to bother you with such simple questions. But I have not found a tutorial that will answer my questions. If I'm not wrong, you're preparing a tutorial, are not you?
I first need release version 1.0.0. Then I will transition to making tutorials. The tutorials is a bold part on my TODO list. ecati wrote:Now, how can I bring the green piston into its original position with a spring after it is pulled out?
You can't have the green thing be connected to a piston and the spring at the same time. You can simply tell the piston to move back to its original position by dragging its associated slider controller to its original position. You can as well change the controller of the piston joint to do it with a click of a key, such as key('f') * 5, so that it moves 5 preset units (millemeters in your case) when key F is held down and back to initial location when the key is released. You can add a negative sign to 5 or in front of the controller for it to move in the opposite direction. ecati wrote:Collision problem. When the first part is moved, it enters into the second part and the third part escapes from the center. How is this prevented?
There must be something in the way. Here is a few potential causes to this: - Part2 is connected to multiple joints, such as the hinge and the piston. It must be connected to just the hinge.
- Either part2 is pushed out by part3 (if the hinge is not inside part3 or part3 state is not set to non-collidable). Either move hinge inside part3 and set it static or set part3 non-collidable so it doesn't push out part2.
- Another collision outside the shown view is stopping part2.
There could be many reasons. I won't know until I inspect the actual model myself, but the actual cause may very likely denote one of the provided potential causes above. Regards, Anton
-
Anton_S
- PluginStore Author

-
- Posts: 1204
- Joined: Tue Nov 23, 2010 9:15 pm
- Name: Anton
- Operating system: Windows
- SketchUp version: 2018
- License type: Pro
- SketchUp use: hobby
- Level of SketchUp: Advanced
by Anton_S » Mon Apr 24, 2017 12:31 am
Hello, Martin, BallBearing wrote:I got the worm gear to do it's work quite nicely (MSPhysics & Sketchy). Just making the collision mesh groups is time consuming. I wonder if there exist possibility for something like in Blender & mesh collision option? The collision frame is not so super exact...
Those images show it in SketchyPhysics, but it will work the same in MSPhysics. So, another way of doing it (in MSPhysics) is by using geared joints: - Set both gears to non-collidable and remove all original joints connecting the gears.
- Add a Piston joint at the location and in the direction of the wormgear and connect it to the wormgear (using the Joint Connection Tool).
- Add a Hinge joint at the center and in the normal direction of the gear and connect it to the gear.
- Using the Joint Connection Tool, connect Piston joint to the Hinge joint to create a geared joint.
- Adjust the gear ratio of the piston-to-hinge gear using the MSPhysics UI.
Make sure you're using MSPhysics toolbars for doing all that... Regards, Anton
-
Anton_S
- PluginStore Author

-
- Posts: 1204
- Joined: Tue Nov 23, 2010 9:15 pm
- Name: Anton
- Operating system: Windows
- SketchUp version: 2018
- License type: Pro
- SketchUp use: hobby
- Level of SketchUp: Advanced
by faust07 » Mon Apr 24, 2017 10:15 am
Hi, Anton, first test of a (cloth-) mesh with your MSPhysics API self connect script. Unfortunately, each node joins only one rod. What am I doing wrong?
Last edited by faust07 on Tue Apr 25, 2017 9:52 pm, edited 1 time in total.
-
faust07
-
- Posts: 510
- Joined: Tue Aug 25, 2009 3:26 pm
- Location: Germany
- Name: Faust07
- Operating system: Windows
- SketchUp version: 2017
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Intermediate
by ecati » Mon Apr 24, 2017 2:45 pm
Where do we download MSPhysics 1.0.0?
-

ecati
-
- Posts: 62
- Joined: Fri Nov 25, 2016 4:43 pm
- Name: Necati Abaylı
- Operating system: Windows
- SketchUp version: 2017
- License type: Pro
- SketchUp use: hobby
- Level of SketchUp: Beginner
by TIG » Mon Apr 24, 2017 3:05 pm
ecati wrote:Where do we download MSPhysics 1.0.0?
You could wait [joke  ] ? The current version is 0.9.9 - and it's latest version is always available from the SketchUcation PluginStore: http://sketchucation.com/pluginstore?pln=MSPhysicsLike most Plugins/Extensions...
TIG
-

TIG
- Global Moderator
-
- Posts: 20275
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- SketchUp version: 2021
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by faust07 » Mon Apr 24, 2017 3:16 pm
Hi, ecati, Sorry, I used a test version for the connect example file. Anton is working on release version 1.0.0 - which soon comes out.
-
faust07
-
- Posts: 510
- Joined: Tue Aug 25, 2009 3:26 pm
- Location: Germany
- Name: Faust07
- Operating system: Windows
- SketchUp version: 2017
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Intermediate
by SynSuka3D » Tue Apr 25, 2017 6:27 pm
Bonjour, Je voudrais lire la vitesse D'un corps sur l'axe Y interne,no axe Y mondiale !!! J'ai essayé get_velocity... set_var("speed_Y",????)
Hello, I would like to read the speed of a body on the internal Y-axis, no Y-axis world! I tried: get_velocity... set_var("speed_Y",????)
-
SynSuka3D
-
- Posts: 23
- Joined: Sat Apr 30, 2016 9:17 pm
- Name: Nicolas
- Operating system: Windows
- SketchUp version: 2017
- License type: Free/Make
- SketchUp use: game and/or sci-fi modelling
- Level of SketchUp: Advanced
by Anton_S » Tue Apr 25, 2017 9:41 pm
Hello, Nicolas, To get local velocity, along the body's Y-axis, you got to transform the global velocity relative to the body first, then get the Y component: - Code: Select all
loc_vel = this.get_velocity.transform(this.get_normal_matrix.inverse) vy = loc_vel.y
Regards, Anton
-
Anton_S
- PluginStore Author

-
- Posts: 1204
- Joined: Tue Nov 23, 2010 9:15 pm
- Name: Anton
- Operating system: Windows
- SketchUp version: 2018
- License type: Pro
- SketchUp use: hobby
- Level of SketchUp: Advanced
by Anton_S » Tue Apr 25, 2017 9:46 pm
Faust, I will ckeck out that cloth thingy soon.
-
Anton_S
- PluginStore Author

-
- Posts: 1204
- Joined: Tue Nov 23, 2010 9:15 pm
- Name: Anton
- Operating system: Windows
- SketchUp version: 2018
- License type: Pro
- SketchUp use: hobby
- Level of SketchUp: Advanced
by cristyan » Wed Apr 26, 2017 12:58 am
Hello ! There is a script or another way that maintains the same distance between objects attached on CurvySlider , as a rollercoaster ? Thank you !
Last edited by cristyan on Wed Apr 26, 2017 1:06 pm, edited 1 time in total.
-
cristyan
-
- Posts: 14
- Joined: Fri Sep 20, 2013 7:05 pm
- Name: Cristi Cristian
- Operating system: Windows
- SketchUp version: 2013
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Beginner
by Anton_S » Wed Apr 26, 2017 1:02 am
Okay, faust. Your script for connecting bodies attempts to connnect multiple bodies to the same joint. That's how it is in the user interface of MSPhysics, but behind the scenes a new joint instance is added for each constraint. So here is the script to have: - Code: Select all
onTick { if frame == 1 this.touching_bodies(true).each { |body| next if body.group.name != 'capsule' joint = MSPhysics::BallAndSocket.new(this.world, this, this.get_matrix, this.group) joint.connect(body) } end }
Paste it into one knot, and assign it to all knots, using the Assign Script to All With Name button. That said, this is a very inefficient way of creating cloth, not to mention that you also have to create faces and then reposition vertices and map the UVs of textures (if any). I already got my own, more efficient, version of cloth working, like 3 years ago. But it's not perfect. Here is the demo updated and refined for the current version of MSPhysics:
-
Anton_S
- PluginStore Author

-
- Posts: 1204
- Joined: Tue Nov 23, 2010 9:15 pm
- Name: Anton
- Operating system: Windows
- SketchUp version: 2018
- License type: Pro
- SketchUp use: hobby
- Level of SketchUp: Advanced
by faust07 » Wed Apr 26, 2017 2:55 pm
Thanks, Anton, Your code works perfectly. For genuine cloth simulation this is, of course, too cumbersome. For me, it is a good practice to learn a little bit of good script again. In addition, the example shows the almost unlimited possibilities of MSPhysics.
-
faust07
-
- Posts: 510
- Joined: Tue Aug 25, 2009 3:26 pm
- Location: Germany
- Name: Faust07
- Operating system: Windows
- SketchUp version: 2017
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Intermediate
by SynSuka3D » Thu Apr 27, 2017 3:13 am
============================== ================================================ To get local velocity, along the body's Y-axis, you got to transform the global velocity relative to the body first, then get the Y component: CODE: SELECT ALL loc_vel = this.get_velocity.transform(this.get_normal_matrix.inverse) vy = loc_vel.y
Regards, Anton ============================= =================== problem!!!!!!
Last edited by SynSuka3D on Thu Apr 27, 2017 10:14 am, edited 1 time in total.
-
SynSuka3D
-
- Posts: 23
- Joined: Sat Apr 30, 2016 9:17 pm
- Name: Nicolas
- Operating system: Windows
- SketchUp version: 2017
- License type: Free/Make
- SketchUp use: game and/or sci-fi modelling
- Level of SketchUp: Advanced
by Anton_S » Thu Apr 27, 2017 3:29 am
Oops, the get_normal_matrix should be normal_matrix
Also, to quote other people, use the double-quote button or put them in quote tags surrounded with square brackets. And posting the whole video on the error isn't necessary either. Just post a message that is reported.
-
Anton_S
- PluginStore Author

-
- Posts: 1204
- Joined: Tue Nov 23, 2010 9:15 pm
- Name: Anton
- Operating system: Windows
- SketchUp version: 2018
- License type: Pro
- SketchUp use: hobby
- Level of SketchUp: Advanced
by ecati » Sat Apr 29, 2017 8:02 am
This gears is not spinning properly. What would be the reason?
-

ecati
-
- Posts: 62
- Joined: Fri Nov 25, 2016 4:43 pm
- Name: Necati Abaylı
- Operating system: Windows
- SketchUp version: 2017
- License type: Pro
- SketchUp use: hobby
- Level of SketchUp: Beginner
by ecati » Sat Apr 29, 2017 10:46 pm
Hi, Anton Will you take a look at this file at a time when you are not busy?
-

ecati
-
- Posts: 62
- Joined: Fri Nov 25, 2016 4:43 pm
- Name: Necati Abaylı
- Operating system: Windows
- SketchUp version: 2017
- License type: Pro
- SketchUp use: hobby
- Level of SketchUp: Beginner
by Anton_S » Sun Apr 30, 2017 8:54 am
Hello, Ecati,
For the first one, try setting material thickness of simulation tab, in the MSPhysics UI, to zero. It will improve the behavior by a bit. But because the gears are too small, the collision intersections aren't quite proper. You could increase world scale, say to 40, which should result in an improved behavior, but it will unfortunately result in a crash. I will try to fix that scaling bug before releasing 1.0.0.
For the second one, you can increase update rate, to say 4, and/or reduce update timestep, to say 1/120. The smaller the update timestep is, the more accurate the simulation is. The smaller update timestep should prevent collisions from deteriorating. Both of the settings can be adjusted through the Simulation tab of the MSPhysics UI dialog. After you do these, increasing the motor speed should have things running properly.
Nice examples by the way. I'm stunned with your improved MSPhysics skills.
Regards, Anton
-
Anton_S
- PluginStore Author

-
- Posts: 1204
- Joined: Tue Nov 23, 2010 9:15 pm
- Name: Anton
- Operating system: Windows
- SketchUp version: 2018
- License type: Pro
- SketchUp use: hobby
- Level of SketchUp: Advanced
by ecati » Tue May 02, 2017 9:28 pm
Is it possible to do servo controls via the msphysics API without writing a script?
-

ecati
-
- Posts: 62
- Joined: Fri Nov 25, 2016 4:43 pm
- Name: Necati Abaylı
- Operating system: Windows
- SketchUp version: 2017
- License type: Pro
- SketchUp use: hobby
- Level of SketchUp: Beginner
by Anton_S » Tue May 02, 2017 10:31 pm
It depends on how complex you want the controller to be. The simplest one is the slider controller. You can generate it by pressing the generate slider button in joint UI. Others are controlling with key, like key('f') as noted in some prior post. You can also write a function of time dirctly into the cpntroller, like: t = world.time; cos(t)*5 There are many controllers you can write without relying on the MSPhysics scripting API.
-
Anton_S
- PluginStore Author

-
- Posts: 1204
- Joined: Tue Nov 23, 2010 9:15 pm
- Name: Anton
- Operating system: Windows
- SketchUp version: 2018
- License type: Pro
- SketchUp use: hobby
- Level of SketchUp: Advanced
by Wolfy_71 » Wed May 03, 2017 11:09 am
I'm really enjoying MSPhysics plug-in and have been following Sam Ketner's very insightful tutorials on Youtube. I'm wondering if there is a manual easily available, so I can bone up on some more stuff. More pressingly, I'm wondering how to attach one hinge with a bar (which appears to be in a fixed point) on a bar attached to another hinge... so that it is freely movable. I'm trying to draw an umbrella-like hinge at the moment and I'm stuck.
-
Wolfy_71
-
- Posts: 1
- Joined: Sat Apr 08, 2017 10:09 am
- Name: Adam
- Operating system: Windows
- SketchUp version: 2017
- License type: Free/Make
- SketchUp use: product design
- Level of SketchUp: Intermediate
by ecati » Thu May 04, 2017 8:30 am
Hi, Anton, I made this file by taking advantage of the Planned Steps.skp file you have prepared. I want the movement to begin when the space key is pressed and continue and stop until the space key is pressed again.
-

ecati
-
- Posts: 62
- Joined: Fri Nov 25, 2016 4:43 pm
- Name: Necati Abaylı
- Operating system: Windows
- SketchUp version: 2017
- License type: Pro
- SketchUp use: hobby
- Level of SketchUp: Beginner
by Anton_S » Thu May 04, 2017 9:22 am
Wolfy_71 wrote:I'm really enjoying MSPhysics plug-in and have been following Sam Ketner's very insightful tutorials on Youtube. I'm wondering if there is a manual easily available, so I can bone up on some more stuff. More pressingly, I'm wondering how to attach one hinge with a bar (which appears to be in a fixed point) on a bar attached to another hinge... so that it is freely movable. I'm trying to draw an umbrella-like hinge at the moment and I'm stuck.
To create movable hinges, you have to create them within the context of a desired parent group/component. Then connect it to the desired child group/component (using the MSPhysics Joint Connection Tool). That way the parent group will move and the connected child group will move relative to the parent group, while rotating around the hinge axis, which will also be relative to the parent group.
Last edited by Anton_S on Thu May 04, 2017 9:24 am, edited 1 time in total.
-
Anton_S
- PluginStore Author

-
- Posts: 1204
- Joined: Tue Nov 23, 2010 9:15 pm
- Name: Anton
- Operating system: Windows
- SketchUp version: 2018
- License type: Pro
- SketchUp use: hobby
- Level of SketchUp: Advanced
by Anton_S » Thu May 04, 2017 9:23 am
ecati wrote:I made this file by taking advantage of the Planned Steps.skp file you have prepared. I want the movement to begin when the space key is pressed and continue and stop until the space key is pressed again.
This command will be available in MSPhysics 1.0.0. Basically you will utilize the toggle_key('space') command. It will be released soon.
-
Anton_S
- PluginStore Author

-
- Posts: 1204
- Joined: Tue Nov 23, 2010 9:15 pm
- Name: Anton
- Operating system: Windows
- SketchUp version: 2018
- License type: Pro
- SketchUp use: hobby
- Level of SketchUp: Advanced
by Ad Machine » 5 minutes ago
-
Ad Machine
- Robot
-
- Posts: 2012
-
Return to Plugins
|