Hello TDahl,
First of all, very professional work here, in a sence of understanding how to use the plugin despite the lack of documentation on it. Great job!
I'm not sure what is causing the crash. I think that the physics engine has a limit on how much joints it can control at once. I will look into this bugsplat issue when I find the time.
Meanwhile, there are a couple of things you can do to improve behavior of cable and performance:
- Because you are relying on a small timestep (1/300), reducing solver model, to 4 iterations for example, would improve the performance by a good factor. Solver model basically controls the stability of joints. If your timestep is small, reducing solver model would alter the stability joints by an unnoticeable factor.
- Specificating the collision shape of "FCC Segment Instance" to Box should improve the performance as well. I assume you already did that for your the edited model, but in case you haven't, here is an easy way to do it for all of them: Because all your cable segments have the same name, you can assign a box shape to one of the segments and use the Assign Props to All with Name button, within the MSPhysics UI, to assign alike properties to all instances with the same name.
- Because all joints are flexible, you can simply rely on a Fixed joint, rather than Hinge. This would make the entire cable more stiff and of course improve performance.
I eddied your model, containing all the addressed suggestions and attached it below.
Also, if you change a joint within one of the wire segments, which also adds it to all other component instances, you can re-interconnect the segments with their joint by pasting this command into Ruby Console:
id = 646194 # Change this to desired joint ID.
instance_name = 'FCC Segment Instance' # Change this to instance name
ids = [id]
Sketchup.active_model.start_operation('OP', true, false, false)
Sketchup.active_model.entities.each { |e|
if (e.is_a?(;;Sketchup;;ComponentInstance) || e.is_a?(Sketchup;;Group)) && e.name == instance_name
e.set_attribute('MSPhysics Body', 'Connected Joints', ids)
end
}
Sketchup.active_model.commit_operation
That's the code I used to interconnect the Fixed joints with their segments.
Once again, great work, TDahl!
Best regards,
Anton
, and after 30 seconds it spins out of control
.