Intersection of surfaces and lines

Rachit Semalty
Rachit Semalty Altair Community Member
edited May 2021 in Community Q&A

Hi all. I have a set of line segments and a set of surfaces. I want to find surfaces that intersect those lines. How may I achieve that? Is it possible using TCL coding?

Regards,

Rachit

Best Answer

  • Robert Hoglund
    Robert Hoglund
    Altair Employee
    edited May 2021 Answer ✓

    Hi Rachit,

    I would investigate using the HM TCL command hm_getclosestpointsbetweenlinesurface.

    It takes as input a line ID and surface ID.  If the line intersects the surface, it will return the intersection point(s) as a list of values in groups of 6.  If it does not intersect, it will return the closest point on the line and the closest point on the surface as well as the length (7 values).  You can refer the documentation for more info.

    Thanks,

    Rob H.

Answers

  • Robert Hoglund
    Robert Hoglund
    Altair Employee
    edited May 2021 Answer ✓

    Hi Rachit,

    I would investigate using the HM TCL command hm_getclosestpointsbetweenlinesurface.

    It takes as input a line ID and surface ID.  If the line intersects the surface, it will return the intersection point(s) as a list of values in groups of 6.  If it does not intersect, it will return the closest point on the line and the closest point on the surface as well as the length (7 values).  You can refer the documentation for more info.

    Thanks,

    Rob H.

  • Rachit Semalty
    Rachit Semalty Altair Community Member
    edited May 2021

    Hi Rachit,

    I would investigate using the HM TCL command hm_getclosestpointsbetweenlinesurface.

    It takes as input a line ID and surface ID.  If the line intersects the surface, it will return the intersection point(s) as a list of values in groups of 6.  If it does not intersect, it will return the closest point on the line and the closest point on the surface as well as the length (7 values).  You can refer the documentation for more info.

    Thanks,

    Rob H.

    Thanks @Robert Hoglund, it worked as I desired. 

    Regards,

    Rachit.