[Plugin] JointSU 1.0

[Plugin] JointSU 1.0

Postby MarcioAB » Mon Jan 26, 2009 11:35 pm

Advantages to use JointSU:

1. Easier to handle assembles (specially when reusable).
2. Re-assemble after move components (explode view).
3. Animation


1. Create a JointSU component (one per model).
2. Apply an instance of JointSU on any component ("joint-enable" the component).
3. Structure 2 joint-enabled components as parent-child.
4. Establish a connection between them.
5. Repeat for other joints.
6. Assemble, Animation, Hide/Unhide/Select.

Pack files:

The zip pack (MS Windows) has 4 files. JointSU_GUI.rb, JointSU.rb, bike.skp and this file
For developers, the idea is to have one Ruby file for GUI and Menus stuff and a GUI-less file with classes and modules. Both are necessary to make it work with my proposed GUI.

The bike.skp demo is my test bed ready for use. You can open the bike file and use << Plugins/JointSU/Animate/Start>> to check the animation. You can move components and sub-components (using normal StechUP move tool) or use << Plugins/JointSU/Explode >> and re-assemble all using << Plugins/JointSU/Assemble >>.
You can open the SkecthUP Outliner and see my proposed structure for the bike and play around.

Workflow in Details:

1.1. Use << Plugins/JointSU/Create JointSU compo >> menu to generate a component with a geometry easy to position on its parent. Or you can create your own geometry. What is important is just this component axis and the name: it must be "JointSU".

2.1. From << Window/Components >> drag an instance of JointSU into the model and use << Window/Outliner >> to allocate it below the component that will be "joint-enabled".

2.2. To position the JointSU instance, use SketchUP Move function or << JointSU/Position >> contextual menus over the joint (in Outliner or in the View). The UI (user interface) can be mouse, keyboard or panel.

2.3. On OUTLINER, edit the associated component of the JointSU and take note of its axis positions, specially, the Z-axis for Alpha rotation. The position tools will be based on these axis.
Alpha: rotation of the JointSU around this Z-axis.
Beta: angle relative this XY-plane
Torsion: rotation around JointSU X-axis
tip1: use SketchUp "Show component axes" (on Window/Model Info/Components menu) to see the axes.

3.1. Use << Window/Outliner >>. This is the trick part to establish the behavior of the mecanism.

4.1. To (easier) establish the joint-joint connection: on OUTLINER, use << JointSU/CameraOnTarget >> on parent-joint and zoom-in. Then on OUTLINER, use << JointSU/Set >> on child-joint and pick in the model view the parent-joint that is zoomed-in. The child-joint (with the corresponding attached joint-enabled component) will snap-on the parent-joint.

4.2. To handle JointSU geometric parameters (axial translation, axial rotation and flip) use << JointSU/Joint >> contextual menus over the joint (in Outliner or in the View). The UI (user interface) can be keyboard or panel.

6.1. Use menu << Plugins/JointSU/Assemble >> to re-assemble all the joints back on its original (in dictionary) parameters. You can use SketchUP Move tools to mess all around with the components and than just re-assemble in one click.

6.2. Use menu << Plugins/JointSU/Explode >> to create an exploded view of the structure. OBS: This must be improved because the generated exploded view is "ugly" to say minimal. But at least it is a starting point to manually create a looking better exploded view.

6.3. Use contextual menu << JointSU/Joint/Set anime >> to set animation parameters (active true/false and the rotation step) ... this will be improved in the future.

6.4. Use menus << Plugins/JointSU/Animate/Start>> and << ../Stop >> to initiate the animation.

6.5. Use menus << Plugins/JointSU/Hide/Unhide >> to hide/unhide/select the joints.

Extra: JointSU/CameraOnTarget

1. Select component (on Model View or Outliner).
2. Activate CameraOnT (on JointSU contextual menu).
3. The Component axis will be centered on the View.
- Rotate (LButton), Zoom (+Shift) and Pan (+Ctrl) the View related this axis.
- ReCenter (Double click) to bring back the Component axis to View center.
4. Escape (Esc) or select another tool to exit.

Works only for Components and the target is always fixed (on Component axis). There is another plugin for general use.

JointSU pack.zip


Marcio de A. Braga - Jan/2009


Re: [Plugin] JointSU 1.0

Postby pilou » Tue Jan 27, 2009 1:51 am

A little video tut will be useful ;)

PS the bike for the V6 ;)
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
Top SketchUcator

Re: [Plugin] JointSU 1.0

Postby thomthom » Tue Jan 27, 2009 8:56 am

:thumb: :D :thumb:
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
PluginStore Author
PluginStore Author

Re: [Plugin] JointSU 1.0

Postby chango70 » Tue Jul 28, 2009 9:48 pm

Hey that is brilliant! I can't believe there aren't more responses. Makes putting stuff on awkward geometries a doddle! :ecstatic:


Re: [Plugin] JointSU 1.0

Postby Bob James » Wed Jul 29, 2009 8:22 am

Pilou wrote:A little video tut will be useful ;)

It really would.
i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60
User avatar
Bob James 
Premium Member
Premium Member

Re: [Plugin] JointSU 1.0

Postby MarcioAB » Thu Jul 30, 2009 6:58 pm

Ok. For example, assuming already 2 components created and it's axis origin positioned at the center of the cilinders, this is the Workflow as they appear in the video:

1. Drop 2 JointSU into the model
2. Make each JointSU child of each Component
3. Name both JointSUs
4. Using "Zero" function, position each JointSU at the Components origin.
5. Make Component#2 child of Component#1 (create of a product structure)
6. Using "Set" function, establish the connection of the joints.
7. Using "Panel" function, reverse the direction of the joint (Flip=true).
8. Using "Set Anime" function, make this joint able to be part of the animation.
9. Using "Anime Start", animate the whole model.
10. Using "Anime Stop", stop model animation.
11. Using "Panel", re-align the joint to it's original position.

If interested I have the WMV video in much better quality, but it's 1.3 MB. (do not recall if there is a place to upload such files here).



SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago

Ad Machine 


Return to Plugins

Who is online

Users browsing this forum: erickmachado_0 and 9 guests