Skip to content

Commit

Permalink
WIP: add basic as imports
Browse files Browse the repository at this point in the history
  • Loading branch information
9and3 committed Feb 7, 2024
1 parent c9c4bc5 commit b901a61
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 17 deletions.
4 changes: 4 additions & 0 deletions GH/PyGH/components/scriptsynccpy/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
18 changes: 1 addition & 17 deletions GH/PyGH/examples/runner_script_2.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
15 changes: 15 additions & 0 deletions GH/PyGH/examples/script_cube_blue.py
Original file line number Diff line number Diff line change
@@ -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()

0 comments on commit b901a61

Please sign in to comment.