How Do I Find The Exact Center Of A Group

Hello,

I am wondering how I select the exact center of any group I select. It doesn’t always pop up when I’m using the selection tool.

Thank you,
Appletatoes

How do you want to define the centre? The centre of the bounding box? The centre of gravity of the object it represents?

There are plugins for both, I believe.

Is the group a 2D or 3D object?

The center for a 2D group of faces. I have a bunch of faces that I group together then it makes a perfect square box around everything. The center of that 2D box please.

Thank you.

You need to include your example. Trying to describe geometry in words just leads to confusion. For example, are all these faces in the same plane?

You could try entering the following code in Ruby Console (Menu option: Window, Ruby Console):

model = Sketchup.active_model()
selection = model.selection
entities= model.entities
grp = entities.add_group(model.selection)
ctr = grp.bounds.center
UI.messagebox ctr, MB_OK
entities.add_cpoint ctr
grp.explode

This creates a group from the selection, displays the centre coordinates in a message box, adds a construction point at the centre, then explodes the group just created.

4 Likes

there isn’t any ruby or console in SketchUp Free which is the forum sub-section you are posting in…

john

I may be missing something…the topic’s tags say SketchUp Free. That version can’t run plugins or process Ruby commands!

Sorry, I got mixed up with Sketchup Make

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.