Ruby code and Automatic Sketchup

Sketchup comes with its own Ruby version - v2.0 for v2016.

If you look at the example offered you will see some basic changes…

Ruby now fails if there is a space between parenthesized () arguments and the methods, or spaces in a command - like:
pt0 = Geom:: Point3d.new 0,Ss,Gr
which should be e.g.
pt0 = Geom::Point3d.new(0, Ss, Gr)
etc… then later on…
pm.add_polygon(pt0, pt1, pt2)
finally
ent.add_faces_from_mes(pm)

Although this original would not now be regarded as ‘good’ coding today…

1 Like