Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
π£οΈ Road Profile Builder | Generate roads, curbs and pavements easily Download
Shorter version for this ruby line
-
I am rewriting my wood joint scripts and was wanting to know if there is a shorthand version of this command
cface=codef.entities.add_face @pt[0],@pt[1],@pt[2],@pt[3],@pt[4],@pt[5],@pt[6],@pt[7],@pt[8],@pt[9],@pt[10],@pt[11]Keith
-
@ktkoh said:
I am rewriting my wood joint scripts and was wanting to know if there is a shorthand version of this command
cface=codef.entities.add_face @pt[0],@pt[1],@pt[2],@pt[3],@pt[4],@pt[5],@pt[6],@pt[7],@pt[8],@pt[9],@pt[10],@pt[11]Keith
Usecface=codef.entities.add_face(@pt)It can take an array, you don't need to pass each element of the array separately

Of course the points have to be in the array in the right order - as it seems you have here... -
Try:
cface=codef.entities.add_face(@pt)It's good that the API allows both ways...
entities.add_face(pt1, pt2, pt3, ...)
entities.add_face([pt1, pt2, pt3,...])
Advertisement