MSPhysics 1.0.3 (16 October 2017)

Re: MSPhysics 0.9.8 (13 November 2016)

Postby DonDeEs » Thu Nov 17, 2016 10:29 am

Hi Anton

Is there a way I can tidy up the collision wireframe for Compound from CD shapes in the UI. Both the rack and the pinion I have drawn are not getting a very good collision detection wireframe so the gears are jumping out of the rack.

I have checked the geometry in the models and they appear to be sound so I am assuming this is related to the way the wireframe is generated/calculated.

Thanks again for this great plug in.
0

DonDeEs 
 

Re: MSPhysics 0.9.8 (13 November 2016)

Postby Anton_S » Fri Nov 18, 2016 6:46 am

Hi, DonDeEs,

The Collision from CD shape is not reliable. Its ability to calculate proper collision is limited. What you can do is manually divide sub-geometry of the gear into convex-hull groups. Then assign Compound shape to the top level group. So, for the gear, every tooth should have its own group. The top level group, of Compound shape, should contain all the teeth.

For the chains, using collision as the constraint for keeping the objects from falling apart is not a viable approach. Yes, increasing the density of all chain links can get all pieces to hold tight, but they will break once a certain amout of force is applied. What would be a better solution is having every peace of chain interconnected by a ball-and-socket joint. There is a very efficient way to do it. Here, check out this example:
artificial_chains.skp

I might create a YouTube tutorial for it later.

Anton
1

Anton_S 
PluginStore Author
PluginStore Author
 

Re: MSPhysics 0.9.8 (13 November 2016)

Postby DonDeEs » Sat Nov 19, 2016 6:19 pm

Hi Anton

Many thanks for your reply. The solution makes sense. It will make modelling gears a little more complicated but that is ok. I guess I could also let the gears run as cylinders on a box collision shape for the rack (so they roll effectively) and null the gear teeth on both.

I don't know if it helps you to know that when Collision Wireframe is enabled on the simulation it shows fine but if you use orbit the wireframes are lost. It means you effectively have to stop the simulation, orbit to where you want to see and restart in order to get the view you want with wireframe.

It is a minor problem for me but maybe it is a bug that you are not aware of and can fix.

Thanks again for your help.
0

DonDeEs 
 

Re: MSPhysics 0.9.8 (13 November 2016)

Postby SketchyPhysicsNutt » Sat Nov 19, 2016 9:53 pm

Hi Anton just reporting this little bug im getting with your ams windowsettingsv4.2.0

plugin and MSphysics keeps jumping out of fullscreen.

im using MSPhysics_0.9.8/Win 8.1/Sketchup 2016 and ae-toolbar editor plugin


Before


After



any info would help
Tez
0

SketchyPhysicsNutt 
 

Re: MSPhysics 0.9.8 (13 November 2016)

Postby Anton_S » Sun Nov 20, 2016 2:31 am

Thanks for reporting this, SketchyPhysicsNut. I came across it but forgot about it the next moment. Now I got it logged.

DonDeEs, for the geared effect, you can try connecting joints to joints. They are called geared joints. For your rack and pinion gear, you can connect slider to the rack group and hinge to the pinion group. Then connect slider with the hinge. After that, using UI you can adjust distance-to-angle ratio. Geared joints allows user to utilize gears without having any collision at all. I even tried making a differential gear using the geared joints. It worked very well. Once I get some free time, I will definitely make a tutorial about it. At the moment, here is an example of geared joints:
MSPhysics Geared Joints

Edit: At the moment geared joints yield improper behavior under certain cases, but I'm intending to address the issue in the next release.

Also, I'm aware of the collision wireframe not drawing when the orbit tool is activated. The collision wireframe stops being drawn whenever the simulation is suspended. However, it starts drawing again whenever it is resumed. That's how SketchUp API works and I don't have much control over it. So, while having an orbit tool, if you right click and select Exit the simulation should resume the drawing.
0
Last edited by Anton_S on Mon Nov 21, 2016 3:21 am, edited 1 time in total.

Anton_S 
PluginStore Author
PluginStore Author
 

Re: MSPhysics 0.9.8 (13 November 2016)

Postby DonDeEs » Sun Nov 20, 2016 12:50 pm

Hi Anton

That makes sense of the geared joints option. I had not really worked out what they were about but this is absolutely the solution I needed so many thanks.
0

DonDeEs 
 

Re: MSPhysics 0.9.8 (13 November 2016)

Postby DonDeEs » Fri Nov 25, 2016 1:53 pm

Hi Anton

I hope it is OK to report a possible bug with MSPhysics 0.9.8.

I am using it with Sketchup 2017 on a Surface Pro running Windows 10.

It seems the UI opens in a different resolution and does not therefore display in full. The maximise button is disabled so I wondered if there is anything that I can do to fix this.

I have attached a screen shot for you if it helps.

Sketchup Print Screen.png
0

DonDeEs 
 

Re: MSPhysics 0.9.8 (13 November 2016)

Postby DonDeEs » Fri Nov 25, 2016 4:32 pm

I just checked and this only seems to be a problem with S2017. Seems to work fine in 2016.
0

DonDeEs 
 

Re: MSPhysics 0.9.8 (13 November 2016)

Postby Anton_S » Fri Nov 25, 2016 9:53 pm

Thank you for reporting this, DonDeEs. Someone reported something similar and I'm in the process of fixing it. I might have to send you s private message to verify the fix.
0

Anton_S 
PluginStore Author
PluginStore Author
 

Re: MSPhysics 0.9.8 (13 November 2016)

Postby DonDeEs » Sat Nov 26, 2016 10:53 am

Sure thing. Feel free to do so.
0

DonDeEs 
 

Re: MSPhysics 0.9.8 (13 November 2016)

Postby robint » Sun Dec 11, 2016 7:47 am

Hi Anton
Congrats on your great work resurecting old SP for a new version. I played with SP some years ago and amazed myself by getting a caterpillar track chain to work

May I ask if it is possible, in your version, to assign real physical values to objects, eg mass in kg, spring rate m/kg, damping kg/m^2 and so on

and perhaps equivalent elements for rotating masses

Its all in aid of helping my student understand the dynamic behaviour of physical systems with different input and load conditions open loop and closed loop

If this could be done, it would be of fantastic benefit for Uni ugrads (yes there are professional - expensive suites to do this). Something tailored to fit with the unbeatable SU would be so good

It wasn't available in the original SP, only cruded dimensionless tweaks

Cheers

Robin

ps apologies if this has already been answered pls link me
0
As one door closes another one slams in your face
User avatar
robint 
 

Re: MSPhysics 0.9.8 (13 November 2016)

Postby Anton_S » Sun Dec 11, 2016 11:44 am

Hi, robint,

Just to clarify a thing, MSPhysics is not a new version of SketchyPhysics; MSPhysics is a plugin written completely from scratch, integrating the latest NewtonDynamics Physics engine by Julio Jerez. Yes, it does have a similar functionality to SketchyPhysics, but that was done because I didn't want to reinvent all the ideas Chris Phillips put into writing SketchyPhysics and so that SketchyPhysics users wouldn't have hard time transitioning to MSPhysics.

In MSPhysics, the mass (kg), force (N), torque (Nm), angular velocity (rad/s), and linear velocity (m/s) - are controled with the standard SI units. These values are proper, even with the world scale set to some value other than one, as behind the scenes they are scaled to maintain themselves in SI units. The parameters for joints, such as power, accel, damp, and friction, however, are controlleded with unknown units. While writing the custom joints, I didn't place close attension to the units, but I think they can be converted to the units you described in your post. Some testing needs to be done to figure out the ratios.

By default the mass is calculated by taking the volume of an object, in m^3, and multiplying it by the density, in kg/m^3, which is by default 700 kg/m^3, the density of wood.

To assign a particular mass to a body, in killograms, you can do it with the UI dialog:
  1. Select the desired body.
  2. Open the MSPhysics UI.
  3. Activate the Body Properties tab.
  4. Select weight control option and switch it to mass.
  5. Write the desired mass into the mass input box.

The static and kinetic friciton coeffiences, which can also be assigned through the dialog, are not the actual coefficients. The actual coefficient is an average coeffiecent between the two touching bodies. For instance, if the floor has a static coefficient of 0.9 and kinetic of 0.7, and the touching body has a static coefficient of 0.4 and kinetic of 0.3, the actual static coefficient for the contact, would be (0.9+0.4)/2 and the actual kinetic coefficient would be (0.7+0.3)/2.

The same concept applies to elasticity and softness. I'm no expert what the softness does, as I didn't write the physics engine, doing most of the calculations for my wrapper, but I think it controls how much energy is transfered durding collision, i.e an aditional parameter for elasticity.

To control other physical properties, such as velocity, you need to assign a Ruby script to a group. This can be done by selecting a desired group, activating the Script tab in the MSPhysics UI, and writting some code in the editor. Here's a script for applying a particular velocity to an object whenever simulation starts:
Code: Select all
onStart {
  this.set_velocity(0,1,2) # x, y, z - the velocity vector
}

The velocity can also be applied every time the world is updated:
Code: Select all
onUpdate {
  this.set_velocity(4,5,6) # x, y, z - the velocity vector
}

And the velocity can also be recorded:
Code: Select all
onUpdate {
  # Get current velocity
  cv = this.get_velocity
  # Output it in the note
  note = sprintf("Velocity: (%.3f, %.3f, %.3f)", cv.x, cv.y, cv.z)
  simulation.display_note(note)
}

You may also apply force, torque, omega, and do other things with scripting. Check out this scripting documentation link:
http://www.rubydoc.info/github/AntonSyn ... sics/index

Here is the exact link for all the functions available for a body:
http://www.rubydoc.info/github/AntonSyn ... ysics/Body

Regards,
Anton
2

Anton_S 
PluginStore Author
PluginStore Author
 

Re: MSPhysics 0.9.8 (13 November 2016)

Postby robint » Sun Dec 11, 2016 1:18 pm

Thank you so much Anton, thats given me some homework!

BTW I didn't wish to imply you were overwriting the previous SP. MSP is of course entirely yours started from scratch - brilliant stuff

I'll be glad to pass any useful models I can generate back to you to pass around to other interested parties and perhaps help generate other instructional models

Cheers

Robin
0
As one door closes another one slams in your face
User avatar
robint 
 

Re: MSPhysics 0.9.8 (13 November 2016)

Postby Anton_S » Sun Dec 11, 2016 2:06 pm

Hi, Robin,

I'm glad I could help.

Best regards,
Anton
0

Anton_S 
PluginStore Author
PluginStore Author
 

Re: MSPhysics 0.9.8 (13 November 2016)

Postby Sjamon » Mon Dec 12, 2016 12:00 am

Dear Anton,

I just downloaded the plugin to make a simple cinematic / collision check on a folding workbench model, that is basically a deformable parallelogram.
Although I got the basic principle and manage to make singles hinges move as expected, any component is stuck as soon as it's linked to two hinges.

There's also a message reading "Requires MSPhysics 0.9.8+" in a corner of the screen, should I understand that it won't work unless I install something else ?

Thanks
Armand
0

Sjamon 
 

Re: MSPhysics 0.9.8 (13 November 2016)

Postby Anton_S » Mon Dec 12, 2016 11:17 am

Hi, Armand,

A hinge with no parent groups will act stationary. In order for the hinge to move, it must have a parent group. What I think is going on in your model is that the hinges are top level groups. If you want a hinge to link two groups together, and still move, simply create a hinge joint within one of the groups andd then, using the joint connection tool, connect it to the other group. That way the hinge joint will have a parent body, which will allow it to move.

Check out this mini clip:
Movable Joints Example

The message is there so that people using your model would know that they need MSPhysics in order to run it.

Regards,
Anton
0

Anton_S 
PluginStore Author
PluginStore Author
 

Re: MSPhysics 0.9.8 (13 November 2016)

Postby gilles » Mon Dec 12, 2016 1:33 pm

I think I have some issue with hinge when I link it to a parent:

Mac OSX 10.8.5, SU2015.
0
" c'est curieux chez les marins ce besoin de faire des phrases "
User avatar
gilles 
Top SketchUcator
 

Re: MSPhysics 0.9.8 (13 November 2016)

Postby Anton_S » Mon Dec 12, 2016 1:47 pm

Hi, gilles,

To fix that, you have to select the joint, open MSPhysics UI, and check the "connected collide" option.

Regards,
Anton
0

Anton_S 
PluginStore Author
PluginStore Author
 

Re: MSPhysics 0.9.8 (13 November 2016)

Postby robint » Mon Dec 12, 2016 2:23 pm

Anton_S wrote:Hi, Robin,

I'm glad I could help.

Best regards,
Anton


I made a simple mass/spring damper system as per model, but I get some odd results not like the damped sinusoid

Am I on the right track or have I made some basic errors

Also the block doesn't sit still on the plane but wanders off

I am also having difficulty tying in the UI with real values of spring rate N/m and damping c*velocity Ns/m

Any advice, most appreciated

Cheers
Robin

BTW I looked at the Ruby docs but couldnt tie up real units to the constants
0
As one door closes another one slams in your face
User avatar
robint 
 

Re: MSPhysics 0.9.8 (13 November 2016)

Postby gilles » Mon Dec 12, 2016 2:46 pm

Anton_S wrote:Hi, gilles,

To fix that, you have to select the joint, open MSPhysics UI, and check the "connected collide" option.

Regards,
Anton



Works fine :thumb:

A lot to dig in, I go back to the mine.
1
" c'est curieux chez les marins ce besoin de faire des phrases "
User avatar
gilles 
Top SketchUcator
 

Re: MSPhysics 0.9.8 (13 November 2016)

Postby Anton_S » Mon Dec 12, 2016 4:51 pm

Hi, Robin,

The block doesn't sit still probably because you disabled the friction. Enabling the friction checkbox option for the block and for the floor contacting the block will fix the wandering off behavior.

I will add an option to control accel and damp with the SI units in the upcoming release. At the moment, I figured that spring constant is roughly equals to (accel * 7 - damp), when spring joint stiffness is set to 1.0.

Edit: Ensure that both anuglar and linear damping for all bodies are set to zero. This improves the closeness.

Anton
0

Anton_S 
PluginStore Author
PluginStore Author
 

Re: MSPhysics 0.9.8 (13 November 2016)

Postby robint » Mon Dec 12, 2016 11:17 pm

Hi Anton

I'm sure I tried every way with the friction coeffs, and it didnt seem to help much, unless Im doing something wrong. If you could get real SI units into the spring damper model this would be fantastic. Classic maths leaves everything in normalised units which is really hard for students to translate into the real world - thats what MS physics is about. I try to encourage my student to abandon th suck-it-and-see approach in favour of understanding what is really happening and calculating the effect. I know that math is a real turn off for most users, but I try

cheers Robin
0
As one door closes another one slams in your face
User avatar
robint 
 

Re: MSPhysics 0.9.8 (13 November 2016)

Postby robint » Tue Dec 13, 2016 12:51 pm

Anton_S wrote:Hi, Robin,

The block doesn't sit still probably because you disabled the friction. Enabling the friction checkbox option for the block and for the floor contacting the block will fix the wandering off behavior.

I will add an option to control accel and damp with the SI units in the upcoming release. At the moment, I figured that spring constant is roughly equals to (accel * 7 - damp), when spring joint stiffness is set to 1.0.

Edit: Ensure that both anuglar and linear damping for all bodies are set to zero. This improves the closeness.

Anton


Yes indeed, improved action, I missed the friction box

Herewith a revised model changing block mass from 0 - 0.5 kg gives a displacement of 0 - 1.0 so the spring rate is 2

spring stiff 1 (what does this do?)
Accel 1, damp 1.5 (gives critical damping approx)

changing sample rate from 1/60 to 1/240 changes the whole model performance

iterations 16 - improves stability

the plane has a mass of 0.01kg, lowest i could get without instability

So Ive actually got a spring damper that sort of behaves but it seems like the spring has inertial mass - an ideal spring should be zero mass and friction

What do you think? Anything I can do to help (ruby dummy just now)

Cheers

Robin) :P
0
As one door closes another one slams in your face
User avatar
robint 
 

Re: MSPhysics 0.9.8 (13 November 2016)

Postby Anton_S » Tue Dec 13, 2016 1:21 pm

Hi, Robin,

I just revised the spring joint to base on Hooke's law. Just need to adress a few other things before its ready for the release.

Regards,
Anton
0

Anton_S 
PluginStore Author
PluginStore Author
 

Re: MSPhysics 0.9.8 (13 November 2016)

Postby robint » Tue Dec 13, 2016 3:00 pm

Anton_S wrote:Hi, Robin,

I just revised the spring joint to base on Hooke's law. Just need to adress a few other things before its ready for the release.

Regards,
Anton


Hi Anton

It occured to me loking at the motor joint, that it would be neat to have control sliders on important coeffs, of spring rate, friction, and damping, help to speed up student experience

BTW just seen some example in Sketchucation, blown away with the talent out there

Hope my little exercises aren' t too dull

Cheers

Robin
0
As one door closes another one slams in your face
User avatar
robint 
 

Re: MSPhysics 0.9.8 (13 November 2016)

Postby gilles » Thu Dec 15, 2016 10:11 am

jansen.gif


What am I doing wrong?
0
" c'est curieux chez les marins ce besoin de faire des phrases "
User avatar
gilles 
Top SketchUcator
 

Re: MSPhysics 0.9.8 (13 November 2016)

Postby Anton_S » Thu Dec 15, 2016 10:49 am

Hi, gilles,

You just need to adjust motor joint properties. So, select the motor joint, open MSPhysics UI, and set Accel to 20, Damp to 10, and uncheck the Free Rotate checkbox option. This should make the motor more stronger.

Anton
0

Anton_S 
PluginStore Author
PluginStore Author
 

Re: MSPhysics 0.9.8 (13 November 2016)

Postby gilles » Fri Dec 16, 2016 1:58 pm

Thanks Anton,

Very nice tool you made there.

theo.gif
1
" c'est curieux chez les marins ce besoin de faire des phrases "
User avatar
gilles 
Top SketchUcator
 

Re: MSPhysics 0.9.8 (13 November 2016)

Postby Anton_S » Fri Dec 16, 2016 2:33 pm

Very clever, gilles!

I'm sure there is a way to improve performance and stiffness of that thing.

Anton
0

Anton_S 
PluginStore Author
PluginStore Author
 

Re: MSPhysics 0.9.8 (13 November 2016)

Postby gilles » Fri Dec 16, 2016 3:02 pm

1
" c'est curieux chez les marins ce besoin de faire des phrases "
User avatar
gilles 
Top SketchUcator
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

PreviousNext


 

Return to Plugins

Who is online

Users browsing this forum: No registered users and 8 guests

Visit our sponsors: