Hello, I’m new to Grasshopper. i’m trying to learn how to calculate mass from a ditch ive made with lines. I will link my GH script with rhino model for a better understanding.
I also want to point out that the slider at the start of the script will make more lines and points. My idea was to use this for a very detailed way to calculated the mass
The comma separator is used for points, not numbers. So actually you are speciflying the point (0, 75/2 tan(53) , 0) with this panel. It should be 0.75, not 0,75.
Second, angles in GH are in radians, so tan(53) is NOT computed as tan(53°).
Finally, since you project the offset polylines on the mesh, but the height varies, there is no guarantee the angle of the slope will be 53°, is this what you are after ?
Also, dividing a polyline with more points won’t do much since the straight segments will remain straight.
I built a huge triangular Sweep, then split it by the mesh to retrieve the closed volume.
Amazing! and yeah you are right about the angle slope aswell. i was trying to make some calculations to get the bottom to be 1 meter wide and then a 53° angle upwards to the surface. Thank you so much for the help with this! I’ve been struggling a while
I have another question for you, lets say if i wanted to put in a pipe like geometry in the “ditch” i’ve created. is it then possible to make the ditch brep form around that pipe? so the volume of the ditch will change according to the radius of the pipe?
You’d need to specify some constraints (what is constant ? slope, depth, width of the bottom ? Maybe keep a tolerance between the pipe and the walls ?), but it should be possible to do that.
This is a more accurate model of the ditch and its volume, intersecting the triangular shape with the terrain surface. Wall slope is set to 90 - 53 = 37 degrees from vertical. Using the previous value of 30 (narrower ditch), the volume is ~7% lower with this model: 140,462 cubic units.
Thank you so much both of you ! i really appriciate the help! My idea is to try make as little geometry as possible and stil be able to calculate the mass.
This is an odd question… What about depth of the ditch? If your base polyline were the centerline of a pipe, optimal bottom width and depth could be derived, given radius and clearance values. But maybe the pipe needs a constant slope, given a depth at either end? That too can be derived.
I’m still struggling to create a wireframe to calculate the mass from. My plan is to use this to analyze the mass, etc. Maybe one of you can guide me a little on this? I’ve tidied up the script this time. its stil the same rhino model as before. Wireframe Ditch Volume.gh (17.7 KB)