Page 1 of 1

AddArc3pt() fails

Posted: Wed Jan 22, 2014 7:43 am
by Steph
I am unable to use the VBA function AddArc3pt(). Sometimes it works well, and sometimes the arcs are upside-down. Here is a little program that produces the bug (an inverted arc):

Public Sub Bug()
Dim doc As Document
Dim ms As ModelSpace
Dim w1 As Point, w2 As Point, w3 As Point
Dim A As Arc
Set doc = Application.ActiveDocument
Set ms = doc.ModelSpace
Set w1 = Library.CreatePoint(1, 0, 0)
Set w2 = Library.CreatePoint(0, -1, 0)
Set w3 = Library.CreatePoint(-1, 0, 0)
Set A = ms.AddArc3pt(w1, w2, w3)
A.Update
End Sub

It produces the same result as if the y coordinate of the w2 point was inverted.

NB: I am using the lastest version of CMS Intellicad Pro on Windows 7 64 bits.

Thanks for your help!

Posted: Tue Feb 18, 2014 4:15 pm
by Accuright
The thing about arcs in CAD environments is that they are always concaved based on your point selection, and I believe it has something to do with clockwise / counter-clockwise.

So, if you use the start, end, radius arc command, you'll notice that picking your start and end points from left to right, the curve will concave up when picking radius point. Pick start and end points right to left, and the curve will concave down when picking radius point.

This is the best clue I can give you, we're still learning a lot about implementing arc logic ourselves at our office.