For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

CAD application, open source .Net Wrappers

Mihai Dima's picture
Forums: 

We started developing NaroCAD, a free open source parametric modeling CAD application with C#:
http://sourceforge.net/projects/narocad/. The project contains a .Net(C++/CLI) wrapper layer and also a wrapper code generator application, you can generate your own wrappers in the language you want.
The OCC 6.3.0 wrappers are compiled under one assembly named OCWrappers.dll.

Thomas Rollmann's picture

That sounds great. I will have a look on NaroCAD.

entery's picture

Hi MiHai,
Thanks, this looks very good!
But is it support for Import/Export for Step/Iges format ?

Best Regards!

Mihai Dima's picture

Hi,

I am glad that you are interested in using the wrappers. I planned to add wrappers for iges and step in the next few days. Probably I will wrap also the ElCLib.

Please let me know if you find any problems/bugs or if you need any other packages.

Best regards,
Mihai

Mark Duquette's picture

I have been looking for a 3d gcode generator (CAM)without much success. I think that Narocad would make an excellent place to start. Up to now I have not stepped up to using C#, I have been using C++. Narocad looks like a reason to learn C#. I need the wrappers for import and export to start with.

Great work, Thanks
Mark

Mihai Dima's picture

Hi Mark,

I am very sorry for the late reply to your post. I just didn't see it among these messages.

The current library version already contains modules that import BREP. I also wrapped the IGES packages (around 30-40 dependent packages) and uploaded them on SVN but they are not built yet in the current assembly, I had a lot of work to do at the NaroCad project. I hope to make some time in the next 1-2 weeks to rebuild the wrappers and add also these packages. Currently I have just one big .sln project for the wrappers, rebuilding is hardware intensive and takes a lot of time, I should also find a solution to split the project into smaller pieces.

Best regards,
Mihai

Robert Hill's picture

Thank you for posting info on your wrapper. I've been exploring the various C# wrappers and have a question regarding yours.

How do you handle methods that accept a pointer as an argument? Most of the C# wrappers use a ref parameter but yours does not seem too. For instance, what would be the correct way to make the following method calls using your wrapper?

OCGeom_Curve curve = OCBRep_Tool.Curve(edge, ref first, ref last);

OCGeomAPI_ProjectPointOnSurf project1 = new OCGeomAPI_ProjectPointOnSurf(p1, plane);
project1.LowerDistanceParameters(ref u1, ref v1);

view.Proj(ref eyeDirectionX, ref eyeDirectionY, ref eyeDirectionZ);
view.Convert(x, y, ref wX, ref wY, ref wZ);
projectionPlane.Coefficients(ref A, ref B, ref C, ref D);

Thank you in advance for your reply.

Sincerely, R. Hill

Mihai Dima's picture

Hi Robert,

The C++/CLI wrappers are still under development and the problem you noticed is one problem that I am working now at. The code generator currently does not detect and translate properly the non const references used as output values for primitive data types (ex: Quantity_Parameter& Vx) into their C# ref equivalent, they are seen as double* or int* and probably accessible only from C++/CLI. The usage of more complex objects like handles and enums is translated properly.

I am mainly focused on the modeling application development and until now where I needed output values I made the changes by hand (ex: V2d_View::Hit). It seems that I could add a lot of functionality until now without hitting too much the ref parameters problem, now I need to implement some projection and I will update by hand at least the View packages to use ref and make a new release today or tomorrow.

Hope to add these improvements at the code generator and wrappers soon (before the end of the year) or at least find someone to help me with this task.

Best regards,
Mihai

Mihai Dima's picture

Hi Robert,

I made some update on the wrappers. Many of them can be used now using ref form C#.

Best regards,
Mihai

jeon yong tae's picture

HI Mihai Zama-Neagra

I wonder the .Net Wrappers is wrapped "BRepGProp".
I can't find "OCBRepGProp".

Mihai Dima's picture

Hi Jeon Yong Tae,

I am sorry for the late reply.

If you need quickly this module please look into the wrappers/WrapperGenerator folder for an automatic wrapper generator application. Just generate the wrappers, add them to the OCWrappers.sln and rebuild the library.
I am currently working at the NaroCad project but soon (in 1-2 weeks) I am planning to make some wrapper tests and probably also a new wrapper version. If you will not succeed to make the wrappers for this module I will keep in mind this module and add it. There are also other wrappers uploaded on SVN, probably I will add many other modules.

Best regards,
Mihai

Mihai Dima's picture

Hi,

I wrapped the BRepGProp and uploaded the wrappers and the new compiled library.

Please let me know if it works well.

Thank you,
Mihai

Dmitry's picture

Hello Mihai,
I could not find the link to download the
sources.
Please, can you get the full link ? I would like to take a lokk at the project.

Thank's
Dmitry

Mihai Dima's picture

Hi Dmitry,

You can browse the source codes at: http://narocad.svn.sourceforge.net/viewvc/narocad/

You can download them with a SVN client using a repository URL like: https://narocad.svn.sourceforge.net/svnroot/narocad

The project is in /trunk/narocad and it is standalone. If you want to see also the wrappers used please look into /trunk/wrappers/ folder.

Best regards,
Mihai