Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FindUsingVector See across material

5 REPLIES 5
Reply
Message 1 of 6
Arias79
322 Views, 5 Replies

FindUsingVector See across material

 

Hi All,

 

I'd like to implement a function that returns all the faces visible from a given point.

FindUsingVectos has a cone functionality that seems to be the perfect solution for my problem (I migth need to call it several times with diferent direction vectors but) I can get all the faces for a given point, direction and cone angle.

 

The problem I'm having is that it also returns faces that are behind material and with a single intersection point per occurence, i won't have information enough to discriminate if farther faces are visible or not.

 

Does anybody know how can I implement this function.

 

Thanks a lot

 

Pablo

5 REPLIES 5
Message 2 of 6
philippe.leefsma
in reply to: Arias79

First question is why would like to do that? Which kind of feature are you trying to create?

 

Second thing is when you mention "I migth need to call it several times with diferent direction vectors" I'm curious how you would do that? Would you call it an infinite number of time with every possible direction?

 

I doubt it is possible to achieve that, but in the meantime I sent a query to the development team, I will let you know their feedback.

 

Regards,

Philippe.



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

Message 3 of 6
Arias79
in reply to: Arias79

 

Hello Philippe,

 

Thanks for your answer.

 

The application I'm working on, calculates radiation propagation trogh mazes (radiation propagates in a straigth line until it hits a surface).

 

With "findusingray" I have implemented this funtionality by selecting a resolution, and checking a non-inifinite (but very big) number of directions, this works, but very slow.

 

With the "cone" functionality in "findusingvector", I was hoping to execute it only 6 times (Positive and negative direction of every axis X,Y,Z) with a 60 deg angle. This will return some duplicate results due to the overlap of these 60 deg cones, but would cover the whole 4*pi solid angle.

 

Ovbiously, the grapich cards can perform this kind of calculations to produce the screen view....

 

Any advice will be much appreciated.

 

Thanks

 

Pablo

 

 

Message 4 of 6
philippe.leefsma
in reply to: Arias79

Hi Pablo,

 

I'm checking the FindUsingVector API more closely: how come the VisibleObjectsOnly argument of that method doesn't meet your requirement?

 

Seems to be what you are looking for:

 

Optional input Boolean that indicates whether or not invisible objects should be included in the search. Defaults to True indicating that invisible objects will be ignored.

 

Regards,

Philippe.



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

Message 5 of 6

Here is the reply from a colleague:

 

I don’t see a simple way to solve this problem. The graphics system does it quite differently by using a Z buffer to determine what’s visible. Back face culling is also used. It might be possible to reproduce some of these algorithms but it wouldn’t be simple.

 

As far as the VisibleObjectsOnly argument in FindUsingVector, that’s for things whose visibility is turned completely off.  For example, if a body or occurrence has been turned off, this allows you to still include it in the results. It doesn’t have anything to do with what’s occluded in the current view orientation.

 

Sorry for the bad news,

Philippe.



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

Message 6 of 6
Arias79
in reply to: Arias79

 

Hello Philippe,

 

Thanks very much for looking into this.

It's unfortunate this functionality is not available.

I'll update this post If I find a good solution for this problem

 

Pablo

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report