Place the center of an objet to a diagonal line

Hi guys.

I will try to explain it simple. I have an object that looks like a cylinder. It basically have a center from top to bottom but with a different shape all around from top to bottom.

I have 2 sets of points generated in grasshopper and lines between 2 points. I wold like to place my object on to each line so the center of the object will go on to the line.

The lines are at different angles.

I will try to come out with some screenshots in the next days.

Thank you in advance

Hi -

You can possibly use VolumeCentroid to create a point at the center of that object and use that to snap to when moving or use the Between snap to find the point between the center of the top cap and the bottom cap.

The 3dm file would be much more helpful.
-wim

Ricasa singleshot.3dm (6.9 MB)

the lower object is align to that line but is not perfect. also the other lines are angled in 2 planes and I’m not sure how to do it

Hello - does the attached file have what you are trying to do?
Ricasa singleshot_test.3dm (312.2 KB)

-Pascal

just open you file. Do not understand what is the difference

ok, got it. can I ask how? to rotate it to one direction I understand. Getting stuck rotating on 2 directions, and also hot to make sure that the center (axis) of the object falls exactly on to the line

Hello -

  1. Run the Point command. Set the Cen osnap and the one-shot OnCrv osnap. Pick the axis line as the curve. Snap the point to the Cen of the lower circle on your object. The point will appear on the axis line at the closest location the the center of the circular edge you used. You could also use ClosestPt to get this location.

  2. Start Orient. Set the first two points at the centers of the top and bottom circular edges on your part. Set the target points snapping to the point made in step 1, and any ‘Near’ snap on the axis line.

-Pascal