• Login
sketchucation logo sketchucation
  • Login
ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

How to set length units in code

Scheduled Pinned Locked Moved Developers' Forum
3 Posts 3 Posters 169 Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    Mcdull
    last edited by 12 Feb 2011, 09:44

    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 example

    
    pts = []
     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

    1 Reply Last reply Reply Quote 0
    • K Offline
      kyyu
      last edited by 12 Feb 2011, 11:57

      4.5.m
      Just type this in the ruby console, and see what it returns.

      1 Reply Last reply Reply Quote 0
      • T Offline
        TIG Moderator
        last edited by 12 Feb 2011, 12:26

        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 then z=z.m` will work to convert it...

        TIG

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        1 / 1
        • First post
          1/3
          Last post
        Buy SketchPlus
        Buy SUbD
        Buy WrapR
        Buy eBook
        Buy Modelur
        Buy Vertex Tools
        Buy SketchCuisine
        Buy FormFonts

        Advertisement