Circle intersections plugin

Continuing the discussion from Circular guide lines:

I moved here from Feature Requests category since the discussion has shifted to the plugin I am working on.

I have extended the plugin to find true intersections between circles and edges. I’d like to add construction lines also, but I can’t find a way to pick a construction line from within a tool. Does anyone know of a technique?


I’m not quite sure what you mean. You are familar with the tool class. The “onLButtonDown” method of a tool class includes “x,y” arguments that can be supplied to the view class’s “pick_helper”:

  def onLButtonDown(flags, x,  y, view)
    pickhelper = view.pick_helper(x,y)
    best_picked = pickhelper.best_picked
    if best_picked == ...

I’m not providing more code because I haven’t tested anything. You can examine “best_picked” to see if a ConstructionLine object was clicked, and then try to determine the 3D position that was clicked.

Or do you mean if when your tool is running, the mouse is hovering over a construction line and you want to generate reference points? I think that involves handling the mouse move and the InputPoint class. I’m not familiar with InputPoint at all. Or are you are using the built-in selection tool, which returns entities in an array?

Thanks Bruce! I had been using InputPoint, which never finds a ConstructionLine. Then I remembered PickHelper, which will select a CL. On my way again, though finding that both of these input helpers are somewhat finicky.

Here is a revised version 0.2 that will do intersections between a circle/arc and another circle/arc, edge, or construction line. The same tool automatically detects what you have selected and handles it accordingly.

  • As before, the entities must coplanar and must be in the same edit context.
  • I have found that selecting a construction line is erratic, so I included a trap that says it couldn’t resolve your selection (as opposed to “nothing selected”)

This is still beta-level software, so please use only at your own risk but also please kick the tires hard to help detect unforeseen bugs and let me know what you find.

SB_intersect_circles.rbz (4.2 KB)

Re, selecting a CLine. Don’t forget to try out the new window pick methods, just released this cycle.

That will limit compatibility with pre-2016 but it’s worth a try. Thanks for the idea!

@DanRathbun thanks for the idea. Here’s a version that uses window pick on 2016. It seems much more reliable on my MacBookPro Retina (where the high-dpi screen may have been interfering with the pick). It may still have the previous issue selecting construction lines on pre-2016.

SB_intersect_circles.rbz (4.4 KB)

1 Like

Several years ago there was discussion rotating 1 line around one its end to intersect another. There are possible five solutions to that problem. That has been solved mathametical would it help you have link? I maybe able to find it. Ral subject is intersection of a line and sphere or circle.

The math in my plugin is fine - all set on that end. The remaining problem was that picking a construction line from within a Tool is flakey.

Here’s a gif of the tool being used to solve a problem that was recently discussed: constructing an accurate tetrahedron.

How do we switch to “window pick mode” ? A modifier key ?

No switch. If you are running 2016 and the tool concludes it is looking for a construction line, it uses window_pick. It only starts looking for a c-line after failing to find a circle, arc, or edge.