Apollonius circles tangent to circles
All  1-3  4-7

Previous
Next
 From:  Michael Gibson
8618.4 In reply to 8618.1 
Hi Brian, by the way the Draw curves > Circles > Tangent command can generate a circle tangent to 3 other curves currently.

> but the question is, can the center of a circle be found like the following var x1 = code which does not work:

Sorry no, currently there isn't anything set up for returning circle properties to script, the only things exposed specific to curves currently are:

crv.isClosed property,
crv.getFacesOfEdge()
crv.getUVCurvesOfEdge()
crv.getStartPt()
crv.getEndPt()
crv.getLength()


> Second question, is the c1.radius code OK?

I don't think so - I'd think it is returning "undefined".


> Third question, is a circle just another curve, or is there objectpicker
> code to restrict selection to circles?

Sorry no there isn't currently, the current ones are just by more general object type than that:
allowCurves();
allowStandaloneCurves();
allowEdgeCurves();
allowFaces();
allowBReps();
allowPointObjects();
allowEditPoints();
allowTopLevelObjects();

Probably a good way to add a more flexible one would be to let you pass in a function that the objectpicker would then call to decide if an object should be allowed to be picked or not.

Those are some things that I can add in for you in v4 once it's underway. Not too much longer...

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
8618.5 In reply to 8618.4 
Thank you very much Michael!

BoundingBox center should do nicely.

Looking forward to MoI4.

- Brian

Well CircleTan command does create the desired tangent circle.

EDITED: 9 Oct 2017 by BEMFARMER

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
8618.6 In reply to 8618.5 
I think that the CircleTan command has the Apollonius algebra built in.
- Brian
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Michael Gibson
8618.7 In reply to 8618.6 
Hi Brian,

re:
> I think that the CircleTan command has the Apollonius algebra built in.

CircleTan uses an iterative solver technique - that's when given some "seed points" to start with it takes little steps on each curve and sees which directions are getting closer to a good result. Then smaller and smaller steps to converge in on the answer.

The tricky part with that kind of solver is getting good seed points, it tends to work well when you can guide it by picks in the general region where you think the answer should be.

The good part about it is that it's very general purpose, it can find a circle tangent to 3 general curves, not just 3 circles:


- Michael

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages: All  1-3  4-7