[Plugin] Align 2d

[Plugin] Align 2d

Postby Didier Bur » Fri Nov 23, 2007 6:18 pm

Hi all,
Here is the beta of my new Align 2D script (the Align 3D script has been released yesterday, available at the old SU Ruby forum and at my site).

How it works ?
1. Make a selection (other objects than groups or components are ignored)
2. Select "Align 2D" in the context menu or in the Tools menu
3. Click 2 points that define a line for the alignement.
4. A construction line is temporarily drawn and a dialog box is displayed
5. Choose your options:
- horizontally align all groups/components along X axis at the intersection with the cline
- vertically align all groups/components along Y axis at the intersection with the cline
- perpendicularly align all groups/components along a perpendicular virtual line at the intersection with the cline.
6. Other options self-explanatory

Experiment by yourself and have fun !
Regards,

Please get the latest version from the PluginStore

Download

0
Didier Bur
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur 
 

Re: New script: ALIGN 2D

Postby Didier Bur » Fri Nov 23, 2007 6:19 pm

Oops, where's the rb ??? I've attached it and nothing shows up ? :oops:

Coen, I just retried and it tells me that rb extension isn't allowed. 8O
Any fix for this ?
0
Didier Bur
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur 
 

Re: New script: ALIGN 2D

Postby not registered yet » Fri Nov 23, 2007 6:19 pm

Hi, Didier !
It seems that with .zip files, there is no restrictions. ;)
... and THANKS for the new script - it look very hopeful !

:)

[kaizer_soze]
0

not registered yet 
 

Re: New script: ALIGN 2D

Postby Didier Bur » Fri Nov 23, 2007 6:21 pm

Well, so here it is.
Give it a try :D
0
Didier Bur
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur 
 

Re: New script: ALIGN 2D

Postby TIG » Fri Nov 23, 2007 6:21 pm

Thanks Didier, it works OK but sometimes gives an error =

Error: #<ArgumentError: Cannot convert argument to Sketchup::Point3d>

referring to the line:

translate = Geom::Transformation.translation( origin.vector_to( inters_point ) )

Can't see immediately why ?

The 'test for selection' doesn't give you the context-menu IF only one object is selected - why have the test for "and ss.length==1" ? Is this connected to the error message ?
0
TIG
User avatar
TIG 
Global Moderator
 

Re: New script: ALIGN 2D

Postby Didier Bur » Fri Nov 23, 2007 6:22 pm

Thanks for the bug report TIG
I'll check that soon (and the selection issue as well) :oops:
0
Didier Bur
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur 
 

Re: New script: ALIGN 2D

Postby Didier Bur » Fri Nov 23, 2007 6:23 pm

Bug found: it happens when either the 2 points that define the alignment line or the origin of groups/components are not on the same plane.

I'm considering to provide an additionnal option to align groups/components axis with the alignment line. Does it make sense or do you think this will be useful ?

Regards,
0
Didier Bur
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur 
 

Re: New script: ALIGN 2D

Postby Didier Bur » Fri Nov 23, 2007 6:25 pm

Here is an update with some fixes, thanks to TIG for pointing out.
All alignments are now done regardless of altitudes of selected groups/components.
It also checks for impossible alignments, for instance aligning vertically along a line which is parallel to Y axis is not allowed. ;)
0
Didier Bur
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur 
 

Re: New script: ALIGN 2D

Postby Didier Bur » Fri Nov 23, 2007 6:25 pm

Coen,
NO, I cannot upload a rb file :cry:
Here is the zip instead 8)
0
Didier Bur
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur 
 

Re: New script: ALIGN 2D

Postby not registered yet » Fri Nov 23, 2007 6:26 pm

Hi, Didier and Thanks for the script again !
Just an idea for improvment - an option, after aligning objects obove the line to place them with uniformly space between them, like we can do in PhotoShop. :)

[kaizer_soze]
0

not registered yet 
 

Re: New script: ALIGN 2D

Postby Didier Bur » Fri Nov 23, 2007 6:27 pm

Hi TIG,
I see that you're online now and I've got a small problem:

Rotating groups/components work with this attached version EXCEPT with Y match, and I don' know why. Can you have a look at it ?
Thanks in advance.
0
Didier Bur
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur 
 

Re: New script: ALIGN 2D

Postby TIG » Fri Nov 23, 2007 6:28 pm

Will look and get back to you a.s.a.p...

Edit: After an hour I'm 'stumped' - I'll sleep on it and get back to you [on year]...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Align 2d

Postby marcelpatulacci » Thu May 02, 2013 2:08 pm

Hi Didier,

First, thank you for this plugin,
However, I have some problems to make it work.

For example, it doesn't work when i try to align windows on a facade. But if the facade is placed horizontally, then it works perfectly. Have you already heard about that?
Maybe i'm using it in a wrong way?
Can you help me please?

Thank you.
0

marcelpatulacci 
 

Re: [Plugin] Align 2d

Postby TIG » Tue Nov 04, 2014 4:50 pm

Didier has agreed that I might update his Plugins.
The version in the PluginStore is now v2014/v2015 compatible.

Download

1
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Align 2d

Postby dubreu » Sat Jul 09, 2016 11:14 am

Bonjour,

J'ai installé ce pluging facilement.
Je n'arrive pas à m'en servir. Il me manque un élément de compréhension.
Je suis plutôt à l'aise avec Sketchup.

Je sélectionne plusieurs composants.
Je lance la fonction Align 2D avec le menu.

Je trace une droite; le menu apparait avec les différentes options. je valide et rien ne se passe.

En fait, je souhaiterais bien comprendre le principe d’alignement que je ne maitrise pas suffisamment.

J'ai cherché, mais il ne me semble pas qu'il existe de tutorial.

Pourrais-je avoir un peu d'aide ?

D'avance merci !!!

François
0

dubreu 
 

Re: [Plugin] Align 2d

Postby Dave R » Sat Jul 09, 2016 11:34 am

dubreu wrote:Je trace une droite; le menu apparait avec les différentes options. je valide et rien ne se passe


Perhaps you could show us the components/groups you are trying to align. Probably you are choosing the wrong alignment setting at the top of the dialog box.
0
%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: [Plugin] Align 2d

Postby dubreu » Sat Jul 09, 2016 12:11 pm

Screen-2016-07-09_12-57-36.jpg
Hi dave,

Thank you for your so quick answer !
I will try to explain it in english. Be indulgent ...

You will find enclosed a screen capture.

I'm currently working on a project with a schematic railway layout (2D) which will be included in a 3D project. That why i would wike to do all the job with only one tool, sketchup.

At the left of the screen, a component. It's a schematic railway turnout.

I would like to duplicate the component and align the new instance on the current schematic layout.

A the right of the screen(figure 1 above), i would like to align the 2 turnouts like that.
A the right of the screen (figure 2 under the previous one), i would like to align the 2 turnouts like that as well (More difficult ?).

Can it be done with the 2D Align Plugin ?

Best.
François
0

dubreu 
 

Re: [Plugin] Align 2d

Postby pilou » Sat Jul 09, 2016 5:19 pm

Aucun souci! On peut aussi essayer l'Align 3D!

Any Trouble!

(you can also try the Align 3D by Didier Bur also! )

Click image for animation of 2D Align! :ugeek:
GIF_align.gif
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] Align 2d

Postby dubreu » Sun Jul 10, 2016 6:16 pm

Grands remerciements
c'est reparti !

François
0

dubreu 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Plugins

Who is online

Users browsing this forum: No registered users and 28 guests

Visit our sponsors: