How to select a set of nodes on a vector defined by N1, N2, N3 and basepoint?

Sathish_21542
Sathish_21542 Altair Community Member
edited October 2020 in Community Q&A

If N1 is 100(node id)/ N2 is 101(node id)/ N3 is 102(node id).... Basepoint is 'userdefined', tolerance 0.1 / normal to plane

how to write a code to select a list of nodes falling on the defined vector?

 

Thanks in advance!

Answers

  • vipin_22401
    vipin_22401 Altair Community Member
    edited November 2018
    Hi sathish,
     
    you can use 'on plane' option in *createmark.
     
    for example if you have base coordinates and vector normals,
    *createmark nodes 1 'on plane' $baseX $baseY $baseZ $normalX $normalY $normalZ 0.1 0 0
    hm_getmark nodes 1
  • Sathish_21542
    Sathish_21542 Altair Community Member
    edited November 2018

    Hi Vipin,

    Thanks for the reply!

    I have came through this 'on plane' option. But the problem is I have the input N1, N2, N3 and basepoint only. Can you help me with the codes for extracting base coordinates and vector normals from the input?

     

    Thanks!

  • vipin_22401
    vipin_22401 Altair Community Member
    edited October 2020

    Hi Sathish,

     

    you can find a proc for vector normals from 3 nodes in following thread:

    https://community.altair.com/community?id=community_question&sys_id=0396447a1b2bd0908017dc61ec4bcb47

    use the proc to find vector normals:

     

    set vecNormals [NormalFrmPlane $N1 $N2 $N3]

    set baseCords [lindex [hm_nodevalue $baseNode] 0]
     

    substitute these values in *createmark command :)

    *createmark nodes 1 'on plane' {*}$baseCords {*}$vecNormals 0.1 0 0
     

  • Sathish_21542
    Sathish_21542 Altair Community Member
    edited November 2018

    Hi Vipin,

    Thanks!

    Its working