As you can see from the top of the loft it is not closing all the way. If someone can help me fix and show me how to correct this I would greatly appreciate it.
I canât open your R6 .3dm file anyway in R5. But the problem is easy to fix. Right-click the âOâ (Options) input to Loft and check âClosed loftâ.
I already answered the question and have no intention of installing the plugin.
I checked off closed loft and this error occured
- Loft failed, donât know why.
Oh. Now that I can see the Rhino file, this isnât a closed loft at all. You need to flatten the input to Join to achieve a âClosed Brepâ.
But the missing fragment happens earlier in the code, at SrfSplit and before Scale that gets you the outer surface. The yellow fragment is left out. By the way, note the redundant Area and Sort components (disabled).
Why? It looks like a sharp edge in the surface at that point, on the left edge of this fragment.
sorry for the multiple questions, as you can see I am very new to grasshopper, but my next question is how do I loft that missing piece to match the already existing closed brep.
Thank you!
Can you fix the surface to remove that creased edge? Not sure that scaling and lofting that fragment will work out to get the âClosed Brepâ. As you can see with the âTree/List Viewerâ, its index value is 99. Hey, I just noticed the slider â9â value plugged into the âWâ (Wrap) input to List Item to get the largest surface? Thatâs unusualâŚ
I already deleted the files and shut down GH/Rhino for today. Good luck.
Lol we will see! I will try to get it.
- Loft failed, donât know why.
Canât look at your file now but from experience you usually get this error if you have a duplicate curve or if your start and end curve are the same (in which case you should delete the end curve and use the closed curve option).
I contoured the surface, added the top edge curve (flipped direction!), rebuilt the curves and lofted them to smooth the base surface:
That fixed the creased edge and eliminated the fragment, but two of the holes still broke the edge. Fixed that by adjusting the Divide Curve âNâ (Count) slider from 6 to 7, though 5 also works.
Replaced an extremely slow Area component with a Srf SL cluster I wrote for this very purpose. It sorts surfaces based on sum of edge lengths instead of area so is much faster. You can edit the cluster to see how it works.
Changed another slow Area component getting the Scale âCâ (Centroid) to use the original (smoothed) lofted surface instead of the one with holes. Much faster.
Dance_Studio_2019Nov29a.gh (35.3 KB) (âbadâ surface internalized, no need for Rhino file)
Modified settings:
Contour âDâ interval set to 4.7 (more curves to loft)
Divide Curve âNâ set to 6
Scale âFâ for Voronoi NURBS curves set to 0.9 (smaller, more space between holes)
Scale âFâ for holed surface set to 1.05 (thinner shell)
Dance_Studio_2019Nov29b.gh (33.5 KB)
Sorry for just gtting to you today but I thank you so much!!!
Area is much faster in R6 than R5 (because it is multi-threaded) and if you want Iâve attached a Fast Area script component which used R6 newer GetArea method which doesnât compute a centroid (faster). Sometimes you do need an area calc.
FastArea.gh (2.1 KB)
Here is that one Multi-Threaded so it can be faster.
FastAreaMT.gh (2.0 KB)
hi @Michael_Pryor
Is it possible to write a component in c # that is fast centers as well as the area calculated in the tool above?
@Mahdiyar
private void RunScript(List<Brep> breps, ref object A, ref object B)
{
var areas = new double[breps.Count];
var centroids = new Point3d[breps.Count];
System.Threading.Tasks.Parallel.For(0, breps.Count, i =>
{
var amp = AreaMassProperties.Compute(breps[i], false, true, false, false);
areas[i] = amp.Area;
centroids[i] = amp.Centroid;
});
A = areas;
B = centroids;
}
Ehsan.gh (556.7 KB)