I’m currently working on a design involving twisted boxes that I want to populate with a beam structure. My goal is to extract the outer faces of these twisted boxes (image A) to create a kind of cage.
but I’m having trouble with the top, bottom, front, and back surfaces. When I use the partition and tree branch features, the tree branches selected don’t align with the ones I need for top and bottom surfaces (Images C and D)
Is there a way to save the file with the plug-ins still embedded, similar to the “internalize” feature for geometry, so you’ll be able to open it? Right now, if I delete the plug-ins, the script won’t run.
Using the list item, I get all the grouped surface layers, including all the internal surfaces. However, I only need the outer surfaces that form the “cage” of the shape, and I haven’t been able to isolate those— even with the list item component. Is there something I might be missing or misunderstanding?
've managed to extract all the surfaces except the front and back. When I try to split the list or use the tree branch component to select them, it behaves unpredictably, selecting random faces instead. Any idea why this might be happening?
Is there genereally a way to change the order of a list or tree branches?
Initially, I used this expression for X, Y and Z: round(abs(x))
But I had to fudge it slightly because some angled surfaces fooled it: round(abs(x)-0.1)
I went to extraordinary (ugly) measures (yellow group in version ‘c’ below) to separate two breps joined together at the “nose” of this shape, colored red in this image:
Oh wow really kind of you to always take the time the time and solving the problem For now it helps me achieve what I want, really appreciate it, thank you!
I will however start a new post on data trees, because I really want to understand how they work and how I can manipulate them.
If you apply Shift List it becomes five branches (40 voxels per branch, 5 rows of 8 voxels per row, or 40 * 6 = 240 faces per branch - 5 branches * 240 = 1200 faces total):
It’s great to understand data trees Many ways to manipulate them.
In this case, adjacent faces are effectively duplicate faces (if I understand your goal?) and there must be a way to ignore duplicates and get six branches of surface faces (left, right, top, bottom, front and back).
Thanks to your help, I was able to extract the faces I needed!
I’ve started a new project where I not only need the faces but also need to select voxels in specific orders. To clarify: for creating the beam structure, I’d like to reduce the thickness of the voxels in the back area (the red “nose” in your picture), as it’s quite dense there. So I need to divide the structure into sections and select the correct data branches to adjust the thickness.
I’m still a bit confused about how data trees work, but I’m here to learn—and very grateful for the community’s help as I improve.
Let’s consider voxels instead of faces. We can always deconstruct voxels to get faces later.
Before that, I’ve separated the geometry from the code by putting it in a separate file and using Data Output and Data Input. This file must be run first:
I find the ColorBa and ColorJa components very useful for visualizing data trees of geometry but you might find another tool useful too; ‘Tree/List Viewer’ uses a ‘path idx’ slider to select branches and a ‘list idx’ slider to highlight (in yellow) one geometry in the selected branch.
I feel really bad that you’re going through all this trouble to help, but I’m also extremely grateful—I’m learning so much from your scripts! I can’t thank you enough. These are all approaches I wouldn’t have thought of.
I wanted to share the progress I’ve made, thanks to all the help! There are still a few parts of your script I don’t fully understand, so I might have a few more questions for you down the line, if that’s alright. But for now, I’m really happy with the result!