How do I get the plane of a circle?

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

In order to define a plane containing a circle, I need the center of the circle and the normal of the plane. Getting the center is simple using hm_getbestcirclecenter. I have not been able to find a means of getting the normal. If it were possible to get the coordinates of two points on the circle, I could use those with the coordinates of the circle center to calculate the normal. However, I haven't been able to find a means of getting those two points.

Answers

  • tinh
    tinh Altair Community Member
    edited June 2018

    I know that there is such command ( i read it already), but I can't remember

    anway, you can try creating the circle (using *createbestcirclecenternode with last argument=1 (will create circle, too))

    and then create 4 nodes on that circle to calculate normal vector

  • imoto
    imoto
    Altair Employee
    edited June 2018

    It might be hm_getcoordinatesofpointsonline.

     

    Example:

    *createentitypanel lines 'Select line';
    set lineid [hm_info lastselectedentity lines];
    foreach coord [hm_getcoordinatesofpointsonline $lineid '0 0.3 0.6'] {
     tk_messageBox -message 'Coordinate = $coord';
    }
     

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2018

    It might be hm_getcoordinatesofpointsonline.

     

    Example:

    *createentitypanel lines 'Select line';
    set lineid [hm_info lastselectedentity lines];
    foreach coord [hm_getcoordinatesofpointsonline $lineid '0 0.3 0.6'] {
     tk_messageBox -message 'Coordinate = $coord';
    }
     

     

    That works perfectly! Thanks!