OCCSVG.NET
1.0.1-beta1
dotnet add package OCCSVG.NET --version 1.0.1-beta1
NuGet\Install-Package OCCSVG.NET -Version 1.0.1-beta1
<PackageReference Include="OCCSVG.NET" Version="1.0.1-beta1" />
<PackageVersion Include="OCCSVG.NET" Version="1.0.1-beta1" />
<PackageReference Include="OCCSVG.NET" />
paket add OCCSVG.NET --version 1.0.1-beta1
#r "nuget: OCCSVG.NET, 1.0.1-beta1"
#:package OCCSVG.NET@1.0.1-beta1
#addin nuget:?package=OCCSVG.NET&version=1.0.1-beta1&prerelease
#tool nuget:?package=OCCSVG.NET&version=1.0.1-beta1&prerelease
Welcome to OCCSVG.NET
OCCSVG.NET
This is a library designed for reading SVG files (Scalable Vector Graphic), accurately interpreting shapes, including their strokes, fills, and other properties. It supports most types of gradients, patterns, which gives designers the freedom to define their drawings in almost any vector drawing application and save them into SVG file.
Additionally, the OCCSVGViewer application can view and explore SVG files.
OCCSVGViewer
The application is a demo using 3D-Viewer built on Occt.NET (7.9.0). The demo is available on the GitHub, displays also the SVG model's topology and its elements in a TreeView. It allows for editing the elements in Tree, so it can be used to see how arbitrary SVG code will be displayed using the library.
The OCCSVG.NET package is built upon several key technologies: .Net, C#, C++/CLI. It also uses Occt.NET (version 7.9.0), which is based on Open CASCADE Technology (OCCT), is available from: https://www.nuget.org/packages/Occt.NET.
Development requirements
Microsoft Visual Studio Professional 2022 (64-bit) * .Net Desktop workload * .Net Standard 8.0 support component
Unsupported Features:
* Reading marker elements (e.g., line starting and ending shapes)
* Reading clipPath and mask elements
* Reading Text on Path
* Reading image is not currently supported
For Developer
Standard code:
<br> <img width="571" height="357" alt="image" src="https://github.com/user-attachments/assets/881ad13c-b37e-4f67-901e-84e61913dd04" /> <br>
<code color="gray"> // Handling of shape outside of an OCCSVG.NET OCCElement doc = reader.Open(fileName);
foreach (var element in doc.Children) { if (element.TopoShape == null) continue; // Create AIS_Shape for visualization AIS_Shape aisShape = new AIS_Shape(element.TopoShape); this.View.DisplayShape(aisShape); } </code>
<code color="gray"> // Get elements by class name List<PathSegment> paths = doc.GetAllElements<PathSegment>(); List<Rectangle> Rectangles = doc.GetAllElements<Rectangle>(); </code>
<code color="gray"> // Get element by selected node name TreeNode node = this.ModelTreeView.SelectedNode; if (node != null) { AOCCBaseElement element = doc.GetElementByName(node.Name); } </code>
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0-windows7.0 is compatible. net9.0-windows was computed. net10.0-windows was computed. |
-
net8.0-windows7.0
- Occt.NET (>= 7.9.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.1-beta1 | 113 | 9/28/2025 |
| 1.0.1-alpha4 | 224 | 9/15/2025 |
| 1.0.1-alpha3 | 113 | 9/14/2025 |