draw an arc between two points.

This widget could not be displayed.

draw an arc between two points.

Anonymous
Not applicable

Hello Guys , 

 

I am developing a function which will draw an arc of a circle between each of my points, one after the other.
I managed to recover my two points.

But I don't know how to draw an arc between my two points.

 

for the angle of the arc of a circle:

if the distance between the two points is large, the angle of the arc of a circle is small.

0 Likes
Reply
1,579 Views
3 Replies
Replies (3)

R.Gerritsen4967
Advocate
Advocate

I think you need more information than just 2 points to draw an arc or a circle.

So you will need something to calculate the start/end angle or arc length or the directions in the start- or endpoint.

 

Maybe have a look at this link:

https://www.theswamp.org/index.php?topic=40382.0 

Look at the post from Gile, this is a very simple way to draw an arc with only 3 points.

0 Likes

norman.yuan
Mentor
Mentor

I assume that you do know given 2 points, there could be infinite numbers of arc to be drawn. So, are you saying you just want to draw arc that pass through the 2 points with a random radius? It sounds not making any sense to me. You may want to explain more on what you need, a picture may help make things easier to explain for you and understand for others.

 

Norman Yuan

Drive CAD With Code

EESignature

0 Likes

Anonymous
Not applicable

Hello guys 🙂

 

Excuse me if i'm not clear 😞

 

What i want is to draw an ARC from the first point(3dpoint) to the second point(3dpoint),if the angle can be chosen at random, that's fine with me.

Capture d’écran 2021-06-22 101338.png

Now

 

 

I show you my code a little. but I managed to do this with a Spline.

 

// Define the fit points for the spline
                    Point3dCollection TroisPoints = new Point3dCollection();
                    TroisPoints.Add(A);
                    TroisPoints.Add(C);
                    TroisPoints.Add(B);

                    // Get a 3D vector from the point (0.5,0.5,0)
                    Vector3d vecTan = new Point3d(200,200, 0).GetAsVector();
                    Vector3d vecTan1 = new Point3d(0, 100, 0).GetAsVector();
                    // Create a spline through (0, 0, 0), (5, 5, 0), and (10, 0, 0) with a
                    // start and end tangency of (0.5, 0.5, 0.0)
                     Spline acSpline = new Spline(TroisPoints, vecTan, vecTan, 1, 0.5);
                    acSpline.SetDatabaseDefaults();

                    // Add the new object to the block table record and the transaction
                    acBlkTblRec.AppendEntity(acSpline);
                    tr.AddNewlyCreatedDBObject(acSpline, true);*/
                }
                // Save the new line to the database
                tr.Commit();

 

But i want to do this whith the ARC .

 

THANKS A LOT GUYS 🙂

 

0 Likes