Find pairs of opposite surfaces to an element.
I have an FE inside a CAD. for any FE element, I have to get opposite paired surfaces.
Any solution?
Answers
-
Try find closest surf from elem center
0 -
@tinh Passing list of all surfaceid to get closest surface makes code slow. Do you know any code without passing surface id list?
Secondly, if its a single surface cad, then i will not get opposite surfaces, instead i get surfaces on same plane using closest surface. How to check this?
0 -
yes, hm_getclosestsurface is very slow
using hm_measureshortestdistance is faster
after finding the closest surf, use hm_markremove to remove it from surf mark, and continue searching next closest surf
0 -
Altair Forum User said:
yes, hm_getclosestsurface is very slow
using hm_measureshortestdistance is faster
after finding the closest surf, use hm_markremove to remove it from surf mark, and continue searching next closest surf
Ple
Altair Forum User said:@tinh Passing list of all surfaceid to get closest surface makes code slow. Do you know any code without passing surface id list?
Secondly, if its a single surface cad, then i will not get opposite surfaces, instead i get surfaces on same plane using closest surface. How to check this?
Clarify abt my second doubt. @tinh
0 -
Secondary,...
=> to check it, you can compare normal vector of 2 surfs, in case of single surf cad, 2 normal vectors have same direction
otherwise, they have inversed normals
hm_triplecos may help
0 -
@tinh Can you elaborate. Pls.
0 -
Once you find the closest surf, find its normal by hm_getsurfacenormalatcoord
0 -
@tinh i am using hm_triplecos function. what is happening is sometimes it gives +1 or -1 for opposite surfaces/parallel surfaces both. so, getting opposite surfaces in case of ribs fails in some areas. that is, it may get surface of nearby rib too in case of plastics. what to do?
0 -
Unify comps with normal + (red outer)
Then search nearest surface in normal - only, ignore surf with triplecos +1
0 -
@tinh how to 'Unify comps with normal + (red outer)?'
0 -
Enter panel normals>surfs to adjust it
0 -
@tinh, will be helpful in plastic comps with full of ribs?
0 -
Please try and if it is not helpful, tell us reason
0