sketchucation logo sketchucation
    • Login
    1. Home
    2. sketchyKev
    3. Posts
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    πŸ«› Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download
    S
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 5
    • Posts 75
    • Groups 1

    Posts

    Recent Best Controversial
    • Joints for SP4?

      Hi,

      This is an adaptation of a demo created by C. Phillips for self connecting joints. Basically all I have done, is changed the codes so that the objects to be connected do not need to be named.
      All you have to do is copy and paste the pre-made joints to where the objects need a connection. No grouping joints, no Joint Connector Tool and no naming objects!

      There are hinges, sliders and ball joints in this demo. Just click on the joint type you want and copy and paste it to where where you need the joint. Just make sure that the joint touches both objects to be connected. There should be at least two objects and the base plate can count as one.
      There are some ready made connections for demo purposes and some intentionally unconnected objects to test the joints on. One thing to note is that the joints do not have an option to disable "Connected Collide" in their current form so the objects to be connected should not overlap as in real life.

      It should be fairly easy to make a plugin toolbar to orientate and scale these self connecting joints at creation, just like the regular physics solids, for someone who knows what they are doing. The copy paste method is just a makeshift way to try out the concept.

      I mentioned SP4 in the title because C.Phillips has mentioned that he intends to get rid of the JCT in SP4. This demo might give an idea of where SP4 is heading and be a basis for discussion for your SP4 wish list. Try the attached model and see what you think.


      EZJoints.skp

      posted in SketchyPhysics
      S
      sketchyKev
    • RE: Door hinge servo not working

      Cheers! You can scale your joints down by a factor of 10 so that they don't look so out of place, just don't scale down by 100! On the subject of scaling you should get the "Fredo scale tools plugin" (if you have not already). It is vastly superior to the standard Sketchup scale tool, easier to use with lots of additional features. For example you can increase the height of a door without turning the door lock hole into an elipse and you scale in 3 dimensions from the centre by clicking ctrl once and typing a number in (something you cannot normally do). The plugin comes with a very good illustrated pdf manual explaining the features. Rather than scale all the individual servos down by a factor of ten you could build the whole model scaled up by a factor of ten and then scale the completed model down by a factor of ten at the end. Just make sure all your dimensions are properly attached so that they adjust correctly with any scaling operations. πŸ˜‰

      posted in SketchyPhysics
      S
      sketchyKev
    • RE: Simple clutch in SketchyPhysics?

      Just in case anyone is interested, I have attached a model using my magnetic clutch idea I mentioned earlier, combined with the helpful ruby control codes from Mr K, which allows the driven part to free-wheel when the clutch is disengaged. By changing the status of the yellow driven part in the model to "static", the clutch becomes a dynamic brake powerful enough to stop the motor. Might be an idea to have a clutch/brake joint in SP 4.0?


      magclutchK.skp

      posted in SketchyPhysics
      S
      sketchyKev
    • RE: Door hinge servo not working

      I managed to get your servo and door hinge to work by scaling up the servo by a factor of ten. You seem to be working to a very small scale. If you insert a new joint from the menu it seems to be 100 times larger than yours. I have heard that working to very small scales can cause problems with S.P. Probably best to use large joints and hide the physics joints layer in the finished product. What dimensions have you got set in your preferences? Inches or millimetres? I also noticed you have one part of the door hinge as "static mesh". That is normally only used for ground terrain which never moves. If you decide later that you want the door to open the opposite way you will have to change both the status and type and if you you forget you have it as static mesh you might wonder why that part does not move. Use default for simple rectangular parts aligned with the axes and convex hull for the rest. Other than that, nice looking door! πŸ˜‰

      posted in SketchyPhysics
      S
      sketchyKev
    • RE: Simple clutch in SketchyPhysics?

      Thanks Mr K! Your clutch works pretty well, but unfortunately I need a clutch that can free wheel. However I learnt some new stuff about using ruby scripts so thanks again! I am working on a magnetic clutch which is almost doing what I want it to. I will probably incorporate some of your script. I had read some stuff about how difficult it is to access the static parameters when the simulation was running, but I though I would ask, just in case that issue had been resolved in SP 3.2.

      Cheers! 😎

      posted in SketchyPhysics
      S
      sketchyKev
    • Simple clutch in SketchyPhysics?

      Is it possible to make a simple clutch in SP, by for example changing the "damp" parameter of a hinge joint dynamically while a simulation is running using a ruby script?

      posted in SketchyPhysics
      S
      sketchyKev
    • RE: Pivot arm won't pivot

      Hi again Rick,

      You did a good job with linking the slider with the servo. It looks almost perfect. Unfortunately the movement of the lock arm is more complicated and trying to simulate the action of the linkages with servos would be difficult even for an expert. The servo method is not the way to go as it "fakes" the physics and does not look realistic and takes things like gravity out of the equation. Anyway, I have modified you model yet again. This time the the lock arm is manipulated by the A and D keys and swings freely when not being actively manipulated. To use the model use the slider to pull the load up and use the D key to put the lock arm in place. A key to release the lock. If you turn the "Internal" and "physics joints" layers on you can see the working parts. Click on the big servo with the UI open and you can see the code for controlling the servo with the keyboard in the blue box. For more info on SP keyboard controls see http://sketchyphysics.wikia.com/wiki/Beginner.

      @unknownuser said:

      ... I wish I understood what it actually takes to make the parts interact correctly. For example my very first upload you looked at; why doesn't the lock physically push the arm, and the arm in turn push the block like the one you did.
      I will study yours further, but I doubt I'll get it. We'll see.
      Thanks again for your time,
      Rick

      The key part is that for complex parts is that what you see is not necessarily what the physics simulation thinks the shape is. Use the "Debug" feature in the SketchyPhysics right click menu to see what the simulation thinks the shape is. You need to break parts into smaller non-concave parts.

      I was wondering if you use extrude or the "outer shell" method to make your parts? Either method tends to make parts that are not directly compatible with sketchy physics. There is another method to hide the unsightly joins in the parts other than the method I described earlier. It involves exploding the parts down to the individual line and faces level. Add in extra lines to divide the shape into simple non concave solids. Now treble click to select all the lines in the larger solid. Right click and select the "intersect with model" option. Now hide the join lines you do not want to see. Now group the smaller solids individually. Make the state of the small parts "convex hull". Group all the sub-parts back into one large part. Now you should have a large complex part that looks good and behaves realistically in the simulation.


      PIVOT ARM-PH4.skp

      posted in SketchyPhysics
      S
      sketchyKev
    • RE: Pivot arm won't pivot

      @unknownuser said:

      Actually what I was asking was how did you link all 3 servos to one slider?

      I didn't. The slider only manipulates the lock bar. There are no other servos. Everything else follows because the surfaces are sliding and pushing against each other as they would in the real world. It is a "real" physics simulation πŸ˜‰

      You could arrange for one slider to control more then one object if you really want to. Use two servos, one for each object. In the UI you will we see that each servo has a number something like slider('servo1856')in the controller box. Just change the number of the second servo to be the same as the first. This works fine if you want the two items to move by the same amount but if you want a ratio other than 1:1 it gets a bit buggy.

      Another way is to use one servo on one object and an ordinary hinge joint on the other (instead of a second servo). Link the servo and the hinge joint to make a gear connection. Change the gear ratio in the UI to whatever you want. One problem is that by default the gear connection rotates one gear in the opposite direction to the other and you cannot use a negative gear ratio to fix this. You have to rotate the rotary joint axis through 180 degrees to reverse the action. Both methods allow you to control more than one object with one slider.

      See the simple demo attached of one slider controlling two bars. The ratio is set so that the second bar rotates twice as much as the first with the servo. The ratio can be changed by treble clicking on the blue joint of the second bar then click on the UI icon and then change the value of the ratio in the parameters for hinge hinge1841.


      Multi servo.skp

      posted in SketchyPhysics
      S
      sketchyKev
    • RE: Pivot arm won't pivot

      @unknownuser said:

      ... two questions: how did you do that? and how do I "drag" the handle?
      Thanks,
      Rick

      Hi Rick,

      When the simulation is running the cursor becomes a hand and you can use it drag things around by holding down the left mouse button when over the object you want to "grab". The default is to drag left, right, forward or backward horizontally but if you press shift while holding down the left mouse button you can drag things vertically. Use it to pull on the handle of your pivot arm device as you would if it were a real object.

      For some reason (at least for me) this "drag" functionality disappears if you select any other functions like orbit while the simulation is running and the "grab hand" can not be reactivated. Maybe a bug?

      I am not sure what you mean by "that" when you ask "how do I do that"? I am guessing you are asking how I hide the functional parts inside a skin? If so I have done a little tutorial that requires you to use the attached file. It contains two hollow boxes. The purple box looks nice because the joins have been deleted using the "Outer Shell" tool but when the simulation is running you can see that if the little red box is dragged over the hole it does not fall in, so the purple box is not behaving physically as it should. The green box behaves (because it is made of individual groups) but it does not look as nice. Sketchy Physics can not handle shapes with concave surfaces automatically so you have to break concave objects into smaller non-concave parts and group them.)

      Here is how you get the best of both worlds. Select the purple box and change the state to "ignore" in the "UI" or right click and use Sketchy Physics/State:/Ignore. Run the simulation again and the red box falls straight through the solid surface of the box because it is no longer a physical object and you can not interact with it or drag it and nothing collides with it. Now with the layers menu open, make sure the "main" layer is the active layer with the radio button on the right of it highlighted. Select both the purple box and the green box and make them into a group. Now triple click on the green box so that only the green box is selected. (Triple clicking opens the group for editing.) Use the move tool to move the green box 50 units to the left so that it is exactly superimposed on the purple box. Click outside the box to close the group again. Now turn off the layer called "internal" to hide the functional green box. Now when you run the simulation the box looks nice and behaves nice with the hole acting as it should and the box can be dragged about. If you need to edit the internal box, switch off the outer layer and turn on the internal layer again.

      Let me know if any of that helps or makes any sense πŸ˜•


      Tutorial

      posted in SketchyPhysics
      S
      sketchyKev
    • RE: Pivot arm won't pivot

      Have a look at the attached model and see if it is the sort of thing you are after. I have put the working mechanics in a hidden layer called "Bones" and using your original parts as a non working pretty skin for the ugly mechanical parts. The load can be lifted by using the lock servo or dragging the arm handle.


      PIVOT ARM-PH3c.skp

      posted in SketchyPhysics
      S
      sketchyKev
    • RE: Really didn't understood gears

      When making gears the secret is making sure each joint is grouped with an object (not the same object) before using ctrl-click to make the gear connection. If each joint is not associated with its own grouped object the gear pop-up window will not appear. One you have made the connection, use the UI to inspect the first joint and the gear ratio parameter can then be changed in the UI.

      posted in SketchyPhysics
      S
      sketchyKev
    • RE: How to control gravity

      Select the object and then click on the "UI" button two buttons to the right of the "Play" button. In the the User Interface that opens, set the density of the object to something low like 0.0001 and the object will be much lighter.

      posted in SketchyPhysics
      S
      sketchyKev
    • RE: How to make objects fly

      Try this primitive balloon model attached. Well, it is an early form of flight πŸ˜›

      The next step is to add more thrusters for sideways motion and ruby controllers to adjust the thrust in flight, but the balloon model floats around quite nicely with a nudge. Select the balloon and open the UI to see the thruster parameter. One limitation is that the thruster will not work if the thrust object is grouped with anything else so that is why I have connected the "basket" with a joint and a gyro was added for stability. The altitude can be changed while the simulation is running by holding shift and giving it a nudge up or down, or by slightly adjusting the thrust parameter in the UI and putting the cursor back over the simulation window again.


      balloon.skp

      posted in SketchyPhysics
      S
      sketchyKev
    • RE: Pivot arm won't pivot

      Hi Rhots,

      I managed to get your model to work. First click on the "UI" button. This is the 3rd icon in the Sketchy Physics menu bar. This brings up the user interface. Now click on the "joint connector". This is the 4th button on the right in the SP menu bar. Click on the pin and then hold down the "Ctrl" key on your keyboard. You should now have a plus sign next to your mouse pointer. If the plus sign does not appear try the other "Ctrl" key on your keyboard. While still holding the ctrl button click on the joint. THe joint should now be highlighted in a yellow box and in the UI inspector it should say "connected to hinge 108461". In the UI click on the black text that says "hinge 108461". It should now be highlighted in yellow and shows details of the joint. Untick the "Connected collide" box. This is necessary because the pin and the arm share the same physical space. Although there is a hole in the arm for the pin, the wireframe black box when the simulation is running shows the simulation considers the arm to be a large rectangular box with no hole. It might be better to cut off the cylinders and the ends of the pivot arms and add new ones. Group the arm. Group the new cylinders with the arm. Group the whole assembly with the joint and remake the connection. This will give a better approximation of the physical shape of the arm in the simulation for collisions. While you have the UI open you might want to set the accel parameter to 0.0 so that the arm does not accelerate continuously and shake itself to pieces. If you really want the arm to be self powered, you would be better off replacing the joint with a motor. Let me know how you get on and if this is any help.

      posted in SketchyPhysics
      S
      sketchyKev
    • RE: Internal Joint?

      An object with an "internal" joint means that a joint has been grouped with the object. Sometimes when repeatedly clicking on a grouped object to select a joint for deletion, the group is "opened" (temporarily exploded to allow access to the internal elements of the group). Occasionally due to an obscure bug, deleting a joint in a group opened in this way shows the joint still existing as an internal element even after it has been deleted. The best cure is to explode the object with the internal joint and re-group the elements. If your model is complex with many physics joints it is normal to have groups which have "internal" joints and is nothing to worry about as long as the joint exists. For example in chain with many links, each link would have one joint on one side as an "internal" joint and the joint on the other side as a "connected" joint. Let me know if any of that helps. If it does not, you will have to provide further details of the problem or upload your model so that people here can better understand the problem and try and help you further.

      posted in SketchyPhysics
      S
      sketchyKev
    • 1 / 1