netcore-sci 1.0.22

Package Description

There is a newer version of this package available.
See the version list below for details.
Install-Package netcore-sci -Version 1.0.22
dotnet add package netcore-sci --version 1.0.22
<PackageReference Include="netcore-sci" Version="1.0.22" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add netcore-sci --version 1.0.22
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

netcore-sci

NuGet Badge

Quality Gate Status

.NET core sci

<hr/>

Quickstart

From examples follow example_0001 can be created following these steps:

  • create console project
dotnet new console -n example_0001
cd example_0001
  • add reference to netcore-sci ( check latest version here )
dotnet add package netcore-sci --version 1.0.21

if prefer to link source code directly to stepin with debugger add project reference instead

dotnet add reference ../../netcore-sci/netcore-sci.csproj
  • setup example code
using static System.Math;
using SearchAThing.Sci;
using SearchAThing;

namespace example_0001
{
    class Program
    {
        static void Main(string[] args)
        {
            var tol = 1e-8;
            var R = 100;

            var dxf = new netDxf.DxfDocument();
            var ang = 0d;
            var angStep = 10d.ToRad();
            var angElev = 20d.ToRad();

            var o = Vector3D.Zero;
            var p = new Vector3D(R, 0, 0);

            Circle3D circ = null;

            while (ang < 2 * PI)
            {
                var l = new Line3D(o, p.RotateAboutZAxis(ang));
                var l_ent = l.DxfEntity;
                l_ent.Color = netDxf.AciColor.Cyan;
                dxf.AddEntity(l_ent);

                var arcCS = new CoordinateSystem3D(o, l.V, Vector3D.ZAxis);
                var arc = new Arc3D(tol, arcCS, R, 0, angElev);
                var arc_ent = arc.DxfEntity;
                arc_ent.Color = netDxf.AciColor.Yellow;
                dxf.AddEntity(arc_ent);

                var arc2CS = new CoordinateSystem3D(l.To - R * Vector3D.ZAxis,
                    Vector3D.ZAxis, Vector3D.Zero - l.To);
                var arc2 = new Arc3D(tol, arc2CS, R, 0, PI / 2);
                var arc2_ent = arc2.DxfEntity;
                arc2_ent.Color = netDxf.AciColor.Green;
                dxf.AddEntity(arc2_ent);

                if (circ == null)
                {
                    circ = new Circle3D(tol,
                        CoordinateSystem3D.WCS.Move(Vector3D.ZAxis * arc.To.Z),
                        arc.To.Distance2D(Vector3D.Zero));
                    var circ_ent = circ.DxfEntity;
                    circ_ent.Color = netDxf.AciColor.Yellow;
                    dxf.AddEntity(circ_ent);
                }

                ang += angStep;
            }

            dxf.Viewport.ShowGrid = false;
            dxf.Save("output.dxf");
        }
    }
}
  • execute
dotnet run

<img src="examples/example_0001/output.png" width=300>

API Documentation

Unit tests

  • debugging unit tests
    • from vscode just run debug test from code lens balloon
  • executing all tests
    • from solution root folder dotnet test
  • testing coverage
    • from vscode run task ( ctrl+shift+p ) Tasks: Run Task then test with coverage ( .NET Core Test Explorer extension required then move to some file eg. Vector3D.cs and click on Add Watch from bottom bar )

How this project was built

mkdir netcore-sci
cd netcore-sci

dotnet new sln
dotnet new classlib -n netcore-sci

cd netcore-sci
dotnet add package netcore-util --version 1.0.2
dotnet add package netcore-psql-util --version 1.0.3
dotnet add package netDXF.Standard --version 2.1.1
cd ..

dotnet new xunit -n test
cd test
dotnet add reference ../netcore-sci/netcore-sci.csproj
cd ..

dotnet sln netcore-sci.sln add netcore-sci/netcore-sci.csproj
dotnet sln netcore-sci.sln add test/test.csproj
dotnet restore
dotnet build
dotnet test test/test.csproj

netcore-sci

NuGet Badge

Quality Gate Status

.NET core sci

<hr/>

Quickstart

From examples follow example_0001 can be created following these steps:

  • create console project
dotnet new console -n example_0001
cd example_0001
  • add reference to netcore-sci ( check latest version here )
dotnet add package netcore-sci --version 1.0.21

if prefer to link source code directly to stepin with debugger add project reference instead

dotnet add reference ../../netcore-sci/netcore-sci.csproj
  • setup example code
using static System.Math;
using SearchAThing.Sci;
using SearchAThing;

namespace example_0001
{
    class Program
    {
        static void Main(string[] args)
        {
            var tol = 1e-8;
            var R = 100;

            var dxf = new netDxf.DxfDocument();
            var ang = 0d;
            var angStep = 10d.ToRad();
            var angElev = 20d.ToRad();

            var o = Vector3D.Zero;
            var p = new Vector3D(R, 0, 0);

            Circle3D circ = null;

            while (ang < 2 * PI)
            {
                var l = new Line3D(o, p.RotateAboutZAxis(ang));
                var l_ent = l.DxfEntity;
                l_ent.Color = netDxf.AciColor.Cyan;
                dxf.AddEntity(l_ent);

                var arcCS = new CoordinateSystem3D(o, l.V, Vector3D.ZAxis);
                var arc = new Arc3D(tol, arcCS, R, 0, angElev);
                var arc_ent = arc.DxfEntity;
                arc_ent.Color = netDxf.AciColor.Yellow;
                dxf.AddEntity(arc_ent);

                var arc2CS = new CoordinateSystem3D(l.To - R * Vector3D.ZAxis,
                    Vector3D.ZAxis, Vector3D.Zero - l.To);
                var arc2 = new Arc3D(tol, arc2CS, R, 0, PI / 2);
                var arc2_ent = arc2.DxfEntity;
                arc2_ent.Color = netDxf.AciColor.Green;
                dxf.AddEntity(arc2_ent);

                if (circ == null)
                {
                    circ = new Circle3D(tol,
                        CoordinateSystem3D.WCS.Move(Vector3D.ZAxis * arc.To.Z),
                        arc.To.Distance2D(Vector3D.Zero));
                    var circ_ent = circ.DxfEntity;
                    circ_ent.Color = netDxf.AciColor.Yellow;
                    dxf.AddEntity(circ_ent);
                }

                ang += angStep;
            }

            dxf.Viewport.ShowGrid = false;
            dxf.Save("output.dxf");
        }
    }
}
  • execute
dotnet run

<img src="examples/example_0001/output.png" width=300>

API Documentation

Unit tests

  • debugging unit tests
    • from vscode just run debug test from code lens balloon
  • executing all tests
    • from solution root folder dotnet test
  • testing coverage
    • from vscode run task ( ctrl+shift+p ) Tasks: Run Task then test with coverage ( .NET Core Test Explorer extension required then move to some file eg. Vector3D.cs and click on Add Watch from bottom bar )

How this project was built

mkdir netcore-sci
cd netcore-sci

dotnet new sln
dotnet new classlib -n netcore-sci

cd netcore-sci
dotnet add package netcore-util --version 1.0.2
dotnet add package netcore-psql-util --version 1.0.3
dotnet add package netDXF.Standard --version 2.1.1
cd ..

dotnet new xunit -n test
cd test
dotnet add reference ../netcore-sci/netcore-sci.csproj
cd ..

dotnet sln netcore-sci.sln add netcore-sci/netcore-sci.csproj
dotnet sln netcore-sci.sln add test/test.csproj
dotnet restore
dotnet build
dotnet test test/test.csproj

NuGet packages (2)

Showing the top 2 NuGet packages that depend on netcore-sci:

Package Downloads
SearchAThing.Wpf
WPF library that uses netcore-sci
netcore-opengl
Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.11.0 0 8/6/2020
1.10.0 68 8/4/2020
1.9.1 18 8/4/2020
1.9.0 39 8/3/2020
1.8.0 72 8/3/2020
1.7.0 61 7/20/2020
1.6.0 101 7/19/2020
1.5.0 93 7/15/2020
1.4.0 127 7/4/2020
1.3.1 65 7/3/2020
1.3.0 59 7/2/2020
1.2.2 112 6/29/2020
1.2.1 177 6/28/2020
1.2.0 27 6/28/2020
1.1.34 48 6/27/2020
1.1.33 91 6/24/2020
1.1.32 109 4/9/2020
1.1.31 129 1/8/2020
1.1.30 99 12/30/2019
1.0.30 145 8/14/2019
1.0.29 124 8/14/2019
1.0.28 121 8/13/2019
1.0.27 128 7/15/2019
1.0.26 126 7/13/2019
1.0.24 123 7/12/2019
1.0.22 142 7/12/2019
1.0.21 148 7/12/2019
1.0.20 142 7/11/2019
1.0.19 130 7/1/2019
1.0.18 126 7/1/2019
1.0.17 137 6/29/2019
1.0.16 136 6/29/2019
1.0.15 134 6/29/2019
1.0.13 133 6/26/2019
1.0.12 127 6/26/2019
1.0.11 137 6/23/2019
1.0.10 136 6/23/2019
1.0.9 137 6/23/2019
1.0.8 131 6/23/2019
1.0.7 144 6/22/2019
1.0.6 135 6/20/2019
1.0.5 140 6/20/2019
1.0.4 137 6/20/2019
1.0.2 131 6/20/2019
1.0.1 136 6/20/2019
1.0.0 142 6/20/2019
Show less