CADImport.NET and SvgNet

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
ngoell
Posts: 2
Joined: 14 Nov 2006, 12:04

CADImport.NET and SvgNet

Post by ngoell » 08 Jan 2007, 12:08

Hello,

I have a CADImport.Net related issue, that I hope can be resolved with your help:

I am using CADImport.Net and intended to convert a DWG file to SVG format by reading the DWG with CADImport.Net and writing it with the free SVG library SvgNet (http://www.codeproject.com/csharp/svgnet.asp) to SVG format. SvgNet provides a GDI+ to SVG bridge (SvgGraphics), that uses the *exact* same interface as a GDI+ System.Drawing.Graphics object that does not render to the screen but outputs an SVG file.
Unfortunately, the Graphics class is a sealed class, so the SvgGraphics class cannot be a direct subclass of the Graphics class. As a result an SvgGraphics object cannot be passed to the CADImport.Net CADImage.Draw() method, despite the fact that it provides the exact same methods as System.Drawing.Graphics.

To resolve this problem, I could imagine, that CADImport.Net provides an interface that is similar or identical to the System.Drawing.Graphics class, that is supported by a CadImage.Draw method. Using this interface I would be able to write a wrapper for the SvgGraphics class and use CadImport.Net to output SVG graphics.

Do you see any opportunity that CADImport.Net could support such functionality and open up new possibilities (not only for this issue) regarding the application area of CADImport.Net?

Thanks in advance,
Nicolas Goell

support
Posts: 3271
Joined: 30 Mar 2005, 11:36
Contact:

Post by support » 09 Jan 2007, 09:04

Hello Nicolas,

We need a little time for estimating this library to find out what is possible to do.

Sergey.

Please post questions to the forum or write to support@cadsofttools.com

support
Posts: 3271
Joined: 30 Mar 2005, 11:36
Contact:

Post by support » 12 Jan 2007, 19:22

Hello Nicolas,

Library <b>SvgNet</b> contains it's own interface IGraphics which inherits no one standard interface of FrameWork. This fact presumes valuable difficulties in realisation of <b>Draw</b> method for this interface in the context <b>CAD Import .NET</b>.

However this task can be solved like a separate project, using sources of <b>CAD Import .NET</b>

Sergey.

Please post questions to the forum or write to support@cadsofttools.com

Post Reply