sketchucation logo sketchucation
    • Login
    1. Home
    2. Theten
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    T
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 1
    • Groups 1

    Theten

    @Theten

    0
    Reputation
    1
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    Theten Unfollow Follow
    registered-users

    Latest posts made by Theten

    • RE: How to Change Feet to Millimeter?

      Hi,
      i have a problem
      when i write this code:

      Create the WebDialog and set its HTML file

      face_dialog = UI::WebDialog.new
      path = Sketchup.find_support_file "Ch13/create_face.html", "Plugins"
      face_dialog.set_file path

      Set the WebDialog's callback

      face_dialog.add_action_callback("create_face") {|d, arg|
      if arg.to_s.length == 0
      puts "Invalid input. Coordinates must be valid numbers."
      else
      v = arg.to_s.split(",")
      pt1 = Geom::Point3d.new(Float(v[0].strip), Float(v[1].strip),
      Float(v[2].strip))
      pt2 = Geom::Point3d.new(Float(v[3].strip), Float(v[4].strip),
      Float(v[5].strip))
      pt3 = Geom::Point3d.new(Float(v[6].strip), Float(v[7].strip),
      Float(v[8].strip))
      pt4 = Geom::Point3d.new(Float(v[9].strip), Float(v[10].strip),
      Float(v[11].strip))
      vec1 = pt2 - pt1
      vec2 = pt2 - pt3
      plane = [pt1, vec1 * vec2]
      if pt4.on_plane? plane
      Sketchup.active_model.entities.add_face pt1, pt2, pt3, pt4
      else
      puts "Invalid input. Points must lie on the same plane."
      end
      end
      }

      Display the dialog box

      if RUBY_PLATFORM.index "darwin"
      face_dialog.show_modal
      else
      face_dialog.show
      end

      the unit appare in inches but mi template in setting in mm.How i can have it in mm?
      thanks and sorry for my english

      posted in Newbie Forum
      T
      Theten