How to set length units in code
-
I want to pull a face from 0 to 4.5m, and my entities is imported from other software,how to set length units in code?
for examplepts = [] pts[0] = [edge.start.position.x, edge.start.position.y, 0] pts[1] = [edge.end.position.x, edge.end.position.y, 0] pts[2] = [edge.end.position.x, edge.end.position.y, 4.5] pts[3] = [edge.start.position.x, edge.start.position.y, 4.5]here,i want to set z value as 4.5m,how to set? thank u
-
4.5.m
Just type this in the ruby console, and see what it returns. -
If you are getting the x/y/z values as strings [perhaps from an imported text file] then
` z=z+'.m'4.5.m ### as a string
eval(z)
177.165354330709 ### in inches [SUp's base units and used to position the point]if they are as floats thenz=z.m` will work to convert it...
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