Please wait...
×

Error

Posted Wed, 05 Dec 2012 21:23:08 GMT by adacovsk
Hello,

Given three nodes on a given slice, how would I go about finding all the elements within the area enclosed by those three nodes? How would the element numbers correspond to the node numbers? I plan on changing the properties of those elements within these bounds. See here:

[img width=200 height=178]http://i.imgur.com/T8jsfgK.png[/img]

The elements in orange are the ones being bounded by the area of the triangle (outlined in red) with the nodes (yellow vertices).

Thanks,

Adam
Posted Mon, 15 Apr 2013 11:51:18 GMT by Søren Erbs Poulsen
Hi Adam,

Calculate the centroids (http://en.wikipedia.org/wiki/Centroid) of all elements and store them in an array.

Use one of the methods suggested in the thread below to find out which of the centroids (which comes in x and y coordinates in 2D) that are within the triangle that you define.

http://stackoverflow.com/questions/2049582/how-to-determine-a-point-in-a-triangle

Use IfmGetNode to obtain vertices (nodes) of elements.

Hope this is what you were looking for!

Best regards,
Søren

You must be signed in to post in this forum.