Jump to content

Recommended Posts

Posted

I am using the following coe to get the midpoint of an Arc:

Dim mp2 As Point3d = _

arc.GetClosestPointTo(arc.GetPointAtParameter((arc.EndParam + arc.StartParam) / 2), arc.Normal, False)

 

But how do I get the midpoint of a CircularArc2d?

Posted

With regard to your posted example, I think the GetClosestPointTo method call is unnecessary. This should suffice:

 

Dim mp2 As Point3d = arc.GetPointAtParameter((arc.EndParam + arc.StartParam) / 2)

 

A CircularArc2d works in a similar fashion. Because a CircularArc2d inherits from Curve2d, this should get a midpoint.

 

Dim mp as Point2D = ca2d.EvaluatePoint((ca2d.EndAngle + ca2d.StartAngle)/2)

Posted

Thanx SEANT, it's working.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...