• Login
sketchucation logo sketchucation
  • Login
🔌 Quick Selection | Try Didier Bur's reworked classic extension that supercharges selections in SketchUp Download

Newbie question

Scheduled Pinned Locked Moved Developers' Forum
3 Posts 3 Posters 175 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.
  • P Offline
    Pygmy
    last edited by 14 Jul 2013, 17:21

    Hello,
    a complete newbie here, please bear with me.

    So I am trying to find the intersection points between two co-planar Sketchup circles.
    defined by:
    C1 = [center1], [normal], radius1
    C2 = [center2], [normal], radius2

    This is probably a bad solution but I've been trying to use the Geom::intersect_line_line for each pair of Edge components, somewhat like this:

    T=C1.each{|j| C2.each {|k|Geom::intersect_line_line(j,k)}}

    But i stumbled on another problem, which is, Geom::intersect_line_line only accepts Arrays(i'm trying to input Edge objects, also Edge arrays won't work).
    And, whenever i use the .to_a method to any Edge object(including in the above code), this is what i get:
    "(eval): warning: default `to_a' will be obsolete"

    Can anyone tell me what I have to do to make the Geom::intersect_line_line to work with Edges? Also is there a simpler solution to this that I'm missing?

    1 Reply Last reply Reply Quote 0
    • C Offline
      Chris Fullmer
      last edited by 14 Jul 2013, 18:55

      Is the geometry of the circles in the same group/model space? Or is it separated by groups or components?

      Lately you've been tan, suspicious for the winter.
      All my Plugins I've written

      1 Reply Last reply Reply Quote 0
      • T Offline
        TIG Moderator
        last edited by 14 Jul 2013, 21:54

        Because SketchUp's circles are in reality finely faceted polygons the real-intersection of two arcs' circumferences is unlikely to be exactly on those arcs' edges, unless by coincidence it turns out to be at one of the arc's edge's vertices.
        Conversely the actual-intersection of those arcs' edges is unlikely to fall exactly on the arcs' circumferences, unless by coincidence it's at a vertex of those arcs' edges...

        My TrueTangent tools contain a number of algorithms to find circles/arcs' true tangents, true intersection points etc...

        Perhaps these will help you find what you need... 😕

        TIG

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

        Advertisement