Cancel
Showing results for 
Search instead for 
Did you mean: 

Find a part of face which is visible from outside

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

Hi All.

 

I want to solve the following problem. I need to select each part of faces (or faces as whole) that is visible from outside. Below I give an example in pictures.

 

I have one idea: fire the body from any points in space then collect hitted points on each face and create some sort of interpolated face by these points. But this solution has a problem with performance/tolerance. I would like to know, maybe there is way better.

 

And of course I want to get a solution that could be implemented to any geometry.

 

 

This is a body. Only example, this might be any geometry.This is a body. Only example, this might be any geometry.

 

This is the result that I want to achive.This is the result that I want to achive.

 

The description about how it has to work (how I guess).The description about how it has to work (how I guess).

6 REPLIES

Re: Find a part of face which is visible from outside

Siemens Phenom Siemens Phenom
Siemens Phenom

We have an example program on the GTAC Solution center called

 create linked exterior and export parasolid data of resulting solids

You should be able to find it if you search for this string:

 

nx_api3792

 

But I don't think it is going to subdivide the curving face that goes into the cavity to differentiate the part that you can see from the part that you cannot see.  How would you do that in interactive NX?  The automation toolkits are intended to help you automat processes that are achievable from the user interface, but if we don't have an interactive way to do something, we usually won't have an API method either.

 

The key function for that sample program is described as follows in the Open C Reference:

 

Overview
This function creates an Linked Exterior feature, and its
associated sheet bodies, in the same part as object_in_part. The
input faces will extracted as one or more, possibly disjoint,
regions. The xform gives the context for each face. Adjacent
faces which come from the same body and share an xform will be
joined into single sheet body. Input faces cannot be occurrences.
This feature is implemeted as a feature set which owns hidden
subfeatures similar to Linked Regions. The subfeatures should not be
edited or deleted individually.
And it mentions some related calls that you might want to investigate:
 
UF_MODL_ask_linked_exterior
UF_MODL_edit_linked_exterior
UF_MODL_identify_exterior_using_hl
UF_MODL_identify_exterior_using_rays

 

Re: Find a part of face which is visible from outside

Siemens Phenom Siemens Phenom
Siemens Phenom

This is a pretty hard problem, I think.

 

> collect hitted points on each face and create some sort of interpolated face by these points.

 

I don't think this will work. The set of "hit" points will typically have some strange shape that will make it impossible to construct an interpolating surface.

 

What sort of output o you need? Surfaces, polygons, pixels ??

山田
yamada

Re: Find a part of face which is visible from outside

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

SteveLabout wrote:
How would you do that in interactive NX?  The automation toolkits are intended to help you automat processes that are achievable from the user interface, but if we don't have an interactive way to do something, we usually won't have an API method either.

 

 


A creation manually is extremely manual way Smiley Happy It is extremely depends on geometry.


I have an idea how to do it, but I need an access to core. I know that in core there is a technique of visualisation (when you manipulate a model in screen and NX visualize it). There is the scene graph that allow NX to display hidden and visible part of scene when you move or rotate scene. So if I had an access to fuctions of visualisation in core I would be able to do what I want productively.

 

 

Re: Find a part of face which is visible from outside

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

Yamada wrote:

This is a pretty hard problem, I think.

 

> collect hitted points on each face and create some sort of interpolated face by these points.

 

I don't think this will work. The set of "hit" points will typically have some strange shape that will make it impossible to construct an interpolating surface.

 

What sort of output o you need? Surfaces, polygons, pixels ??


You underestimate my power (с) haha Smiley Happy

 

I don't need the clean and tolerance part of visible surfase. I just need to know its area and ratio between all area and visible area.

Re: Find a part of face which is visible from outside

Siemens Phenom Siemens Phenom
Siemens Phenom

> I don't need the clean and tolerance part of visible surfase.

> I just need to know its area and ratio between all area and visible area.

 

Total area is straightforward; I assume you know how to get that.

 

For the visible area from a given view-point, you could try something like this:

(1) Use the "Define Product Outline" function to get a 2D outline of your part.

(2) Measure the area enclosed by this outline.

(3) Subtract the area of the "outside" faces (you have to define what you mean by "outside".

This will give you the area of the visible portions of interior faces (from this view point).

 

Or, if you want to do it the way it's done in visualization:

(1) Tesselate the model into triangles.

(2) Set up a software z-buffer and scan-convert each triangle into this z-buffer.

Keep track of how many z-buffer pixels have front pixels that came from your "inside" faces.

 

Then, in either case, iterate over all viewpoints (which is easier said than done).

山田
yamada

Re: Find a part of face which is visible from outside

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer
What is "Define Product Outline"? I did not find it in documentation.

As for z-buffer, I need to access to core functions in order to get z-map. Maybe there are other technique, but I do not know about them (you mentioned a software for scan z-buffer?).

And I have to know not only z-depth, but I have to know z-depth according to face. Actually I don't know where this information is calculated and store. I guess it is more than the core of parasolid or NX. Maybe hardware, graphic card.

"iterate over all viewpoints"

As I described I made surround 3D model by sphere, then create points on it uniformly (A Fibonacci sphere for example) and in each point create a vector to the center of sphere. Each point and vector is a viewpoint. Of course it is discrete, but I don't know another way.