Align center

Hello,

for the function of alignment and “center of alignment”; it is the last parameter which tires me the famous point of alignment, the key enter and nothing is aligned ditto with the key ‘esc’ … it is painful … :cold_face:

Thank’s

You are talking about the “Concentric” command line alignment option and pressing Enter to “auto-align”? In a quick test here it seems to work, can you post an example where it is not?

ESC will cancel and exit any command, that is to be expected. But Enter should work to auto align.

I’m talking about the ‘align objects’ icon in the left bar

Capture d’écran 2021-12-27 à 13.49.43

Capture d’écran 2021-12-27 à 13.54.26

you should post your geometry as mentioned, i dont see that you can do much to make it fail.

Works for me here - Align>Concentric (choose objects) Enter

Cool to see that it also respects grouped objects (the text curves).

I’m on Windows Rhino though.

and in the perspective view, the objects are on the same plane? lay one on top of the other?

No. Align is a 2D operation, not a 3D operation. It will align according to the active CPlane in 2d. The objects will remain separated in CPlane Z.

ok, thank’s

yes, yes, it is possible, alignment on the 3 planes; ce post with this file fichier
now I’m looking for the detail that kills :grinning:

Well, you can always use two consecutive concentric Align operations, one from the Top CPlane and the second from the Front for example…

This is also fairly easily scriptable for individual objects, I probably already have something* that does this lying around somewhere, however, what’s not quite so simple is dealing with groups moving together (especially nested groups).

* for example this script - which is hard coded relative to World CPlane - but which does not currently support object grouping.

Edit, fixed a minor bug with point objects
Align3DWorld.py (3.7 KB)

and it would not be a ‘problem’ of the center of gravity of the objects? that all the objects to be grouped are the same center of gravity so that it is well centered on the 3 axes.?

“Center of gravity” is not the way these things are calculated - virtually all native Rhino alignment commands use the objects’ bounding box for alignment determination. For example, if “centered” is chosen, it uses the center of the bounding box.

If you want to have something based on the object’s center of mass, a script would need to be written that calculates the volume mass properties for each object or group of objects in order to get the alignment point.

Here is a quick hack of the script above that tries to respect object top grouping (single groups). Results with nested groups will likely be incorrect.

Edit, fixed a minor bug with point objects
Align3DWorldG.py (5.0 KB)

there is something that makes a difference in this file where the alignment works. no ?

No, it does not. In that file, all the objects are lying on the World XY plane. Using “concentric” and the Perspective viewport (Top CPlane), it aligns in X and Y here, but not Z. Like this:

If it were to align centered in Z at the same time, it would look like this:

Right, I’m defeated :zipper_mouth_face: :wink:, and thanks for your help :pray:

The second image was simply made with Align twice… the way to snatch victory from defeat… :stuck_out_tongue_winking_eye: