TCL Script or Macro to trim surfaces with plans from different directions at one time

Tony_21982
Tony_21982 Altair Community Member
edited June 2021 in Community Q&A

Hi, Everyone

       Anyone could help me write a Script or Macro to catch this function that trim surfaces at one time with several planes which belong to the same normal direction.

      Right now it seems to only can choose one plane to trim several surface. For example, firstly select the target surfaces which need to be trimmed, then choose the trim direction like x,y,z-axis, but at last only can select one POINT or NODE. So I want to realize the function that several surfaces can be trimmed at different position under one directions with one operating, instead of several repetitive operating separately. Certainly it will be definitely the best to trim surfaces with plans under different directions at one time.

         I posted this question, however I have not got what I want.

         Hopefully someone can help solve this challenge. Your help will be greatly appreciated.

         Thanks a lot.

Answers

  • Rishabh Awasthi_20948
    Rishabh Awasthi_20948
    Altair Employee
    edited June 2021

    Hello Tony 

    Is it possible to share some images for the above problem. Trimming surfaces with a plane will create new surfaces so you would have to account for these surfaces as well . You can look for commands such as *createmark , hm_getmark which are useful to retrieve surface ids. 

    Further when you manually trim surfaces , the executed commands will be saved in commands.tcl in home directory which is usually in 'My Documents'. You can go right at the bottom of the file to see which Modify command is used to trim surfaces. You can check documentation of that command in Altair Help Reference Guide to observe the syntax and parameters passed.

    Most probably you would have to run a forloop to trim the surfaces for each plane. 

    PS : command.tcl will be a big file. To simplify it you can delete it before doing the trimming manually. A new file will created with only commands you used for trimming.  

  • Tony_21982
    Tony_21982 Altair Community Member
    edited June 2021

    Hello Awasthi

        Thanks very much for your nice replying. 

         Maybe I did not descript my questions clearly. I am sorry for that.

         Normally, many surfaces can be trimmed with one plane at one time. My first wish is to trim many surfaces at one time with many planes which have the same normal direction; the second wish is to trim many surfaces at one time with many plans which have different normal directions;

          Hopefully the following picture can help you catch my points.

    T    Thanks again for your time and help. image