Hey,
I have a python script (run_grasshopper.py
) that makes a json input (input.json
) go through a gh file (polygon_json.gh
) and the output is a polygon in rhino (geometry.3dm
).
polygon_json.gh
consists of:
(Notes: a jSwan component is being used to deserialize the json; the sphere component was only added to provide reference.)
The input consists of a series of coordinates, and my issue is that the polygon drastically changes whether their numerical type is integer or float.
For example, when inputting integers:
And when inputting floats:
I don’t understand why, just by turning from int to float, the polygon expanded 10 times.
To recreate these results, you’d have to:
- Have
run_grasshopper.py
,input.json
andpolygon_json.gh
in the same folder - Open
polygon_json.gh
- And run
run_grasshopper.py
If the steps are done correctly, geometry.3dm
will automatically be created in the folder.
input.json (124 Bytes)
polygon_json.gh (11.9 KB)
run_grasshopper.py (2.0 KB)