# How do I align the center of a sphere with the center of a square?

First post here on the forum. I’m using the free web version of Sketchup. I’m creating a small model-building tool with spheres mounted on the ends of truncated pyramids extruded from the faces of a hexagon. How do I align the center of the sphere with the center of the end of the pyramid? Desired motions shown in blue:

I’m not sure how this thread go missed for 2days, perhaps the stress of the holidays.

The easiest option is to draw the spheres in place rather than trying to move them into position.
Here I have used the desktop version, but the process is the same in the web version. The gif is a little clumsy, it was a big day yesterday and I’m feeling a little delicate this morning.

3 Likes

Another way with xray and hidden geometry…

1 Like

Another is to create the sphere the “wrong” way, using a smaller circle as the follow-me path for a bigger one, which gets you halfway there.

Turn on x-ray (search “x-ray” in toolbar; assign a hotkey like shift+a for future use if you want) and I can see that the original circle is inside the sphere because I used it as the path. Rather than deleting the circle, I can select over both and make this a group or component.

At this point as long as I am in x-ray mode I can access the center of the circle as a grip for moving the sphere. However, it’s a pain to do so without accidentally inferring to the hidden endpoints of the edges that make up the sphere. Also, my sphere group is not a Solid, and that’s annoying.

A refined “wrong” sphere method is to use the circle to set a new axis. I make the circle and sphere a component this time, not a group. When I open it, I see that the axis has been placed on the floor.

I can move it to the center of the circle. Search “axis” in the toolbar to find the set axis command. Assign a hotkey like shift+x to it here if you want, for future use. Click on the center of the circle and pull the red and green dimensions to infer them to the current red and green dimensions.

Now I can delete the cheat-circle. I have a new purple inference dot for Origin that represents the center of the sphere. When I grab new instances of the sphere from the Component sidebar, I will already be gripped to the center. Also, it’s a Solid now.

What if I wanted to be able to find the center of the face, or a little way inside the volume of the sphere from that point? In that case, after creating a component, I can draw an edge from the center of the sphere outward. Here I can hide the edge and use the endpoint as a grip, but I might accidentally click on the wrong spot again. There’s so much nearby geo.

Instead, I will set axis again. I can use the endpoint of the guide edge, where it meets the surface of the sphere, or I can use a little ways inside on the guide edge if I want. I’m going to make red go this way and green go this way this time. Then, I can delete the guide-edge and use the purple origin dot going forward.

Even better, because I set red and green like so, I can go to the Component sidebar and click the expand triangle to get my Component options. Here, I can activate Glue to Any. Now, when I grab a new instance of the sphere from the Component window, it will “stand” on any face in my model. I have a hidden edge on the square to help guide placement.

Your “path” circle can be used to apply its ‘Find Center’ to include in the “sphere” group. The circle itself can then be deleted.
In X-ray you would have a sphere and its visible center.

True - for some reason (i.e. because I never use true guides) I thought Find Center wasn’t in web, but there it is.

Thanks for the detailed info, Box. It was fascinating to watch you create in a couple minutes what took me a couple days. That’s what years of practice will do for you

Does the free web version have X-ray mode? I couldn’t find it. I also don’t see a way to set custom hotkeys. And I definitely don’t have a Toolbar. The free version seems to be hideously limited in scope. I used to have the free standalone app, whose interface was better, but that no longer appears to be supported.

I did try to create the circles in situ at the end of the pyramids, but FollowMe kept giving me deformed spheres. In the end, once I’d finally managed to create the spheres off-site, I just eyeballed them into position. This is just a prototype and doesn’t have to be perfect.

Yes. Select it in the Default Styles panel on the right.

Search for the tool you want to set the hot key for using the Magnifying Glass icon on the left. If it allows a custom keyboard shortcut, you should be able to set it in the window.

The toolbar is on the left in SketchUp Free. That version doesn’t allow you to create a custom toolbar like the Windows desktop version does. Box has created a custom toolbar for his GIFs with commonly used tools.

I expect he would have made his GIF in the web version if your post had been in the SketchUp for Web/SketchUp Free category. I moved the thread to that category.

It’s actually not that limited. The user interface is just different.

SketchUp 2017 Make is still available. It isn’t support, that’s true, but it can still be used and, like SketchUp Free, available for for hobbyist use. sketchup.com/download/all

Right, as Dave says search and hotkey setting are accessed through the magnifying glass. Web has almost everything that is in native desktop, including the set axis and glue to any features I described above, you just have to use search/hotkeys, which are better than toolbars and menus anyway, or use the right-side sidebars which are a bit messy in some respects but mostly as powerful as in native desktop.

Thanks for all the good advice. I see the X-ray mode now, I had no idea it was there, and would never have thought to look for it under “Styles.” It would make much more sense for it to be listed under “View.” I assumed “Styles” referred to object styles, like specific line widths, pattern colors, etc.

Sorry my post wasn’t in the correct place: I didn’t notice the Categories popup menu until today.

I can run SketchUp Make 2016 on my Mac but my OS is too old for SketchUp Make 2017. I saved my web project as a .skp file, but 2016 can’t open it because the web app only backsaves as far as 2017 format. So it looks like I’m stuck using the web app, unless I want to recreate my projects from scratch using the 2016 app. Or is there a way to convert .skp 2017 files to .skp 2016?

X-ray is a style setting after all.

You could upload your .skp file from SketchUp Free to the 3D Warehouse. Then go to the 3D Warehouse in your internet browser and download the Collada file. You can then import the .dae file into SketchUp 2016.

I’d say it’s worth working out why this was going wrong for you, it’s a pretty fundamental tool.

1 Like

I’m currently using the free web app, so my tool bars and palettes look much different than the one you show in your message. I do have Sketchup Make 2016 at home, but was hoping the web app would be easier to use. Not sure if that’s the case yet: I need more experience with both before I decide which one to focus on.

I’ll look into that idea with the 3D Warehouse conversion. Thanks for the tip!

I know that you are using the free web app. I was showing that X-ray is a style setting in the desktop version, too, so there is consistency between the versions. You’ll also find the X-ray style in the Default styles in the desktop version.

You need to learn how to use inferencing to position things.
Here I have used the two midpoints to find the center of the rectangle, then aligned the second circle on the midpoint of the first circle. Get this right and your spheres won’t be deformed. The face is giving me the red orientation for the first circle but the second is getting the blue orientation from my camera angle. Both can be forced by the use of the arrow keys, up for Blue, right for Red and left for Green.

2 Likes

@MikeBlackwell

Along with all the tips from the user community, I thought I would add a simple tip since you already have the geometry created. The tip is to use the Group/Component Grips to find and move from the center of the sphere and then use the inference engine to move to the center of the rectangle.

In the animation below, while in the Move tool, you can see how I cycle through the Grip positions to find the center position. I then move the sphere and use SU’s inference engine to fine the center of the rectangle.

I hope this helps
ChrisD

4 Likes

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