[Plugin] Q JS ALIGN TOOLBAR

[Plugin] Q JS ALIGN TOOLBAR

Postby CadFather » Mon Jun 29, 2009 11:11 am

Here is a tweaked version of Jan's Sandstrom (Pixero) script for aligning objects along the 3 main axis - it is useful for those pesky areas like lampshades or 3D text, or just when you feel lazy enough..

it is mainly for groups (though it will align edges too) - also note that the script takes reference from the centre of the group bounding box and not necessarily the geometric one.

i want to thank Jan for allowing me to tweak his script and come up with this toolbar version of it.

the script doesn't really need a tutorial but it is in my to do list, together with other scripts which i will post on my website later on.

cheers
Max

Q JS Align.PNG


(tested only on PC - unzip the contents to your plugins folder)
3
Quarr-IT - SketchUp Training from the Master.. http://quarr-it.com/
User avatar
CadFather 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Q JS ALIGN TOOLBAR

Postby blajnov » Mon Jun 29, 2009 1:05 pm

Is it possible to make sure that the alignment occurred on the selected object?
1

blajnov 
 

Re: [Plugin] Q JS ALIGN TOOLBAR

Postby CadFather » Mon Jun 29, 2009 1:28 pm

i know what you mean, but i haven't been able to focus a selection as primary (the one that doesn't move)

i plan more work on it (like geometric centre and spacing) but it may be beyond my coding (read tweaking) skills..
1
Quarr-IT - SketchUp Training from the Master.. http://quarr-it.com/
User avatar
CadFather 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Q JS ALIGN TOOLBAR

Postby Bob James » Mon Jun 29, 2009 5:49 pm

Toolbar: Much appreciated!!
0
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] Q JS ALIGN TOOLBAR

Postby leixing » Tue Jun 30, 2009 2:47 am

wow ,very nice work! i like it .
0

leixing 
 

Re: [Plugin] Q JS ALIGN TOOLBAR

Postby pilou » Tue Jun 30, 2009 1:53 pm

Like this? ;)
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] Q JS ALIGN TOOLBAR

Postby thomthom » Tue Jun 30, 2009 1:53 pm

Coen Naninck wrote:Can you show me an example where the center of the Group's bounding box is dissimilar from the geometric one?

bb_centre.png


Unless the content of the group/component is a box the boundingbox centre will never be the geometric centre of the content.
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Q JS ALIGN TOOLBAR

Postby Daniel S » Tue Jun 30, 2009 1:57 pm

Thankyou Cadfather!!!
Coen Naninck wrote:Can you show me an example where the center of the Group's bounding box is dissimilar from the geometric one?


Quick example:
centro.gif

(centroid is the geometric center)

Daniel S

Edit: another example:
centro2.gif
0
Last edited by Daniel S on Tue Jun 30, 2009 2:17 pm, edited 1 time in total.

Daniel S 
 

Re: [Plugin] Q JS ALIGN TOOLBAR

Postby CadFather » Tue Jun 30, 2009 1:59 pm

Hi Coen - yes try with a grouped triangle, the centre differs from the bounding box

(thanks all for the feedback) :thumb:

EDIT: Coen you got 3 answers in one go - watch your servers.. ;)
0
Quarr-IT - SketchUp Training from the Master.. http://quarr-it.com/
User avatar
CadFather 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Q JS ALIGN TOOLBAR

Postby CadFather » Tue Jun 30, 2009 2:36 pm

there are two issues i think merit attention: centroid reference and spacing/distribution of objects

we could have icons or a small dialog, sort of this
settings.PNG



actually i have looked at the centroid script by Alex Schreyer, but have not been able to implement it into the align script yet (it's going to take me some time)

in fact if any of the great masters can help, might be better! :roll: :)
0
Quarr-IT - SketchUp Training from the Master.. http://quarr-it.com/
User avatar
CadFather 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Q JS ALIGN TOOLBAR

Postby Chris Fullmer » Tue Jun 30, 2009 5:33 pm

EDIT: THis is wrong, I was looking at his shape wrong.

Thom I think on yours the bounding box center is the geometric center or centroid. Your face runs the diagonal of the bounding box, so placing a centerpoint on that face is just like placing a centerpoint in the middle of a diagonal line of the bounding box.

Chris
0
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer 
SketchUp Team
SketchUp Team
 

Re: [Plugin] Q JS ALIGN TOOLBAR

Postby thomthom » Tue Jun 30, 2009 8:59 pm

The bounding box' centre point is not the centre of that extruded triangle.
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Q JS ALIGN TOOLBAR

Postby CadFather » Tue Jun 30, 2009 9:33 pm

thomthom wrote:The bounding box' centre point is not the centre of that extruded triangle.


Chris, it's the background colour throwing you off.. (must have been on purpose!)
0
Quarr-IT - SketchUp Training from the Master.. http://quarr-it.com/
User avatar
CadFather 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Q JS ALIGN TOOLBAR

Postby Chris Fullmer » Tue Jun 30, 2009 9:48 pm

thomthom wrote:The bounding box' centre point is not the centre of that extruded triangle.

OOooohhh! I get it. Yes, Cadfather is right, I could not see a 3d object there at all. I just saw the front, bright face.

So yes thom, you're right. That construction point is not the center of the geometry. :oops:

Chris
0
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer 
SketchUp Team
SketchUp Team
 

Re: [Plugin] Q JS ALIGN TOOLBAR

Postby thomthom » Tue Jun 30, 2009 9:49 pm

thehe
messing with your head! ;) :D
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Q JS ALIGN TOOLBAR

Postby ideas_arte » Wed Jul 01, 2009 7:40 am

Nice...!

Thank you very much...!
0

ideas_arte 
 

Re: [Plugin] Q JS ALIGN TOOLBAR

Postby Bob James » Fri Jul 10, 2009 6:41 pm

CadFather wrote:
(tested only on PC - unzip the contents to your plugins folder)


Works on Mac except the toolbar doesn't "stick" - have to use View/Toolbars each time SU loads.
0
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] Q JS ALIGN TOOLBAR

Postby CadFather » Fri Jul 10, 2009 8:48 pm

thanks Bob - i hope someone with a mac will be able to fix this :roll:
0
Quarr-IT - SketchUp Training from the Master.. http://quarr-it.com/
User avatar
CadFather 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Q JS ALIGN TOOLBAR

Postby •BTM » Fri Jul 10, 2009 10:04 pm

Just add this:

case gp_quarr_jsalign_tb.get_last_state
when 1
gp_quarr_jsalign_tb.restore
when -1
gp_quarr_jsalign_tb.show
end


Picture 1.png
0

•BTM 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Q JS ALIGN TOOLBAR

Postby utiler » Sun Aug 23, 2009 11:27 pm

Thanks Coen, good tip. Could have used it last week while trying to flatten some survey dwgs.... :thumb:
0
purpose/expression/purpose/....
User avatar
utiler 
Top SketchUcator
 

Re: [Plugin] Q JS ALIGN TOOLBAR

Postby CadFather » Thu Aug 27, 2009 8:39 pm

That's great Coen, thanks..and it is really fast as well
0
Quarr-IT - SketchUp Training from the Master.. http://quarr-it.com/
User avatar
CadFather 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Q JS ALIGN TOOLBAR

Postby opla457 » Fri Oct 16, 2009 2:11 pm

A big thank for this plugin, so great - the function sketchup messed !!
0

opla457 
 

Re: [Plugin] Q JS ALIGN TOOLBAR

Postby jason_maranto » Tue Feb 09, 2010 5:55 pm

Thank you both for this wonderful script -- something I've always wanted in Sketchup.

Best,
Jason.
0
I create video tutorial series about several 2D & 3D graphics programs.
User avatar
jason_maranto 
 

Re: [Plugin] Q JS ALIGN TOOLBAR

Postby bagatelo » Tue Feb 09, 2010 8:35 pm

I change the plugin to show menus in "Plugins" Menu. Now we can set keyboard keys, is very useful to me.

I thought about a function of "smart drop" for all of the possible directions of the axis, like this, the aligned objects if they would not fix in the most distant part of the object of alignment reference, but they would collide in the surface. Look image example. It would be as the plugin drop, but it would work in all possible directions by axes(9 possibilities, or 6, if we not consider middle). Maybe some keys like SHIFT can change this behavior.
0
While the cat's away, the mice will play
User avatar
bagatelo 
 

Re: [Plugin] Q JS ALIGN TOOLBAR

Postby bagatelo » Sun Feb 13, 2011 8:56 pm

Two years later I had another idea. Could someone modify this script to reposition the axes of the selected objects? Maybe by pressing a modifier key on the keyboard, such as alt or shift.
0
While the cat's away, the mice will play
User avatar
bagatelo 
 

Re: [Plugin] Q JS ALIGN TOOLBAR

Postby Vicspa » Sun Feb 13, 2011 9:33 pm

very useful plug-in, thank you :thumb:
0

Vicspa 
 

Re: [Plugin] Q JS ALIGN TOOLBAR

Postby Bob James » Tue Feb 15, 2011 1:18 am

There does not seem to be a way to select which object the others are to align with. I've tried selecting #1 first and then #2, but get the same result if I select #2 first then #1.

It would be very helpful if you could effectively say "make the other(s)" align with "this one"
1
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] Q JS ALIGN TOOLBAR

Postby Pixero » Tue Feb 15, 2011 8:22 am

The script was written to work like many 2d align functions. Aligning to min, max or center, but for each axis.
My original script (without the toolbar has some added functionality like that you can choose "custom" and enter a value (position) in one axis and align to that. When using a group you can choose if the groups max, center or min should align to the value.
Not exactly what your after but might be useful sometimes.

Here is the original script (without toolbar).

jsAlign.rb
-1
User avatar
Pixero 
Premium Member
Premium Member
 

Re: [Plugin] Q JS ALIGN TOOLBAR

Postby Prevayl » Mon Mar 28, 2011 12:02 am

This tool is very useful. i just have one suggestion and im not sure if it was already mentioned but do to busy schedule,forgive if this was already suggested.
But an added feature That functions similar to illustrator would be great where you an evenly distribute the objects(groups) between a distance.
For example In adobe illustrator you can create 10 boxes and align them to a straight line but then you can equally distribute the spaces in between them based on the box furthest to the left and furthest to the right.
That feature would make it easy to create a patio for instance with a gap in between each 2x4 and have it evenly spaced
0

Prevayl 
 

Re: [Plugin] Q JS ALIGN TOOLBAR

Postby function » Mon Mar 28, 2011 4:39 pm

it was brought up about a week ago
viewtopic.php?f=323&t=36006
I couldn't get d.bur's suggestion to distribute evenly, so I don't think it's been created yet- I am a huge fan of the adobe style align/distribute box, and I use the OP's mod all the time! Hopefully someone can complete the package sooner or later.

remember you can distribute the same object by moving and typing '/#' in the dimension box

on a side note:
d.bur's align script would however be a fine addition to this toolbar pack, "Align Along Line" for when ortho just can't do it - :thumb:
0

function 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

Next


 

Return to Plugins

Who is online

Users browsing this forum: asah, dogacangul, Google Bot, jhharuki and 15 guests

Visit our sponsors: