I am building a Generator for Popupcards in Grasshopper. So i generalised diffrent Foldtypes and Foldcombinations in Custom parametical Clusters. And the results are encouraging.
But behind the pure functionallity of working folds, movements and rotations it would be nice to trim the calculaed surfaces with simple curves, without braking the Rules of the Popup components.
So i want that Grasshopper exports for each Foldelement i created his own SVG. For Example
The Foldelement is just a Curve (for Cut) and some Lines (for Fold)
The other thing i want is to give a component a predefined curve from an SVG File as Mask.
So i can import a SVG Mask in Rhino reference it in Grasshopper and use Boolean Operations to trim the Foldelement. But i want it faster, if possible. Is it possible just to reference the Filename (Each svg File have only 1 Curve) and get the Curve without using Rhino first?
SVG Files are XML Files. Is it possible to read the string of a curve like
d=“m 78.89736,76.267726 c 15.32863,-2.524715 51.39599,-15.148292 60.41284,5.951117 9.01683,21.099407 36.96904,32.099957 3.06572,33.362307 -33.90332,1.26236 -81.512242,12.80392 -88.545378,4.32809 C 46.797406,111.43341 32.37046,85.10423 45.895722,83.841874 59.420984,82.579515 78.89736,76.267726 78.89736,76.267726 Z”
and convert it to a curve Grasshopper / Rhino undersand?
This would be the prefered solution.
If i can select nodes in XML (and Ladybug and other plugin shows that this work) much complexer Documentstructures are possible.