lagadic / visp_cao_editor

Development of a CAD model editor for ViSP model-based tracker
GNU General Public License v3.0
19 stars 8 forks source link

Primitive: 3D Face #7

Closed s-trinh closed 7 years ago

s-trinh commented 7 years ago

A 3D face can be modeled by 3 to N points. The order of the points can matter when computing the visibility from face normal.

Interaction description:

3d_face

3d_line_multiple_selection

vikasTmz commented 7 years ago

Is this feature introduced here and in #6 an alternate to simplifying a model? Like instead of simplifying just choose the important contour points?

s-trinh commented 7 years ago

Yes, after some reflexion, we prefer the approach where the user selects directly the contour points he wants for 3D lines and 3D faces:

vikasTmz commented 7 years ago

From #8

in complex CAD models we have, the object is not decomposed of multiple primitives in the object tree view and we don't want to force the user to prefilter and/or group each primitive in a specific group

Simplifying or decomposing models isn't difficult once important vertices are selected. Below are some simple steps that can be done to generate faces from the selected vertices.

1. Select vertices screenshot from 2017-06-03 12 55 17

2. Y to seperate vertices/ edges and P to create a new mesh for those separated vertices/ edges screenshot from 2017-06-03 12 55 50

3. Now the user can select edges/vertices/faces and then X to delete them. Limited Dissolve can now be used to reduce number of vertices/ edges further and maintain the contour [this step is optional]

4. F to create a face from the new set of vertices screenshot from 2017-06-03 13 49 56

vikasTmz commented 7 years ago

The advantage of having these primitives exist in the scene is it would be easy to manage them. But if they are to be managed in a list as just data points, the list would be very large for even a simple model like cubesat and it would be hard for the user then to remove/ disable a random list of points/ lines from the tree view without any 3D representation.

But let me go ahead and implement these features and see how it turns out when working with complex models.

vikasTmz commented 7 years ago

The advantage of having these primitives exist in the scene is it would be easy to manage them. But if they are to be managed in a list as just data points, the list would be very large for even a simple model like cubesat and it would be hard for the user then to remove/ disable a random list of points/ lines from the tree view without any 3D representation.

Any reviews on this?

s-trinh commented 7 years ago

Sorry for the delay.

But if they are to be managed in a list as just data points, the list would be very large for even a simple model like cubesat and it would be hard for the user then to remove/ disable a random list of points/ lines from the tree view without any 3D representation.

The current status of the pull request for me is:

Is it correct (I don't have access to my dev machine right now) or I missed something? If so, this pull request could be a first Blender plugin.


The second plugin I would like to have is:

We should proceed iteratively:

Do you think it is feasible? In the (global) project, I would like to prioritize on this 2nd Blender plugin. If we are short in time, some optional features could be dropped (for example, import a .cao in Blender) or simplify.

vikasTmz commented 7 years ago

The current status of the pull request for me

Yes, these have been implemented.

I believe I can finish the second plugin (including version 1,2,3) within the given deadlines in my timeline. The import plugin can also be done since I've alloted a week for that during the month of August and also 2 weeks after that to work on any improvements.

vikasTmz commented 7 years ago

There could be one issue with this:

screenshot from 2017-06-11 20 07 33

This is fine for simple models.

Solution: If the user were to follow the steps I mentioned in the 4 steps few comments above (June 3), this issue can be solved.

s-trinh commented 7 years ago

Ok. Let's move to the tutorial part for now.

vikasTmz commented 7 years ago

I believe I've found a solution to the above. The new PR has the implementation. Basically after the user selects the vertices:

Therefore all user has to do is to select the vertices and add it as a primitive. Editing these vertices may be tricky, so right now only add/delete is possible.

s-trinh commented 7 years ago

Done in #16