Create Arc using 3 Points (Tangent Point Tangent)

Create Arc using 3 Points (Tangent Point Tangent)

alexisgacia
Advocate Advocate
1,474 Views
2 Replies
Message 1 of 3

Create Arc using 3 Points (Tangent Point Tangent)

alexisgacia
Advocate
Advocate

Hi,

 

Good day.

 

Need help on creating Arc using 3 points (Tangent to Line, Point, Tangent to Circle) in c#. Below sample output.

 

alexisgacia_0-1592808292163.png

 

 

Thanks in advance.

 

 

 

 

1,475 Views
2 Replies
Replies (2)
Message 2 of 3

mujibur.rahman
Enthusiast
Enthusiast

Hi,
if you know the Three 3d points, you can create the arc by using the following code

     Using acTrans As Transaction = acCurDb.TransactionManager.StartTransaction()
                Dim acBlkTbl As BlockTable = acTrans.GetObject(acCurDb.BlockTableId, OpenMode.ForRead)
                Dim acBlkTblRec As BlockTableRecord = acTrans.GetObject(acBlkTbl(BlockTableRecord.ModelSpace), OpenMode.ForWrite)
                Dim arc As CircularArc3d = New CircularArc3d(Point3d.Origin, Point3d.Origin, Point3d.Origin)
                Dim point As Point3d = arc.Center
                Dim rad As Double = arc.Radius
                Dim stang As Double = arc.StartAngle
                Dim edang As Double = arc.EndAngle
                Dim dbarc As Arc = New Arc(point, rad, stang, edang)
                acBlkTblRec.AppendEntity(dbarc)
                acTrans.AddNewlyCreatedDBObject(dbarc, True)
                acTrans.Commit()
            End Using
if it helps please accept this as solution
0 Likes
Message 3 of 3

alexisgacia
Advocate
Advocate

Thanks for the solution that you provided. But I guess it didn't solve the main problem by getting the 2 tangent points. I found another workaround for (Tangent to Line, Point, Tangent to Circle) but it didn't solve the (Tangent to Polyline, Point, Tangent to Circle).

I hope that AutoDesk can provide us access to that function.

0 Likes