How to mask elements by box using tcl

Ash Ahamed
Ash Ahamed Altair Community Member
edited March 2021 in Community Q&A

Hello!

I have the below code using which I am trying to mask elements on a cylinder. I am trying to mask the whole +Y axis [half] of the cylinder.

Here x axis is the height of the cylinder.

Below command either masks all of the elements or masks nothing. What am I doing wrong here?

I have attached the cylinder mesh which is in abaqus inp format.

*view "top"  set X0 0 set Y0 0 set Z0 250 set X1 1000 set Y1 500 set Z1 -250 set syst 0 *createmark elems 2 'by box' $X0 $Y0 $Z0 $X1 $Y1 $Z1 $syst inside 0 0 0 *maskentitymark elements 2 0

Best Answer

  • Gabriel Justo_22431
    Gabriel Justo_22431
    Altair Employee
    edited March 2021 Answer ✓

    Hi Ash,

     

    On the *createmark command you've used single quotation mark on the by box argumnet. If you replace for the double quotation mark the script will work!

    *createmark elems 2 "by box" $X0 $Y0 $Z0 $X1 $Y1 $Z1 $syst inside 0 0 0

     

Answers

  • Gabriel Justo_22431
    Gabriel Justo_22431
    Altair Employee
    edited March 2021 Answer ✓

    Hi Ash,

     

    On the *createmark command you've used single quotation mark on the by box argumnet. If you replace for the double quotation mark the script will work!

    *createmark elems 2 "by box" $X0 $Y0 $Z0 $X1 $Y1 $Z1 $syst inside 0 0 0

     

  • Ash Ahamed
    Ash Ahamed Altair Community Member
    edited March 2021

    Hi Ash,

     

    On the *createmark command you've used single quotation mark on the by box argumnet. If you replace for the double quotation mark the script will work!

    *createmark elems 2 "by box" $X0 $Y0 $Z0 $X1 $Y1 $Z1 $syst inside 0 0 0

     

    Thanks Gabriel, I figured out another way to do this., Closing this post for now,