sketchucation logo sketchucation
    • Login
    1. Home
    2. vhiguita
    3. Topics
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download
    V
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 5
    • Posts 7
    • Groups 1

    Topics

    • V

      Points of house roof

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      1
      0 Votes
      1 Posts
      314 Views
      No one has replied
    • V

      Get points from a Sketchup object

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      88 Views
      TIGT
      Why are you asking again? I already responded a week or so ago... http://forums.sketchucation.com/viewtopic.php?f=180&t=47043
    • V

      Get points from a Sketchup object

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      2k Views
      A
      An object of what you mean is a Sketchup Drawingelement. If the Drawingelement is a Face, Edge, ArcCurve or Curve, it will have a method to get all vertices, and for each vertex you can get the position (which is what you want): positions = face.vertices.map{|v| v.position} If the Drawingelement is a Group, ComponentInstance of Image, it is "a model" in the model any you have to loop over the contained entities: group.parent.entities.find_all{|e| e.respond_to?(:vertices) }. map{|e| e.vertices.map{|v| v.position} }.flatten or with component.definition.entities
    • V

      Load Sketchup file from URL or Specific Diretory

      Watching Ignoring Scheduled Pinned Locked Moved Newbie Forum sketchup
      3
      0 Votes
      3 Posts
      306 Views
      TIGT
      Just set the path as a string path = "C:/Users/Usuario/then_any/valid_path/to a/Folder/MyLovelyPony.skp" If you use / as the file separator the path can be inside '' or "". But if it's \ then use '' ... OR escape the \ as \ inside ""... Loading from a file-path or from a url are handled different as set out in the API docs... Note you can use File methods to find the model's folder or a file's basename or filetype... model_path=File.dirname(model.path) model_name=File.basename(model.path, ".*") model_ext=File.extname(model.path) You can also make new file-paths using output=File.join(model_path, "MyOutputFile.txt") For example this would make a txt file with the model, into which you could write some data...
    • V

      3d points of coplanar polygons - SketchUp Ruby API

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      6
      0 Votes
      6 Posts
      912 Views
      V
      @sdmitch said: vhiguita, Are you still working on this problem or do you have a solution? I was interested in your problem and thought I would give it a try. Using the data from you post, I created a "html" file and created a plugin to read it and place the data. My html file contains the faces, lines and points but the lines and points are really the only data you need. I assummed the units were feet. It would help if I had an actual file to work with so post one if possible. Hi, I found the solution, there are many ways to get this, for example with PHP you could load all the html to a string, you could apply regular expressions to get the values (<div>,<span>, etc) from the tags review curl library.
    • 1 / 1