I want to identify all grid cells in the volume bounded by four quasi-vertical surfaces and two horizontal surfaces.
I’m not sure there is a simple way to get what you want. If you are willing to use python, you could probably create a script to identify hexes based on their coordinates relative to a surface, or whether their coordinates are contained within a volume (see the attached example). Then you could send down a command to create a block from the identified hexes.
SelectUsingEntity.py (985 Bytes)
I am comfortable with python but how exactly I use this python script in trelis?
The script I provided was just an example, which may or may not work for your case. To use the script, you run it the same way you would run a journal file (choose the play button from the toolbar). This will define the function in Trelis’ python interpreter. Next you need to call the function with the appropriate arguments (see below for more on how to do this).
You define the volume by actually creating it in Trelis (e.g. “brick x 10”, “create sphere radius 2”, etc.).
There are a few different ways to use python in Trelis.
Option 1: You can open the script tab by going to Tools->Options->Layout, and checking the option “Show Script Tab”. This allows you to use python in a more interactive manner.
Option 2: Use the journal editor. In the toolbar for the journal editor, you should see the python logo. Choose that to convert a journal file to it’s python equivalent. Or if you are starting from scratch, just choose that and start writing in python.
Option 3: Create a custom tool using python. Go to Tools->Options->Custom Tools to define a custom tool (or use the shortcut in the Custom Tools toolbar). The first line in your custom tool should be “#!python”.
For more details on the python functionality in Trelis, see csimsoft.com/help/appendix/appendix.htm, under Trelis Python Interface.