I am moving certain code which was packaged in the AutoCAD .NET application to a web service. The reason for doing this is to abstract out this functionality so that it can be used by other non-AutoCAD clients. I have worked out the interface to this web serive. However, this code made extensive use of UCS/WCS transformation of the geometries when it was part of the .NET application inside AutoCAD. Now the task for me is to recreate this geometry transformation functionality outside of the AutoCAD and its .NET API.
Has anyone faced similar situation? I will be mostly required to transform points from one UCS to another UCS. The caller of the service can pass the required information to define the UCS - such as origin, point on X axis and point on XY plane. However, how should this information be used to actually implement the necesarry transformation matrices? Has anyone already done this? Any help of word of advice is highly appreciated. Thanks!
Open the arxdoc.chm and type "coordinate" in the index and look at the topics under it.
You can always place base functionality in a seperate dll "class library"
I believe you just need to multiply the two matrices then transform the point.
I had similar issues when working with different API's so I developed a class that I could use in any API. I have attached the multiply matrix and transform point functions I use. Obviously I cannot guarantee there are no bugs!
This was written in VB.net
I should have mentioned in my previous post that you may need to invert one of the matrices depending on how they relate to the point and eachother. I also have an invert function if you need it.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register