Jump to content

One-liner for point(0,"P",8).z in point wrangle


Recommended Posts

16 minutes ago, Alain2131 said:

You indeed need to specify that point will return a vector by encapsulating it with the vector keyword.

@P.z = vector(point(0, "P", 8)).z;


Thanks. I now realize that point is a template function -  meaning the type which is returned depends on the second argument "P" , thus it's not obvious to the compiler that it's a vector at parse time.

How hard would it be for the user to define a function with this signature once and for all:

vector vpoint (int input; int ptnum) return vector(point(input,"P",ptnum))

or something closer to this related trick:

v@opinput1_P.y  -- but with an additional argument

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...