Beginning and ending of joints betwwen components

Alex.01
Alex.01 Altair Community Member
edited October 2020 in Community Q&A

Hi all,

 

I am creating a new script which detects joints between several components and identifies the start node and the end node. I show an example in the image below:

 

image.png.a759418330b7478bd513feb0f563509d.png

 

I am able to detect all joints with the *findmark command, but I don't know how to identify the node which 'starts' or 'ends' the joint. The start/end nodes are those which have temp nodes in the image.

Can anyone help me to do this? Any suggestion?

 

Thanks in advance,

Alex

Answers

  • vipin_22401
    vipin_22401 Altair Community Member
    edited October 2018

    Hi Alex,

     

    Find shared nodes using hm_getnodessharedbyothercomps in mark 1, find edges and get all edge nodes in mark 2.

    Then get markintersection?!

  • Alex.01
    Alex.01 Altair Community Member
    edited October 2018

    Hi vipin,

     

    I think that could work but I forget to say another restriction. I show it in the image below:

     

    image.png.b7be5d59b07a79c1cce80cd2af6854d2.png 

     

    Is there any possibility to specify a 'break angle' which allows to put more temp nodes, like in the image?

  • vipin_22401
    vipin_22401 Altair Community Member
    edited October 2018

    Can you try with the features(command is *features_advanced) option in tools menu?

    It will provide you with plot elements along the features based on break angle. Then you can try some logics with the plot elements.

     

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

  • tinh
    tinh Altair Community Member
    edited October 2018

    Hi

    If you don't find an 'hm_' command to get these vertices:

    *features_advanced  (as vipin suggestion)

    *createmark elems 1 'by comp name' ^feature

    set NodeList [join [hm_getvalue elems mark=1 dataname=nodes]]

    array set Count {}

    set Vertices {}

    foreach NodeId $NodeList {

       if {[incr Count($NodeId)]>2} {lappend Vertices $NodeId}

    }

    puts $Vertices

     

     

    Before version 13 we don't have command 'hm_getvalue', so looping through each element by tcl and get its nodes is quite long. at that time, to query such data i had to use an hm template to fasten script.

  • Alex.01
    Alex.01 Altair Community Member
    edited October 2018

    I really thank you guys, you helped me a lot.