sketchucation logo sketchucation
    • 登入
    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!
    🔌 Smart Spline | Fluid way to handle splines for furniture design and complex structures. Download

    How to draw an edge with an angle and distance

    已排程 已置頂 已鎖定 已移動 Developers' Forum
    25 貼文 4 Posters 2.0k 瀏覽 4 Watching
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • M 離線
      morci429
      最後由 編輯

      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 條回覆 最後回覆 回覆 引用 0
      • Dan RathbunD 離線
        Dan Rathbun
        最後由 編輯

        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 條回覆 最後回覆 回覆 引用 0
        • M 離線
          morci429
          最後由 編輯

          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 條回覆 最後回覆 回覆 引用 0
          • TIGT 離線
            TIG Moderator
            最後由 編輯

            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 條回覆 最後回覆 回覆 引用 0
            • M 離線
              morci429
              最後由 編輯

              Mission accomplished
              Thanks to you all Geniuses

              1 條回覆 最後回覆 回覆 引用 0
              • 1
              • 2
              • 2 / 2
              • 第一個貼文
                最後的貼文
              Buy SketchPlus
              Buy SUbD
              Buy WrapR
              Buy eBook
              Buy Modelur
              Buy Vertex Tools
              Buy SketchCuisine
              Buy FormFonts

              Advertisement