Hi, I’m looking for a way to filter the below coplanar surfaces by area and shape. These are residual landscape spaces that need to be minimum of 50sqm and have a minimum width of 3m.
The output will therefore be a chamfered geometry with width 3m minimum and have an area of at least 50sqm.
Landscape plots that have to be chamfered and filtered:
What I have tried:
- Dispatched the corners into concave and convex angles. Taking the concave angles into query(below 90 degrees).
We know the chord of the circle needs to be 3m. Drawing a circle using the above formula to get the radius. Using the radius, intersecting the plot segments to extract the points and drawing the chord to split the site.
Problem: If the plot segments are too curved, the intersection ends up being more than the length of the chord. So the width of the plot becomes 4m or 5m.
If the angle between the segments is nearly 0 degrees, the circle is really large and doesn’t intersect with the plot.
2. Offset method:
Off set the plot by 1.5m. Take the vertices of this offset plot and connect them to the
original plot using a circle and its curvature at 0.5.
The plots are are too narrow, do not get offset at all.
My problem is that I’m unable to find a way to handle these narrow plots.
I haven’t internalized the values. PFA 3dm and gh file.
FilterLandscape_1.3dm (615.2 KB)
FilterModifyPlots.gh (129.5 KB)
Hi @Ishwarya, welcome to the forum.
Your question is very detailed and difficult to make sense of. You have clearly made a very comprehensive effort to handcraft a parametric solution.
If you could provide some examples of the results you would like, it will be a lot easier for others to understand your goal. I’d suggest you draw examples of the results you want manually.
there is some very good advice here on how to ask a question: Help Us Help You
If you can remove all the other inputs from the script it will also make it more accessible. The Rhino file and elefront are not relevant to your question. Internalise your input geometry and delete everything else. Posts that have a rhino file as well as a grasshopper file get a lot less attention, also grasshopper files that use plugins that are not part of the question will also get less attention.
I assume that clipper will be your friend with this. Clipper does fast and robust polyline offsets and boolean operations.
Here is my interpretation of what you want. If you want chamfered edges instead of fillets you can set the OpenFillet option to 1.
edit: i removed too much at the start. internalised both branches
Thankyou so much @dharman . Will definitely keep in mind the things about uploading files from now on.
Clipper seems to be a much cleaner option. This is almost exactly what i want. There is small thing though. These edges that are created vary between 2.4m to 3.5m since they are curves.
The criteria is that the the width is minimum 3m. Maybe the approximations can take it up to 3.5m, but not below 3m.
Here is an image of what the output would look like:
As you can see, i would like to chamfer out the areas that are narrow but keep other areas that are 90degrees or more. So my tolerance level is chamfering only corners below 90 Degrees.
Thankyou so much in advance!
FilterLandscape_3.gh (53.3 KB)
Thank you for the image. it makes sense now.
The clipper inner offset solves breaking into parts if anywhere is too thin. the outer offset ensures that 3m ball can fit anywhere in the boundary.
however you want the chamfer line length to be 3m
difference between R1.5 fillet (result of offset) and 3m chamfer is illustrated here.
I tried some more to get the sharp chamfers to work. I could not solve it. the problem is with my data structure not matching.
The principle of finding sharp corners of the inner offset, and drawing 3m boxes works robustly, however finding the appropriate intersections with those boxes and the outer offset is not reliable.
I hope you can makes something of this.
Nice approach @dharman!
Now it matches, the problem was the second ClipperOffset, the List entry caused an output with wrong order, so keep individual inputs when do the offset.
FilterLandscape_3.gh (54.7 KB)
Great pick up Thomas Thank you!
Thankyou so much @dharman and @ThomasE . I wrapped up the file and it turned out perfect!