Drag nodes from free edges

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

Hi all,

 

How to get nodes from free edges and drag it in particular direction using tcl?

 

Regards,

Sanket

Answers

  • tinh
    tinh Altair Community Member
    edited March 2019

    use *createmark nodes 'by comp name' ^edges

    for dragging, use panel 2d>drag to try, and you can find relevant commands in command.tcl file 

  • sanket_patil
    sanket_patil Altair Community Member
    edited March 2019

    @tinhThanks for quick reply.

     

    But i want to drag nodes of two edges only as shown below,

     

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

     

    How to do that? 

     

    Regards,

    Sanket

  • tinh
    tinh Altair Community Member
    edited March 2019

    There is not a direct way.

    You have to detect 4 sides of the square and then select 2 opposite sides. I think you are beginner so it is so tough with you.

     

    And you will ask how to detect...

    You must compare angle between each pair of edges and record the node as corner if angle is not 180D

     

    And you will ask how to compare angle...

    You must make some loops to calculate angles, sort to see which ones not 180D

     

    And you will ask how to make a loop...

    :rolleyes:/emoticons/default_rolleyes.gif' title=':rolleyes:' />

     

     

    You should learn hypermesh and basic tcl first. Then write some sample codes, see how it works, divide your work into small tasks, write tcl procs for each task, combine them to form a full program.

    And, you should not learn tcl right if you are not good at hypermesh yet. Tcl macro simulates how you act with HM.

     

  • sanket_patil
    sanket_patil Altair Community Member
    edited March 2019

    @tinhHello Tinh,

     

    Thanks for your valuable suggestions. I will definitely learn Tcl/tk.

     

    I would like to tell you that i can select now required nodes which query i asked you above.

     

    Regards,

    Sanket