Tuesday, May 17, 2011

NaroCAD Wrappers Review. Work on Previewing Sketch Constraints to Remain Persistent

Probably you heard about Xamarin, if not, is not an issue. The opensource .Net implementation (Mono) was forked as the main company did not support it that. I don't want to discuss politics, but I just wish to this new company to succeed and to promote Free/OpenSource as Miguel de Icaza (the creator of Gnome and Mono project) is its owner.
Right now I want to discuss on development on wrappers. In fact, why if things work right, most likely I will try to remove the the original CLI wrappers and to import just the necessary methods/clasess. The design will be a bit different from the actual wrappers and we will try to work using .Net technologies and will extract the information from the existing wrappers.
This approach have many advantages, one of them is the possibility to debug using those wrappers and to make some changes that are at least nice to have for a C#/.Net programmer: automatically using of properties (like gpPnt.X() is better to be used in its property form gpPnt.X and so on), P/Invoke which will make easier to migrate to Visual Studio 2010 (C++ side of wrappers do not need to be recompiled for migrating to VS 2010 for example). This prototype is advanced yet not complete.
This will mean a thing for contributors that were interested in wrappers: is hard for our team to support them and is even harder for every new package to us to investigate why things crash and so on. Also, it make little sense (excluding for making a package) to give wrappers that later will make others' product to crash cause of our fault.
At the end, is just about to separate the codebase and to let as most as possible of C++ behind. If the prototype will not work, we will still use the old wrappers, but if will work (with minimal flaws), we have likely no reason to still use the C++/CLI (aka C++.Net) wrappers. You are still welcome to take Svn snapshot and provide patches and we will include in our Svn tree if you need them and you will want to contribute.
In between I did prepare the code to make previews of constraints persistent (they were shown just in previewing of lines) and if possible to make possible to delete them by selecting and pressing delete. It would be nice if clicking on a constraint to switch automatically to constraint action but this is not also certain.

No comments: