🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Find pairs of opposite surfaces to an element.

User: "Jouher_20929"
Altair Community Member
Updated by Jouher_20929

I have an FE inside a CAD. for any FE element, I have to get opposite paired surfaces.

 

Any solution?

 

Pls help. @tinh @vipin

Find more posts tagged with

Sort by:
1 - 13 of 131
    User: "tinh"
    Altair Community Member
    Updated by tinh

    Try find closest surf from elem center

    User: "Jouher_20929"
    Altair Community Member
    OP
    Updated by Jouher_20929

    @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?

    User: "tinh"
    Altair Community Member
    Updated by tinh

    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

    User: "Jouher_20929"
    Altair Community Member
    OP
    Updated by Jouher_20929

    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

     

    @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

    User: "tinh"
    Altair Community Member
    Updated by tinh

    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

    User: "Jouher_20929"
    Altair Community Member
    OP
    Updated by Jouher_20929

    @tinh Can you elaborate. Pls.

    User: "tinh"
    Altair Community Member
    Updated by tinh

    Once you find the closest surf, find its normal by hm_getsurfacenormalatcoord

    User: "Jouher_20929"
    Altair Community Member
    OP
    Updated by Jouher_20929

    @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?

    User: "tinh"
    Altair Community Member
    Updated by tinh

    Unify comps with normal + (red outer)

    Then search nearest surface in normal - only, ignore surf with triplecos +1

    User: "Jouher_20929"
    Altair Community Member
    OP
    Updated by Jouher_20929

    @tinh how to 'Unify comps with normal + (red outer)?'

    User: "tinh"
    Altair Community Member
    Updated by tinh

    Enter panel normals>surfs to adjust it

    User: "Jouher_20929"
    Altair Community Member
    OP
    Updated by Jouher_20929

    @tinh, will be helpful in plastic comps with full of ribs?

    User: "tinh"
    Altair Community Member
    Updated by tinh

    Please try and if it is not helpful, tell us reason