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

    How to draw an edge with an angle and distance

    Scheduled Pinned Locked Moved Developers' Forum
    25 Posts 4 Posters 1.3k Views 4 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
      morci429
      last edited by

      Tig it isn't working.
      guys could u have a look at the code and tell me what do you think?

      ...*[snip]*... reposted [in later post](http://forums.sketchucation.com/viewtopic.php?f)
      
      1 Reply Last reply Reply Quote 0
      • Dan RathbunD Offline
        Dan Rathbun
        last edited by

        Added a note at the bottom of the API doc page for Model.raytest() informing readers of the nil return value, when no geometry is "hit."

        I'm not here much anymore.

        1 Reply Last reply Reply Quote 0
        • M Offline
          morci429
          last edited by

          guys i think you are right, the hits array is empty. the ray isn't hitting any geometry. Still trying to find out why though

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

            Rather than start with convoluted code try a simple 'one-liner' pasted into the Ruby Console...
            Draw two rectangular faces place them one above the other, above the origin.

            rt=true;p=ORIGIN;while rt;p rt=Sketchup.active_model.raytest(p,Z_AXIS);p=rt[0]if rt;end
            

            it should produce something like this
            [Point3d(0, 0, 16.9685), [#<Sketchup::Face:0xbea3ae8>]] [Point3d(0, 0, 39.3701), [#<Sketchup::Face:0xbea3ad4>]] nil
            NOW you know it's working........

            TIG

            1 Reply Last reply Reply Quote 0
            • M Offline
              morci429
              last edited by

              Mission accomplished
              Thanks to you all Geniuses

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

              Advertisement