A question adding circle by 2 points

A question adding circle by 2 points

StephenCim-001
Advocate Advocate
606 Views
2 Replies
Message 1 of 3

A question adding circle by 2 points

StephenCim-001
Advocate
Advocate

Hi All

 

The have the following snip of code.

 

entities = []
entities.append(circle1)
#create intercest points
intersectShank = sketchshank.intersectWithSketchPlane(entities)
circlesshank = sketchshank.sketchCurves.sketchCircles
-------------------

now if I add a circle by centre radius using one of the intersect points. that works fine.

shank = circlesshank.addByCenterRadius(intersectShank[1], 0.1 )

 

Now if I add a circle by 2 points   like this that works

shank = circlesshank.addByTwoPoints(adsk.core.Point3D.create(0, 0, 0), adsk.core.Point3D.create(0.1, 0, 0) )

 

But if I use 1 of the intersect points in the by two point I get an error
shank = circlesshank.addByTwoPoints(intersectShank[1], adsk.core.Point3D.create(0.1, 0, 0) )

Complaining that I need 2 arguments of type error

 

Why is the intersect point now a valid point when used in the addByTwoPoints method?

 

Cheers, Stephen

0 Likes
Accepted solutions (1)
607 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Accepted solution

According to the Reference Manual the two methods allow different parameters.

 

addByTwoPoints method

 

addByTwoPoints.PNG

 

addByCenterRadius method

 

addByCenterRadius.PNG

 

0 Likes
Message 3 of 3

StephenCim-001
Advocate
Advocate

This mean that the points from by an intersect a 'sketchPoint' and not a point3D.

OK, I guess that makes sense   , I haven't done any sort of coding in 30 years ... I guess it shows 🙂

 

Cheers, Stephen

0 Likes