OCCSVG.NET 1.0.1-beta1

This is a prerelease version of OCCSVG.NET.
dotnet add package OCCSVG.NET --version 1.0.1-beta1
                    
NuGet\Install-Package OCCSVG.NET -Version 1.0.1-beta1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OCCSVG.NET" Version="1.0.1-beta1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OCCSVG.NET" Version="1.0.1-beta1" />
                    
Directory.Packages.props
<PackageReference Include="OCCSVG.NET" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OCCSVG.NET --version 1.0.1-beta1
                    
#r "nuget: OCCSVG.NET, 1.0.1-beta1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OCCSVG.NET@1.0.1-beta1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OCCSVG.NET&version=1.0.1-beta1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=OCCSVG.NET&version=1.0.1-beta1&prerelease
                    
Install as a Cake Tool

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 Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible.  net9.0-windows was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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