Last major version of Ab2d.ReaderSvg and ZoomPanel published

by abenedik 17. December 2021 11:01

I would like to inform you that the last major version of Ab2d.ReaderSvg and ZoomPanel libraries have been published.

With this release both libraries have got special builds for .Net 5.0 and .Net 6.0. Also, both libraries are available as NuGet packages. Note that the version that is distributed through NuGet uses a different licensing mechanism than the version that is installed by the evaluation or commercial version installer. The same assembly from NuGet can be used for evaluation and commercial usage. The commercial usage can be activated by calling the SetLicense method. The code for that method can be obtained from the User Account web page.

With the support for the latest .Net versions and NuGet both libraries are updated to the latest standards. 

The Ab2d.ReaderSvg library also got some additional new features that improve reading some more complex svg files that use "use" or "marker" elements. See the changelog for more info.

Both libraries are used by many customers in many commercial products. In the last years, they have received many new features and fixes. This makes then are very mature.

The development at AB4D company is focused on 3D products. Therefore, the 2D products (including Ab2d.ReaderSvg and ZoomPanel) will get only limited support. Also, there are no major new versions planned. The future development will cover only simpler or critical issues or be based on custom development.

Tags:

ReaderSvg | ZoomPanel

New maintenance release of 3D libraries published

by abenedik 2. April 2021 16:39

I would like to inform you that new versions of Ab3d.PowerToys and Ab3d.DXEngine have been published. The main purpose of the new versions is to solve some issues from the previous version. And as always, there are also a few interesting new features.

 

The first new feature that I would like to mention is that the new version of Ab3d.PowerToys supports creating contour lines (also known as isoline). The following image shows contour lines that were created from a height map:

Contour lines (isolone) creared by Ab3d.PowerToys library

 

The contour lines can also be added as part of a 3D plot - to demonstrate that, the existing 3D plot sample was updated to show contour lines:

Plot 3D with contour lines

 

Another bigger new feature is greatly improved support for creating 3D axes. The new axes can be used by many 3D plots and graphs. To support that 2 new classes were added to the Ab3d.PowerToys library. The first is AxisWith3DLabelsVisual3D that can show one axis and shows 3D text (axis title and value labels) by using TextBlockVisual3D objects. This shows text as real 3D objects. The other new class is the AxisWithOverlayLabelsVisual3D. As the name suggest this class is using standard 2D TextBlock elements that are added to an overlay Canvas object. The following image shows AxisWith3DLabelsVisual3D with a few different axis options:

Different axes created by AxisWith3DLabelsVisual3D

 

To simplify showing multiple axes a third class - AxesBoxVisual3D - was added. It can show up to 6 axes. It also dynamically switched the visibility of the axes and orientation so that when user rotates the camera the correct axes are visible and the text is oriented in the correct direction.

So if you want to present your 3D data in some kind of a 3D plot of a 3D graph, you just got great new tools to achieve that quickly.

 

Let me quickly mention some other new features: 

  • Improved HeightMapVisual3D with a new option to use a one-dimensional texture for colors and then adjusting the texture coordinates of the mesh. This better interpolates the colors between various height map values. See updated sample for more info.
  • Added Parent property to the BaseVisual3D object. This way you can easily traverse the hierarchy of objects that derive from BaseVisual3D object - all Visual3D objects from Ab3d.PowerToys, including ContentVisual3D.
  • Improved Boolean operation that can now change only the triangles that intersect the second object.

 

But as mentioned before, most of the work was done to solve issues based on some new testing tools. A few fixes are related to using IsVisible property. The full list of changes can be seen in the Ab3d.PowerToys versions history page.

 

The Ab3d.DXEngine library did not get any bigger new features. But there were some solved issues. See the list of changes in the Ab3d.DXEngine versons history page.

Tags: , ,

DXEngine | ReaderSvg

New version of Ab2d.ReaderSvg supports .Net CORE 3.1

by abenedik 23. December 2019 15:43

I am happy to inform you that a new version of Ab2d.ReaderSvg library is available.

As you can see from the title of this blog post, the Ab2d.ReaderSvg got the .Net CORE 3.1 support and has joined the 3D libraries that also support that.

What is more, this version of Ab2d.ReaderSvg got a new distribution method - it can be installed as a NuGet package from the standard NuGet repository.

The new version is still available as a windows installer (evaluation version can be downloaded from Downloads web page; commercial version can be downloaded from the Users Account web page). The version that is installed with windows installer uses the same licensing mechanism as before – using license.licx files or application license key.

But because the licensing with license.licx files does not work anymore for .Net CORE applications and also because this licensing was not very intuitive to use, the distribution that comes with NuGet uses a new, so called “universal”, licensing mechanism. There a single dll file is used for both evaluation and commercial usage. If the commercial license is not activated, then on first use of the library the user gets a dialog where he can start a 60-day evaluation. But if the user has a commercial license, he can activate it with calling SetLicense method – for example:

Ab2d.Licensing.ReaderSvg.LicenseHelper.SetLicense(licenseOwner: "[CompanyName]", 
                                                  licenseType: "[LicenseType]", 
                                                  license: "[LicenseText]");

This should be easier to setup. The parameters for the SetLicense call will be available from the User Account web page. Currently this is not yet implemented on the web site, but you can contact support and you will get the required code snippet by email.

Because all users will have access to all future library version form NuGet web site, the license parameters also contain information about the updates subscription expiration date. So if you will not have a valid subscription when a new version will be available, you will not be able to use it. This also means that when updates subscription is renewed, then new license parameters will need to be entered to the SetLicense call. If will not want to update to new version, then you will need to limit the version to the last version that you still have access to. If you will want to the new version before renewing the license, you will simply need to comment the SetLicense call and start the library in an evaluation mode.

So to summarize: the new licensing mechanism is much simpler to use and understand, the library requires only one dll for both evaluation and commercial version and therefore it can be distributed as a NuGet package. And this licensing mechanism is supported in .Net CORE 3.1. 

This also means that the .Net CORE version is not available with windows installer. It can be get only from NuGet.

With windows installer you also get samples projects and Users Reference help file. This is not available with NuGet. But there are now more standard ways to get them:

- Samples can get downloaded from GitHub - https://github.com/ab4d/Ab2d.ReaderSvg.Wpf.Samples

- Help is available online - https://www.ab4d.com/help/ReaderSvg/html/R_Project_Ab2d_ReaderSvg_Help.htm

 

Support for .Net CORE 3.1 is not the only new feature of this release. If you are using ReaderSvg to read large svg files, you will be happy to know that the new version got some significant performance optimizations – some svg files can be read a few times faster.

There is also an improved support for reading svg patterns – the new versions now support linked patterns (patterns that have xlink:href set to another pattern).

There are also a few other improvements and fixes. See a full list here: https://www.ab4d.com/ReaderSvg-history.aspx

 

Though most of the development time in the company is spent for 3D libraries, you can see that the 2D libraries are still fully supported and will continue to get new updates in the future. For example, in early 2020 I plan to update ZoomPanel control so that it will also support .Net CORE 3.1 version and be available with NuGet.

Tags:

ReaderSvg

Major update of Ab2d.ReaderSvg brings better support for css styles and more

by abenedik 6. November 2018 17:00

I am happy to inform you that a new major version of Ab2d.ReaderSvg was just published.

The new version has a significantly better support for reading css styles. The new version of the Ab2d.ReaderSvg can now correctly read a css text with multiple class name definitions in one line. Also adding additional properties to already defined class names is now supported. Those two features are required to correctly read the following css definition:

.A, .B { fill: green; } 

.A { stroke: green; }

This update should greatly improve reading css styles from svg files. But because css styles can be incredibly complex, there are still cases that are not supported. Luckily, the main tools that can save to svg files usually do not use such complex css styles and therefore Ab2d.ReaderSvg should be able to read almost all the files.

 

An important new feature is also that ReaderSvg class now has two new delegates: BeforeWpfObjectCreatedCallback and AfterWpfObjectCreatedCallback. The first delegate is called before ReaderSvg creates a WPF object from the svg element. The delegate gets the xml text that is used to define the element. It can be used to create your own WPF object from the xml and pass that back to ReaderSvg. The other delegate is called after the WPF object is created by ReaderSvg. It gets the created WPF object and the xml text. This delegate can be used to read some additional properties from the xml and decorate or change the already created WPF object.

There are also some other improvements and fixes. The whole list can be seen on ReaderSvg versions history web page.

 

This shows that though the main focus of the AB4D company is on developing components for 3D visualization, the 2D tools and importers are still fully supported - most of the updates are based on the great feedback from the customers. So, if you get a svg file that is not correctly imported or you have a good feature request, please send me the svg file or a feature request.

Tags:

ReaderSvg

New version of Ab2d.ReaderSvg library published

by abenedik 17. November 2017 21:15

I would like to inform you that I have just published a new version of Ab2d.ReaderSvg library.

Ab2d.ReaderSvg is the best and most accurate SVG importer library for .Net and can convert SVG elements into WPF objects.

The following is a list of improvements and changes in this version:

  • Added SourceStream property to SvgViewbox and SvgDrawing. This allows reading SVG file from stream (for example to bind memory stream from a database to a SvgViewbox)
  • Improved support for generic font families: serif, sans-serif, monospace, times.
  • Set InnerReaderSvg and NamedObjects properties on ReaderSvg object before SvgViewbox.SvgFileLoaded event is fired (in the previous version those two properties were set after the event was fired and therefore it was not possible to read InnerReaderSvg and NamedObjects in the SvgFileLoaded event handler).
  • Prevented setting RenderTransformOrigin from inkscape:transform-center-x and inkscape:transform-center-y attributes when there is also a transform attribute set. This fix prevents applying an invalid transformation.
  • Fixed reading alpha value when color is specified as "rgba(r,g,b,a)" value.
  • Prevented foreignData elements defined in SVG file that are not supported (for example metafiles) to "hide" other standard SVG elements.
  • Added UseOnlyInstalledFontFamilies property to ReaderSvg. That property can be set to true to prevent creating FontFamily objects with font names that are not installed on the system.

Tags:

ReaderSvg

Maintenance update of Ab2d.ReaderSvg published

by abenedik 24. January 2017 10:09

I would like to inform you that a new maintenance update of Ab2d.ReaderSvg has been published.

The new version adds the following new properties to the ReaderSvg object: IsCorrectingNamesForWpf, MakeNamesUnique and GetCustomSvgElementNameCallback.

They can be used to better control how the names defined in svg file are used on the WPF objects. Before ReaderSvg always corrected the names when they did not fit into WPF’s naming schema. It also made the name unique by adding indexes after duplicated names. But now it is possible to preserve the names as they are in the svg file.

What is more, user now have full control on defining the name with using a custom callback that can be assigned to the new GetCustomSvgElementNameCallback property.

The new version also fixes a rare problem that could occur when an unknow transformation type is defined in svg file.

Also, some users reported that Visual Studio analyzer could in some cases report CA0055 and CA0052 errors when using Ab2d.ReaderSvg library. This has been fixed.

 

The new release also brings a new sample to ZoomPanel project that shows how easy is to use ZoomPanen in WinForms application.

Tags:

ReaderSvg | ZoomPanel

All AB4D libraries improved with new licensing code and many new features

by abenedik 26. April 2016 21:39

I would like to inform you that today new versions of all the AB4D products have been published.

The main reason for this release is that the evaluation and commercial licensing code that is included in all the products have been greatly improved. What is more, the deployment script that I use to prepare all release version have been improved.

Also, all the products got some additional functionality or fixed bugs. For example, the following image shows new ViewCubeCameraController from Ab3d.PowerToys library:

3D ViewCube in Ab3d.PowerToys library

The main benefits of the new licensing and deployment are:

  • All products are now also compiled for .Net 4.5 target framework. This means that all products are available for .Net 3.5, .Net 4.0 and also .Net 4.5 (an exception is Ab3d.DXEngine that does not support .Net 3.5). This will allow using new language features in the libraries – especially async and await support.
  • New evaluation and commercial licensing code is now faster and required less resources.
  • New evaluation code allows starting ad-hock evaluation on a computer that do not have the evaluation version installed. This means that you will be able to create a sample project with an evaluation version and then just copy your application to another computer. At the first start of your application you will get a dialog to start a new evaluation and then be able to continue running your application. In the previous version you needed to install evaluation version on the other computer too.
  • Improved commercial licensing code that brings new options to embed license key into your project and allows using special license key for application. This simplifies compiling projects on cloud base build servers and allows some other non-standard distributions. More details about that can be found in the new “Using commercial version” help file.

The new version also introduces new directory structure that is created after the libraries are installed. In the previous version the libraries for .Net 3.5 framework were installed into “bin” folder and libraries for .Net 4.0 framework were installed into “bin\.Net 4” folder. Now the organization is much more standard: the .Net 3.5 assemblies are in “bin\net35” folder, .Net 4.0 assemblies are in “bin\net40” folder and .Net 4.5 assemblies are in “bin\net45” folder.

This means that you might need to update your references.

The new .Net 4.5 versions of the libraries will allow using async keywords. Currently this has not yet been added to any of the libraries. But in the near future I plan to add support for async to all of the libraries. For example, async loading of 3D models or svg files. Another possibility is to create async methods to animate camera or ZoomPanel.

 

As mentioned before, this release also brings other improvements and fixes.

Ab3d.PowerToys got some great new features. The most highly anticipated feature is the ability to control the camera with 3D cube. The image with three possible cubes was shown before.

Another great addition to the library are new TubePathVisual3D and TubePathMesh3D that allows creating various tube based objects:

3D tube path in Ab3d.PowerToys library

The following is a full list of new features in Ab3d.PowerToys library

  • Added ViewCubeCameraController.
  • Added TubePathVisual3D and TubePathMesh3D.
  • Added support to create extruded MeshGeometry3D that has custom orientation (not only in the direction of Y axis). This can be achieved with using a new override of CreateExtrudedMeshGeometry that also takes shapeYVector parameter.
  • Added IsStartPositionClosed and IsEndPositionClosed properties to TubeLineVisual3D. Also added additional isStartPositionClosed and isEndPositionClosed constructor parameters to the TubeLineMesh3D.
  • Added FreezeMeshGeometry3D to BoxVisual3D and SphereVisual3D to control if the MeshGeometry3D is frozen.
  • Improved TubeVisual3D that now allows setting Height to 0 - this creates an optimized TubeVisual3D without creating both bottom and top ring - in this case only bottom ring is created.
  • Fixed using adjustmentFactor in FitIntoView method.
  • Fixed using FitIntoView when it is called in Loaded method and the Viewport3D is shown in Ab3d.DXEngine.
  • Fixed type used by ShowMovablePlanes property.
  • Improved MouseCameraController to capture the mouse only when the mouse rotation / movement is bigger than a few pixels. This prevents "swallowing" MouseUp event for processing mouse click in EventManager3D.
  • Added UsePreviewEvents property to EventManager3D – when set to true the EventManager3D subscribes to Preview mouse and touch events instead of standard events - for example PreviewMouseUp event instead of MouseUp event. This can be used to use left mouse button for camera rotation and also for click events.
  • Added TurnTo method to FirstPersonCamera - this turns the camera towards the specified position or to the specified direction vector.
  • CameraControlPanel now moves the FirstPersonCamera forward or backwards when ZoomIn or ZoomOut buttons are clicked.
  • When MouseCameraController is used for FirstPersonCamera the mouse wheel now moves camera forward and backwards.

The library also got a few new samples. Two are to demonstrate the ViewCubeCameraController and TubePathVisual3D. There is also a greatly improved FirstPersonCamera sample that also shows how to turn the camera toward the clicked object. Another new sample shows how to create an application where user can draw to a 3D texture – for example to write annotation to a 3D height map.

 

Ab2d.ReaderSvg library that can read svg files also got many new features. 

The new version now supports textPath element that can render text on a path:

Support for svg textPath element in Ab2d.ReaderSvg

Another very interesting new feature is the new GetElementSvgText method that returns the outer xml text of the specified element. This can be very useful when you add some special attributes or elements to the svg elements. If those elements are not standard svg elements, then ReaderSvg cannot read them. But with using GetElementSvgText you can get the xml text from the specified element and then parse the data out of the xml.

The following is a list of all new features:

  • Added support for textPath elements (positioning text on a path).
  • Added GetElementSvgText to get the svg text of the element with the specified id (can be used to read some additional svg properties that are not read by ReaderSvg).
  • Added support for dx and dy properties on the text element.
  • Fixed writing new line characters in XAML.
  • Added support for vertical text (glyph-orientation-vertical svg property).
  • Improved writing images in XAML that are now written in more clear XAML. Also fixed setting Source for images that are created from foreign objects.
  • Added support for reading number lists that end with comma - for example "12, 34, 56," - this prevented reading svg file in the previous version.
  • Improved support for rounder corners on rectangles in case when only rx or only ry is specified - in this case the other value is set to the same value.

 

Other libraries got only a few updates.

For example, the Ab3d.DXEngine library does not have any new feature in the core libraries but there are three new samples that show how to use standard DirectX rendering code inside DXEngine. The samples show how to render 3D cube with SharpDX code, use the camera and camera controller from Ab3d.PowerToys and mix the rendered 3D cube with other 3D objects from Ab3d.PowerToys library.

Ab2d.ReaderWmf got the following new features:

  • Improved reading images with negative scale transformations.
  • Improved positioning text for some special use cases (correctly position text based on the TextAlign mode).
  • Fixed ResourceDictionaryWriter so that the ResolveResourceKeyCallback is called also for root keys.

 

ZoomPanel library was only slightly improved – the number of history items was increased to 100.

Also Ab3d.Reader3ds got only one improvement. The support for reading broken 3ds files has been improved so that some invalid positions that are not used in TriangleIndices are fixed. This prevents creating too big bounds value that is usually used to position the camera after the model is loaded. 

 

I am really excited about this release. It improves many aspects of the libraries that are not related to the core functionality but are needed because of licensing. It also enables many new features that are possible with .Net 4.5 and allows creating more user friendly APIs with async methods.

Tags: , , , , ,

Ab3d.PowerToys | DXEngine | Reader3ds | ReaderSvg | ReaderWmf | ZoomPanel