.NET

Reply
New Member
ReidGould
Posts: 1
Registered: ‎03-19-2014
Message 1 of 1 (151 Views)

Geometry vs DatabaseServices

151 Views, 0 Replies
06-15-2014 10:38 AM

I'm brand new to the .NET framework and the Managed .NET API. Targeting AutoCAD 2014. I've been through the "2014 .NET Training" and loads of samples at Kean's blog Through the Interface and have been examining the Managed Class Reference documentation as much as I can.


one thing I'm stuck on is the relationship between the classes in Geometry and the similar classes in DatabaseServices. I found this thread about Entity vs Entity2d which helped a lot, and this blog about Curve.CreateFromGeCurve.


But I expected to find more functions like CreateFromGeCurve, and for them to be more robust. If I need to add a CircularArc3d to the database, does it not make a difference if I add an instance of Circle, or if I use CreateFromGeCurve to add the resulting Curve? If I do need the object to be of type Circle, I've found no helper method for the conversion, so is the normal way to use the Circle constructor and put in all the information from CircularArc3d? It seems like I do more work converting between the objects than I actually use the Geometry classes for geometric operations.

 

What if I'm using a CircularArc2d? CreateFromGeCurve isn't overloaded to take that object, and all the DatabaseServices classes have 3 dimensional properties and functions that require Point3d, so why does the Geometry namespace even have the 2d classes? do the 3d classes not have all the capability of the 2d ones? do the 2d classes have any special purpose, or are they mostly a legacy feature?

 

Thanks in advance for helping an overly enthusiastic amateur understand best practices.

 

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.