├── ScriptLoader
├── Scripts
│ ├── Script3.js
│ ├── Script4.js
│ ├── Script5.js
│ ├── test1.css
│ ├── test.css
│ ├── test2.css
│ ├── Script1.js
│ ├── Script2.js
│ ├── OldScriptLoader.js
│ ├── ScriptLoader.ts
│ └── ScriptLoader.js
├── Web.config
├── Web.Debug.config
├── Web.Release.config
├── Properties
│ └── AssemblyInfo.cs
└── index.htm
├── netDxf
├── XDataCode.cs
├── XDataRecord.cs
├── docs
│ └── netDxf Documentation.chm
├── Environment.cs
├── Entities
│ ├── AttributeFlags.cs
│ ├── HatchFillType.cs
│ ├── MLineJustification.cs
│ ├── MTextLineSpacingStyle.cs
│ ├── HatchType.cs
│ ├── HatchStyle.cs
│ ├── PolylineSmoothType.cs
│ ├── OrdinateDimensionAxis.cs
│ ├── MLineFlags.cs
│ ├── ImageDisplayFlags.cs
│ ├── Face3dEdgeFlags.cs
│ ├── HatchBoundaryPathTypeFlag.cs
│ ├── DimensionType.cs
│ ├── EndSequence.cs
│ ├── MTextAttachmentPoint.cs
│ ├── HatchGradientPatternType.cs
│ ├── VertexTypeFlags.cs
│ ├── SplineTypeFlags.cs
│ ├── PolylineTypeFlags.cs
│ ├── DimensionTypeFlag.cs
│ └── TextAligment.cs
├── Objects
│ ├── DictionaryClonningFlag.cs
│ ├── ImageDisplayQuality.cs
│ ├── PlotPaperUnits.cs
│ ├── PlotRotation.cs
│ ├── ImageDefReactor.cs
│ ├── SupportedImageFormats.cs
│ ├── DictionaryObject.cs
│ ├── MLineStyleFlags.cs
│ ├── PlotFlags.cs
│ └── RasterVariables.cs
├── Properties
│ └── AssemblyInfo.cs
├── Header
│ ├── AttMode.cs
│ ├── HeaderVariable.cs
│ └── DxfVersion.cs
├── Collections
│ ├── EntityCollectionEventArgs.cs
│ ├── ObservableCollectionBaseEventArgs.cs
│ ├── AttributeDefinitionDictionaryEventArgs.cs
│ └── ObservableDictionaryBaseEventArgs.cs
├── ICodeValueReader.cs
├── Symbols.cs
├── ICodeValueWriter.cs
├── Blocks
│ ├── BlockEnd.cs
│ └── BlockTypeFlags.cs
├── Tables
│ ├── ViewMode.cs
│ ├── LayerFlags.cs
│ └── ApplicationRegistry.cs
└── EncodingType.cs
├── TestDxfDocument
├── image.jpg
├── sample binary.dxf
└── Properties
│ └── AssemblyInfo.cs
├── DwgToSvgConverter
├── Libs
│ ├── WW.dll
│ ├── WW.GL.dll
│ ├── WW.Cad.dll
│ ├── WW.Pdf.dll
│ ├── WW.License.dll
│ └── ICSharpCode.SharpZipLib.dll
├── Zimmertyp_1_.dwg
├── Zimmertyp_2_.dwg
├── Properties
│ ├── Settings.settings
│ ├── Settings.Designer.cs
│ ├── AssemblyInfo.cs
│ └── Resources.Designer.cs
├── Form1.cs
├── Helpers.cs
├── Form1.Designer.cs
└── Modifier.cs
├── DxfLayerSeparation
├── Libs
│ ├── WW.dll
│ ├── WW.Cad.dll
│ ├── WW.GL.dll
│ ├── WW.Pdf.dll
│ └── WW.License.dll
├── app.config
├── Properties
│ ├── Settings.settings
│ ├── Settings.Designer.cs
│ ├── AssemblyInfo.cs
│ └── Resources.Designer.cs
├── Form1.cs
├── Form1.Designer.cs
└── Program.cs
├── SvgConverter
├── Libs
│ ├── PdfSharp.dll
│ ├── PdfSharp.Charting.dll
│ └── TextFile1.txt
├── Properties
│ ├── Settings.settings
│ ├── Settings.Designer.cs
│ ├── AssemblyInfo.cs
│ └── Resources.Designer.cs
├── Form1.cs
├── svg
│ ├── ISVGElement.cs
│ ├── SVGDefinitions.cs
│ ├── SVG.cs
│ ├── SVGGroup.cs
│ ├── SVGMarker.cs
│ ├── SVGArrow.cs
│ ├── SVGRect.cs
│ ├── SVGAttributes.cs
│ └── SVGText.cs
├── Program.cs
├── drawing.svg
└── Form1.Designer.cs
├── ApertureService
├── 0001_GB01_OG14_0000_Aperture.dwg
├── 0001_GB01_OG14_0000_Aperture.dxf
├── ClickFailFatal.xml
├── Form1.cs
├── ClickFail1.xml
├── DrawingBoundsResponse.xml
├── Properties
│ ├── Settings.settings
│ ├── AssemblyInfo.cs
│ ├── Settings.Designer.cs
│ └── Resources.Designer.cs
├── Web References
│ └── ApertureCrap
│ │ ├── Reference.map
│ │ ├── ApScriptingService.disco
│ │ └── ApScriptingService.wsdl
├── app.config
├── Form1.Designer.cs
├── ApertureBounds.cs
└── Aperture.htm
├── SvgEdit
├── Web.Debug.config
├── Web.Release.config
├── Properties
│ └── AssemblyInfo.cs
├── SvgHandler.cs
└── Web.config
├── .gitattributes
└── .gitignore
/ScriptLoader/Scripts/Script3.js:
--------------------------------------------------------------------------------
1 |
2 | var Script3 = { name: "Script III" };
3 |
--------------------------------------------------------------------------------
/ScriptLoader/Scripts/Script4.js:
--------------------------------------------------------------------------------
1 |
2 | var Script4 = { name: "Script IV" };
3 |
--------------------------------------------------------------------------------
/ScriptLoader/Scripts/Script5.js:
--------------------------------------------------------------------------------
1 |
2 | var Script5 = { name: "Script V" };
3 |
--------------------------------------------------------------------------------
/ScriptLoader/Scripts/test1.css:
--------------------------------------------------------------------------------
1 |
2 | html, body
3 | {
4 | background-color: red;
5 | }
6 |
--------------------------------------------------------------------------------
/ScriptLoader/Scripts/test.css:
--------------------------------------------------------------------------------
1 |
2 | html, body
3 | {
4 | background-color: black;
5 | }
6 |
--------------------------------------------------------------------------------
/ScriptLoader/Scripts/test2.css:
--------------------------------------------------------------------------------
1 |
2 | html, body
3 | {
4 | background-color: green;
5 | }
6 |
--------------------------------------------------------------------------------
/netDxf/XDataCode.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ststeiger/SvgConverter/HEAD/netDxf/XDataCode.cs
--------------------------------------------------------------------------------
/netDxf/XDataRecord.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ststeiger/SvgConverter/HEAD/netDxf/XDataRecord.cs
--------------------------------------------------------------------------------
/TestDxfDocument/image.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ststeiger/SvgConverter/HEAD/TestDxfDocument/image.jpg
--------------------------------------------------------------------------------
/DwgToSvgConverter/Libs/WW.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ststeiger/SvgConverter/HEAD/DwgToSvgConverter/Libs/WW.dll
--------------------------------------------------------------------------------
/DxfLayerSeparation/Libs/WW.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ststeiger/SvgConverter/HEAD/DxfLayerSeparation/Libs/WW.dll
--------------------------------------------------------------------------------
/SvgConverter/Libs/PdfSharp.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ststeiger/SvgConverter/HEAD/SvgConverter/Libs/PdfSharp.dll
--------------------------------------------------------------------------------
/DwgToSvgConverter/Libs/WW.GL.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ststeiger/SvgConverter/HEAD/DwgToSvgConverter/Libs/WW.GL.dll
--------------------------------------------------------------------------------
/ScriptLoader/Scripts/Script1.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ststeiger/SvgConverter/HEAD/ScriptLoader/Scripts/Script1.js
--------------------------------------------------------------------------------
/ScriptLoader/Scripts/Script2.js:
--------------------------------------------------------------------------------
1 |
2 | var Script2 = { name: "Script II" };
3 | console.log(Script1.name);
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/DwgToSvgConverter/Libs/WW.Cad.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ststeiger/SvgConverter/HEAD/DwgToSvgConverter/Libs/WW.Cad.dll
--------------------------------------------------------------------------------
/DwgToSvgConverter/Libs/WW.Pdf.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ststeiger/SvgConverter/HEAD/DwgToSvgConverter/Libs/WW.Pdf.dll
--------------------------------------------------------------------------------
/DwgToSvgConverter/Zimmertyp_1_.dwg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ststeiger/SvgConverter/HEAD/DwgToSvgConverter/Zimmertyp_1_.dwg
--------------------------------------------------------------------------------
/DwgToSvgConverter/Zimmertyp_2_.dwg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ststeiger/SvgConverter/HEAD/DwgToSvgConverter/Zimmertyp_2_.dwg
--------------------------------------------------------------------------------
/DxfLayerSeparation/Libs/WW.Cad.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ststeiger/SvgConverter/HEAD/DxfLayerSeparation/Libs/WW.Cad.dll
--------------------------------------------------------------------------------
/DxfLayerSeparation/Libs/WW.GL.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ststeiger/SvgConverter/HEAD/DxfLayerSeparation/Libs/WW.GL.dll
--------------------------------------------------------------------------------
/DxfLayerSeparation/Libs/WW.Pdf.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ststeiger/SvgConverter/HEAD/DxfLayerSeparation/Libs/WW.Pdf.dll
--------------------------------------------------------------------------------
/TestDxfDocument/sample binary.dxf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ststeiger/SvgConverter/HEAD/TestDxfDocument/sample binary.dxf
--------------------------------------------------------------------------------
/DwgToSvgConverter/Libs/WW.License.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ststeiger/SvgConverter/HEAD/DwgToSvgConverter/Libs/WW.License.dll
--------------------------------------------------------------------------------
/netDxf/docs/netDxf Documentation.chm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ststeiger/SvgConverter/HEAD/netDxf/docs/netDxf Documentation.chm
--------------------------------------------------------------------------------
/DxfLayerSeparation/Libs/WW.License.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ststeiger/SvgConverter/HEAD/DxfLayerSeparation/Libs/WW.License.dll
--------------------------------------------------------------------------------
/SvgConverter/Libs/PdfSharp.Charting.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ststeiger/SvgConverter/HEAD/SvgConverter/Libs/PdfSharp.Charting.dll
--------------------------------------------------------------------------------
/ApertureService/0001_GB01_OG14_0000_Aperture.dwg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ststeiger/SvgConverter/HEAD/ApertureService/0001_GB01_OG14_0000_Aperture.dwg
--------------------------------------------------------------------------------
/ApertureService/0001_GB01_OG14_0000_Aperture.dxf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ststeiger/SvgConverter/HEAD/ApertureService/0001_GB01_OG14_0000_Aperture.dxf
--------------------------------------------------------------------------------
/DwgToSvgConverter/Libs/ICSharpCode.SharpZipLib.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ststeiger/SvgConverter/HEAD/DwgToSvgConverter/Libs/ICSharpCode.SharpZipLib.dll
--------------------------------------------------------------------------------
/DxfLayerSeparation/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ApertureService/ClickFailFatal.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Ungültige Daten auf Stammebene. Zeile 1, Position 1.
4 |
5 |
--------------------------------------------------------------------------------
/SvgConverter/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/DwgToSvgConverter/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/DxfLayerSeparation/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/SvgConverter/Form1.cs:
--------------------------------------------------------------------------------
1 |
2 | using System.Windows.Forms;
3 |
4 |
5 | namespace SvgConverter
6 | {
7 |
8 |
9 | public partial class Form1 : Form
10 | {
11 |
12 |
13 | public Form1()
14 | {
15 | InitializeComponent();
16 | }
17 |
18 |
19 | }
20 |
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/SvgConverter/Libs/TextFile1.txt:
--------------------------------------------------------------------------------
1 |
2 | http://superuser.com/questions/381125/how-do-i-convert-an-svg-to-a-pdf-on-linux
3 | Dependencies on Ubuntu Lucid:
4 |
5 | - libcairo.so.2
6 | - libgobject-2.0.so.0
7 | - libgthread-2.0.so.0
8 | - libglib-2.0.so.0
9 | - librsvg-2.so.2
10 |
11 | -----libpthread.so.0
12 | -----libc.so.6
13 |
--------------------------------------------------------------------------------
/SvgConverter/svg/ISVGElement.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Opus
3 | //
4 | // Opus Core
5 | // Mark Final
6 | namespace Opus.Core
7 | {
8 | public interface ISVGElement
9 | {
10 | System.Xml.XmlElement Element
11 | {
12 | get;
13 | set;
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/ApertureService/Form1.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 |
9 | namespace ApertureService
10 | {
11 | public partial class Form1 : Form
12 | {
13 | public Form1()
14 | {
15 | InitializeComponent();
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/DxfLayerSeparation/Form1.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 |
9 | namespace DxfLayerSeparation
10 | {
11 | public partial class Form1 : Form
12 | {
13 | public Form1()
14 | {
15 | InitializeComponent();
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/netDxf/Environment.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace netDxf
3 | {
4 | public class Env
5 | {
6 |
7 | public static bool StrictErrorChecking
8 | {
9 | get
10 | {
11 | return false;
12 | }
13 | }
14 |
15 |
16 | public static string NewLine
17 | {
18 | get
19 | {
20 | return System.Environment.NewLine;
21 | // return "\n";
22 | }
23 | }
24 |
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/DwgToSvgConverter/Form1.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 |
10 | namespace DwgToSvgConverter
11 | {
12 | public partial class Form1 : Form
13 | {
14 | public Form1()
15 | {
16 | InitializeComponent();
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/ApertureService/ClickFail1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | NONE
9 |
10 |
11 |
12 |
13 | Script _DrawingClick started
14 | Drawing 0001_GB01_OG14_0000 Accessed
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/ApertureService/DrawingBoundsResponse.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 195.326569
7 | 225.331299
8 | 134.932205
9 | 165.386215
10 |
11 |
12 |
13 | Script DrawingBounds started
14 | Drawing 0001_GB01_OG14_0000 Accessed
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/ApertureService/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | https://www6.cor-asp.ch/ApWebServices/ApScriptingService.asmx
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ApertureService/Web References/ApertureCrap/Reference.map:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/SvgConverter/svg/SVGDefinitions.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Opus
3 | //
4 | // Opus Core
5 | // Mark Final
6 | namespace Opus.Core
7 | {
8 | public class SVGDefinitions : ISVGElement
9 | {
10 | public SVGDefinitions(ISVGElement parent)
11 | {
12 | System.Xml.XmlElement parentElement = parent.Element;
13 | System.Xml.XmlElement element = parentElement.OwnerDocument.CreateElement("defs");
14 | parentElement.AppendChild(element);
15 |
16 | (this as ISVGElement).Element = element;
17 | }
18 |
19 | System.Xml.XmlElement ISVGElement.Element
20 | {
21 | get;
22 | set;
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/ApertureService/Web References/ApertureCrap/ApScriptingService.disco:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/SvgConverter/svg/SVG.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Opus
3 | //
4 | // Opus Core
5 | // Mark Final
6 | namespace Opus.Core
7 | {
8 | public class SVG : ISVGElement
9 | {
10 | public SVG(System.Xml.XmlDocument document, string SVGnamespace, string version)
11 | {
12 | System.Xml.XmlElement element = document.CreateElement("svg", SVGnamespace);
13 |
14 | System.Xml.XmlAttribute attribute = document.CreateAttribute("version");;
15 | attribute.Value = version;
16 | element.Attributes.Append(attribute);
17 |
18 | (this as ISVGElement).Element = element;
19 | }
20 |
21 | System.Xml.XmlElement ISVGElement.Element
22 | {
23 | get;
24 | set;
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/netDxf/Entities/AttributeFlags.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace netDxf.Entities
4 | {
5 | ///Attribute flags.
6 | [Flags]
7 | public enum AttributeFlags
8 | {
9 | ///
10 | /// Attribute is visible.
11 | ///
12 | Visible = 0,
13 | ///
14 | /// Attribute is invisible (does not appear).
15 | ///
16 | Hidden = 1,
17 | ///
18 | /// This is a constant attribute.
19 | ///
20 | Constant = 2,
21 | ///
22 | /// Verification is required on input of this attribute.
23 | ///
24 | Verify = 4,
25 | ///
26 | /// Attribute is preset (no prompt during insertion).
27 | ///
28 | Predefined = 8
29 | }
30 | }
--------------------------------------------------------------------------------
/ApertureService/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
12 | https://www6.cor-asp.ch/ApWebServices/ApScriptingService.asmx
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/DwgToSvgConverter/Helpers.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace DwgToSvgConverter
3 | {
4 |
5 |
6 | public class StorageHelper
7 | {
8 |
9 |
10 | public static string GetDesktopPath(string filename)
11 | {
12 | string desk = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Desktop);
13 | return System.IO.Path.Combine(desk, filename);
14 | } // End Function GetDesktopPath
15 |
16 |
17 | public static bool DriveExists(string name)
18 | {
19 | System.IO.DriveInfo[] drives = System.IO.DriveInfo.GetDrives();
20 |
21 | // System.IO.DriveInfo di = new System.IO.DriveInfo("");
22 |
23 | foreach (System.IO.DriveInfo di in drives)
24 | {
25 | // System.Console.WriteLine(di.Name);
26 | if (System.StringComparer.InvariantCultureIgnoreCase.Equals(name, di.Name))
27 | return true;
28 | } // Next di
29 |
30 | return false;
31 | } // End Function DriveExists
32 |
33 |
34 | } // End Class StorageHelper
35 |
36 |
37 | } // End Namespace DwgToSvgConverter
38 |
--------------------------------------------------------------------------------
/SvgConverter/svg/SVGGroup.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Opus
3 | //
4 | // Opus Core
5 | // Mark Final
6 | namespace Opus.Core
7 | {
8 | public class SVGGroup : ISVGElement
9 | {
10 | public SVGGroup(ISVGElement parent, string id)
11 | {
12 | System.Xml.XmlElement parentElement = parent.Element;
13 | System.Xml.XmlDocument document = parentElement.OwnerDocument;
14 | System.Xml.XmlElement element = document.CreateElement("g");
15 | parentElement.AppendChild(element);
16 |
17 | System.Xml.XmlAttribute idAttr = document.CreateAttribute("id");
18 | idAttr.Value = id;
19 | element.Attributes.Append(idAttr);
20 |
21 | (this as ISVGElement).Element = element;
22 | }
23 |
24 | System.Xml.XmlElement ISVGElement.Element
25 | {
26 | get;
27 | set;
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/SvgConverter/svg/SVGMarker.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Opus
3 | //
4 | // Opus Core
5 | // Mark Final
6 | namespace Opus.Core
7 | {
8 | public class SVGMarker : ISVGElement
9 | {
10 | public SVGMarker(ISVGElement parent, string id)
11 | {
12 | System.Xml.XmlElement parentElement = parent.Element;
13 | System.Xml.XmlDocument document = parentElement.OwnerDocument;
14 | System.Xml.XmlElement element = document.CreateElement("marker");
15 | parentElement.AppendChild(element);
16 |
17 | System.Xml.XmlAttribute idAttr = document.CreateAttribute("id");
18 | idAttr.Value = id;
19 | element.Attributes.Append(idAttr);
20 |
21 | (this as ISVGElement).Element = element;
22 | }
23 |
24 | System.Xml.XmlElement ISVGElement.Element
25 | {
26 | get;
27 | set;
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/SvgConverter/Program.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace SvgConverter
3 | {
4 |
5 |
6 | static class Program
7 | {
8 |
9 |
10 | ///
11 | /// Der Haupteinstiegspunkt für die Anwendung.
12 | ///
13 | [System.STAThread]
14 | static void Main()
15 | {
16 | #if false
17 | System.Windows.Forms.Application.EnableVisualStyles();
18 | System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false);
19 | System.Windows.Forms.Application.Run(new Form1());
20 | return;
21 | #endif
22 |
23 | SvgToPdf SvgToPdfInstance = new SvgToPdf ();
24 | SvgToPdfInstance.CreatePdf ();
25 |
26 | // MainClass.Convert();
27 |
28 | System.Console.WriteLine(System.Environment.NewLine);
29 | System.Console.WriteLine(@" --- Press any key to continue --- ");
30 | System.Console.ReadKey();
31 | } // End Sub Main
32 |
33 |
34 | } // End Class Program
35 |
36 |
37 | } // End Namespace SvgConverter
38 |
--------------------------------------------------------------------------------
/SvgConverter/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.34014
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace SvgConverter.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/DwgToSvgConverter/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.34014
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace DwgToSvgConverter.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/DxfLayerSeparation/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Dieser Code wurde von einem Tool generiert.
4 | // Laufzeitversion:4.0.30319.34209
5 | //
6 | // Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
7 | // der Code erneut generiert wird.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace DxfLayerSeparation.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/ScriptLoader/Web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
15 |
16 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/SvgConverter/drawing.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
40 |
--------------------------------------------------------------------------------
/SvgConverter/Form1.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace SvgConverter
2 | {
3 | partial class Form1
4 | {
5 | ///
6 | /// Erforderliche Designervariable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Verwendete Ressourcen bereinigen.
12 | ///
13 | /// True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Vom Windows Form-Designer generierter Code
24 |
25 | ///
26 | /// Erforderliche Methode für die Designerunterstützung.
27 | /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.components = new System.ComponentModel.Container();
32 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
33 | this.Text = "Form1";
34 | }
35 |
36 | #endregion
37 | }
38 | }
39 |
40 |
--------------------------------------------------------------------------------
/ApertureService/Form1.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace ApertureService
2 | {
3 | partial class Form1
4 | {
5 | ///
6 | /// Erforderliche Designervariable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Verwendete Ressourcen bereinigen.
12 | ///
13 | /// True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Vom Windows Form-Designer generierter Code
24 |
25 | ///
26 | /// Erforderliche Methode für die Designerunterstützung.
27 | /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.components = new System.ComponentModel.Container();
32 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
33 | this.Text = "Form1";
34 | }
35 |
36 | #endregion
37 | }
38 | }
39 |
40 |
--------------------------------------------------------------------------------
/DwgToSvgConverter/Form1.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace DwgToSvgConverter
2 | {
3 | partial class Form1
4 | {
5 | ///
6 | /// Erforderliche Designervariable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Verwendete Ressourcen bereinigen.
12 | ///
13 | /// True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Vom Windows Form-Designer generierter Code
24 |
25 | ///
26 | /// Erforderliche Methode für die Designerunterstützung.
27 | /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.components = new System.ComponentModel.Container();
32 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
33 | this.Text = "Form1";
34 | }
35 |
36 | #endregion
37 | }
38 | }
39 |
40 |
--------------------------------------------------------------------------------
/DxfLayerSeparation/Form1.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace DxfLayerSeparation
2 | {
3 | partial class Form1
4 | {
5 | ///
6 | /// Erforderliche Designervariable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Verwendete Ressourcen bereinigen.
12 | ///
13 | /// True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Vom Windows Form-Designer generierter Code
24 |
25 | ///
26 | /// Erforderliche Methode für die Designerunterstützung.
27 | /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.components = new System.ComponentModel.Container();
32 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
33 | this.Text = "Form1";
34 | }
35 |
36 | #endregion
37 | }
38 | }
39 |
40 |
--------------------------------------------------------------------------------
/SvgEdit/Web.Debug.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
29 |
30 |
--------------------------------------------------------------------------------
/ScriptLoader/Web.Debug.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
29 |
30 |
--------------------------------------------------------------------------------
/SvgEdit/Web.Release.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
19 |
30 |
31 |
--------------------------------------------------------------------------------
/ScriptLoader/Web.Release.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
19 |
30 |
31 |
--------------------------------------------------------------------------------
/TestDxfDocument/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("TestDxfDocument")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("TestDxfDocument")]
13 | [assembly: AssemblyCopyright("Daniel Carvajal © 2014")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("f43eb3ea-c8f5-4b40-84a8-9a0a0faef3e4")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("0.0.0.0")]
36 | [assembly: AssemblyFileVersion("0.0.0.0")]
37 |
--------------------------------------------------------------------------------
/netDxf/Entities/HatchFillType.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2014 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2014 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | namespace netDxf.Entities
24 | {
25 | ///
26 | /// Hatch pattern fill type.
27 | ///
28 | public enum HatchFillType
29 | {
30 | ///
31 | /// Pattern fill.
32 | ///
33 | PatternFill = 0,
34 |
35 | ///
36 | /// Solid fill.
37 | ///
38 | SolidFill = 1
39 | }
40 | }
--------------------------------------------------------------------------------
/netDxf/Objects/DictionaryClonningFlag.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2014 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2014 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | namespace netDxf.Objects
24 | {
25 | ///
26 | /// Duplicate record cloning flag (determines how to merge duplicate entries).
27 | ///
28 | public enum DictionaryClonningFlag
29 | {
30 | NotApplicable = 0,
31 | KeepExisting = 1,
32 | UseClone = 2,
33 | XrefName = 3,
34 | Name = 4,
35 | UnmangleName = 5
36 | }
37 | }
--------------------------------------------------------------------------------
/netDxf/Objects/ImageDisplayQuality.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2014 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2014 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | namespace netDxf.Objects
24 | {
25 | ///
26 | /// Image display quality (screen only).
27 | ///
28 | public enum ImageDisplayQuality
29 | {
30 | ///
31 | /// Draft quality.
32 | ///
33 | Draft = 0,
34 | ///
35 | /// High quality.
36 | ///
37 | High = 1
38 | }
39 | }
--------------------------------------------------------------------------------
/netDxf/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("netDxf")]
9 | [assembly: AssemblyDescription(".net Dxf Reader-Writer")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("netDxf")]
13 | [assembly: AssemblyCopyright("Daniel Carvajal © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("4b9680da-0121-489f-8a4f-e15ab0b04d6e")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("2015.4.8.1457")]
36 | [assembly: AssemblyFileVersion("2015.4.8.1457")]
37 |
--------------------------------------------------------------------------------
/SvgEdit/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // Allgemeine Informationen über eine Assembly werden über die folgenden
6 | // Attribute gesteuert. Ändern Sie diese Attributwerte, um die
7 | // Assemblyinformationen zu ändern.
8 | [assembly: AssemblyTitle("SvgEdit")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("SvgEdit")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar
18 | // für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von
19 | // COM aus zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest.
20 | [assembly: ComVisible(false)]
21 |
22 | // Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird.
23 | [assembly: Guid("cb321ee8-b2d3-4f6c-8fb6-e22031b2174e")]
24 |
25 | // Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
26 | //
27 | // Hauptversion
28 | // Nebenversion
29 | // Buildnummer
30 | // Revision
31 | //
32 | // Sie können alle Werte angeben oder die standardmäßigen Revisions- und Buildnummern
33 | // übernehmen, indem Sie "*" wie folgt verwenden:
34 | [assembly: AssemblyVersion("2015.3.30.1330")]
35 | [assembly: AssemblyFileVersion("2015.3.30.1330")]
36 |
--------------------------------------------------------------------------------
/ScriptLoader/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // Allgemeine Informationen über eine Assembly werden über die folgenden
6 | // Attribute gesteuert. Ändern Sie diese Attributwerte, um die
7 | // Assemblyinformationen zu ändern.
8 | [assembly: AssemblyTitle("ScriptLoader")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("ScriptLoader")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar
18 | // für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von
19 | // COM aus zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest.
20 | [assembly: ComVisible(false)]
21 |
22 | // Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird.
23 | [assembly: Guid("9bf21ef6-545f-4116-a4f3-516bb9ca5dd1")]
24 |
25 | // Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
26 | //
27 | // Hauptversion
28 | // Nebenversion
29 | // Buildnummer
30 | // Revision
31 | //
32 | // Sie können alle Werte angeben oder die standardmäßigen Revisions- und Buildnummern
33 | // übernehmen, indem Sie "*" wie folgt verwenden:
34 | [assembly: AssemblyVersion("2015.12.21.1323")]
35 | [assembly: AssemblyFileVersion("2015.12.21.1323")]
36 |
--------------------------------------------------------------------------------
/ScriptLoader/Scripts/OldScriptLoader.js:
--------------------------------------------------------------------------------
1 |
2 | function loadRequiredFiles(callback)
3 | {
4 | var scripts = ['Scripts/Script2.js', 'Scripts/Script1.js'];
5 | var styles = ['Scripts/test1.css'];
6 | var filesloaded = 0;
7 | var filestoload = scripts.length + styles.length;
8 |
9 | function finishLoad()
10 | {
11 | if (callback === null)
12 | return;
13 |
14 | if (filesloaded === filestoload)
15 | {
16 | callback();
17 | }
18 | }
19 |
20 |
21 | for (var i = 0; i < scripts.length; i++)
22 | {
23 | console.log('Loading script ' + scripts[i]);
24 | var script = document.createElement('script');
25 | script.type = 'text/javascript';
26 | script.src = scripts[i];
27 | script.onload = function ()
28 | {
29 | console.log('Loaded script');
30 | console.log(this);
31 | filesloaded++; // (This means increment, i.e. add one)
32 | finishLoad();
33 | };
34 | document.head.appendChild(script);
35 | }
36 |
37 | for (var i = 0; i < styles.length; i++)
38 | {
39 | console.log('Loading style ' + styles[i]);
40 | var style = document.createElement('link');
41 | style.rel = 'stylesheet';
42 | style.href = styles[i];
43 | style.type = 'text/css';
44 | style.onload = function ()
45 | {
46 | console.log('Loaded style');
47 | console.log(this);
48 | filesloaded++;
49 | finishLoad();
50 | };
51 | document.head.appendChild(style);
52 | }
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/netDxf/Entities/MLineJustification.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2014 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2014 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | namespace netDxf.Entities
24 | {
25 | ///
26 | /// Justification.
27 | ///
28 | public enum MLineJustification
29 | {
30 | ///
31 | /// Top.
32 | ///
33 | Top = 0,
34 | ///
35 | /// Zero.
36 | ///
37 | Zero = 1,
38 | ///
39 | /// Bottom.
40 | ///
41 | Bottom = 2
42 | }
43 | }
--------------------------------------------------------------------------------
/netDxf/Entities/MTextLineSpacingStyle.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2012 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2012 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | namespace netDxf.Entities
24 | {
25 | ///
26 | /// MText line spacing style.
27 | ///
28 | public enum MTextLineSpacingStyle
29 | {
30 | ///
31 | /// At least (taller characters will override)
32 | ///
33 | AtLeast = 1,
34 | ///
35 | /// Exact (taller characters will not override)
36 | ///
37 | Exact = 2
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/netDxf/Header/AttMode.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2013 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2013 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | namespace netDxf.Header
24 | {
25 | ///
26 | /// Defines the attribute visibility.
27 | ///
28 | public enum AttMode
29 | {
30 | ///
31 | /// None.
32 | ///
33 | None = 0,
34 | ///
35 | /// Normal.
36 | ///
37 | Normal = 1,
38 | ///
39 | /// All.
40 | ///
41 | All = 2
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/netDxf/Objects/PlotPaperUnits.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2014 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2014 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | namespace netDxf.Objects
24 | {
25 | ///
26 | /// Plot paper units.
27 | ///
28 | public enum PlotPaperUnits
29 | {
30 | ///
31 | /// Inches.
32 | ///
33 | Inches = 0,
34 | ///
35 | /// Milimiters.
36 | ///
37 | Milimeters = 1,
38 | ///
39 | /// Pixels.
40 | ///
41 | Pixels = 2
42 | }
43 | }
--------------------------------------------------------------------------------
/SvgConverter/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // Allgemeine Informationen über eine Assembly werden über die folgenden
6 | // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
7 | // die mit einer Assembly verknüpft sind.
8 | [assembly: AssemblyTitle("SvgConverter")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("SvgConverter")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar
18 | // für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von
19 | // COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest.
20 | [assembly: ComVisible(false)]
21 |
22 | // Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
23 | [assembly: Guid("740a925f-6ede-4d06-a428-5d0c8a2848cb")]
24 |
25 | // Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
26 | //
27 | // Hauptversion
28 | // Nebenversion
29 | // Buildnummer
30 | // Revision
31 | //
32 | // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
33 | // übernehmen, indem Sie "*" eingeben:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("2015.4.8.1457")]
36 | [assembly: AssemblyFileVersion("2015.4.8.1457")]
37 |
--------------------------------------------------------------------------------
/ApertureService/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // Allgemeine Informationen über eine Assembly werden über die folgenden
6 | // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
7 | // die mit einer Assembly verknüpft sind.
8 | [assembly: AssemblyTitle("ApertureService")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("ApertureService")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar
18 | // für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von
19 | // COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest.
20 | [assembly: ComVisible(false)]
21 |
22 | // Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
23 | [assembly: Guid("fa421bad-b6fb-4441-bdb3-b8a83b046a98")]
24 |
25 | // Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
26 | //
27 | // Hauptversion
28 | // Nebenversion
29 | // Buildnummer
30 | // Revision
31 | //
32 | // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
33 | // übernehmen, indem Sie "*" eingeben:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("2016.4.11.0945")]
36 | [assembly: AssemblyFileVersion("2016.4.11.0945")]
37 |
--------------------------------------------------------------------------------
/netDxf/Entities/HatchType.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2014 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2014 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | namespace netDxf.Entities
24 | {
25 | ///
26 | /// Hatch pattern type.
27 | ///
28 | public enum HatchType
29 | {
30 | ///
31 | /// User defined.
32 | ///
33 | UserDefined = 0,
34 |
35 | ///
36 | /// Predefined.
37 | ///
38 | Predefined = 1,
39 |
40 | ///
41 | /// Custom.
42 | ///
43 | Custom = 2
44 | }
45 | }
--------------------------------------------------------------------------------
/DwgToSvgConverter/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // Allgemeine Informationen über eine Assembly werden über die folgenden
6 | // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
7 | // die mit einer Assembly verknüpft sind.
8 | [assembly: AssemblyTitle("DwgToSvgConverter")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("DwgToSvgConverter")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar
18 | // für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von
19 | // COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest.
20 | [assembly: ComVisible(false)]
21 |
22 | // Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
23 | [assembly: Guid("6d670d8a-8eb4-4670-9764-9e554b5f8860")]
24 |
25 | // Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
26 | //
27 | // Hauptversion
28 | // Nebenversion
29 | // Buildnummer
30 | // Revision
31 | //
32 | // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
33 | // übernehmen, indem Sie "*" eingeben:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("2016.9.13.0946")]
36 | [assembly: AssemblyFileVersion("2016.9.13.0946")]
37 |
--------------------------------------------------------------------------------
/DxfLayerSeparation/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // Allgemeine Informationen über eine Assembly werden über die folgenden
6 | // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
7 | // die mit einer Assembly verknüpft sind.
8 | [assembly: AssemblyTitle("DxfLayerSeparation")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("DxfLayerSeparation")]
13 | [assembly: AssemblyCopyright("Copyright © 2016")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar
18 | // für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von
19 | // COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest.
20 | [assembly: ComVisible(false)]
21 |
22 | // Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
23 | [assembly: Guid("a76c87c1-866c-43af-b04b-401ce25d7687")]
24 |
25 | // Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
26 | //
27 | // Hauptversion
28 | // Nebenversion
29 | // Buildnummer
30 | // Revision
31 | //
32 | // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
33 | // übernehmen, indem Sie "*" eingeben:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("2016.4.11.1335")]
36 | [assembly: AssemblyFileVersion("2016.4.11.1335")]
37 |
--------------------------------------------------------------------------------
/netDxf/Collections/EntityCollectionEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using netDxf.Entities;
3 |
4 | namespace netDxf.Collections
5 | {
6 | ///
7 | /// Represents the arguments thrown by the EntityCollection events.
8 | ///
9 | public class EntityCollectionEventArgs :
10 | EventArgs
11 | {
12 | #region private fields
13 |
14 | private readonly EntityObject item;
15 | private bool cancel;
16 |
17 | #endregion
18 |
19 | #region constructor
20 |
21 | ///
22 | /// Initializes a new instance of EntityCollectionEventArgs.
23 | ///
24 | /// Item that is being added or removed from the collection.
25 | public EntityCollectionEventArgs(EntityObject item)
26 | {
27 | this.item = item;
28 | this.cancel = false;
29 | }
30 |
31 | #endregion
32 |
33 | #region public properties
34 |
35 | ///
36 | /// Get the item that is being added or removed from the collection.
37 | ///
38 | public EntityObject Item
39 | {
40 | get { return this.item; }
41 | }
42 |
43 | ///
44 | /// Gets or sets if the operation must be canceled.
45 | ///
46 | /// This property is used by the OnBeforeAdd and OnBeforeRemove events to cancel the add or remove operation.
47 | public bool Cancel
48 | {
49 | get { return this.cancel; }
50 | set { this.cancel = value; }
51 | }
52 |
53 | #endregion
54 | }
55 | }
--------------------------------------------------------------------------------
/SvgConverter/svg/SVGArrow.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Opus
3 | //
4 | // Opus Core
5 | // Mark Final
6 | namespace Opus.Core
7 | {
8 | public class SVGArrow : ISVGElement
9 | {
10 | public SVGArrow(ISVGElement parent, int x1, int y1, int x2, int y2, string units)
11 | {
12 | System.Xml.XmlElement parentElement = parent.Element;
13 | System.Xml.XmlDocument document = parentElement.OwnerDocument;
14 | System.Xml.XmlElement element = document.CreateElement("line");
15 | parentElement.AppendChild(element);
16 |
17 | System.Xml.XmlAttribute x1Attr = document.CreateAttribute("x1");
18 | x1Attr.Value = System.String.Format("{0}{1}", x1, units);
19 | element.Attributes.Append(x1Attr);
20 |
21 | System.Xml.XmlAttribute y1Attr = document.CreateAttribute("y1");
22 | y1Attr.Value = System.String.Format("{0}{1}", y1, units);
23 | element.Attributes.Append(y1Attr);
24 |
25 | System.Xml.XmlAttribute x2Attr = document.CreateAttribute("x2");
26 | x2Attr.Value = System.String.Format("{0}{1}", x2, units);
27 | element.Attributes.Append(x2Attr);
28 |
29 | System.Xml.XmlAttribute y2Attr = document.CreateAttribute("y2");
30 | y2Attr.Value = System.String.Format("{0}{1}", y2, units);
31 | element.Attributes.Append(y2Attr);
32 |
33 | (this as ISVGElement).Element = element;
34 | }
35 |
36 | System.Xml.XmlElement ISVGElement.Element
37 | {
38 | get;
39 | set;
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/netDxf/Entities/HatchStyle.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2014 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2014 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | namespace netDxf.Entities
24 | {
25 | ///
26 | /// Hatch pattern style.
27 | ///
28 | public enum HatchStyle
29 | {
30 | ///
31 | /// Hatch “odd parity” area.
32 | ///
33 | Normal = 0,
34 |
35 | ///
36 | /// Hatch outermost area only.
37 | ///
38 | Outer = 1,
39 |
40 | ///
41 | /// Hatch through entire area.
42 | ///
43 | Ignore = 2
44 | }
45 | }
--------------------------------------------------------------------------------
/netDxf/Entities/PolylineSmoothType.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2009 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2009 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | namespace netDxf.Entities
24 | {
25 | ///
26 | /// Defines the curves type.
27 | ///
28 | public enum PolylineSmoothType
29 | {
30 | ///
31 | /// No smooth curve.
32 | ///
33 | NoSmooth = 0,
34 | ///
35 | /// Quadratic B-spline curve.
36 | ///
37 | Quadratic = 5,
38 | ///
39 | /// Cubic B-spline curve.
40 | ///
41 | Cubic = 6,
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/SvgConverter/svg/SVGRect.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Opus
3 | //
4 | // Opus Core
5 | // Mark Final
6 | namespace Opus.Core
7 | {
8 | public class SVGRect : ISVGElement
9 | {
10 | public SVGRect(ISVGElement parent, int x, int y, int width, int height, string units)
11 | {
12 | System.Xml.XmlElement parentElement = parent.Element;
13 | System.Xml.XmlDocument document = parentElement.OwnerDocument;
14 | System.Xml.XmlElement element = document.CreateElement("rect");
15 | parentElement.AppendChild(element);
16 |
17 | System.Xml.XmlAttribute xAttr = document.CreateAttribute("x");
18 | xAttr.Value = System.String.Format("{0}{1}", x, units);
19 | element.Attributes.Append(xAttr);
20 |
21 | System.Xml.XmlAttribute yAttr = document.CreateAttribute("y");
22 | yAttr.Value = System.String.Format("{0}{1}", y, units);
23 | element.Attributes.Append(yAttr);
24 |
25 | System.Xml.XmlAttribute widthAttr = document.CreateAttribute("width");
26 | widthAttr.Value = System.String.Format("{0}{1}", width, units);
27 | element.Attributes.Append(widthAttr);
28 |
29 | System.Xml.XmlAttribute heightAttr = document.CreateAttribute("height");
30 | heightAttr.Value = System.String.Format("{0}{1}", height, units);
31 | element.Attributes.Append(heightAttr);
32 |
33 | (this as ISVGElement).Element = element;
34 | }
35 |
36 | System.Xml.XmlElement ISVGElement.Element
37 | {
38 | get;
39 | set;
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/netDxf/Entities/OrdinateDimensionAxis.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2014 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2014 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | namespace netDxf.Entities
24 | {
25 | ///
26 | /// Defines the axis that measures the ordinate dimension.
27 | ///
28 | public enum OrdinateDimensionAxis
29 | {
30 | ///
31 | /// The ordinate dimension measure the X distance and the dimension line is aligned to the Y axis.
32 | ///
33 | X,
34 | ///
35 | /// The ordinate dimension measure the Y distance and the dimension line is aligned to the X axis.
36 | ///
37 | Y
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/SvgConverter/svg/SVGAttributes.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Opus
3 | //
4 | // Opus Core
5 | // Mark Final
6 | namespace Opus.Core
7 | {
8 | public static class SVGAttributes
9 | {
10 | private static System.Xml.XmlAttribute GetAttribute(ISVGElement svgElement, string name)
11 | {
12 | System.Xml.XmlElement element = (svgElement as ISVGElement).Element;
13 | System.Xml.XmlDocument document = element.OwnerDocument;
14 | System.Xml.XmlAttribute attribute = element.Attributes[name];
15 | if (null == attribute)
16 | {
17 | attribute = document.CreateAttribute(name);
18 | element.Attributes.Append(attribute);
19 | }
20 |
21 | return attribute;
22 | }
23 |
24 | public static System.Xml.XmlAttribute Fill(ISVGElement svgElement, string value)
25 | {
26 | System.Xml.XmlAttribute attribute = GetAttribute(svgElement, "fill");
27 | attribute.Value = value;
28 | return attribute;
29 | }
30 |
31 | public static System.Xml.XmlAttribute Stroke(ISVGElement svgElement, string value)
32 | {
33 | System.Xml.XmlAttribute attribute = GetAttribute(svgElement, "stroke");
34 | attribute.Value = value;
35 | return attribute;
36 | }
37 |
38 | public static System.Xml.XmlAttribute StrokeWidth(ISVGElement svgElement, int value)
39 | {
40 | System.Xml.XmlAttribute attribute = GetAttribute(svgElement, "stroke-width");
41 | attribute.Value = value.ToString();
42 | return attribute;
43 | }
44 | }
45 | }
--------------------------------------------------------------------------------
/SvgConverter/svg/SVGText.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Opus
3 | //
4 | // Opus Core
5 | // Mark Final
6 | namespace Opus.Core
7 | {
8 | public class SVGText : ISVGElement
9 | {
10 | public SVGText(ISVGElement parent, string text, int x, int y, int width, int height, string units)
11 | {
12 | System.Xml.XmlElement parentElement = parent.Element;
13 | System.Xml.XmlDocument document = parentElement.OwnerDocument;
14 | System.Xml.XmlElement element = document.CreateElement("text");
15 | parentElement.AppendChild(element);
16 |
17 | element.InnerText = text;
18 |
19 | System.Xml.XmlAttribute xAttr = document.CreateAttribute("x");
20 | xAttr.Value = System.String.Format("{0}{1}", x, units);
21 | element.Attributes.Append(xAttr);
22 |
23 | System.Xml.XmlAttribute yAttr = document.CreateAttribute("y");
24 | yAttr.Value = System.String.Format("{0}{1}", y, units);
25 | element.Attributes.Append(yAttr);
26 |
27 | System.Xml.XmlAttribute widthAttr = document.CreateAttribute("width");
28 | widthAttr.Value = System.String.Format("{0}{1}", width, units);
29 | element.Attributes.Append(widthAttr);
30 |
31 | System.Xml.XmlAttribute heightAttr = document.CreateAttribute("height");
32 | heightAttr.Value = System.String.Format("{0}{1}", height, units);
33 | element.Attributes.Append(heightAttr);
34 |
35 | (this as ISVGElement).Element = element;
36 | }
37 |
38 | System.Xml.XmlElement ISVGElement.Element
39 | {
40 | get;
41 | set;
42 | }
43 | }
44 | }
--------------------------------------------------------------------------------
/netDxf/Objects/PlotRotation.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2014 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2014 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | namespace netDxf.Objects
24 | {
25 | ///
26 | /// Plot rotation
27 | ///
28 | public enum PlotRotation
29 | {
30 | ///
31 | /// No rotation.
32 | ///
33 | NoRotation = 0,
34 | ///
35 | /// 90 degrees counterclockwise.
36 | ///
37 | Degrees90 = 1,
38 | ///
39 | /// Upside-downd.
40 | ///
41 | Degrees180 = 2,
42 | ///
43 | /// 90 degrees clockwise.
44 | ///
45 | Degrees270 = 3
46 | }
47 | }
--------------------------------------------------------------------------------
/netDxf/Entities/MLineFlags.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2014 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2014 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | using System;
24 |
25 | namespace netDxf.Entities
26 | {
27 | ///
28 | /// Flags (bit-coded values).
29 | ///
30 | [Flags]
31 | internal enum MLineFlags
32 | {
33 | ///
34 | /// Has at least one vertex (code 72 is greater than 0).
35 | ///
36 | Has = 1,
37 | ///
38 | /// Closed.
39 | ///
40 | Closed = 2,
41 | ///
42 | /// Suppress start caps.
43 | ///
44 | NoStartCaps = 4,
45 | ///
46 | /// Suppress end caps.
47 | ///
48 | NoEndCaps = 8
49 | }
50 | }
--------------------------------------------------------------------------------
/ApertureService/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Dieser Code wurde von einem Tool generiert.
4 | // Laufzeitversion:4.0.30319.34014
5 | //
6 | // Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
7 | // der Code erneut generiert wird.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace ApertureService.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 |
26 | [global::System.Configuration.ApplicationScopedSettingAttribute()]
27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
28 | [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)]
29 | [global::System.Configuration.DefaultSettingValueAttribute("https://www6.cor-asp.ch/ApWebServices/ApScriptingService.asmx")]
30 | public string ApertureService_ApertureCrap_ApScriptingService {
31 | get {
32 | return ((string)(this["ApertureService_ApertureCrap_ApScriptingService"]));
33 | }
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/netDxf/Entities/ImageDisplayFlags.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2013 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2013 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | using System;
24 |
25 | namespace netDxf.Entities
26 | {
27 | ///
28 | /// Image display options.
29 | ///
30 | [Flags]
31 | public enum ImageDisplayFlags
32 | {
33 | ///
34 | /// Show image.
35 | ///
36 | ShowImage = 1,
37 | ///
38 | /// Show image when not aligned with screen.
39 | ///
40 | ShowImageWhenNotAlignedWithScreen = 2,
41 | ///
42 | /// Use clipping boundary.
43 | ///
44 | UseClippingBoundary = 4,
45 | ///
46 | /// Transparency on.
47 | ///
48 | TransparencyOn = 8
49 | }
50 | }
--------------------------------------------------------------------------------
/netDxf/Objects/ImageDefReactor.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2013 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2013 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | namespace netDxf.Objects
24 | {
25 | internal class ImageDefReactor :
26 | DxfObject
27 | {
28 |
29 | #region private fields
30 |
31 | private string imageHandle;
32 |
33 | #endregion
34 |
35 | #region constructors
36 |
37 | public ImageDefReactor(string imageHandle)
38 | : base(DxfObjectCode.ImageDefReactor)
39 | {
40 | this.imageHandle = imageHandle;
41 | }
42 |
43 | #endregion
44 |
45 | #region public properties
46 |
47 | public string ImageHandle
48 | {
49 | get { return imageHandle; }
50 | set { imageHandle = value; }
51 | }
52 |
53 | #endregion
54 |
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/netDxf/Objects/SupportedImageFormats.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2014 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2014 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | namespace netDxf.Objects
24 | {
25 | ///
26 | /// Supported image formats.
27 | ///
28 | ///
29 | /// These are the image formats in common between the net framework and AutoCAD.
30 | ///
31 | public enum SupportedImageFormats
32 | {
33 | ///
34 | /// Bmp image format.
35 | ///
36 | Bmp,
37 | ///
38 | /// Jpg image format.
39 | ///
40 | Jpeg,
41 | ///
42 | /// Png image format.
43 | ///
44 | Png,
45 | ///
46 | /// Tiff image format.
47 | ///
48 | Tiff
49 | }
50 | }
--------------------------------------------------------------------------------
/netDxf/ICodeValueReader.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2014 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2014 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | namespace netDxf
24 | {
25 | internal interface ICodeValueReader
26 | {
27 | ///
28 | /// Gets the dxf code.
29 | ///
30 | short Code { get; }
31 |
32 | ///
33 | /// Gets the value.
34 | ///
35 | object Value { get; }
36 |
37 | ///
38 | /// Gets the line that has been read.
39 | ///
40 | long CurrentPosition { get; }
41 |
42 | void Next();
43 | byte ReadByte();
44 | byte[] ReadBytes();
45 | short ReadShort();
46 | int ReadInt();
47 | long ReadLong();
48 | bool ReadBool();
49 | double ReadDouble();
50 | string ReadString();
51 |
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/netDxf/Symbols.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2009 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2009 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | namespace netDxf
24 | {
25 | ///
26 | /// Symbols for dxf text strings.
27 | ///
28 | ///
29 | /// These special strings translates to symbols in AutoCad.
30 | ///
31 | public static class Symbols
32 | {
33 | ///
34 | /// Text string that shows as a diameter 'Ø' character.
35 | ///
36 | public const string Diameter = "%%c";
37 |
38 | ///
39 | /// Text string that shows as a degree '°' character.
40 | ///
41 | public const string Degree = "%%d";
42 |
43 | ///
44 | /// Text string that shows as a plus-minus '±' character.
45 | ///
46 | public const string PlusMinus = "%%p";
47 | }
48 | }
--------------------------------------------------------------------------------
/netDxf/Entities/Face3dEdgeFlags.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2014 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2014 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | using System;
24 |
25 | namespace netDxf.Entities
26 | {
27 | ///
28 | /// Defines which edges are hidden.
29 | ///
30 | [Flags]
31 | public enum Face3dEdgeFlags
32 | {
33 | ///
34 | /// All edges are visible (default).
35 | ///
36 | Visibles = 0,
37 | ///
38 | /// First edge is invisible.
39 | ///
40 | First = 1,
41 | ///
42 | /// Second edge is invisible.
43 | ///
44 | Second = 2,
45 | ///
46 | /// Third edge is invisible.
47 | ///
48 | Third = 4,
49 | ///
50 | /// Fourth edge is invisible.
51 | ///
52 | Fourth = 8
53 | }
54 | }
--------------------------------------------------------------------------------
/netDxf/ICodeValueWriter.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2014 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2014 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | namespace netDxf
24 | {
25 | internal interface ICodeValueWriter
26 | {
27 | ///
28 | /// Gets the dxf code.
29 | ///
30 | short Code { get; }
31 |
32 | ///
33 | /// Gets the value.
34 | ///
35 | object Value { get; }
36 |
37 | ///
38 | /// Gets the line that has been written.
39 | ///
40 | long CurrentPosition { get; }
41 |
42 | void Write(short code, object value);
43 | void WriteByte(byte value);
44 | void WriteBytes(byte[] value);
45 | void WriteShort(short value);
46 | void WriteInt(int value);
47 | void WriteLong(long value);
48 | void WriteBool(bool value);
49 | void WriteDouble(double value);
50 | void WriteString(string value);
51 | void Flush();
52 |
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/netDxf/Entities/HatchBoundaryPathTypeFlag.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2014 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2014 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | using System;
24 |
25 | namespace netDxf.Entities
26 | {
27 | ///
28 | /// Defines the boundary path type of the hatch.
29 | ///
30 | /// Bit flag.
31 | [Flags]
32 | public enum HatchBoundaryPathTypeFlag
33 | {
34 | ///
35 | /// Default.
36 | ///
37 | Default = 0,
38 | ///
39 | /// External.
40 | ///
41 | External = 1,
42 | ///
43 | /// Polyline.
44 | ///
45 | Polyline = 2,
46 | ///
47 | /// Derived.
48 | ///
49 | Derived = 4,
50 | ///
51 | /// Textbox.
52 | ///
53 | Textbox = 8,
54 | ///
55 | /// Outermost.
56 | ///
57 | Outermost = 16
58 | }
59 | }
--------------------------------------------------------------------------------
/netDxf/Entities/DimensionType.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2014 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2014 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | namespace netDxf.Entities
24 | {
25 | ///
26 | /// Dimension type.
27 | ///
28 | public enum DimensionType
29 | {
30 | ///
31 | /// Rotated, horizontal, or vertical.
32 | ///
33 | Linear = 0,
34 | ///
35 | /// Aligned.
36 | ///
37 | Aligned = 1,
38 | ///
39 | /// Angular 2 lines.
40 | ///
41 | Angular = 2,
42 | ///
43 | /// Diameter.
44 | ///
45 | Diameter = 3,
46 | ///
47 | /// Radius.
48 | ///
49 | Radius = 4,
50 | ///
51 | /// Angular 3 points.
52 | ///
53 | Angular3Point = 5,
54 | ///
55 | /// Ordinate.
56 | ///
57 | Ordinate = 6,
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/netDxf/Blocks/BlockEnd.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2013 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2013 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | using System;
24 | using netDxf.Tables;
25 |
26 | namespace netDxf.Blocks
27 | {
28 |
29 | ///
30 | /// Represents the termination element of the block definiton.
31 | ///
32 | internal class BlockEnd :
33 | DxfObject
34 | {
35 | private Layer layer;
36 |
37 | ///
38 | /// Initializes a new instance of the BlockEnd class.
39 | ///
40 | public BlockEnd() : base(DxfObjectCode.BlockEnd)
41 | {
42 | this.layer = Layer.Default;
43 | }
44 |
45 | ///
46 | /// Gets or sets the block end layer.
47 | ///
48 | public Layer Layer
49 | {
50 | get { return this.layer; }
51 | set
52 | {
53 | if (value == null)
54 | throw new ArgumentNullException("value");
55 | this.layer = value;
56 | }
57 | }
58 | }
59 | }
--------------------------------------------------------------------------------
/netDxf/Entities/EndSequence.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2009 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2009 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | using System;
24 | using netDxf.Tables;
25 |
26 | namespace netDxf.Entities
27 | {
28 |
29 | ///
30 | /// Represents the terminator element of a vertex sequence in polylines or attributes in a block reference.
31 | ///
32 | internal class EndSequence :
33 | DxfObject
34 | {
35 | private Layer layer;
36 |
37 | ///
38 | /// Initializes a new instance of the EndSequence class.
39 | ///
40 | public EndSequence() : base(DxfObjectCode.EndSequence)
41 | {
42 | this.layer = Layer.Default;
43 | }
44 |
45 | ///
46 | /// Gets or sets the end sequence layer
47 | ///
48 | public Layer Layer
49 | {
50 | get { return this.layer; }
51 | set
52 | {
53 | if (value == null)
54 | throw new ArgumentNullException("value");
55 | this.layer = value;
56 | }
57 | }
58 | }
59 | }
--------------------------------------------------------------------------------
/SvgEdit/SvgHandler.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace SvgEdit
3 | {
4 |
5 |
6 | // http://stackoverflow.com/questions/23785317/mime-types-for-xsp-mono-webserver
7 | public class SvgHandler : System.Web.IHttpHandler
8 | {
9 |
10 |
11 | public SvgHandler()
12 | { }
13 |
14 |
15 | public void ProcessRequest(System.Web.HttpContext context)
16 | {
17 | context.Response.ClearContent ();
18 | context.Response.ClearHeaders ();
19 | string absolutePath = context.Server.MapPath ("~" + context.Request.Url.AbsolutePath);
20 | System.IO.FileInfo fi = new System.IO.FileInfo (absolutePath);
21 |
22 | if (!fi.Exists)
23 | {
24 | /*
25 | throw new HttpException(404
26 | ,string.Format("File \"{0}\" doesn't exist...", absolutePath)
27 | );
28 | */
29 | context.Response.Clear ();
30 | context.Response.ClearHeaders ();
31 |
32 | context.Response.ContentType = "text/html";
33 | context.Response.StatusCode = (int)System.Net.HttpStatusCode.NotFound;
34 | // context.Response.Status = "foo";
35 | context.Response.StatusDescription = string.Format ("File \"{0}\" doesn't exist...", context.Request.Url.AbsolutePath);
36 | context.Response.Flush ();
37 | context.Response.End ();
38 | return;
39 | } // End if (!fi.Exists)
40 |
41 | long length = fi.Length;
42 | context.Response.CacheControl = "Public";
43 | context.Response.AddHeader ("Content-Length", length.ToString ());
44 | context.Response.Headers.Add ("Cache-Control", "no-cache, no-store, max-age=0");
45 | context.Response.Headers.Add ("Pragma", "no-cache");
46 | context.Response.Headers.Add ("Pragma", "no-cache");
47 | context.Response.Cache.SetExpires (System.DateTime.UtcNow.AddYears (-1));
48 | context.Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);
49 | context.Response.ContentType = "image/svg+xml";
50 | context.Response.WriteFile (absolutePath);
51 | context.Response.Flush ();
52 | context.Response.Close ();
53 | } // End Sub ProcessRequest
54 |
55 |
56 | public bool IsReusable
57 | {
58 | get
59 | {
60 | return false;
61 | }
62 | } // End Property IsReusable
63 |
64 |
65 | } // End Class SvgHandler : System.Web.IHttpHandler
66 |
67 |
68 | } // End Namespace SvgEdit
69 |
--------------------------------------------------------------------------------
/netDxf/Tables/ViewMode.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2014 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2014 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | namespace netDxf.Tables
24 | {
25 | public enum ViewMode
26 | {
27 | ///
28 | /// Turned off.
29 | ///
30 | Off = 0,
31 | ///
32 | /// Perspective view active.
33 | ///
34 | Perspective = 1,
35 | ///
36 | /// Front clipping on.
37 | ///
38 | FrontClippingPlane = 2,
39 | ///
40 | /// Back clipping on.
41 | ///
42 | BackClippingPlane = 4,
43 | ///
44 | /// UCS Follow mode on.
45 | ///
46 | UCSFollow = 8,
47 | ///
48 | /// Front clip not at eye. If on, the front clip distance (FRONTZ) determines the front clipping plane.
49 | /// If off, FRONTZ is ignored, and the front clipping plane is set to pass through the camera point (vectors behind the camera are not displayed).
50 | /// This flag is ignored if the front-clipping bit (2) is off.
51 | ///
52 | FrontClipNotAtEye = 16
53 | }
54 | }
--------------------------------------------------------------------------------
/netDxf/Entities/MTextAttachmentPoint.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2012 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2012 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | namespace netDxf.Entities
24 | {
25 | ///
26 | /// Defines the multiline text attachment point.
27 | ///
28 | public enum MTextAttachmentPoint
29 | {
30 | ///
31 | /// Top left.
32 | ///
33 | TopLeft = 1,
34 | ///
35 | /// Top center.
36 | ///
37 | TopCenter = 2,
38 | ///
39 | /// Top right.
40 | ///
41 | TopRight = 3,
42 | ///
43 | /// Middle left.
44 | ///
45 | MiddleLeft = 4,
46 | ///
47 | /// Middle center.
48 | ///
49 | MiddleCenter = 5,
50 | ///
51 | /// Middle right.
52 | ///
53 | MiddleRight = 6,
54 | ///
55 | /// Bottom left.
56 | ///
57 | BottomLeft = 7,
58 | ///
59 | /// Bottom center.
60 | ///
61 | BottomCenter = 8,
62 | ///
63 | /// Bottom right.
64 | ///
65 | BottomRight = 9,
66 | }
67 | }
--------------------------------------------------------------------------------
/netDxf/EncodingType.cs:
--------------------------------------------------------------------------------
1 | // Code modified from Danny Chen comment in http://stackoverflow.com/questions/3404199/how-to-find-out-the-encoding-of-a-file-c-sharp
2 |
3 | using System;
4 | using System.Globalization;
5 | using System.IO;
6 | using System.Text;
7 |
8 | namespace netDxf
9 | {
10 | internal class EncodingType
11 | {
12 |
13 | public static Encoding GetType(Stream fs)
14 | {
15 | byte[] Unicode = {0xFF, 0xFE, 0x41};
16 | byte[] UnicodeBIG = {0xFE, 0xFF, 0x00};
17 | byte[] UTF8 = {0xEF, 0xBB, 0xBF}; //with BOM
18 | Encoding reVal = Encoding.Default;
19 |
20 | BinaryReader r = new BinaryReader(fs, Encoding.Default);
21 | int i;
22 | int.TryParse(fs.Length.ToString(CultureInfo.InvariantCulture), out i);
23 | byte[] ss = r.ReadBytes(i);
24 | if (IsUTF8Bytes(ss) || (ss[0] == UTF8[0] && ss[1] == UTF8[1] && ss[2] == UTF8[2]))
25 | reVal = Encoding.UTF8;
26 | else if (ss[0] == UnicodeBIG[0] && ss[1] == UnicodeBIG[1] && ss[2] == UnicodeBIG[2])
27 | reVal = Encoding.BigEndianUnicode;
28 | else if (ss[0] == Unicode[0] && ss[1] == Unicode[1] && ss[2] == Unicode[2])
29 | reVal = Encoding.Unicode;
30 | fs.Position = 0;
31 | return reVal;
32 | }
33 |
34 | private static bool IsUTF8Bytes(byte[] data)
35 | {
36 | int charByteCounter = 1;
37 | for (int i = 0; i < data.Length; i++)
38 | {
39 | byte curByte = data[i];
40 | if (charByteCounter == 1)
41 | {
42 | if (curByte >= 0x80)
43 | {
44 | while (((curByte <<= 1) & 0x80) != 0)
45 | charByteCounter++;
46 |
47 | if (charByteCounter == 1 || charByteCounter > 6)
48 | return false;
49 | }
50 | }
51 | else
52 | {
53 | if ((curByte & 0xC0) != 0x80)
54 | return false;
55 | charByteCounter--;
56 | }
57 | }
58 | if (charByteCounter > 1)
59 | throw new Exception("Error byte format.");
60 |
61 | return true;
62 | }
63 | }
64 | }
--------------------------------------------------------------------------------
/netDxf/Objects/DictionaryObject.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2014 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2014 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | using System.Collections.Generic;
24 |
25 | namespace netDxf.Objects
26 | {
27 | public class DictionaryObject :
28 | DxfObject
29 | {
30 | private readonly Dictionary entries;
31 | private bool isHardOwner;
32 | private DictionaryClonningFlag clonning;
33 |
34 | internal DictionaryObject(DxfObject owner)
35 | : base(DxfObjectCode.Dictionary)
36 | {
37 | this.isHardOwner = false;
38 | this.clonning = DictionaryClonningFlag.KeepExisting;
39 | this.entries = new Dictionary();
40 | this.owner = owner;
41 | }
42 |
43 | ///
44 | /// Gets the entries dictionary (key: owner entry handle, value: name)
45 | ///
46 | public Dictionary Entries
47 | {
48 | get { return entries; }
49 | }
50 |
51 | public bool IsHardOwner
52 | {
53 | get { return isHardOwner; }
54 | set { isHardOwner = value; }
55 | }
56 |
57 | public DictionaryClonningFlag Clonning
58 | {
59 | get { return clonning; }
60 | set { clonning = value; }
61 | }
62 | }
63 | }
64 |
65 |
--------------------------------------------------------------------------------
/ScriptLoader/index.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Test
9 |
10 |
11 |
12 |
13 |
14 |
15 |
19 |
20 |
21 |
22 |
23 |
34 |
35 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
--------------------------------------------------------------------------------
/ApertureService/ApertureBounds.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace ApertureService
3 | {
4 |
5 |
6 | public class ApertureBounds
7 | {
8 |
9 | public double L;
10 | public double R;
11 | public double T;
12 | public double B;
13 |
14 |
15 |
16 | public string sL;
17 | public string sR;
18 | public string sT;
19 | public string sB;
20 |
21 |
22 |
23 | public double XUL;
24 | public double YUL;
25 | public double XLR;
26 | public double YLR;
27 |
28 |
29 | public string LogText;
30 |
31 |
32 | public ApertureBounds()
33 | { }
34 |
35 |
36 |
37 |
38 |
39 | public ApertureBounds(double pL, double pR, double pT, double pB)
40 | {
41 | this.L = pL;
42 | this.R = pR;
43 | this.T = pT;
44 | this.B = pB;
45 |
46 |
47 | this.sL = this.L.ToString();
48 | this.sR = this.R.ToString();
49 | this.sT = this.T.ToString();
50 | this.sB = this.B.ToString();
51 |
52 | this.XUL = this.L;
53 | this.YUL = this.T;
54 | this.XLR = this.R;
55 | this.YLR = this.B;
56 | }
57 |
58 |
59 |
60 |
61 | public ApertureBounds(string s)
62 | {
63 | System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
64 | doc.LoadXml(s);
65 |
66 | System.Xml.XmlNode nL = doc.SelectSingleNode("//L");
67 | System.Xml.XmlNode nR = doc.SelectSingleNode("//R");
68 | System.Xml.XmlNode nT = doc.SelectSingleNode("//T");
69 | System.Xml.XmlNode nB = doc.SelectSingleNode("//B");
70 |
71 | sL = nL.InnerText;
72 | sR = nR.InnerText;
73 | sT = nT.InnerText;
74 | sB = nB.InnerText;
75 |
76 |
77 | double.TryParse(sL, out this.L);
78 | double.TryParse(sR, out this.R);
79 | double.TryParse(sT, out this.T);
80 | double.TryParse(sB, out this.B);
81 |
82 | this.XUL = System.Math.Round( this.L, 1);
83 | this.YUL = System.Math.Round( this.T, 1);
84 | this.XLR = System.Math.Round( this.R, 1);
85 | this.YLR = System.Math.Round( this.B, 1);
86 |
87 | System.Xml.XmlNode asl = doc.SelectSingleNode("//ApxScriptLog");
88 | this.LogText = asl.InnerText;
89 | }
90 |
91 | }
92 |
93 |
94 | }
95 |
--------------------------------------------------------------------------------
/netDxf/Objects/MLineStyleFlags.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2014 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2014 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | using System;
24 |
25 | namespace netDxf.Objects
26 | {
27 | ///
28 | /// Flags (bit-coded).
29 | ///
30 | [Flags]
31 | public enum MLineStyleFlags
32 | {
33 | ///
34 | /// None.
35 | ///
36 | None = 0,
37 | ///
38 | /// Fill on.
39 | ///
40 | FillOn = 1,
41 | ///
42 | /// Display miters.
43 | ///
44 | DisplayMiters = 2,
45 | ///
46 | /// Start square end (line) cap.
47 | ///
48 | StartSquareEndCap = 16,
49 | ///
50 | /// Start inner arcs cap.
51 | ///
52 | StartInnerArcsCap = 32,
53 | ///
54 | /// Start round (outer arcs) cap.
55 | ///
56 | StartRoundCap = 64,
57 | ///
58 | /// End square (line) cap.
59 | ///
60 | EndSquareCap = 256,
61 | ///
62 | /// End inner arcs cap.
63 | ///
64 | EndInnerArcsCap = 512,
65 | ///
66 | /// End round (outer arcs) cap.
67 | ///
68 | EndRoundCap = 1024
69 | }
70 | }
--------------------------------------------------------------------------------
/netDxf/Header/HeaderVariable.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2014 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2014 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | using System;
24 |
25 | namespace netDxf.Header
26 | {
27 | ///
28 | /// Defines a header variable.
29 | ///
30 | internal class HeaderVariable
31 | {
32 | #region private fields
33 |
34 | private readonly string name;
35 | private object value;
36 |
37 | #endregion
38 |
39 | #region constructors
40 |
41 | public HeaderVariable(string name, object value)
42 | {
43 | this.name = name;
44 | this.value = value;
45 | }
46 |
47 | #endregion
48 |
49 | #region public properties
50 |
51 | ///
52 | /// Gets the header variable name.
53 | ///
54 | public string Name
55 | {
56 | get { return this.name; }
57 | }
58 |
59 | ///
60 | /// Gets the header variable stored value.
61 | ///
62 | public object Value
63 | {
64 | get { return this.value; }
65 | set { this.value = value; }
66 | }
67 |
68 | #endregion
69 |
70 | #region overrides
71 |
72 | public override string ToString()
73 | {
74 | return String.Format("{0}:{1}", this.name, this.value);
75 | }
76 |
77 | #endregion
78 |
79 | }
80 | }
--------------------------------------------------------------------------------
/netDxf/Tables/LayerFlags.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2014 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2013 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | using System;
24 |
25 | namespace netDxf.Tables
26 | {
27 | ///
28 | /// Standard layer flags (bit-coded values).
29 | ///
30 | [Flags]
31 | internal enum LayerFlags
32 | {
33 | ///
34 | /// Default.
35 | ///
36 | None = 0,
37 | ///
38 | /// Layer is frozen; otherwise layer is thawed.
39 | ///
40 | Frozen = 1,
41 | ///
42 | /// Layer is frozen by default in new viewports.
43 | ///
44 | FrozenNewViewports = 2,
45 | ///
46 | /// Layer is locked.
47 | ///
48 | Locked = 4,
49 | ///
50 | /// If set, table entry is externally dependent on an xref.
51 | ///
52 | XrefDependent = 16,
53 | ///
54 | /// If both this bit and bit 16 are set, the externally dependent xref has been successfully resolved.
55 | ///
56 | XrefResolved = 32,
57 | ///
58 | /// If set, the table entry was referenced by at least one entity in the drawing the last time the
59 | /// drawing was edited. (This flag is for the benefit of AutoCAD commands. It can be ignored by
60 | /// most programs that read DXF files and need not be set by programs that write DXF files)
61 | ///
62 | Referenced = 64
63 | }
64 | }
--------------------------------------------------------------------------------
/netDxf/Entities/HatchGradientPatternType.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2014 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2014 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | namespace netDxf.Entities
24 | {
25 | ///
26 | /// Gradient pattern types.
27 | ///
28 | public enum HatchGradientPatternType
29 | {
30 | ///
31 | /// Linear.
32 | ///
33 | [StringValue("LINEAR")]
34 | Linear,
35 | ///
36 | /// Cylinder.
37 | ///
38 | [StringValue("CYLINDER")]
39 | Cylinder,
40 | ///
41 | /// Inverser cylinder.
42 | ///
43 | [StringValue("INVCYLINDER")]
44 | InvCylinder,
45 | ///
46 | /// Spherical.
47 | ///
48 | [StringValue("SPHERICAL")]
49 | Spherical,
50 | ///
51 | /// Inverse spherical.
52 | ///
53 | [StringValue("INVSPHERICAL")]
54 | InvSpherical,
55 | ///
56 | /// Hemispherical.
57 | ///
58 | [StringValue("HEMISPHERICAL")]
59 | Hemispherical,
60 | ///
61 | /// Inverse hemispherical.
62 | ///
63 | [StringValue("INVHEMISPHERICAL")]
64 | InvHemispherical,
65 | ///
66 | /// Curved.
67 | ///
68 | [StringValue("CURVED")]
69 | Curved,
70 | ///
71 | /// Inverse curved.
72 | ///
73 | [StringValue("INVCURVED")]
74 | InvCurved
75 | }
76 | }
--------------------------------------------------------------------------------
/netDxf/Entities/VertexTypeFlags.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2009 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2009 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | using System;
24 |
25 | namespace netDxf.Entities
26 | {
27 | ///
28 | /// Defines the vertex type.
29 | ///
30 | [Flags]
31 | internal enum VertexTypeFlags
32 | {
33 | ///
34 | /// 2d polyline vertex.
35 | ///
36 | PolylineVertex = 0,
37 | ///
38 | /// Extra vertex created by curve-fitting.
39 | ///
40 | CurveFittingExtraVertex = 1,
41 | ///
42 | /// Curve-fit tangent defined for this vertex.
43 | /// A curve-fit tangent direction of 0 may be omitted from DXF output but is significant if this bit is set.
44 | ///
45 | CurveFitTangent = 2,
46 | ///
47 | /// Not used.
48 | ///
49 | NotUsed = 4,
50 | ///
51 | /// Spline vertex created by spline-fitting.
52 | ///
53 | SplineVertexFromSplineFitting = 8,
54 | ///
55 | /// Spline frame control point.
56 | ///
57 | SplineFrameControlPoint = 16,
58 | ///
59 | /// 3D polyline vertex.
60 | ///
61 | Polyline3dVertex = 32,
62 | ///
63 | /// 3D polygon mesh.
64 | ///
65 | Polygon3dMesh = 64,
66 | ///
67 | /// Polyface mesh vertex.
68 | ///
69 | PolyfaceMeshVertex = 128
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/netDxf/Entities/SplineTypeFlags.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2012 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2012 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | using System;
24 |
25 | namespace netDxf.Entities
26 | {
27 | ///
28 | /// Defines the spline type.
29 | ///
30 | /// Bit flag.
31 | [Flags]
32 | internal enum SplineTypeFlags
33 | {
34 | ///
35 | /// Default (open 3d spline).
36 | ///
37 | None = 0,
38 |
39 | ///
40 | /// Closed spline.
41 | ///
42 | Closed = 1,
43 |
44 | ///
45 | /// Periodic spline.
46 | ///
47 | Periodic = 2,
48 |
49 | ///
50 | /// Rational spline.
51 | ///
52 | Rational = 4,
53 |
54 | ///
55 | /// Planar.
56 | ///
57 | Planar = 8,
58 |
59 | ///
60 | /// Linear (planar bit is also set).
61 | ///
62 | Linear = 16,
63 |
64 | // in AutoCAD 2012 the flags can be greater than 70 despite the information that shows the dxf documentation these values are just a guess.
65 | FitChord = 32,
66 | FitSqrtChord = 64,
67 | FitUniform = 128,
68 |
69 | Unknown1 = 256,
70 | Unknown2 = 512,
71 | ///
72 | /// Used by splines created by fit points.
73 | ///
74 | Unknown3 = 1024,
75 | ///
76 | /// Used for closed periodic splines.
77 | ///
78 | Unknown4 = 2048
79 |
80 |
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/netDxf/Entities/PolylineTypeFlags.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2009 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2009 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | using System;
24 |
25 | namespace netDxf.Entities
26 | {
27 | ///
28 | /// Defines the polyline type.
29 | ///
30 | /// Bit flag.
31 | [Flags]
32 | internal enum PolylineTypeFlags
33 | {
34 | ///
35 | /// Default, open polyline.
36 | ///
37 | OpenPolyline = 0,
38 | ///
39 | /// This is a closed polyline (or a polygon mesh closed in the M direction).
40 | ///
41 | ClosedPolylineOrClosedPolygonMeshInM = 1,
42 | ///
43 | /// Curve-fit vertices have been added.
44 | ///
45 | CurveFit = 2,
46 | ///
47 | /// Spline-fit vertices have been added.
48 | ///
49 | SplineFit = 4,
50 | ///
51 | /// This is a 3D polyline.
52 | ///
53 | Polyline3D = 8,
54 | ///
55 | /// This is a 3D polygon mesh.
56 | ///
57 | PolygonMesh = 16,
58 | ///
59 | /// The polygon mesh is closed in the N direction.
60 | ///
61 | ClosedPolygonMeshInN = 32,
62 | ///
63 | /// The polyline is a polyface mesh.
64 | ///
65 | PolyfaceMesh = 64,
66 | ///
67 | /// The linetype pattern is generated continuously around the vertices of this polyline.
68 | ///
69 | ContinuousLineTypePatter = 128
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/netDxf/Entities/DimensionTypeFlag.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2014 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2014 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | using System;
24 |
25 | namespace netDxf.Entities
26 | {
27 | ///
28 | /// Dimension type.
29 | ///
30 | [Flags]
31 | internal enum DimensionTypeFlag
32 | {
33 | ///
34 | /// Rotated, horizontal, or vertical.
35 | ///
36 | Linear = 0,
37 | ///
38 | /// Aligned.
39 | ///
40 | Aligned = 1,
41 | ///
42 | /// Angular 2 lines.
43 | ///
44 | Angular = 2,
45 | ///
46 | /// Diameter.
47 | ///
48 | Diameter = 3,
49 | ///
50 | /// Radius.
51 | ///
52 | Radius = 4,
53 | ///
54 | /// Angular 3 points.
55 | ///
56 | Angular3Point = 5,
57 | ///
58 | /// Ordinate.
59 | ///
60 | Ordinate = 6,
61 | ///
62 | /// Indicates that the block reference (group code 2) is referenced by this dimension only.
63 | ///
64 | BlockReference = 32,
65 | ///
66 | /// Ordinate type. This is a bit value (bit 7) used only with integer value 6. If set, ordinate is X-type; if not set, ordinate is Y-type.
67 | ///
68 | OrdinteType = 64,
69 | ///
70 | /// This is a bit value (bit 8) added to the other group 70 values if the dimension text has been positioned at a user-defined location rather than at the default location.
71 | ///
72 | UserTextPosition = 128
73 | }
74 | }
--------------------------------------------------------------------------------
/netDxf/Collections/ObservableCollectionBaseEventArgs.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2014 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2014 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | using System;
24 |
25 | namespace netDxf.Collections
26 | {
27 | ///
28 | /// Represents the arguments thrown by the ObservableCollection events.
29 | ///
30 | /// Type of items.
31 | public class ObservableCollectionBaseEventArgs :
32 | EventArgs
33 | {
34 | #region private fields
35 |
36 | private readonly T item;
37 | private bool cancel;
38 |
39 | #endregion
40 |
41 | #region constructor
42 |
43 | ///
44 | /// Initializes a new instance of ObservableCollectionEventArgs.
45 | ///
46 | /// Item that is being added or removed from the collection.
47 | public ObservableCollectionBaseEventArgs(T item)
48 | {
49 | this.item = item;
50 | this.cancel = false;
51 | }
52 |
53 | #endregion
54 |
55 | #region public properties
56 |
57 | ///
58 | /// Get the item that is being added or removed from the collection.
59 | ///
60 | public T Item
61 | {
62 | get { return this.item; }
63 | }
64 |
65 | ///
66 | /// Gets or sets if the operation must be canceled.
67 | ///
68 | /// This property is used by the OnBeforeAdd and OnBeforeRemove events to cancel the add or remove operation.
69 | public bool Cancel
70 | {
71 | get { return this.cancel; }
72 | set { this.cancel = value; }
73 | }
74 |
75 | #endregion
76 | }
77 | }
--------------------------------------------------------------------------------
/netDxf/Blocks/BlockTypeFlags.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2013 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2013 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | using System;
24 |
25 | namespace netDxf.Blocks
26 | {
27 | ///
28 | /// Block-type flags (bit-coded values, may be combined).
29 | ///
30 | [Flags]
31 | public enum BlockTypeFlags
32 | {
33 | ///
34 | /// Indicates none of the following flags apply.
35 | ///
36 | None = 0,
37 | ///
38 | /// This is an anonymous block generated by hatching, associative dimensioning, other internal operations, or an application.
39 | ///
40 | AnonymousBlock = 1,
41 | ///
42 | /// This block has non-constant attribute definitions
43 | /// (this bit is not set if the block has any attribute definitions that are constant, or has no attribute definitions at all).
44 | ///
45 | NonConstantAttributeDefinitions = 2,
46 | ///
47 | /// This block is an external reference (xref).
48 | ///
49 | XRef = 4,
50 | ///
51 | /// This block is an xref overlay.
52 | ///
53 | XRefOverlay = 8,
54 | ///
55 | /// This block is externally dependent.
56 | ///
57 | ExternallyDependent = 16,
58 | ///
59 | /// This is a resolved external reference, or dependent of an external reference (ignored on input).
60 | ///
61 | ResolvedExternalReference = 32,
62 | ///
63 | /// This definition is a referenced external reference (ignored on input).
64 | ///
65 | DefinitionExternalReference = 64
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/netDxf/Header/DxfVersion.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2013 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2013 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | namespace netDxf.Header
24 | {
25 | ///
26 | /// The AutoCAD drawing database version number.
27 | ///
28 | public enum DxfVersion
29 | {
30 | ///
31 | /// Unknown AutoCAD DXF file.
32 | ///
33 | [StringValue("Unkown")]
34 | Unknown = 0,
35 | ///
36 | /// AutoCAD R10 DXF file.
37 | ///
38 | [StringValue("AC1006")]
39 | AutoCad10 = 1,
40 | ///
41 | /// AutoCAD R11 and R12 DXF file.
42 | ///
43 | [StringValue("AC1009")]
44 | AutoCad12 = 2,
45 | ///
46 | /// AutoCAD R13 DXF file.
47 | ///
48 | [StringValue("AC1012")]
49 | AutoCad13 = 3,
50 | ///
51 | /// AutoCAD R14 DXF file.
52 | ///
53 | [StringValue("AC1014")]
54 | AutoCad14 = 4,
55 | ///
56 | /// AutoCAD 2000 DXF file.
57 | ///
58 | [StringValue("AC1015")]
59 | AutoCad2000 = 5,
60 | ///
61 | /// AutoCAD 2004 DXF file.
62 | ///
63 | [StringValue("AC1018")]
64 | AutoCad2004 = 6,
65 | ///
66 | /// AutoCAD 2007 DXF file.
67 | ///
68 | [StringValue("AC1021")]
69 | AutoCad2007 = 7,
70 | ///
71 | /// AutoCAD 2010 DXF file.
72 | ///
73 | [StringValue("AC1024")]
74 | AutoCad2010 = 8,
75 | ///
76 | /// AutoCAD 2013 DXF file.
77 | ///
78 | [StringValue("AC1027")]
79 | AutoCad2013 = 9
80 | }
81 | }
--------------------------------------------------------------------------------
/netDxf/Collections/AttributeDefinitionDictionaryEventArgs.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2014 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2014 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | using System;
24 | using netDxf.Entities;
25 |
26 | namespace netDxf.Collections
27 | {
28 | ///
29 | /// Represents the arguments thrown by the AttributeDefinitionDictionary events.
30 | ///
31 | public class AttributeDefinitionDictionaryEventArgs :
32 | EventArgs
33 | {
34 | #region private fields
35 |
36 | private readonly AttributeDefinition item;
37 | private bool cancel;
38 |
39 | #endregion
40 |
41 | #region constructor
42 |
43 | ///
44 | /// Initializes a new instance of AttributeDefinitionDictionaryEventArgs.
45 | ///
46 | /// Item that is being added or removed from the dictionary.
47 | public AttributeDefinitionDictionaryEventArgs(AttributeDefinition item)
48 | {
49 | this.item = item;
50 | this.cancel = false;
51 | }
52 |
53 | #endregion
54 |
55 | #region public properties
56 |
57 | ///
58 | /// Get the item that is being added to or removed from the dictionary.
59 | ///
60 | public AttributeDefinition Item
61 | {
62 | get { return this.item; }
63 | }
64 |
65 | ///
66 | /// Gets or sets if the operation must be canceled.
67 | ///
68 | /// This property is used by the BeforeAddItem and BeforeRemoveItem events to cancel the add or remove operations.
69 | public bool Cancel
70 | {
71 | get { return this.cancel; }
72 | set { this.cancel = value; }
73 | }
74 |
75 | #endregion
76 | }
77 | }
--------------------------------------------------------------------------------
/netDxf/Entities/TextAligment.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2009 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2009 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | namespace netDxf.Entities
24 | {
25 | ///
26 | /// Defines the text alignment.
27 | ///
28 | public enum TextAlignment
29 | {
30 | ///
31 | /// Top left.
32 | ///
33 | TopLeft,
34 | ///
35 | /// Top center.
36 | ///
37 | TopCenter,
38 | ///
39 | /// Top right.
40 | ///
41 | TopRight,
42 | ///
43 | /// Middle left.
44 | ///
45 | MiddleLeft,
46 | ///
47 | /// Middle center.
48 | ///
49 | MiddleCenter,
50 | ///
51 | /// Middle right.
52 | ///
53 | MiddleRight,
54 | ///
55 | /// Bottom left.
56 | ///
57 | BottomLeft,
58 | ///
59 | /// Bottom center.
60 | ///
61 | BottomCenter,
62 | ///
63 | /// Bottom right.
64 | ///
65 | BottomRight,
66 | ///
67 | /// Baseline left.
68 | ///
69 | BaselineLeft,
70 | ///
71 | /// Baseline center.
72 | ///
73 | BaselineCenter,
74 | ///
75 | /// Baseline right.
76 | ///
77 | BaselineRight,
78 | ///
79 | /// Aligned (if vertical alignment = 0).
80 | ///
81 | Aligned,
82 | ///
83 | /// Middle (if vertical alignment = 0)
84 | ///
85 | Middle,
86 | ///
87 | /// Fit (if vertical alignment = 0)
88 | ///
89 | Fit
90 |
91 |
92 | }
93 | }
--------------------------------------------------------------------------------
/netDxf/Collections/ObservableDictionaryBaseEventArgs.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2014 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2014 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | using System;
24 | using System.Collections.Generic;
25 |
26 | namespace netDxf.Collections
27 | {
28 | ///
29 | /// Represents the arguments thrown by the ObservableDictionaryEventArgs events.
30 | ///
31 | /// Type of items.
32 | /// Type of items.
33 | public class ObservableDictionaryBaseEventArgs :
34 | EventArgs
35 | {
36 | #region private fields
37 |
38 | private readonly KeyValuePair item;
39 | private bool cancel;
40 |
41 | #endregion
42 |
43 | #region constructor
44 |
45 | ///
46 | /// Initializes a new instance of ObservableDictionaryEventArgs.
47 | ///
48 | /// Item that is being added or removed from the dictionary.
49 | public ObservableDictionaryBaseEventArgs(KeyValuePair item)
50 | {
51 | this.item = item;
52 | this.cancel = false;
53 | }
54 |
55 | #endregion
56 |
57 | #region public properties
58 |
59 | ///
60 | /// Get the item that is being added to or removed from the dictionary.
61 | ///
62 | public KeyValuePair Item
63 | {
64 | get { return this.item; }
65 | }
66 |
67 | ///
68 | /// Gets or sets if the operation must be canceled.
69 | ///
70 | /// This property is used by the OnBeforeAdd and OnBeforeRemove events to cancel the add or remove operations.
71 | public bool Cancel
72 | {
73 | get { return this.cancel; }
74 | set { this.cancel = value; }
75 | }
76 |
77 | #endregion
78 | }
79 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 |
4 | # User-specific files
5 | *.suo
6 | *.user
7 | *.sln.docstates
8 |
9 | # Build results
10 |
11 | [Dd]ebug/
12 | [Rr]elease/
13 | x64/
14 | build/
15 | [Bb]in/
16 | [Oo]bj/
17 |
18 | # Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
19 | !packages/*/build/
20 |
21 | # MSTest test Results
22 | [Tt]est[Rr]esult*/
23 | [Bb]uild[Ll]og.*
24 |
25 | *_i.c
26 | *_p.c
27 | *.ilk
28 | *.meta
29 | *.obj
30 | *.pch
31 | *.pdb
32 | *.pgc
33 | *.pgd
34 | *.rsp
35 | *.sbr
36 | *.tlb
37 | *.tli
38 | *.tlh
39 | *.tmp
40 | *.tmp_proj
41 | *.log
42 | *.vspscc
43 | *.vssscc
44 | .builds
45 | *.pidb
46 | *.log
47 | *.scc
48 |
49 | # Visual C++ cache files
50 | ipch/
51 | *.aps
52 | *.ncb
53 | *.opensdf
54 | *.sdf
55 | *.cachefile
56 |
57 | # Visual Studio profiler
58 | *.psess
59 | *.vsp
60 | *.vspx
61 |
62 | # Guidance Automation Toolkit
63 | *.gpState
64 |
65 | # ReSharper is a .NET coding add-in
66 | _ReSharper*/
67 | *.[Rr]e[Ss]harper
68 |
69 | # TeamCity is a build add-in
70 | _TeamCity*
71 |
72 | # DotCover is a Code Coverage Tool
73 | *.dotCover
74 |
75 | # NCrunch
76 | *.ncrunch*
77 | .*crunch*.local.xml
78 |
79 | # Installshield output folder
80 | [Ee]xpress/
81 |
82 | # DocProject is a documentation generator add-in
83 | DocProject/buildhelp/
84 | DocProject/Help/*.HxT
85 | DocProject/Help/*.HxC
86 | DocProject/Help/*.hhc
87 | DocProject/Help/*.hhk
88 | DocProject/Help/*.hhp
89 | DocProject/Help/Html2
90 | DocProject/Help/html
91 |
92 | # Click-Once directory
93 | publish/
94 |
95 | # Publish Web Output
96 | *.Publish.xml
97 |
98 | # NuGet Packages Directory
99 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line
100 | #packages/
101 |
102 | # Windows Azure Build Output
103 | csx
104 | *.build.csdef
105 |
106 | # Windows Store app package directory
107 | AppPackages/
108 |
109 | # Others
110 | sql/
111 | *.Cache
112 | ClientBin/
113 | [Ss]tyle[Cc]op.*
114 | ~$*
115 | *~
116 | *.dbmdl
117 | *.[Pp]ublish.xml
118 | *.pfx
119 | *.publishsettings
120 |
121 | # RIA/Silverlight projects
122 | Generated_Code/
123 |
124 | # Backup & report files from converting an old project file to a newer
125 | # Visual Studio version. Backup files are not needed, because we have git ;-)
126 | _UpgradeReport_Files/
127 | Backup*/
128 | UpgradeLog*.XML
129 | UpgradeLog*.htm
130 |
131 | # SQL Server files
132 | App_Data/*.mdf
133 | App_Data/*.ldf
134 |
135 |
136 | #LightSwitch generated files
137 | GeneratedArtifacts/
138 | _Pvt_Extensions/
139 | ModelManifest.xml
140 |
141 | # =========================
142 | # Windows detritus
143 | # =========================
144 |
145 | # Windows image file caches
146 | Thumbs.db
147 | ehthumbs.db
148 |
149 | # Folder config file
150 | Desktop.ini
151 |
152 | # Recycle Bin used on file shares
153 | $RECYCLE.BIN/
154 |
155 | # Mac desktop service store files
156 | .DS_Store
157 |
--------------------------------------------------------------------------------
/netDxf/Objects/PlotFlags.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2014 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2014 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | using System;
24 |
25 | namespace netDxf.Objects
26 | {
27 | ///
28 | /// Defines the plot settings flag.
29 | ///
30 | /// Bit flag.
31 | [Flags]
32 | public enum PlotFlags
33 | {
34 | ///
35 | /// Plot viewport borders.
36 | ///
37 | PlotViewportBorders = 1,
38 | ///
39 | /// Show plot styles.
40 | ///
41 | ShowPlotStyles=2,
42 | ///
43 | /// Plot centered.
44 | ///
45 | PlotCentered=4,
46 | ///
47 | /// Plot hidden.
48 | ///
49 | PlotHidden=8,
50 | ///
51 | /// Use standard scale.
52 | ///
53 | UseStandardScale=16,
54 | ///
55 | /// Plot plot styles.
56 | ///
57 | PlotPlotStyles=32,
58 | ///
59 | /// Scale line weights.
60 | ///
61 | ScaleLineweights=64,
62 | ///
63 | /// Print line weights.
64 | ///
65 | PrintLineweights=128,
66 | ///
67 | /// Draw viewports first.
68 | ///
69 | DrawViewportsFirst=512,
70 | ///
71 | /// Model type.
72 | ///
73 | ModelType=1024,
74 | ///
75 | /// Update paper.
76 | ///
77 | UpdatePaper=2048,
78 | ///
79 | /// Soom to paper on update.
80 | ///
81 | ZoomToPaperOnUpdate=4096,
82 | ///
83 | /// Initializing.
84 | ///
85 | Initializing=8192,
86 | ///
87 | /// Prev plot init.
88 | ///
89 | PrevPlotInit=16384
90 | }
91 | }
--------------------------------------------------------------------------------
/DwgToSvgConverter/Modifier.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace DwgToSvgConverter
3 | {
4 |
5 |
6 | public class Modifier
7 | {
8 |
9 |
10 | public static string GetInlineStyle()
11 | {
12 | string style = @"
13 | path:hover {
14 | fill: orange;
15 | stroke-width: 10;
16 | stroke: gold;
17 | transition: all .2s ease-in-out;
18 | transform: scale(1.0);
19 | }
20 |
21 | path
22 | {
23 | transform: scale(1.0);
24 | }
25 | ";
26 | return style;
27 | } // End Function GetInlineStyle
28 |
29 |
30 | public static void ModifySVG(string file)
31 | {
32 | System.Xml.XmlDocument doc = new System.Xml.XmlDocument ();
33 | if (System.Environment.OSVersion.Platform != System.PlatformID.Unix)
34 | doc.XmlResolver = null; // .NET Framework
35 |
36 | doc.Load (file);
37 |
38 | System.Xml.XmlNamespaceManager nspmgr = new System.Xml.XmlNamespaceManager (doc.NameTable);
39 | nspmgr.AddNamespace(doc.DocumentElement.Name, doc.DocumentElement.NamespaceURI);
40 |
41 | bool bOnlyRoomLayer = true;
42 |
43 | if (bOnlyRoomLayer)
44 | {
45 | System.Xml.XmlNodeList pathLayers = doc.SelectNodes("//svg:g[@id!='FM_OBJEKT_RAUM']", nspmgr);
46 | foreach (System.Xml.XmlNode layer in pathLayers)
47 | {
48 | layer.ParentNode.RemoveChild(layer);
49 | } // Next layer
50 | } // End if (bOnlyRoomLayer)
51 |
52 |
53 |
54 | System.Xml.XmlElement xe = doc.CreateElement("style", doc.DocumentElement.NamespaceURI);
55 | xe.SetAttribute("type", "text/css");
56 |
57 | xe.InnerText = GetInlineStyle ();
58 |
59 | if (doc.DocumentElement.FirstChild == null)
60 | doc.DocumentElement.AppendChild(xe);
61 | else
62 | doc.DocumentElement.InsertBefore(xe, doc.DocumentElement.FirstChild);
63 |
64 | // System.Xml.XmlNode nd = doc.SelectSingleNode("//svg:g[@id='FM_OBJEKT_RAUM']", nspmgr);
65 | // System.Xml.XmlNodeList paths = nd.SelectNodes ("./svg:path", nspmgr);
66 | System.Xml.XmlNodeList paths = doc.SelectNodes("//svg:g[@id='FM_OBJEKT_RAUM']/svg:path", nspmgr);
67 | // System.Xml.XmlNodeList paths = doc.SelectNodes("//svg:g[@id='FM_OBJEKT_RAUM']/svg:path[@data-handle='4']", nspmgr);
68 |
69 | // System.Console.WriteLine(paths);
70 |
71 | int r = 20;
72 |
73 | foreach (System.Xml.XmlNode path in paths)
74 | {
75 |
76 | // string col = string.Format("#0000{0:X2}", r);
77 | //path.Attributes["fill"].Value = "#FF0000";
78 | path.Attributes ["fill"].Value = string.Format ("#00{0:X2}00", r);
79 | r += 37;
80 | r = r % 255;
81 | } // Next path
82 |
83 |
84 | string newFileName = null;
85 | if (System.Environment.OSVersion.Platform == System.PlatformID.Unix)
86 | newFileName = @"/root/" + "Rooms_" + System.IO.Path.GetFileNameWithoutExtension(file) + @".svg";
87 | else if(StorageHelper.DriveExists(@"D:\"))
88 | newFileName = @"D:\" + "Rooms_" + System.IO.Path.GetFileNameWithoutExtension(file) + @".svg";
89 | else newFileName = StorageHelper.GetDesktopPath("Rooms_" + System.IO.Path.GetFileNameWithoutExtension(file) + @".svg");
90 |
91 | doc.Save(newFileName);
92 | } // End Sub ModifySVG
93 |
94 |
95 | } // End Class Modifier
96 |
97 |
98 | } // End Namespace DwgToSvgConverter
99 |
--------------------------------------------------------------------------------
/SvgConverter/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Dieser Code wurde von einem Tool generiert.
4 | // Laufzeitversion:4.0.30319.34014
5 | //
6 | // Änderungen an dieser Datei können fehlerhaftes Verhalten verursachen und gehen verloren, wenn
7 | // der Code neu generiert wird.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace SvgConverter.Properties
12 | {
13 |
14 |
15 | ///
16 | /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
17 | ///
18 | // Diese Klasse wurde von der StronglyTypedResourceBuilder-Klasse
19 | // über ein Tool wie ResGen oder Visual Studio automatisch generiert.
20 | // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
21 | // mit der Option /str erneut aus, oder erstellen Sie Ihr VS-Projekt neu.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SvgConverter.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
56 | /// Ressourcenlookups, die diese stark typisierte Ressourcenklasse verwenden.
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/ApertureService/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Dieser Code wurde von einem Tool generiert.
4 | // Laufzeitversion:4.0.30319.34014
5 | //
6 | // Änderungen an dieser Datei können fehlerhaftes Verhalten verursachen und gehen verloren, wenn
7 | // der Code neu generiert wird.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace ApertureService.Properties
12 | {
13 |
14 |
15 | ///
16 | /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
17 | ///
18 | // Diese Klasse wurde von der StronglyTypedResourceBuilder-Klasse
19 | // über ein Tool wie ResGen oder Visual Studio automatisch generiert.
20 | // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
21 | // mit der Option /str erneut aus, oder erstellen Sie Ihr VS-Projekt neu.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ApertureService.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
56 | /// Ressourcenlookups, die diese stark typisierte Ressourcenklasse verwenden.
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/DxfLayerSeparation/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Dieser Code wurde von einem Tool generiert.
4 | // Laufzeitversion:4.0.30319.34209
5 | //
6 | // Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
7 | // der Code erneut generiert wird.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace DxfLayerSeparation.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
17 | ///
18 | // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
19 | // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
20 | // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
21 | // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DxfLayerSeparation.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
51 | /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/netDxf/Objects/RasterVariables.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2014 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2014 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | namespace netDxf.Objects
24 | {
25 | ///
26 | /// Represents the variables applied to bitmaps.
27 | ///
28 | public class RasterVariables :
29 | DxfObject
30 | {
31 | #region private fields
32 |
33 | private bool displayFrame;
34 | private ImageDisplayQuality quality;
35 | private ImageUnits units;
36 |
37 | #endregion
38 |
39 | #region constructors
40 |
41 | ///
42 | /// Initializes a new instance of the RasterVariables class.
43 | ///
44 | public RasterVariables()
45 | : base(DxfObjectCode.RasterVariables)
46 | {
47 | this.displayFrame = true;
48 | this.quality = ImageDisplayQuality.High;
49 | this.units = ImageUnits.Millimeters;
50 | }
51 |
52 | #endregion
53 |
54 | #region public properties
55 |
56 | ///
57 | /// Gets or sets if the image frame is shown.
58 | ///
59 | public bool DisplayFrame
60 | {
61 | get { return this.displayFrame; }
62 | set { this.displayFrame = value; }
63 | }
64 |
65 | ///
66 | /// Gets or sets the image display quality (screen only).
67 | ///
68 | public ImageDisplayQuality DisplayQuality
69 | {
70 | get { return this.quality; }
71 | set { this.quality = value; }
72 | }
73 |
74 | ///
75 | /// Gets or sets the AutoCAD units for inserting images.
76 | ///
77 | ///
78 | /// This is what one AutoCAD unit is equal to for the purpose of inserting and scaling images with an associated resolution.
79 | /// It is recommended to use the same units as the header variable InsUnits.
80 | ///
81 | public ImageUnits Units
82 | {
83 | get { return this.units; }
84 | set { this.units = value; }
85 | }
86 |
87 | #endregion
88 | }
89 | }
--------------------------------------------------------------------------------
/DwgToSvgConverter/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Dieser Code wurde von einem Tool generiert.
4 | // Laufzeitversion:4.0.30319.34014
5 | //
6 | // Änderungen an dieser Datei können fehlerhaftes Verhalten verursachen und gehen verloren, wenn
7 | // der Code neu generiert wird.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace DwgToSvgConverter.Properties
12 | {
13 |
14 |
15 | ///
16 | /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
17 | ///
18 | // Diese Klasse wurde von der StronglyTypedResourceBuilder-Klasse
19 | // über ein Tool wie ResGen oder Visual Studio automatisch generiert.
20 | // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
21 | // mit der Option /str erneut aus, oder erstellen Sie Ihr VS-Projekt neu.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DwgToSvgConverter.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
56 | /// Ressourcenlookups, die diese stark typisierte Ressourcenklasse verwenden.
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/SvgEdit/Web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
21 |
22 |
34 |
35 |
41 |
42 |
43 |
44 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
60 |
61 |
62 |
63 |
64 |
68 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/ScriptLoader/Scripts/ScriptLoader.ts:
--------------------------------------------------------------------------------
1 | class cScriptLoader {
2 | private m_js_files: string[];
3 | private m_css_files: string[];
4 | private m_head:HTMLHeadElement;
5 |
6 | private log = (t:any) =>
7 | {
8 | console.log("ScriptLoader: " + t);
9 | }
10 |
11 |
12 | constructor(files: string[]) {
13 | this.m_js_files = [];
14 | this.m_css_files = [];
15 | this.m_head = document.getElementsByTagName("head")[0];
16 | // this.m_head = document.head; // IE9+ only
17 |
18 |
19 | function endsWith(str:string, suffix:string):boolean
20 | {
21 | if(str === null || suffix === null)
22 | return false;
23 |
24 | return str.indexOf(suffix, str.length - suffix.length) !== -1;
25 | }
26 |
27 |
28 | for(var i:number = 0; i < files.length; ++i)
29 | {
30 | if(endsWith(files[i], ".css"))
31 | {
32 | this.m_css_files.push(files[i]);
33 | }
34 | else if(endsWith(files[i], ".js"))
35 | {
36 | this.m_js_files.push(files[i]);
37 | }
38 | else
39 | this.log('Error unknown filetype "' + files[i] +'".');
40 | }
41 |
42 | }
43 |
44 |
45 | public withNoCache = (filename:string):string =>
46 | {
47 | if(filename.indexOf("?") === -1)
48 | filename += "?no_cache=" + new Date().getTime();
49 | else
50 | filename += "&no_cache=" + new Date().getTime();
51 |
52 | return filename;
53 | }
54 |
55 |
56 | public loadStyle = (filename:string) =>
57 | {
58 | // HTMLLinkElement
59 | var link = document.createElement("link");
60 | link.rel = "stylesheet";
61 | link.type = "text/css";
62 | link.href = this.withNoCache(filename);
63 |
64 | this.log('Loading style ' + filename);
65 | link.onload = () =>
66 | {
67 | this.log('Loaded style "' + filename + '".');
68 |
69 | };
70 |
71 | link.onerror = () =>
72 | {
73 | this.log('Error loading style "' + filename + '".');
74 | };
75 |
76 | this.m_head.appendChild(link);
77 | }
78 |
79 |
80 | public loadScript = (i:number) =>
81 | {
82 | var script = document.createElement('script');
83 | script.type = 'text/javascript';
84 | script.src = this.withNoCache(this.m_js_files[i]);
85 |
86 | var loadNextScript = () =>
87 | {
88 | if (i + 1 < this.m_js_files.length)
89 | {
90 | this.loadScript(i + 1);
91 | }
92 | }
93 |
94 | script.onload = () =>
95 | {
96 | this.log('Loaded script "' + this.m_js_files[i] + '".');
97 | loadNextScript();
98 | };
99 |
100 |
101 | script.onerror = () =>
102 | {
103 | this.log('Error loading script "' + this.m_js_files[i] + '".');
104 | loadNextScript();
105 | };
106 |
107 |
108 | this.log('Loading script "' + this.m_js_files[i] + '".');
109 | this.m_head.appendChild(script);
110 | }
111 |
112 | public loadFiles = () =>
113 | {
114 | // this.log(this.m_css_files);
115 | // this.log(this.m_js_files);
116 |
117 | for(var i:number = 0; i < this.m_css_files.length; ++i)
118 | this.loadStyle(this.m_css_files[i])
119 |
120 | this.loadScript(0);
121 | }
122 |
123 | }
124 |
125 |
126 | var ScriptLoader = new cScriptLoader(["foo.css", "Scripts/Script4.js", "foobar.css", "Scripts/Script1.js", "Scripts/Script2.js", "Scripts/Script3.js"]);
127 | ScriptLoader.loadFiles();
128 |
--------------------------------------------------------------------------------
/ApertureService/Aperture.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Aperture-Test
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | Test
16 |
17 |
18 |
19 |
22 |
23 |
109 |
110 |
111 |
112 |
--------------------------------------------------------------------------------
/netDxf/Tables/ApplicationRegistry.cs:
--------------------------------------------------------------------------------
1 | #region netDxf, Copyright(C) 2014 Daniel Carvajal, Licensed under LGPL.
2 |
3 | // netDxf library
4 | // Copyright (C) 2014 Daniel Carvajal (haplokuon@gmail.com)
5 | //
6 | // This library is free software; you can redistribute it and/or
7 | // modify it under the terms of the GNU Lesser General Public
8 | // License as published by the Free Software Foundation; either
9 | // version 2.1 of the License, or (at your option) any later version.
10 | //
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 |
21 | #endregion
22 |
23 | using System;
24 | using netDxf.Collections;
25 |
26 | namespace netDxf.Tables
27 | {
28 |
29 | ///
30 | /// Represents a registered application name to which the extended data is associated.
31 | ///
32 | public class ApplicationRegistry :
33 | TableObject
34 | {
35 |
36 | #region constants
37 |
38 | ///
39 | /// Gets the default application registry.
40 | ///
41 | public static ApplicationRegistry Default
42 | {
43 | get { return new ApplicationRegistry("ACAD"); }
44 | }
45 |
46 | #endregion
47 |
48 | #region constructors
49 |
50 | ///
51 | /// Initializes a new instance of the ApplicationRegistry class.
52 | ///
53 | /// Layer name.
54 | public ApplicationRegistry(string name)
55 | : base(name, DxfObjectCode.AppId, true)
56 | {
57 | this.reserved = name.Equals("ACAD", StringComparison.OrdinalIgnoreCase);
58 | }
59 |
60 | #endregion
61 |
62 | #region public properties
63 |
64 | ///
65 | /// Gets the owner of the actual dxf object.
66 | ///
67 | public new ApplicationRegistries Owner
68 | {
69 | get { return (ApplicationRegistries)this.owner; }
70 | internal set { this.owner = value; }
71 | }
72 |
73 | #endregion
74 |
75 | #region overrides
76 |
77 | ///
78 | /// Creates a new ApplicationRegistry that is a copy of the current instance.
79 | ///
80 | /// ApplicationRegistry name of the copy.
81 | /// A new ApplicationRegistry that is a copy of this instance.
82 | public override TableObject Clone(string newName)
83 | {
84 | return new ApplicationRegistry(newName);
85 | }
86 |
87 | ///
88 | /// Creates a new ApplicationRegistry that is a copy of the current instance.
89 | ///
90 | /// A new ApplicationRegistry that is a copy of this instance.
91 | public override object Clone()
92 | {
93 | return Clone(this.name);
94 | }
95 |
96 | #endregion
97 |
98 | }
99 | }
--------------------------------------------------------------------------------
/DxfLayerSeparation/Program.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace DxfLayerSeparation
3 | {
4 |
5 |
6 | static class Program
7 | {
8 |
9 |
10 | ///
11 | /// Der Haupteinstiegspunkt für die Anwendung.
12 | ///
13 | [System.STAThread]
14 | static void Main()
15 | {
16 |
17 | #if false
18 | Application.EnableVisualStyles();
19 | Application.SetCompatibleTextRenderingDefault(false);
20 | Application.Run(new Form1());
21 | #endif
22 |
23 | string filename = @"F:\COR\DMS\POST_0020_GE01_OG01_0000 - Kopie.dxf";
24 |
25 | MessageBoxHandler.CloseNextMessageBoxByTitle("Wout Ware trial"); // Annoying
26 | WW.Cad.Model.DxfModel model = null;
27 | model = WW.Cad.IO.DxfReader.Read(filename);
28 |
29 |
30 |
31 | // System.Console.WriteLine(model.UnsupportedObjects.Count);
32 |
33 |
34 | for (int i = model.Layers.Count-1; i >= 0; --i)
35 | {
36 | System.Console.WriteLine(model.Layers[i].Name);
37 |
38 | // if (string.Equals(model.Layers[i].Name, "0", System.StringComparison.InvariantCultureIgnoreCase)) { continue; }
39 |
40 | // if (string.Equals(model.Layers[i].Name, "Grundriss", System.StringComparison.InvariantCultureIgnoreCase))
41 | if (string.Equals(model.Layers[i].Name, "Raumpolygon", System.StringComparison.InvariantCultureIgnoreCase))
42 | {
43 | model.Layers[i].Enabled = true;
44 | continue;
45 | }
46 |
47 |
48 | model.Layers[i].Enabled = false;
49 | // continue;
50 |
51 |
52 | for (int j = model.Entities.Count - 1; j >= 0; --j)
53 | {
54 |
55 | if (model.Entities[j].Layer == model.Layers[i])
56 | {
57 | // System.Console.WriteLine(model.Entities[j].Layer.Name);
58 | // System.Console.WriteLine(model.Layers[i].Name);
59 | model.Entities.RemoveAt(j);
60 | } // End if (model.Entities[j].Layer == model.Layers[i])
61 |
62 | } // Next j
63 |
64 | model.Layers.RemoveAt(i);
65 | } // Next i
66 |
67 | System.Collections.Generic.List ls = new System.Collections.Generic.List();
68 | model.Repair(ls);
69 |
70 | // System.Console.WriteLine(model.Layers[1].Name);
71 | // WW.Cad.Model.Tables.DxfLayer layer = model.Layers[1];
72 | // layer.Enabled = false;
73 |
74 | // WW.Cad.Example.LayerExtractorVisitor layerExtractorVisitor = new WW.Cad.Example.LayerExtractorVisitor();
75 | // layerExtractorVisitor.Run(model, layer);
76 |
77 |
78 | using (System.IO.FileStream fs = new System.IO.FileStream("oneLayer.dxf", System.IO.FileMode.Create, System.IO.FileAccess.Write, System.IO.FileShare.None))
79 | {
80 | WW.Cad.IO.DxfWriter dxfwriter = new WW.Cad.IO.DxfWriter(fs, model, false);
81 | dxfwriter.Write();
82 | // fs.Flush();
83 | // fs.Close();
84 | } // End Using fs
85 |
86 |
87 | System.Console.WriteLine(System.Environment.NewLine);
88 | System.Console.WriteLine(" --- Press any key to continue --- ");
89 | System.Console.ReadKey();
90 | } // End Sub Main
91 |
92 |
93 | } // End Class Program
94 |
95 |
96 | } // End Namespace DxfLayerSeparation
97 |
--------------------------------------------------------------------------------
/ApertureService/Web References/ApertureCrap/ApScriptingService.wsdl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | This function provides the interface the Scripting Engine
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/ScriptLoader/Scripts/ScriptLoader.js:
--------------------------------------------------------------------------------
1 | var cScriptLoader = (function ()
2 | {
3 | function cScriptLoader(files)
4 | {
5 | var _this = this;
6 | this.log = function (t)
7 | {
8 | console.log("ScriptLoader: " + t);
9 | };
10 | this.withNoCache = function (filename)
11 | {
12 | if (filename.indexOf("?") === -1)
13 | filename += "?no_cache=" + new Date().getTime();
14 | else
15 | filename += "&no_cache=" + new Date().getTime();
16 | return filename;
17 | };
18 | this.loadStyle = function (filename)
19 | {
20 | // HTMLLinkElement
21 | var link = document.createElement("link");
22 | link.rel = "stylesheet";
23 | link.type = "text/css";
24 | link.href = _this.withNoCache(filename);
25 | _this.log('Loading style ' + filename);
26 | link.onload = function ()
27 | {
28 | _this.log('Loaded style "' + filename + '".');
29 | };
30 | link.onerror = function ()
31 | {
32 | _this.log('Error loading style "' + filename + '".');
33 | };
34 | _this.m_head.appendChild(link);
35 | };
36 | this.loadScript = function (i)
37 | {
38 | var script = document.createElement('script');
39 | script.type = 'text/javascript';
40 | script.src = _this.withNoCache(_this.m_js_files[i]);
41 | var loadNextScript = function ()
42 | {
43 | if (i + 1 < _this.m_js_files.length)
44 | {
45 | _this.loadScript(i + 1);
46 | }
47 | };
48 | script.onload = function ()
49 | {
50 | _this.log('Loaded script "' + _this.m_js_files[i] + '".');
51 | loadNextScript();
52 | };
53 | script.onerror = function ()
54 | {
55 | _this.log('Error loading script "' + _this.m_js_files[i] + '".');
56 | loadNextScript();
57 | };
58 | _this.log('Loading script "' + _this.m_js_files[i] + '".');
59 | _this.m_head.appendChild(script);
60 | };
61 | this.loadFiles = function ()
62 | {
63 | // this.log(this.m_css_files);
64 | // this.log(this.m_js_files);
65 | for (var i = 0; i < _this.m_css_files.length; ++i)
66 | _this.loadStyle(_this.m_css_files[i]);
67 | _this.loadScript(0);
68 | };
69 | this.m_js_files = [];
70 | this.m_css_files = [];
71 | this.m_head = document.getElementsByTagName("head")[0];
72 | // this.m_head = document.head; // IE9+ only
73 | function endsWith(str, suffix)
74 | {
75 | if (str === null || suffix === null)
76 | return false;
77 | return str.indexOf(suffix, str.length - suffix.length) !== -1;
78 | }
79 | for (var i = 0; i < files.length; ++i)
80 | {
81 | if (endsWith(files[i], ".css"))
82 | {
83 | this.m_css_files.push(files[i]);
84 | }
85 | else if (endsWith(files[i], ".js"))
86 | {
87 | this.m_js_files.push(files[i]);
88 | }
89 | else
90 | this.log('Error unknown filetype "' + files[i] + '".');
91 | }
92 | }
93 | return cScriptLoader;
94 | })();
95 | var ScriptLoader = new cScriptLoader(["foo.css", "Scripts/Script4.js", "foobar.css", "Scripts/Script1.js", "Scripts/Script2.js", "Scripts/Script3.js"]);
96 | ScriptLoader.loadFiles();
97 |
--------------------------------------------------------------------------------