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,...])
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement