gazebosim / gazebo-classic

Gazebo classic. For the latest version, see https://github.com/gazebosim/gz-sim
http://classic.gazebosim.org/
Other
1.15k stars 478 forks source link

Snap in more diverse ways #1727

Open osrf-migration opened 8 years ago

osrf-migration commented 8 years ago

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...?).

snap1.png

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

snap2.png

Parallel faces

snap7.png

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.

snap3.png

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

snap5.png

Moving edges

Collinear edges

snap4.png

Consecutive edges

snap8.png

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.

osrf-migration commented 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:

osrf-migration commented 7 years ago

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).