What less processor heavy ways can i replace these components?

So this section of the script basically extrudes the cells on the on the z axis. Caps them. converts to a “Mesh Brep” and sorts them into a list based on their height.

The “Cap” and the Sort component are eating up processor time and id like to try and tri that down if i can?

anyone have any suggestions on what i could do to work around these issues?

Hello
one issue is from you!
Sort sorts Numbers not Text so if you feed it directly you will suppress a conversion from text to number.
image
For the cap I don’t know but you could generate yourself the cap using “Boundary Surface” then “Brep Join”

2 Likes

Ahhh now that makes sense! Thankyou that has made a huge difference in processing time. Shall i assume that this rule applies to many other components as well and just try to avoid hooking things up directly to panels?

If your extrusion is rectangles, bad decision to extrude and cap, choose Domain Box or Center Box.
Since BoundarySurface works with lists, look at the improvement when Graft it.
Use Panels wisely only to display necessary data. I never use the Panel output…

SharedScreenshot

3 Likes

As Laurent said…
Extrude will transform a curve into an open brep and a surface in a closed brep.
If your curve is planar, first transform it into a surface , then extrude, and you will not need to use Cap.


… yes.
While using panels, for each panel use only its input (to quickly see what is going on in your data) or its output (to manually set some number or string), never both.
Anything going inside a panel is converted into text, a string, the conversion will lose some/most of the original information:

3 Likes

ahh thankyou, ill have a play with this one later on when i have a moment and see how it effects the run times!

ahhh yeah i get you! thanks for the help, i will bare this in mind for next time. Thanks for explaining it!