I do a lot of aligns for moving parts around, but often I want to align a group of objects using something on the middle, such as making the inside of the washers level with a surface.
Currently, what I resort to doing is attaching a curve to part of the object by grouping, and I use the move command to move the objects, but then I usually need to align them in the other planes.
It would be handy to have a FromPoint option. When you choose an alignment mode (HorizCenter) and the FromPoint option is on, Rhino would first ask what (vertical) reference point you would want to align. You could snap to the inside of the washer and then THAT would be what you aligning.
Alignment type ( Bottom Concentric HorizCenter Left Right Top VertCenter FromPoint=yes):
[BTW, I usually include a lot of points in my blocks just for alignment and translations.]
As Pascal I’m not sure what you are asking for exactly and a more elaborate description of the desired workflow would be good.
For now fwiw:
Are you aware of the option to lock (with TAB jey) the direction for move:
Run command Move
Select objects (or have them pre-selected)
Set point to move from.
Now (press Shift ( or have Ortho on) and )move in the desired direction without snapping to anything.
next Press TAB key.
a white line appears that indicated the locked direction in which you can now only move.
The ortho lock helps some, but it’s really easy to cause a misalignment because what you snap to might be more at a greater angle than the ortho is set and cause it to release. I intentionally put the destination surface more than 45degrees off axis, because that’s how it comes sometimes.
I like the align because it’s a dead/total vertical or horizontal axis lock. For assemblies, I use it a lot, but often need to align from a point between the top or bottom of a part, in this case, the washer.
BTW, when I make parts like this I include a lot of points for stacking, but in the case where I needed to see the threaded part, it’s hard to see and grab the point where it’s threaded. [The parts are JIC Bulkhead fittings, washers and jambnut…and a bulkhead.]
[I am working on a machine with hundreds of parts, perhaps a little out Rhino’s comfort zone. Rhino and myself are wanton of very few things to work like this, but I feel that I’m having a difficult time making the case for those things.]
Hi Brenda- see if this makes any sense with what you wan to do- when the white tracking line appears is when I’ve hit the tab key to lock the direction.
I’m sorry, I’ve tried the key, but would a FromPoint option still be a good option.
~
What’s worse, I thought of another option as well:
AsGroup
Checking this option would allow the user align all the selected objects to something else without first grouping them, and ungrouping them later, which I find I often do.
Alignment type ( Bottom Concentric HorizCenter Left Right Top VertCenter FromPoint AsGroup=yes ):
pick 'bottom align’
it will ask: select objects to align
select the larger piece
press enter when done selecting
and choose the bottom corner of the smaller piece where it says “from here” on your drawing.
that’s it.
Try the below Python script.
Select the object or group and this moves the surface normal clicked
# Move single object or group Normal surface to pick
#write by Ing. Vittorio Carlotto carlottovittorio@gmail.com
import Rhino
import rhinoscriptsyntax as rs
def moveNormal():
rs.UnselectAllObjects()
stringa="pick Point < Enter for End>"
rc,surfaceref=Rhino.Input.RhinoGet.GetOneObject(stringa,False, Rhino.DocObjects.ObjectType.Surface )
if rc!=Rhino.Commands.Result.Success: return
sup = surfaceref.Face() # superficie selezionata ## li trovo su Rhino.DocObjects.Objref
obj=surfaceref.Object() # oggetto di partenza
point=surfaceref.SelectionPoint()
param=sup.ClosestPoint(point) ## ClosestPoint lo trovo su Geometry.Surface
if param[0]:
u=param[1]
v=param[2]
else:
return
normal=sup.NormalAt(u,v) ## lo trovo su Geometry.Surface
p2=point+normal*10
ll=rs.ObjectGroups(obj)
rs.UnselectAllObjects()
if ll!=[]:
for gruppo in ll:
rs.Command("_-SelGroup "+str(gruppo))
else:
rs.SelectObject(obj)
rs.Command("_Move w"+str(point)+" _AlongLine W"+str(point)+" W"+str(p2),False)
rs.UnselectAllObjects()
return point
while True:
ris=moveNormal()
if ris==None:break
#ris=moveNormal()
Thanks Izabela, but I want/need to be able to align points even to/from the center of an object. This is difficult.
Vittorio, I often have a need to also align to things such as points as well. In the case of a threaded surface, you cannot help but select any meaningless place on a surface. This is why I embed points in my blocks.
In the case of that real-world JIC bulkhead junction, the part that it mates to has a point so that if the two points are coincident, the fittings are fastened to the correct length.
I will try try your script when I am back on my main computer. It would be most helpful if anything snapable can be used.
The align tool does an axial or 1D translation along the axis perpendicular to the normal you are facing.
The 3point orient would be cumbersome for this purpose. Off the top of my head, it takes 6 points to lay the part down, 3 for the source position and 3 for the resultant position. It’s easy to botch the rotation on the result.
[Theoretically, floating-point wise, the 3Dpoint may not be as accurate unless the code explicitly checks for zero change in the other 2 planes. The Align tool only affects one axis at a time, and makes no change to the other two axises/axi?.]
Using Project for Osnaps will take any Z out of the action- this applies to the tab direction lock as well, which is the solution to the original problem at least, it seems to me.
I am sorry to be an insistent necromancer, but there are several times in the last month in which this feature would have been handy–especially when working with groups and blocks.
Don’t worry, I can be insistent as well - so far, I do not see anything in your example above (Fastener to hole) that is not solved with Tab direction lock.
Yes, it can be done, and I suspect it might be harder to do in a 2D window…
But in practical use, the near snap is too dangerous to keep on all the time. You have to also take in account the amount of time it takes to engage it and disengage it, and check again to make sure it’s not on.