Well, there's no easy reason why it's not working right. There are several different reasons. First, the hydraulics aren't connected to each-other at all, so they collide with each-other like normal objects. Also, the way that everything is grouped is not done properly, and everything was set to default shape (collision as the bounding box). Here's a version I completely re-grouped and re-jointed, and removed a part, because I didn't see what it was doing exactly.
SISSORBARS.skp
Posts made by BTM
-
RE: Scissors effect - solved
-
RE: Driving joints from external data?
@jaycephus said:
Implementing a sensor object that has a configurable distance limit and returns whether an object is present within that distance limit (and possibly an object ID) would be great for using as a general trigger in any sort of physics simulation.
That's possible, but you'd have to use the SketchUp API to do it, there is a method that allows you to find the distance between 2 points, and other methods you might find useful.
-
RE: Groundbot
(sigh). No, it really isn't hard at all, you'd just have to make all the mechanisms inside the sphere no-collision. No-collision objects still have normal mass, so it would work fine. As for the mechanism itself, it should be FAIRLY straight forward.
-
RE: How to prepare plugin for sketchup?
I THINK he wants to know how to install the sketchyphysics plugin, thus "preparing it for use in sketchup". I don't know how to on windows though.
-
RE: Making a SketchUp tool - incorporating the mouse & keyboard
Still no luck. It's weird though; you said that code didn't allow you to place 2 c.points? It worked for me, except for the transformation, and the parts with the Sets works in the Webdialogue box. Also, the changes you were talking about didn't seem to fix it.
-
RE: Overly dark renders, and etcetera
Some in-SU pics of one of my latest models.
Everything but textures were made by me. If you're wondering why the turrets are so bad, the file size is huge, and I want to be able to upload it to the 3D warehouse, so i have to take away a LOT of detail
(Images removed, different ones will most likely be re-posted.) -
RE: Working on new scripting system.
@cphillips said:
There is a big problem with the breaking feature. The actual breaking of the geometry is very slow. It can take several seconds to break a model.
http://sketchyphysics2.googlecode.com/files/Breaking1.avi
Maybe it can be optimized somehow. But I am going to go back to the scripting stuff for now.
I would have guessed that. Maybe you can get sketchyphysics to figure out how to break the object at the start of the animation, then find the object's position and orientation on the collision and break it, or replace it with the broken pieces already made at the start, but not used. Just a thought, I don't have a clue how you're doing it currently, so I'm just throwing this out there
-
RE: Re: Some Funny Pics.
@ Frederic, I didn't know susan boyle was actually ruby code
-
RE: Making a SketchUp tool - incorporating the mouse & keyboard
I think I'm close, but it still isn't working.
` %(#600000)[****require "sketchup.rb"
#-------------------------------------------------------------------------------
class Pinchmover
#-------------------------------------------------------------------------------
def activate
@model = Sketchup.active_model
@ent = @model.entities
@view = @model.active_view
@slct = @model.selection
@slct.clear
@vect = Set.new
@verts = Set.new
@dvert = Set.new- - - - - - - - - - - - - - - - - - - -
@thing = 0
- - - - - - - - - - - - - - - - - - - -
end
#-------------------------------------------------------------------------------
def onLButtonUp(flags, x, y, view)- - - - - - - - - - - - - - - - - - - -
if @thing == 0 ip1 = view.inputpoint x,y pt1 = ip1.position pt2 = Geom::Point3d.new pt1 @cpoint = @ent.add_cpoint pt2 @thing = 1 end
- - - - - - - - - - - - - - - - - - - -
if @thing == 1 ip2 = view.inputpoint x,y pt3 = ip2.position pt4 = Geom::Point3d.new pt3 @cpoint2 = @ent.add_cpoint pt4
- - - - - - - - - - - - - - - - - - - -
prompts = ["Radius="] defaults = [ 0.0.to_l] list = [""] results = UI.inputbox prompts, defaults, list, "Please input desired radius." @rad= results[0].to_l
- - - - - - - - - - - - - - - - - - - -
@ent.each do |e| if e.typename == "Edge" @verts.insert e.start @verts.insert e.end end end
- - - - - - - - - - - - - - - - - - - -
@verts.each do |v| dist = v.position.distance @cpoint.position if dist < @rad @dvert.insert v end end
- - - - - - - - - - - - - - - - - - - -
@dvert.each do |d| # Doesn't seem to work. vec = @cpoint.position.vector_to @cpoint2.position @vect.insert vec end @affected = @ent.transform_by_vectors @dvert.to_a, @vect.to_a @thing = 2 end
- - - - - - - - - - - - - - - - - - - -
end
#-------------------------------------------------------------------------------
end
#-------------------------------------------------------------------------------
plugins_menu = UI.menu("Plugins")
item = plugins_menu.add_item("Pinch Mover") {
Sketchup.active_model.select_tool Pinchmover.new
}****]`... WHY can't I get it to work? I really think the biggest problem could be in how it's set up overall, or in the last few lines, but can't be sure. I've been trying to get it to work on my own for some time now, to no avail. Anyone know what I've done completely wrong?
-
RE: I need help...
I'm not that bad yet. Once though, I thought that an objet I was seeing was moving slow because it was too high poly for... well... existence I guess...
-
RE: Working on new scripting system.
Awesome! THAT must have been hard to do
-
RE: Hey Whaat: Profile Builder...?
... In shape bender, you'd have to do 3 sections aswell, but no glitches
-
RE: A Fun Little Game, Continued...
Granted, you are good at making jokes; just not writing them out or telling them. They still make sense in your head though
... I wish my the ruby script i've been (attempting at) writing would work
-
RE: WIP -- 'Protrude' ruby from Jim Foltz
Error Loading File protrude.rb
no such file to load -- jf_menuwhen I take off the require 'jf_menu', the web dialog that appears when used is white and blank.
-
RE: Re: Some Funny Pics.
... With that google one, I thought it'd been photoshopped, but even worse; actual results I got from google image search
-
RE: Rigging ruby [req]
The idea of having geometry sticking to groups and components crossed my mind once a long time ago, as I guess it has to many other people as well. I wonder what possibilities it would create for sketchy-physics if it worked
... Or maybe someone could make a script that creates a group like FFD, but you use tools to draw a 'skeleton' in it, and the script methods .distance and .distance_to_line to find out the closest point in the skeleton from the mesh, and move it based on the movement of the skeleton, perhaps based on the distance to that closest point aswell. Who knows if that would be possible or not though.
-
RE: A Fun Little Game, Continued...
Granted. It will write itself in record time- record slow time that is.
... I wish I had Unity, especially now that V.2.5 is out That means you can get it for windows now too! http://unity3d.com/unity/whats-new/unity-2.5