How to judge a surface is curve surface or flat surface?

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

Hi,

I am the rookie of the tcl.I have some basic questions.But i can not find it in api document.

Supposed i have a solid,which has many surfaces and lines.

how to judge a surface is curve surface or flat surface? 

how to judge a line is curve line or flat line?

For more,can i know the expression(formula) of surface(line)?

Thanks! 

Answers

  • imoto
    imoto
    Altair Employee
    edited December 2018

    Hi @xiaoming

     

    Check the following things.
    ・line length vs point-point distance of each edges.
    ・normal of surface at each points.

     

    Related APIs.
    ・hm_linelength
    ・hm_getdistance
    ・hm_getsurfacenormal

  • tinh
    tinh Altair Community Member
    edited December 2018

    There is an api but i can't remember, maybe it is removed in new version

     

    A workaround:

    A straight line is simply tested by

    proc IsStraight LineID {

        *createmark lines 1 $LineID

        catch {hm_getbestcirclecenter lines 1 1}

    }

     

    A surface? 

    - create a few lines on it (extract parametric lines)

    - check straight for those lines, if all straight => flat surf (not sure) :rolleyes:/emoticons/default_rolleyes.gif' title=':rolleyes:' />