Open osrf-migration opened 8 years ago
Original comment by Ian Chen (Bitbucket: Ian Chen, GitHub: iche033).
face and edge alignment will definitely help.
As for model alignment, we can borrow some ideas from 3ds max align tool. Two options it offers that we currently can't do:
align an object min/center/max to another object's min/center/max. We can only to min-to-min, center-to-center, max-to-max but not all the combinations
align orientation.
Original report (archived issue) by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).
Currently the snap feature moves a model so that a face in one model touches a face on another model. That is, the faces become coplanar, with normals pointing on opposite directions, and they touch (anywhere at random...?).
We could probably make use of the meshes' triangles even more, offering users other ways to align triangles / edges / vertices. Not sure which ones are useful and whether the benefits brought by the tool justify the time spent implementing.
Faces
Coplanar faces
Make faces coplanar by rotating model and translating model as little as possible.
There are two options, either normals facing opposite directions or same direction.
The moving face might end up anywhere on the green plane.
Parallel faces
Make faces parallel just by rotating model in place, no translation.
There are 2 direction options here as well.
Edges
Picking edges
We already have a way to pick triangles. We'd need a way to pick edges as well. I can think of a couple of ways:
Pick existing edges
They'd highlight as triangles currently do.
Create edges from existing vertices
The edges would highlight with a few vertices highlighted, such as the 2 end vertices and the mid vertex, and the user can pick 2 to make an edge
Moving edges
Collinear edges
Make edges collinear by rotating and translating model as little as possible.
There are two align direction options along the line.
The moving edge might end up anywhere on the green line.
Consecutive edges
Make edges collinear while their end points coincide
There are 4 options for which points coincide:
model1_vertex1 + model2_vertex1
model1_vertex1 + model2_vertex2
model1_vertex2 + model2_vertex1
model1_vertex2 + model2_vertex2
Times 2 options for the alignment
Combining
Once we have these working individually, we could think of combining them as constraints all at once.
Note that I'm not talking about "mating" faces so they always keep that relation if you try to move them, as some CAD programs have. I'm talking just about moving models once, to align them, but then the relationship is not persistent - just like out current snap.