SketchUcation Premium Membership

 

 

[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)
Please, register (free) to access all the attachments on the forums.
Quarr-IT - SketchUp Training from the Master.. . ;) .
User avatar
CadFather
 
Posts: 839
Joined: Fri Nov 16, 2007 11:03 am
Location: London, Milano, Sicily
Name: CadFather

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?
blajnov
 
Posts: 45
Joined: Sat Jan 05, 2008 2:58 am
Name: yura

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..
Quarr-IT - SketchUp Training from the Master.. . ;) .
User avatar
CadFather
 
Posts: 839
Joined: Fri Nov 16, 2007 11:03 am
Location: London, Milano, Sicily
Name: CadFather

Re: [Plugin] Q JS ALIGN TOOLBAR

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

Toolbar: Much appreciated!!
I've reduced my experience level to intermediate because how can I possibly be "advanced" if Solo lists himself as intermediate!!
User avatar
Bob James
Premium Member
Premium Member
 
Posts: 619
Joined: Fri Jan 18, 2008 9:29 pm
Location: Lompoc, CA, USA
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: engineering and mechanical design
Level of SketchUp: Intermediate

Re: [Plugin] Q JS ALIGN TOOLBAR

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

wow ,very nice work! i like it .
leixing
 
Posts: 27
Joined: Fri Apr 11, 2008 9:24 am

Re: [Plugin] Q JS ALIGN TOOLBAR

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

Like this? ;)
Please, register (free) to access all the attachments on the forums.
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
Pilou
Top SketchUcator
 
Posts: 10219
Joined: Wed Jan 23, 2008 10:33 pm
Operating system: Windows
SketchUp version: 6
License type: Free/Make
SketchUp use: hobby
Level of SketchUp: Advanced

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.
Please, register (free) to access all the attachments on the forums.
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17915
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: Thomas Thomassen
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

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
Please, register (free) to access all the attachments on the forums.
Last edited by Daniel S on Tue Jun 30, 2009 2:17 pm, edited 1 time in total.
Daniel S
 
Posts: 349
Joined: Mon Nov 12, 2007 6:06 pm
Location: Mar del Plata, Buenos Aires, Argentina

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.. ;)
Quarr-IT - SketchUp Training from the Master.. . ;) .
User avatar
CadFather
 
Posts: 839
Joined: Fri Nov 16, 2007 11:03 am
Location: London, Milano, Sicily
Name: CadFather

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: :)
Please, register (free) to access all the attachments on the forums.
Quarr-IT - SketchUp Training from the Master.. . ;) .
User avatar
CadFather
 
Posts: 839
Joined: Fri Nov 16, 2007 11:03 am
Location: London, Milano, Sicily
Name: CadFather

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
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer
SketchUp Team
 
Posts: 6762
Joined: Wed Nov 21, 2007 3:21 am
Location: Davis, CA
Name: Chris Fullmer
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: landscape architecture
Level of SketchUp: Advanced

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.
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17915
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: Thomas Thomassen
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

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!)
Quarr-IT - SketchUp Training from the Master.. . ;) .
User avatar
CadFather
 
Posts: 839
Joined: Fri Nov 16, 2007 11:03 am
Location: London, Milano, Sicily
Name: CadFather

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
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer
SketchUp Team
 
Posts: 6762
Joined: Wed Nov 21, 2007 3:21 am
Location: Davis, CA
Name: Chris Fullmer
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: landscape architecture
Level of SketchUp: Advanced

Re: [Plugin] Q JS ALIGN TOOLBAR

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

thehe
messing with your head! ;) :D
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17915
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: Thomas Thomassen
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Q JS ALIGN TOOLBAR

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

Nice...!

Thank you very much...!
ideas_arte
 
Posts: 57
Joined: Tue Sep 09, 2008 7:20 pm
Location: Guatemala
Name: Ivan Alvarado

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.
I've reduced my experience level to intermediate because how can I possibly be "advanced" if Solo lists himself as intermediate!!
User avatar
Bob James
Premium Member
Premium Member
 
Posts: 619
Joined: Fri Jan 18, 2008 9:29 pm
Location: Lompoc, CA, USA
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: engineering and mechanical design
Level of SketchUp: Intermediate

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:
Quarr-IT - SketchUp Training from the Master.. . ;) .
User avatar
CadFather
 
Posts: 839
Joined: Fri Nov 16, 2007 11:03 am
Location: London, Milano, Sicily
Name: CadFather

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
Please, register (free) to access all the attachments on the forums.
•BTM
 
Posts: 717
Joined: Wed Jul 23, 2008 12:59 am

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:
purpose/expression/purpose/....
User avatar
utiler
Top SketchUcator
 
Posts: 1936
Joined: Wed Nov 14, 2007 11:35 am
Location: Queensland, Australia
Name: Andrew
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

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
Quarr-IT - SketchUp Training from the Master.. . ;) .
User avatar
CadFather
 
Posts: 839
Joined: Fri Nov 16, 2007 11:03 am
Location: London, Milano, Sicily
Name: CadFather

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 !!
opla457
 
Posts: 1
Joined: Fri Oct 16, 2009 1:52 pm

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.
I create video tutorial series about several 2D & 3D graphics programs.
User avatar
jason_maranto
 
Posts: 962
Joined: Thu Feb 04, 2010 7:57 pm
Location: Temple Terrace, FL - USA
Name: Jason Maranto
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: illustration, cartoons
Level of SketchUp: Advanced

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.
Please, register (free) to access all the attachments on the forums.
User avatar
bagatelo
 
Posts: 243
Joined: Wed Apr 16, 2008 4:55 pm
Location: São José, Santa Catarina, Brasil
Name: Alex Henrique
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: interior design
Level of SketchUp: Intermediate

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.
User avatar
bagatelo
 
Posts: 243
Joined: Wed Apr 16, 2008 4:55 pm
Location: São José, Santa Catarina, Brasil
Name: Alex Henrique
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: interior design
Level of SketchUp: Intermediate

Re: [Plugin] Q JS ALIGN TOOLBAR

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

very useful plug-in, thank you :thumb:
vicspa
 
Posts: 302
Joined: Wed May 28, 2008 3:11 pm
Location: NYC
Name: vicspa
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: illustration, cartoons
Level of SketchUp: Intermediate

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"
I've reduced my experience level to intermediate because how can I possibly be "advanced" if Solo lists himself as intermediate!!
User avatar
Bob James
Premium Member
Premium Member
 
Posts: 619
Joined: Fri Jan 18, 2008 9:29 pm
Location: Lompoc, CA, USA
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: engineering and mechanical design
Level of SketchUp: Intermediate

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
Please, register (free) to access all the attachments on the forums.
User avatar
Pixero
Premium Member
Premium Member
 
Posts: 1301
Joined: Wed Nov 14, 2007 2:58 pm
Location: Halmstad, Sweden
Name: Jan Sandström
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

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
Prevayl
 
Posts: 1
Joined: Thu Jan 27, 2011 7:42 pm
Name: Chris Brandao

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:
Please, register (free) to access all the attachments on the forums.
function
 
Posts: 41
Joined: Mon Mar 29, 2010 6:24 am

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago

Are you a Premium Member? Get your freebies here. Are you not a Premium Member yet? Upgrade your account to grab these freebies instantly.

Ad Machine
Robot
 
Posts: 2012

Next

Return to Plugins

Who is online

Users browsing this forum: EVANS, Maccaneel, simpleDiary and 10 guests