Is there a way to convert curve to a json metadata using Rhinocommon? I’m developing a script to convert shapes(can be irregular shapes also) to a json data file which could later be reproduced to recreate the curves.
I was thinking of retrieving the points at discontinity and adding these points to the json file. The discontinuity can work for polygons. Whereas for circles I could split the circle curve at a fixed length to get all the coordinates that could be redrawn. But I’m not sure when the shapes are more complex which involves both straight curves and spline what can be the best way. Can I have a suggestion on this if there could be a different approach to tackle this problem?
Hey @sujal Are you adding the User String to the CurveObject or the Curve?
If you add it in Rhino, it adds it to the ObjectAttributes, before you serialize you could of course take the Objects User Strings and add them to the geometry, then serialize. Ensure you duplicate the Curve it before you add the data or you’ll end up duplicating data in your document