Editing User:Thethirdone/GSoC18/Project

From BRL-CAD

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 4: Line 4:
  
 
The primary goal of this project would be to implement a solution to issue #3047. This issue is basically about implementing a way for users to select a face and choose it to be the face that connects to the plate.
 
The primary goal of this project would be to implement a solution to issue #3047. This issue is basically about implementing a way for users to select a face and choose it to be the face that connects to the plate.
 
 
Specifically, after implementing this feature, I expect that a user would be able to click a face (which should be highlighted to make clicking the right face easy) on an object and then click menu button to rotate that face to bottom of the model. If there is a part of the object below the plate after the rotation, it should either error or push the model up until it is no longer intersecting the plate (I’m not sure which is more intuitive).
 
Specifically, after implementing this feature, I expect that a user would be able to click a face (which should be highlighted to make clicking the right face easy) on an object and then click menu button to rotate that face to bottom of the model. If there is a part of the object below the plate after the rotation, it should either error or push the model up until it is no longer intersecting the plate (I’m not sure which is more intuitive).
  
 
Potential Extensions:
 
Potential Extensions:
 
In the process of writing up the plan for this, I found that I don’t think it will take me very much time. I expect a working prototype will take me a week, even if that is a dramatic underestimate, that would still leave a significant of time to be working on other issues in Slic3r.  
 
In the process of writing up the plan for this, I found that I don’t think it will take me very much time. I expect a working prototype will take me a week, even if that is a dramatic underestimate, that would still leave a significant of time to be working on other issues in Slic3r.  
 
 
If different parts of the GUI can be ported to C++ independently, it could make sense to port 3DScene as an extension to this proposal. By the time I finish working on adding face-based part rotation, I should be quite familiar with it so porting would be more efficient than moving onto another area of Slic3r.  
 
If different parts of the GUI can be ported to C++ independently, it could make sense to port 3DScene as an extension to this proposal. By the time I finish working on adding face-based part rotation, I should be quite familiar with it so porting would be more efficient than moving onto another area of Slic3r.  
 
Another possible extension is to work on  adding manual support pillars which would solve #3062. I would certainly be familiar enough with 3DScene to be able to do that side of it, but I haven’t look at the code for support generation at all yet.
 
Another possible extension is to work on  adding manual support pillars which would solve #3062. I would certainly be familiar enough with 3DScene to be able to do that side of it, but I haven’t look at the code for support generation at all yet.
  
 
=='''Implementation Plans'''==
 
=='''Implementation Plans'''==
 
 
Given a normal to rotate to the -z direction, the actual rotation is fairly simple. A rotation about the z axis so that the normal lies in the xz plane followed by a rotation about the y axis to rotate it to -z is quite straightforward. Therefore, most of the work of implementing this feature will be in determining the normal to use from user input.
 
Given a normal to rotate to the -z direction, the actual rotation is fairly simple. A rotation about the z axis so that the normal lies in the xz plane followed by a rotation about the y axis to rotate it to -z is quite straightforward. Therefore, most of the work of implementing this feature will be in determining the normal to use from user input.
 
 
In order to select a face, it is important to be able to find the triangle that the users mouse is over. This is currently already done, but with entire objects instead of individual triangles. Objects are currently determined from mouse position by changing the color of the object based the looking up the color at the position of the mouse. It should be possible to extend the method to a per triangle basis without much trouble. However, it will require an extra rendering pass. The highlighting of a single face (can be multiple triangles) will likely require keeping a buffer of colors for every triangle in the object.  
 
In order to select a face, it is important to be able to find the triangle that the users mouse is over. This is currently already done, but with entire objects instead of individual triangles. Objects are currently determined from mouse position by changing the color of the object based the looking up the color at the position of the mouse. It should be possible to extend the method to a per triangle basis without much trouble. However, it will require an extra rendering pass. The highlighting of a single face (can be multiple triangles) will likely require keeping a buffer of colors for every triangle in the object.  
 
 
When selecting a face, ideally the entire (flatly) connected face would be highlighted. This requires detecting which triangles make up a face. I don’t know of any algorithms which detect flat connected faces off the top of my head, but I am sure they exist. It is fairly easy though to detect triangles which lie of the same plane though. If for some reason highlighting just the connected face is impractical, highlighting all triangles on the same plane should be sufficient.
 
When selecting a face, ideally the entire (flatly) connected face would be highlighted. This requires detecting which triangles make up a face. I don’t know of any algorithms which detect flat connected faces off the top of my head, but I am sure they exist. It is fairly easy though to detect triangles which lie of the same plane though. If for some reason highlighting just the connected face is impractical, highlighting all triangles on the same plane should be sufficient.
 
 

Please note that all contributions to BRL-CAD may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see BRL-CAD:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)