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

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.30 58 8/14/2019
1.0.29 52 8/14/2019
1.0.28 54 8/13/2019
1.0.27 64 7/15/2019
1.0.26 63 7/13/2019
1.0.24 60 7/12/2019
1.0.22 56 7/12/2019
1.0.21 60 7/12/2019
1.0.20 61 7/11/2019
1.0.19 65 7/1/2019
1.0.18 58 7/1/2019
1.0.17 68 6/29/2019
1.0.16 64 6/29/2019
1.0.15 62 6/29/2019
1.0.13 62 6/26/2019
1.0.12 62 6/26/2019
1.0.11 65 6/23/2019
1.0.10 64 6/23/2019
1.0.9 63 6/23/2019
1.0.8 63 6/23/2019
1.0.7 64 6/22/2019
1.0.6 62 6/20/2019
1.0.5 66 6/20/2019
1.0.4 65 6/20/2019
1.0.2 61 6/20/2019
1.0.1 62 6/20/2019
1.0.0 66 6/20/2019
Show less