@natalia, the given link doesn't work, could you please check its correctness?Hi LJK,
Please give more details about this case. What do you mean under HLR projection? Do you prepare HLR presentation with help of OCCT?
How this topic relates to 'http://analysissitus.org/forum/index.php?threads/is-there-a-proper-way-for-occt-to-get-the-viewable-surface-of-a-model-at-a-certain-angle.166/'?
Regards, Natalia
The similar question, where the edges were a point of interest, was discussed here.How to get all the faces of the model in the HLR projection direction?
View attachment 332
It is assumed that annotations 1 and 2 are the faces to be identified in the projection direction. These vertical faces are easy to obtain, so how to capture the faces in other projection directions?
Hi Natalia,thanks for your reply。Maybe my question is not clear。The core of my problem is to artificially set a projection direction, similar to that when the sun shines on the object, it will leave a shadow. What I want to do is how to extract the face of the object that is hit by the sun in the projection direction.
Hi JSLydne.Thank you for your advice .But what I currently need is not the outline of the model, but the faces I can see on the model in the projection direction I set. Similar to a sunlit object, the sunlit side of the object is my desired side. Finally thank you very much for your reply.The similar question, where the edges were a point of interest, was discussed here.
Even if HLRBRep_HLRToShape doesn't provide the API for extracting the filtered faces, you might look inside its implementation and follow the way it extracts the edges. There you'll see that these edges are extracted from the faces stored in another class, and I believe these faces is what you're looking for and, likely, there should be a way to access them as well.Hi JSLydne.Thank you for your advice .But what I currently need is not the outline of the model, but the faces I can see on the model in the projection direction I set. Similar to a sunlit object, the sunlit side of the object is my desired side. Finally thank you very much for your reply.
Hi JSLydne.Thank you for your advice,I'll give it a try.If I succeed, I will post my method and experience in the forum.Even if HLRBRep_HLRToShape doesn't provide the API for extracting the filtered faces, you might look inside its implementation and follow the way it extracts the edges. There you'll see that these edges are extracted from the faces stored in another class, and I believe these faces is what you're looking for and, likely, there should be a way to access them as well.
However, if you're not interested in getting the edges, OCCT's HLR algorithm might be excessive, and implementation of custom function would be worth to try. You might want to investigate the sources how this algorithm treats the faces - if it's visible or not, and adapt this code according to your needs.
Typically such a kind of problems are solved by intersection of a ray with BVH structure of tessellation mesh, where each triangle has a back-reference to originated topological face.
It would be amazing, look forward! Good luck!Hi JSLydne.Thank you for your advice,I'll give it a try.If I succeed, I will post my method and experience in the forum.
Thank you for your support, I am still working on it。Hope for a good result。It would be amazing, look forward! Good luck!