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

    Posts

    Recent Best Controversial
    • Points of house roof

      I have the next .xml file, how could I get the coplanar points or the cloud points for the complete structure?, thanks in advance.

      CODE: SELECT ALL
      <?xml version="1.0" encoding="utf-8"?>
      <EAGLEVIEW_EXPORT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocationreportName="file:///c:/temp/eagleview-export.xsd">
      <VERSION coplanarity="" dormers="" precision="0" precisionUnits="" sourceVersion="1028" targetVersion="0" triangulation=""/>
      <LOCATION address="141 Kennan St" city="Santa Cruz" lat="36.9821000" long="-122.0241000" postal="" state="CA"/>
      <STRUCTURES northorientation="0.0">
      <ROOF id="ROOF1">
      <FACES>
      <FACE designator="I" id="F1">
      <POLYGON id="P1" orientation="71.0" path="L1,L2,L3,L4" pitch="8" size="725" unroundedsize="725.207196199"/>
      </FACE>
      <FACE designator="H" id="F2">
      <POLYGON id="P2" orientation="251.0" path="L2,L5,L6,L7" pitch="8" size="725" unroundedsize="725.207196199"/>
      </FACE>
      <FACE designator="A" id="F3">
      <POLYGON id="P3" orientation="341.0" path="L8,L9,L10,L11" pitch="6" size="14" unroundedsize="14.215955537"/>
      </FACE>
      <FACE designator="B" id="F4">
      <POLYGON id="P4" orientation="23.5" path="L11,L12,L13" pitch="8" size="18" unroundedsize="18.105641666"/>
      </FACE>
      <FACE designator="C" id="F5">
      <POLYGON id="P5" orientation="298.5" path="L9,L14,L15" pitch="8" size="18" unroundedsize="18.105641666"/>
      </FACE>
      <FACE designator="E" id="F6">
      <POLYGON id="P6" orientation="161.4" path="L16,L17,L18,L19" pitch="0" size="342" unroundedsize="341.605953526"/>
      </FACE>
      <FACE designator="G" id="F7">
      <POLYGON id="P7" orientation="154.9" path="L20,L21,L22,L23,L24,L25" pitch="0" size="431" unroundedsize="430.989999028"/>
      </FACE>
      <FACE designator="F" id="F8">
      <POLYGON id="P8" orientation="161.0" path="L24,L26,L27,L28" pitch="4" size="373" unroundedsize="372.713216791"/>
      </FACE>
      <FACE designator="D" id="F9">
      <POLYGON id="P9" orientation="161.0" path="L29,L30,L31,L32" pitch="0" size="156" unroundedsize="156.134580957"/>
      </FACE>
      </FACES>
      <LINES>
      <LINE id="L1" path="C1,C2" type="RAKE"/>
      <LINE id="L2" path="C2,C3" type="RIDGE"/>
      <LINE id="L3" path="C3,C4" type="RAKE"/>
      <LINE id="L4" path="C4,C1" type="EAVE"/>
      <LINE id="L5" path="C2,C5" type="RAKE"/>
      <LINE id="L6" path="C5,C6" type="EAVE"/>
      <LINE id="L7" path="C6,C3" type="RAKE"/>
      <LINE id="L8" path="C7,C8" type="EAVE"/>
      <LINE id="L9" path="C8,C9" type="HIP"/>
      <LINE id="L10" path="C9,C10" type="FLASHING"/>
      <LINE id="L11" path="C10,C7" type="HIP"/>
      <LINE id="L12" path="C7,C11" type="EAVE"/>
      <LINE id="L13" path="C11,C10" type="STEPFLASH"/>
      <LINE id="L14" path="C8,C12" type="EAVE"/>
      <LINE id="L15" path="C12,C9" type="STEPFLASH"/>
      <LINE id="L16" path="C13,C14" type="EAVE"/>
      <LINE id="L17" path="C14,C15" type="EAVE"/>
      <LINE id="L18" path="C15,C16" type="FLASHING"/>
      <LINE id="L19" path="C16,C13" type="EAVE"/>
      <LINE id="L20" path="C17,C18" type="EAVE"/>
      <LINE id="L21" path="C18,C19" type="EAVE"/>
      <LINE id="L22" path="C19,C20" type="EAVE"/>
      <LINE id="L23" path="C20,C21" type="EAVE"/>
      <LINE id="L24" path="C21,C22" type="OTHER"/>
      <LINE id="L25" path="C22,C17" type="EAVE"/>
      <LINE id="L26" path="C21,C23" type="RAKE"/>
      <LINE id="L27" path="C23,C24" type="EAVE"/>
      <LINE id="L28" path="C24,C22" type="RAKE"/>
      <LINE id="L29" path="C25,C26" type="EAVE"/>
      <LINE id="L30" path="C26,C27" type="EAVE"/>
      <LINE id="L31" path="C27,C28" type="FLASHING"/>
      <LINE id="L32" path="C28,C25" type="FLASHING"/>
      </LINES>
      <POINTS>
      <POINT data="27.096141893,67.088581299,10.979694884" id="C1"/>
      <POINT data="13.548070946,62.423606365,20.532174900" id="C2"/>
      <POINT data="27.258347158,22.606073055,20.532174900" id="C3"/>
      <POINT data="40.806418104,27.271047989,10.979694884" id="C4"/>
      <POINT data="0.000000000,57.758631431,10.979694884" id="C5"/>
      <POINT data="13.710276212,17.941098122,10.979694884" id="C6"/>
      <POINT data="9.278743999,64.672471378,3.493539281" id="C7"/>
      <POINT data="6.784562011,63.813655647,3.493539281" id="C8"/>
      <POINT data="8.502105093,59.116949751,5.993539281" id="C9"/>
      <POINT data="10.816882462,59.913991518,5.993539281" id="C10"/>
      <POINT data="16.514503451,61.875839754,3.279073187" id="C11"/>
      <POINT data="2.804484104,57.155101515,3.279073187" id="C12"/>
      <POINT data="21.979793355,7.049796239,6.488001522" id="C13"/>
      <POINT data="44.063242723,14.653737653,6.488001522" id="C14"/>
      <POINT data="39.301449811,28.482988424,6.488001522" id="C15"/>
      <POINT data="17.218000443,20.879047010,6.488001522" id="C16"/>
      <POINT data="72.069905140,8.170819686,0.000000000" id="C17"/>
      <POINT data="48.340121729,0.000000000,0.000000000" id="C18"/>
      <POINT data="43.619383490,13.710019346,0.000000000" id="C19"/>
      <POINT data="45.279078761,14.281498258,0.000000000" id="C20"/>
      <POINT data="44.343428970,16.998822560,0.000000000" id="C21"/>
      <POINT data="66.413517109,24.598163334,0.000000000" id="C22"/>
      <POINT data="39.411645919,31.321760543,5.049411809" id="C23"/>
      <POINT data="61.481734058,38.921101317,5.049411809" id="C24"/>
      <POINT data="61.974461985,37.490115509,0.000000000" id="C25"/>
      <POINT data="59.888616462,43.547850767,0.000000000" id="C26"/>
      <POINT data="36.846151095,35.613693663,0.000000000" id="C27"/>
      <POINT data="38.931996619,29.555958405,0.000000000" id="C28"/>
      </POINTS>
      </ROOF>
      </STRUCTURES>
      </EAGLEVIEW_EXPORT>

      posted in Developers' Forum
      V
      vhiguita
    • Get points from a Sketchup object

      Is there a method in ruby or a way to get all the points (x,y,z) from a 3D sketchup Object?

      Thanks in advance.
      vhiguita

      posted in Developers' Forum
      V
      vhiguita
    • Get points from a Sketchup object

      Is there a method in ruby or a way to get all the 3D points (x,y,z) from a sketchup Object?

      Thanks in advance.

      posted in Developers' Forum
      V
      vhiguita
    • Load Sketchup file from URL or Specific Diretory

      Hi,

      I am implementing a ruby code that loads me a sketchup file(skp), this is my code:

      point = Geom::Point3d.new 10,20,30
      transform = Geom::Transformation.new point
      model = Sketchup.active_model
      entities = model.active_entities
      path = Sketchup.find_support_file "chimney.skp",
      "C:/Users/usuario/Downloads/pluginsketchUp/Sketchup/org.dworks.suide_1.0.0/exe/"
      definitions = model.definitions
      componentdefinition = definitions.load path
      instance = entities.add_instance componentdefinition, transform
      if (instance)
      UI.messagebox instance
      else
      UI.messagebox "Failure"
      end

      How could I do, the file loads of a different path to "Components/Components Sampler/" or maybe of a specific url?.

      Thanks in advance.

      posted in Newbie Forum sketchup
      V
      vhiguita
    • RE: 3d points of coplanar polygons - SketchUp Ruby API

      @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.

      posted in Developers' Forum
      V
      vhiguita
    • RE: 3d points of coplanar polygons - SketchUp Ruby API

      Hi,

      In this instruction Sketchup.active_model.active_entities.add_face(p1,p2,p3).
      Must the p1, p2, p3 points be different (not repeated)?
      With respect to the orientation, it´s a xml file with some data of a house roof I need to draw with SketchUP ruby API, what could it mean?.

      Thanks.

      <?xml version="1.0" encoding="UTF-8"?>
      -<EAGLEVIEW_EXPORT xsi:noNamespaceSchemaLocationreportName="file:///c:/temp/eagleview-export.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <VERSION triangulation="" targetVersion="0" sourceVersion="1028" precisionUnits="" precision="0" dormers="" coplanarity=""/> <LOCATION state="CA" postal="" long="-122.0241000" lat="36.9821000" city="Santa Cruz" address="141 Kennan St"/> -<STRUCTURES northorientation="0.0"> -<ROOF id="ROOF1"> -<FACES> -<FACE id="F1" designator="I"> <POLYGON id="P1" unroundedsize="725.207196199" size="725" pitch="8" path="L1,L2,L3,L4" orientation="71.0"/> </FACE>
      -<FACE id="F2" designator="H"> <POLYGON id="P2" unroundedsize="725.207196199" size="725" pitch="8" path="L2,L5,L6,L7" orientation="251.0"/> </FACE> -<FACE id="F3" designator="A"> <POLYGON id="P3" unroundedsize="14.215955537" size="14" pitch="6" path="L8,L9,L10,L11" orientation="341.0"/> </FACE> -<FACE id="F4" designator="B"> <POLYGON id="P4" unroundedsize="18.105641666" size="18" pitch="8" path="L11,L12,L13" orientation="23.5"/> </FACE>
      ....
      </FACES>
      -<LINES> <LINE id="L1" path="C1,C2" type="RAKE"/> <LINE id="L2" path="C2,C3" type="RIDGE"/> <LINE id="L3" path="C3,C4" type="RAKE"/> <LINE id="L4" path="C4,C1" type="EAVE"/> <LINE id="L5" path="C2,C5" type="RAKE"/> <LINE id="L6" path="C5,C6" type="EAVE"/> <LINE id="L7" path="C6,C3" type="RAKE"/> <LINE id="L8" path="C7,C8" type="EAVE"/>
      ...
      </LINES>
      -<POINTS> <POINT id="C1" data="27.096141893,67.088581299,10.979694884"/> <POINT id="C2" data="13.548070946,62.423606365,20.532174900"/> <POINT id="C3" data="27.258347158,22.606073055,20.532174900"/> <POINT id="C4" data="40.806418104,27.271047989,10.979694884"/> <POINT id="C5" data="0.000000000,57.758631431,10.979694884"/> <POINT id="C6" data="13.710276212,17.941098122,10.979694884"/> <POINT id="C7" data="9.278743999,64.672471378,3.493539281"/> <POINT id="C8" data="6.784562011,63.813655647,3.493539281"/> <POINT id="C9" data="8.502105093,59.116949751,5.993539281"/>
      ...
      </POINTS> </ROOF> </STRUCTURES> </EAGLEVIEW_EXPORT>
      L1

      @tig said:

      If you have three points they will always be 'coplanar'.
      Let's call them p1/p2/p3;
      To add the face use:
      Sketchup.active_model.active_entities.add_face(p1,p2,p3)
      You can use more points BUT you must be sure that they are coplanar.

      What do you mean by the orientation of 71 ?

      PS: Don't double post - be patient - I moved the post here too...

      posted in Developers' Forum
      V
      vhiguita
    • 3d points of coplanar polygons - SketchUp Ruby API

      Hi,

      I have a question, how could I draw a coplanar polygon with the next
      3d points?
      [27.096141893, 67.088581299, 10.979694884][13.548070946,
      62.423606365, 20.5321749][27.258347158, 22.606073055, 20.5321749]
      [40.806418104, 27.271047989, 10.979694884]
      that are the points of
      a polygon of a roof.

      I have the next polygon with the points [27.096141893,67.088581299,10.979694884]
      [13.548070946,62.423606365,20.532174900]
      [13.548070946,62.423606365,20.532174900]
      [27.258347158,22.606073055,20.532174900]
      [27.258347158,22.606073055,20.532174900]
      [40.806418104,27.271047989,10.979694884]
      [40.806418104,27.271047989,10.979694884]
      [27.096141893,67.088581299,10.979694884]
      and orientation of
      71.0 how could I draw the polygon according the orientation.

      Thank you very much.

      posted in Developers' Forum
      V
      vhiguita
    • 1 / 1