diff --git a/GH/PyGH/components/scriptsynccpy/code.py b/GH/PyGH/components/scriptsynccpy/code.py index 765731f..57fd6e0 100644 --- a/GH/PyGH/components/scriptsynccpy/code.py +++ b/GH/PyGH/components/scriptsynccpy/code.py @@ -19,6 +19,10 @@ import queue import json +# note that these import if used with "as" needs to be imported in the code +import Rhino as r +import Rhino.Geometry as rg +import scriptcontext as sc import rhinoscriptsyntax as rs diff --git a/GH/PyGH/examples/runner_script_2.py b/GH/PyGH/examples/runner_script_2.py index b9b638c..a5faf76 100644 --- a/GH/PyGH/examples/runner_script_2.py +++ b/GH/PyGH/examples/runner_script_2.py @@ -1,23 +1,7 @@ # #! python3 -# def main(x): -# y = 456 -# a = x - y -# c = x + y -# b = 123456 -# print("runner_script.py::main() function called") -# print(f"runner_script.py::b value: {b}") -# print(f"runner_script.py::c value: {c}") - -# return a - -# if __name__ == '__main__': -# a = main(x) - -#! python3 - def main(): - k = 12344 + k = 123 print(f"runner_script_2.py::k value: {k}") return a diff --git a/GH/PyGH/examples/script_cube_blue.py b/GH/PyGH/examples/script_cube_blue.py new file mode 100644 index 0000000..66ad8aa --- /dev/null +++ b/GH/PyGH/examples/script_cube_blue.py @@ -0,0 +1,15 @@ +#! python3 + +import Rhino +import Rhino.Geometry as rg +import rhinoscriptsyntax +import scriptcontext + +def main(): + brep_box = rg.Box(Rhino.Geometry.Plane.WorldXY, Rhino.Geometry.Interval(-1, 1), Rhino.Geometry.Interval(-1, 1), Rhino.Geometry.Interval(-1, 1)) + print("runner_script_2.py::main() function called") + + return brep_box + +if __name__ == '__main__': + cube_blue = main() \ No newline at end of file