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

    Geom.intersect_line_plane = point3d?

    Scheduled Pinned Locked Moved Developers' Forum
    5 Posts 3 Posters 207 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.
    • voljankoV Offline
      voljanko
      last edited by

      In the api http://code.google.com/intl/sl-SI/apis/sketchup/docs/ourdoc/geom.html#intersect_line_plane
      ,this function should return point3d.
      But it seems that return vector3d.
      Is it a mistake in the documentation?
      How to easier(less computation) convert vector3d to point3d?
      p.s. does anybody know how to see api users comments?
      I can not set my browser (chrome) to show the comments.

      SuSolid.com - solid check - solid repair- solid intersection check - weight plugin

      1 Reply Last reply Reply Quote 0
      • TIGT Offline
        TIG Moderator
        last edited by

        You are wrong [at least in v8]...
        ` line=edge.line

        [Point3d(17.0223, 16.6822, 55.5118), Vector3d(0, 0, 1)]
        plane=face.plane
        [0.0, 0.0, 1.0, -39.3700787401575]
        point=Geom::intersect_line_plane(line, plane)
        Point3d(17.0223, 16.6822, 39.3701) OR ' nil' However, in practice there is actually little difference between a 3d point and a 3d vector because they both contain XYZ values, and they can both be substituted by an 'array' [except when used in mesh operations which need Point3d objects, but which you are not using anyway?] - so vector.to_a >>> [1, 2, 3]and point.to_a >>> [1, 2, 3]` - which, in most cases, can then be a used as a vector OR as a point!

        There are not always 'comments' on every API page... BUT there are several at the bottom of the page for Geom:: perhaps you need to 'sign-in' ?Capture.PNG

        TIG

        1 Reply Last reply Reply Quote 0
        • voljankoV Offline
          voljanko
          last edited by

          Ups,I'm WRONG.
          The line of code that converted my point3d to vector3d was
          point1=point2-point1
          Sorry. 😳
          I still need to convert vector3d to point3d because the function point1.distance(point2)
          ,don't accept vector3d.
          Maybe I should change the tittle to point3d-point3d=vector3d.

          @unknownuser said:

          There are not always 'comments' on every API page... BUT there are several at the bottom of the page for Geom:: perhaps you need to 'sign-in' ?
          I'm signed in by gmail account.I can see an option "Sign out".

          SuSolid.com - solid check - solid repair- solid intersection check - weight plugin

          1 Reply Last reply Reply Quote 0
          • voljankoV Offline
            voljanko
            last edited by

            Ok,it works the vector.to_a conversion.
            Thanks

            SuSolid.com - solid check - solid repair- solid intersection check - weight plugin

            1 Reply Last reply Reply Quote 0
            • Dan RathbunD Offline
              Dan Rathbun
              last edited by

              @voljanko said:

              I can not set my browser (chrome) to show the comments.

              You are seeing the localized language version of the API page.

              Somehow you must try to set Chrome to English, so you can see the main English pages that have the comments. This is a known issue with the API Doc pages, and complaints have been logged with Google.

              I'm not here much anymore.

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

              Advertisement