🎉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

get the line numbers in a perticular hm component

User: "Altair Forum User"
Altair Employee
Updated by Altair Forum User

can you people any one is having idea about get the line numbers in a perticular component in hypermesh using tcl/tk

Find more posts tagged with

Sort by:
1 - 9 of 91
    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Hi Kiran,

    please post questions about macros in the Hypermesh macros section.

    I don't understand what you want to do. To get the thickness of a component you can use:

    set compT [ hm_getcompthickness $cid ]

    compT... result, thickness

    cid... component id

    Regards,

    Mario

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Hi mario ,

    Thanks for your reply . by using set compT [ hm_getcompthickness $cid ] , we can get the thickness only if its assigned . what I want is I want a macro that should calculate the thickness by finding out the distance between the two lines. Hope you got my point

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Hi Kiran,

    thats not so easy.

    I can post you a short macro to get the distance between two lines. Try to adapt it...

    proc distLineLine {} {

    set selectedLineA ''

    set selectedLineB ''

    *clearmark lines 1

    *createmarkpanel lines 1 'choose line to measure distance from'

    set selectedLines [hm_getmark lines 1]

    set selectedLineA [lindex $selectedLines 0]

    *clearmark lines 2

    *createmarkpanel lines 2 'choose line to measure normal to'

    set selectedLines [hm_getmark lines 2]

    set selectedLineB [lindex $selectedLines 0]

    set listValues [hm_getclosestpointsbetweentwolines $selectedLineA $selectedLineB]

    set xDistance [expr {abs([lindex $listValues 0]-[lindex $listValues 3])}]

    set yDistance [expr {abs([lindex $listValues 1]-[lindex $listValues 4])}]

    set zDistance [expr {abs([lindex $listValues 2]-[lindex $listValues 5])}]

    set distance [expr sqrt(pow($xDistance,2)+pow($yDistance,2)+pow($zDistance,2))]

    tk_messageBox -message 'Distance Line - Line: $distance'

    }

    distLineLine;

    Regards,

    Mario

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    thanxs for Reply. But I dont want this . I want to select that lines automatically in a component.

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    thanks

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Hi,

    sometimes you have to do a little bit by youself ;-)

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Hi, do you mean that we have to select the line manually in HM. Or We have to try to modify somthing in this program. Please clarify.

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Hi,

    you have to replace the manual selection by a routine for automatic selection...

    Regards

    Mario

    User: "tinh"
    Altair Community Member
    Updated by tinh

    Hi KIRAN PUTTA123

    I also think it is not easy to automatically measure thickness because it irregularly depends on CAD.

    For a long time I've developed a tcl procedure to do this but it was not exactly in some cases

    We cannot do anything we want. So just try to simplify your tasks first

    rgds,

    tinh