AddArc3pt() fails

The VBA forum deals with IntelliCAD 2000 VBA (Visual Basic for Applications) issues.

Moderator: CMS Inc

Post Reply
Steph
Newbie
Posts: 1
Joined: Tue Jan 21, 2014 3:39 pm

AddArc3pt() fails

Post by Steph » Wed Jan 22, 2014 7:43 am

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!
Accuright
Valued Contributor
Posts: 47
Joined: Thu Jul 26, 2012 2:19 pm

Post by Accuright » Tue Feb 18, 2014 4:15 pm

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.
Dell Optiplex 745
Windows XP Professional SP3
Intel Core2 6400 @ 2.13Ghz
4GB RAM
Nvidia GeForce GT 610
[I'd rather be on my home computer]

(I do not represent CMS or it's affiliates)
Post Reply