VectorDraw.Drawing.Framework.Net-4.x 11.3.1

dotnet add package VectorDraw.Drawing.Framework.Net-4.x --version 11.3.1                
NuGet\Install-Package VectorDraw.Drawing.Framework.Net-4.x -Version 11.3.1                
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="VectorDraw.Drawing.Framework.Net-4.x" Version="11.3.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add VectorDraw.Drawing.Framework.Net-4.x --version 11.3.1                
#r "nuget: VectorDraw.Drawing.Framework.Net-4.x, 11.3.1"                
#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.
// Install VectorDraw.Drawing.Framework.Net-4.x as a Cake Addin
#addin nuget:?package=VectorDraw.Drawing.Framework.Net-4.x&version=11.3.1

// Install VectorDraw.Drawing.Framework.Net-4.x as a Cake Tool
#tool nuget:?package=VectorDraw.Drawing.Framework.Net-4.x&version=11.3.1                

About

Create .Net managed applications with 2D/3D graphics that manages(Import/export) a big range of formats and geometrical shapes

Nuget Important Setting

The library is created in such a way so it can be used in both x32 and x64 applications. Note that in order to use the VectorDraw Developers Framework nuget the package management of Visual Studio must be PackageReference. Go to Tools->Nuget Package Manager->Package Manager Settings and then General tab under Nuget Package Manager.

How to Use

Add package to your .Net managed Application. This package Supports Windows 7 and above x64 and x32 Platform target. Can be used in Framework 4.8 and below projects. See the following examples for a quick start

Add License to your applications exe

Registered users must also add VectorDraw Licence to their Applications. The license is added to the application by vdLic.exe and using the serial both provided by VectorDraw. If the license is not present then the package works in evaluation mode for 180 days. Edit the build events of your Application and add the followings to the .csproj file

<Target Name = "PostBuild" AfterTargets="PostBuildEvent">
	<Exec Command = "&quot;$(VDRAWDEV)vdlic.exe&quot;  &quot;$(TargetPath)&quot;" />
</Target >
<Target Name="AddPayloadsFolder" AfterTargets="Publish">
	<Exec Command = "&quot;$(VDRAWDEV)vdlic.exe&quot;  &quot;$(PublishDir)$(targetfilename)&quot;" />
</Target >

# Example 1
View and Edit Drawings inside a 'Window Form App':
There is no need to add the control to the form , it is added by the below code!
```csharp
   public partial class Form1 : Form
   {
       vdControls.vdFramedControl vd = new vdControls.vdFramedControl();
       public Form1()
       {
           InitializeComponent();
           vd.Dock = DockStyle.Fill;
           this.Controls.Add( vd );
           this.WindowState = FormWindowState.Maximized;
       }
   }

Example 2

Create simple entities and save to a drawing inside a 'Window Form App': There is no need to add the control to the form , it is added by the below code!

 public partial class Form1 : Form
    {
        vdControls.vdFramedControl vd = new vdControls.vdFramedControl();
        public Form1()
        {
            InitializeComponent();
            vd.Dock = DockStyle.Fill;
            this.Controls.Add(vd);
            this.WindowState = FormWindowState.Maximized;
        }
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            vdDocument doc = vd.BaseControl.ActiveDocument;
            doc.New();//clear the document and initialize it to the defualt state with empty model entities
            //create a new vdline
            vdLine line1 = new vdLine(doc,new VectorDraw.Geometry.gPoint(0,0,0), new VectorDraw.Geometry.gPoint(2,2,0));
            doc.Model.Entities.AddItem(line1);
            vdCircle circle = new vdCircle(doc, new VectorDraw.Geometry.gPoint(1, 1, 0), 1.0);
            doc.Model.Entities.AddItem(circle);
            doc.ZoomExtents();
            doc.Redraw(false);
            //opens the Save dialog and prompts the user to select a file type to save the drawing
            bool success = vdCommandAction.SaveAsEx(doc);
            //alternate save it direct to a file type in local dist
            //bool success = doc.SaveAs(System.IO.Path.GetDirectoryName(Application.ExecutablePath) + @"/vectordraw.pdf");
        }
    }

Example 3

Create 3d entities inside a 'Window Form App': There is no need to add the control to the form , it is added by the below code!

  public partial class Form1 : Form
    {
        vdControls.vdFramedControl vd = new vdControls.vdFramedControl();
        public Form1()
        {
            InitializeComponent();
            vd.Dock = DockStyle.Fill;
            this.Controls.Add(vd);
            this.WindowState = FormWindowState.Maximized;
        }
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            vdDocument doc = vd.BaseControl.ActiveDocument;
            doc.New();//clear the document and initialize it to the defualt state with empty model entities
            //create a new cube
            vdPolyface cube = new vdPolyface(doc);
            cube.CreateBox(new VectorDraw.Geometry.gPoint(0, 0, 0), 4, 4, 4, 0);
            //create a cylider represent the hole
            vdPolyface cylider = new vdPolyface(doc);
            cylider.CreateCone(new VectorDraw.Geometry.gPoint(2, 2, -1), 2, 2, 6, 16);
            //subtruct the cylider from the cube to a new object entitiy
            vdPolyface result = new vdPolyface(doc);

            result.CombinePolyfacesEx(cube, cylider, BooleanOperation.Substraction);
            //add the entitity to the document
            doc.Model.Entities.AddItem(result);

            //shading the result in NorthEast view
            doc.RenderMode = VectorDraw.Render.vdRender.Mode.Shade;
            doc.CommandAction.View3D("VINE");
            doc.Redraw(false);
        }
    }

Example 4

Open IFC documents inside a 'Window Form App': There is no need to add the control to the form , it is added by the below code!

using VectorDraw.Professional.ActionUtilities;
using VectorDraw.Professional.vdObjects;

namespace WinFormsApp3
{
    public partial class Form1 : Form
    {
        vdControls.vdFramedControl vd = new vdControls.vdFramedControl();
        vdIFC.vdIFCComponent iFC = new vdIFC.vdIFCComponent();
        public Form1()
        {
            InitializeComponent();
            vd.Dock = DockStyle.Fill;
            this.Controls.Add(vd);
            this.WindowState = FormWindowState.Maximized;
        }
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            vdDocument doc = vd.BaseControl.ActiveDocument;
            iFC.MeterProgress = doc.MeterProgress;//pipe the IFC progress throw our base document progress
            //events needs to implement IFC openning
            doc.OnAfterOpenDocument += new vdDocument.AfterOpenDocument(doc_OnAfterOpenDocument);
            doc.OnIsValidOpenFormat += Doc_OnIsValidOpenFormat;
            doc.OnLoadUnknownFileName += Doc_OnLoadUnknownFileName;
            doc.OnGetOpenFileFilterFormat += ActiveDocument_OnGetOpenFileFilterFormat;
            //begin an open file dialog prompting the user to select a file from local disk
            vdCommandAction.OpenEx(doc);
        }
        void ActiveDocument_OnGetOpenFileFilterFormat(ref string openFilter)
        {
            //add the ifc to the open dialog filter types
            openFilter = vdIFC.vdIFCComponent.DefaultOpenDialogFilter + openFilter;
        }
        private void Doc_OnLoadUnknownFileName(object sender, string fileName, out bool success)
        {
            success = false;
            vdDocument mdoc = (vdDocument)sender;
            if (mdoc != null && vdIFC.vdIFCComponent.IsIFCExtension(fileName))
            {
                //because the vdIFCDocument represents a single entity 
                //if the selected file is IFC then add the vdIFCDocument to the document model entities
                vdIFC.vdIFCDocument vdifcdoc = iFC.Open(fileName);
                if (vdifcdoc != null)
                {
                    mdoc.EnsureDefaults();
                    mdoc.Model.Entities.AddItem(vdifcdoc);
                    success = true;
                }
            }
        }

        private void Doc_OnIsValidOpenFormat(object sender, string extension, ref bool success)
        {
            //info the document that the IFC is a known valid format
            success = vdIFC.vdIFCComponent.IsIFCExtension(extension);
        }
        void doc_OnAfterOpenDocument(object sender)
        {
            //because IFC are usually 3d drawings change the render mode to 3d shading and also change the background to White than black which is the default
            vdDocument mdoc = (vdDocument)sender;
            if (mdoc != null && vdIFC.vdIFCComponent.IsIFCExtension(mdoc.FileName))
            {
                mdoc.RenderMode = VectorDraw.Render.vdRender.Mode.Shade;
                mdoc.Background = Color.White;
                //view the drawing from North East direction
                mdoc.CommandAction.View3D("VINE");
            }
        }
    }
}

Main Types

The main types provided by this library are:

  • VectorDraw.Professional.Components.vdDocumentComponent
  • VectorDraw.Professional.Control.VectorDrawBaseControl
  • vdControls.vdFramedControl
  • VectorDraw.Professional.Converter.vdConverter
  • vdIFC.vdIFCComponent

Key Features

  • View Edit Print Export 2D and 3D Drawings with various formats .vds , .vdml , .vdcl , .dwg , .dxf , .pdf , .dgn , .ifc , .dwf , .skp , .stl , .obj , .dae , .stp , .step , .las , .laz , .sat , .svg , .hpg, .emf , .wmf , .vdf , .vdi , .jpg , .bmp , .png , .gif , .tif , .ico
  • High performance rendering and memory managment
  • dwg/dxf like formatted object model
  • import/export formats dwg dgn dxf pdf ifc skp obj dae stl dwf emf wmf hpg images(bmp jpg png gif tif ico) VectorDraw (vdml vdcl vds ) Only exported(svg hpgl) Only imported(las laz stp step)
  • Predefined commands with user actions
  • user interaction designed for all requirements:select osnaps grips
  • Touch screen drivers supported
  • Design and object customization
  • Opengl full supported drivers for 3d rendering
  • Print out with big resolution and paper sizes supported
  • Geomertic utility functions
  • 3d boolean oparation
  • Easy distribution with also Side By Side installation for .net applications
  • WPF component also supported
  • COM developer enviroments Support
  • Linux 64bit SideByside with mono installed
  • Design to supported by web services
  • Web canvas control for all browsers that support canvas html element .Webgl also supported for 3d renderings
Product Compatible and additional computed target framework versions.
.NET Framework net40 is compatible.  net403 was computed.  net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.0

    • No dependencies.

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
11.3.1 318 11/5/2024
11.2.20 1,034 10/9/2024
11.2.4 211 10/1/2024
11.2.3 516 9/5/2024
11.2.2 812 7/26/2024
11.2.1 235 7/16/2024
11.1.20 467 6/12/2024
11.1.5 426 5/30/2024
11.1.4 420 4/18/2024
11.1.3 543 3/21/2024
11.1.2 738 2/21/2024