I experience workflow issues with the script I am trying to develop now.
Background: purpose of the script is to calculate volume of a complex foundation including an offset (5cm on the sides, 7 cm down). The height of the foundation differs and, in some cases, height should be calculated until a specific constraint, e.g. plane in the middle of an element (on screenshot A-B meaning that B-C should be removed) or until top constraint (high wall on the picture, from bottom until D).
There are quite many cases in the model, so my questions are:
- How can I possibly filter elements (or geometry in Dynamo?) in order to decide which case to chose (calculate volume only of the lower part or top part, or both)?
- How can I grab B surface automatically and use it as a top constratint for volume calculation?
The current workflow can be seen on the script:
Currenly, I’m selecting all elements in view, getting solids, and joinng it into one to merge stacked on each other eleemnts. Then I am retrieving upper and lower surfaces and getting their curves. I create a plane on the highest point of foundation (which is what needs to be changed) and pull lower surface curves on it. Then I affset curves to side, down, etc., create a sloid again and calculate the volume.
Volumes script.dyn (124.2 KB)