I’m trying to write a condition that if met a solid difference is performed.
Basically I have a rectangle which sides are defined by sliders, I would like to make a condition that if the ration between the two sides is between 0.7 and 1, the rectangle is offsetted, extruded and then subtracted from the main volume.
I have the offset and extrusion already set up but can find a way to make the subtraction if the condition is met.
I’m sorry, I should’ve been more specific with what I’m trying to do.
Basically the whole script is a massing study based on the amount of solar hours that the geometry gets, that’s why it depends on a ladybug script.
I have set various transformations on a rectangle which sides are defined by sliders and fixed area, and then the various transformations will be compared with Galapagos to find the better solution.
The transformation I’m trying to add now is that if the ratio of the two sides is between 0.7 and 1, an offset of the original rectangle will be subtracted from the larger solid to create a patio.
Basically what I want to do is subtract the red box to the blue volume only if the ratio between the two sides I between 0.7 and 1
Expecting people to have your plugins and Ladybug severely limits who can help you. If my post isn’t useful, too bad. I believe if you understand it, you can implement the same technique in your code.
I’m sorry if my previous replay had seemed presumptuous in anyway, that’s not what I was trying to convey, and if that’s what it seemed like I’m sorry.
I was just trying to explain what I wanted to achieve with the script in general, to give as many informations as possible.
I’ve tried to implement the script you’ve suggested and it’s working, thank you.
The only problem now is that if the condition is not met, then the rest of the script is not executed.