Find nearest surface

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Hi,

I m checking for a command to select an surface nearest to the selected surface. Anybody can help me plz.

 

Basically i have a solid and surface imported from catia (Surface is overlapping on solid). now in hypermesh i want to know the project the surface mesh to solid surface (solid surface - which on it is overlapping).

any help plz.

Tagged:

Answers

  • Nachiket Kadu_22143
    Nachiket Kadu_22143 Altair Community Member
    edited May 2018

    Hi 

    You can view it under Topo where solid and surface can be viewed distinctly. Change from auto to topo.

    <?xml version="1.0" encoding="UTF-8"?>1.png

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited May 2018

    I have changed it to By Topo but still couldn't get the answer.

  • Mario_21478
    Mario_21478 Altair Community Member
    edited May 2018

    Hello,

     

    You can try to identify overlapping surfaces by the following tool: 'Geometry->Check->Surfaces->Interference'

     

    Now follow this:

    • Select surfaces of the single surface and the solid (e.g. select one solid surface, extend it by attached) for 'surfaces'
    • Switch 'Isolate only failure' to None
    • Switch 'Save failed' to Surfaces
    • Press Run

    Now the intersecting surfaces are saved und you can retrieve it by any surface command, e.g. mask->surfs->retrieve (see picture)

     

    Best Regards,

    Mario

     

    <?xml version="1.0" encoding="UTF-8"?>image.thumb.png.e6f4dc70488f5814fb16d61eaae7abc4.png

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited May 2018

    Hi all, i think i'm not very clear with my problem. here are few pictures which will display my issue i hope.

     

    image.png.3ea21fb7091682c20a9bee500a831af2.pngimage.png.62e8bfdddf7295c90ecdd181f1ea9be9.png 

     

    The free surface over here is meshed and now i want to project the elements to the solidbody-picture3 (corresponding face/surface) for that i need to know the surface_ID for using the following command.

    *markprojecttosurface entities mark vector surface

     

  • vipin_22401
    vipin_22401 Altair Community Member
    edited May 2018

    Hi @Mounika.Chengalva 

    try the following command, it will return the distance to nearest surface as well as the id of nearest surface. 

    You need to provide all surface ids of the solid as a list.

     

    image.png.0de6024fa04abee58bc351677ef47990.png

  • Nachiket Kadu_22143
    Nachiket Kadu_22143 Altair Community Member
    edited May 2018

    Hi all, i think i'm not very clear with my problem. here are few pictures which will display my issue i hope.

     

    <?xml version="1.0" encoding="UTF-8"?>image.png.3ea21fb7091682c20a9bee500a831af2.png<?xml version="1.0" encoding="UTF-8"?>image.png.62e8bfdddf7295c90ecdd181f1ea9be9.png 

     

    The free surface over here is meshed and now i want to project the elements to the solidbody-picture3 (corresponding face/surface) for that i need to know the surface_ID for using the following command.

    *markprojecttosurface entities mark vector surface

     

    Hi 

    To get surface ID you can use Tools=>find=>surface with number ticked ON. This would give you the surface ID's.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited May 2018

    Hi Nachiket Kadu, i'm trying to get the through command.

  • tinh
    tinh Altair Community Member
    edited May 2018

    Hi, if you want to get the solid surface by tcl command, try this

    #find center of the free surface:

    lassign [join [hm_getgeometrybox surfs $FreeSurfID]] x1 y1 z1 x2 y2 z2

    set centerx [expr ($x1+$x2)/2]

    set centery [expr ($y1+$y2)/2]

    set centerz [expr ($z1+$z2)/2]

    #now find the surface that closest to above center:

    *createmark surfs 1 all

    hm_markremove surfs 1 $FreeSurfID; #we don't want to find the free surface anymore

    lassign [hm_measureshortestdistance2 $centerx $centery $centerz surfs 1 0 0] =>  =>  =>  => ClosestSurfID

    puts $ClosestSurfID

     

    ;)/emoticons/default_wink.png' srcset='/emoticons/wink@2x.png 2x' title=';)' width='20' />

     

     

     

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited May 2018

    Hi Tinh, Can u tell me what are x1 y1 z1 x2 y2 z2 

     

  • tinh
    tinh Altair Community Member
    edited May 2018

    Hi

    those are the lowest and highest coordinates of the surf

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited May 2018

    Thank u Tinh it is working now.