Skip to content

Commit

Permalink
Merge branch 'release/v0.1.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanRynne committed Dec 18, 2020
2 parents 906a375 + 093deb5 commit b0b62fe
Show file tree
Hide file tree
Showing 61 changed files with 1,135 additions and 1,156 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: .NET Core

on:
push:
branches: [ master, develop ]
branches: [ master, develop, ci/* ]
pull_request:
branches: [ master, develop ]

Expand All @@ -23,4 +23,8 @@ jobs:
- name: 🏗 Build
run: dotnet build --configuration Release --no-restore
- name: 🧪 Test
run: dotnet test --no-restore --verbosity normal
run: dotnet test --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=../coverage/opencover.xml
- name: 📚 Push to Codecov.io
uses: codecov/codecov-action@v1
with:
file: coverage/opencover.xml
6 changes: 4 additions & 2 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
run: dotnet build --configuration Release --no-restore

- name: 🧪 Test
run: dotnet test --no-restore --verbosity normal
run: dotnet test --no-restore

- name: 🗜 Compress build files # This would actually build your project, using zip for an example artifact
run: zip --junk-paths ./Paramdigma.Core.zip ./src/bin/Release/netstandard2.0/*
Expand Down Expand Up @@ -57,7 +57,9 @@ jobs:
- name: 📦 Create the package
run: dotnet pack --configuration Release src/Paramdigma.Core.csproj
- name: 🚀 Publish the package to GPR
run: dotnet nuget push src/bin/Release/*.nupkg
run: dotnet nuget push src/bin/Release/*.nupkg -k ${PUSH_TOKEN}
env:
PUSH_TOKEN: ${{secrets.GITHUB_TOKEN}}

deploy_docs:
runs-on: ubuntu-latest
Expand Down
1 change: 0 additions & 1 deletion src/Curves/Geodesics.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using Paramdigma.Core.Geometry;
using Paramdigma.Core.HalfEdgeMesh;

namespace Paramdigma.Core.Curves
{
Expand Down
1 change: 0 additions & 1 deletion src/Curves/LevelSets.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using Paramdigma.Core.Geometry;
using Paramdigma.Core.HalfEdgeMesh;

namespace Paramdigma.Core.Curves
{
Expand Down
178 changes: 89 additions & 89 deletions src/Geometry/3D/Primitives/Box.cs → src/Geometry/Box.cs
Original file line number Diff line number Diff line change
@@ -1,90 +1,90 @@
using Paramdigma.Core.Collections;

namespace Paramdigma.Core.Geometry
{
/// <summary>
/// Represents a 3D box.
/// </summary>
public class Box
{
/// <summary>
/// Initializes a new instance of the <see cref="Box" /> class.
/// </summary>
/// <param name="plane">Base plane of the box.</param>
/// <param name="domainX">Range of values in the X axis.</param>
/// <param name="domainY">Range of values in the Y axis.</param>
/// <param name="domainZ">Range of values in the Z axis.</param>
public Box(Plane plane, Interval domainX, Interval domainY, Interval domainZ)
{
this.Plane = plane;
this.DomainX = domainX;
this.DomainY = domainY;
this.DomainZ = domainZ;
}


/// <summary>
/// Initializes a new instance of the <see cref="Box" /> class from 2 corners. Both corners will
/// form the diagonal of
/// the box.
/// </summary>
/// <param name="lower">Lower left corner point.</param>
/// <param name="upper">Upper right corner point.</param>
public Box(Point3d lower, Point3d upper)
{
this.Plane = Plane.WorldXY;
this.DomainX = new Interval(lower.X, upper.X);
this.DomainY = new Interval(lower.Y, upper.Y);
this.DomainZ = new Interval(lower.Z, upper.Z);
}


/// <summary>
/// Gets or sets the box's base plane.
/// </summary>
/// <value><see cref="Plane" />.</value>
public Plane Plane { get; set; }

/// <summary>
/// Gets or sets the box's X axis domain.
/// </summary>
/// <value><see cref="Interval" />.</value>
public Interval DomainX { get; set; }

/// <summary>
/// Gets or sets the box's Y axis domain.
/// </summary>
/// <value><see cref="Interval" />.</value>
public Interval DomainY { get; set; }

/// <summary>
/// Gets or sets the box's Z axis domain.
/// </summary>
/// <value><see cref="Interval" />.</value>
public Interval DomainZ { get; set; }

/// <summary>
/// Gets the corner point with lowest values.
/// </summary>
/// <returns><see cref="Point3d" />.</returns>
public Point3d Min => new Point3d(
this.DomainX.Start,
this.DomainY.Start,
this.DomainZ.Start);

/// <summary>
/// Gets the corner point with highest values.
/// </summary>
/// <returns><see cref="Point3d" />.</returns>
public Point3d Max => new Point3d(this.DomainX.End, this.DomainY.End, this.DomainZ.End);

/// <summary>
/// Gets the center point of the box.
/// </summary>
/// <returns><see cref="Point3d" />.</returns>
public Point3d Center => new Point3d(
this.DomainX.RemapFromUnit(0.5),
this.DomainY.RemapFromUnit(0.5),
this.DomainZ.RemapFromUnit(0.5));
}
using Paramdigma.Core.Collections;

namespace Paramdigma.Core.Geometry
{
/// <summary>
/// Represents a 3D box.
/// </summary>
public class Box
{
/// <summary>
/// Initializes a new instance of the <see cref="Box" /> class.
/// </summary>
/// <param name="plane">Base plane of the box.</param>
/// <param name="domainX">Range of values in the X axis.</param>
/// <param name="domainY">Range of values in the Y axis.</param>
/// <param name="domainZ">Range of values in the Z axis.</param>
public Box(Plane plane, Interval domainX, Interval domainY, Interval domainZ)
{
this.Plane = plane;
this.DomainX = domainX;
this.DomainY = domainY;
this.DomainZ = domainZ;
}


/// <summary>
/// Initializes a new instance of the <see cref="Box" /> class from 2 corners. Both corners will
/// form the diagonal of
/// the box.
/// </summary>
/// <param name="lower">Lower left corner point.</param>
/// <param name="upper">Upper right corner point.</param>
public Box(Point3d lower, Point3d upper)
{
this.Plane = Plane.WorldXY;
this.DomainX = new Interval(lower.X, upper.X);
this.DomainY = new Interval(lower.Y, upper.Y);
this.DomainZ = new Interval(lower.Z, upper.Z);
}


/// <summary>
/// Gets or sets the box's base plane.
/// </summary>
/// <value><see cref="Plane" />.</value>
public Plane Plane { get; set; }

/// <summary>
/// Gets or sets the box's X axis domain.
/// </summary>
/// <value><see cref="Interval" />.</value>
public Interval DomainX { get; set; }

/// <summary>
/// Gets or sets the box's Y axis domain.
/// </summary>
/// <value><see cref="Interval" />.</value>
public Interval DomainY { get; set; }

/// <summary>
/// Gets or sets the box's Z axis domain.
/// </summary>
/// <value><see cref="Interval" />.</value>
public Interval DomainZ { get; set; }

/// <summary>
/// Gets the corner point with lowest values.
/// </summary>
/// <returns><see cref="Point3d" />.</returns>
public Point3d Min => new Point3d(
this.DomainX.Start,
this.DomainY.Start,
this.DomainZ.Start);

/// <summary>
/// Gets the corner point with highest values.
/// </summary>
/// <returns><see cref="Point3d" />.</returns>
public Point3d Max => new Point3d(this.DomainX.End, this.DomainY.End, this.DomainZ.End);

/// <summary>
/// Gets the center point of the box.
/// </summary>
/// <returns><see cref="Point3d" />.</returns>
public Point3d Center => new Point3d(
this.DomainX.RemapFromUnit(0.5),
this.DomainY.RemapFromUnit(0.5),
this.DomainZ.RemapFromUnit(0.5));
}
}
File renamed without changes.
Loading

0 comments on commit b0b62fe

Please sign in to comment.