Skip to content

Commit

Permalink
Refactors Intersection namespaces. Adds placeholder folders.
Browse files Browse the repository at this point in the history
  • Loading branch information
d3ssy committed Sep 3, 2021
1 parent 453a092 commit 55e9c06
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 25 deletions.
2 changes: 1 addition & 1 deletion src/GShark.Test.XUnit/Operation/IntersectionTests.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using FluentAssertions;
using GShark.Core;
using GShark.Core.IntersectionResults;
using GShark.Geometry;
using GShark.Operation;
using System.Collections.Generic;
using GShark.Intersection;
using Xunit;
using Xunit.Abstractions;

Expand Down
6 changes: 6 additions & 0 deletions src/GShark/GShark.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,10 @@
<None Include="../../media/gshark-logo.png" Pack="true" PackagePath="" />
</ItemGroup>

<ItemGroup>
<Folder Include="Analysis\" />
<Folder Include="Modify\" />
<Folder Include="Evaluation\" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions src/GShark/Geometry/Circle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System;
using System.Linq;
using GShark.Interfaces;
using GShark.Intersection;
using GShark.Operation;

namespace GShark.Geometry
Expand Down
1 change: 1 addition & 0 deletions src/GShark/Geometry/Polyline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Collections.Generic;
using System.Linq;
using GShark.Interfaces;
using GShark.Intersection;
using GShark.Operation;

namespace GShark.Geometry
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using GShark.Geometry;
using System;
using System;
using GShark.Geometry;
using GShark.Intersection.BoundingBoxTree;

namespace GShark.Core.BoundingBoxTree
namespace GShark.Interfaces
{
/// <summary>
/// Interface defining the requirements used by <see cref="BoundingBoxOperations"/>.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
using GShark.Geometry;
using System;
using System;
using System.Collections.Generic;
using GShark.Geometry;
using GShark.Interfaces;

namespace GShark.Core.BoundingBoxTree
namespace GShark.Intersection.BoundingBoxTree
{
/// <summary>
/// A collection of tools operating on bounding box trees.
Expand All @@ -26,7 +27,7 @@ internal static List<Tuple<T1, T2>> BoundingBoxTreeIntersection<T1, T2>(IBoundin
aTrees.Add(bbt1);
bTrees.Add(bbt2);

return FindTheRoot(aTrees, bTrees, tolerance);
return GetRoot(aTrees, bTrees, tolerance);
}

/// <summary>
Expand All @@ -46,7 +47,7 @@ internal static List<Tuple<T1, T1>> BoundingBoxTreeIntersection<T1>(IBoundingBox
aTrees.Add(firstSplit.Item1);
bTrees.Add(firstSplit.Item2);

return FindTheRoot(aTrees, bTrees, tolerance);
return GetRoot(aTrees, bTrees, tolerance);
}

/// <summary>
Expand Down Expand Up @@ -111,7 +112,7 @@ internal static List<T> BoundingBoxPlaneIntersection<T>(IBoundingBoxTree<T> bbt,
/// <param name="bTrees">The second Bounding box tree object.</param>
/// <param name="tolerance">Tolerance as per default set as 1e-9.</param>
/// <returns>A collection of tuples extracted from the Yield method of the BoundingBoxTree.</returns>
private static List<Tuple<T1, T2>> FindTheRoot<T1, T2>(List<IBoundingBoxTree<T1>> aTrees, List<IBoundingBoxTree<T2>> bTrees, double tolerance)
private static List<Tuple<T1, T2>> GetRoot<T1, T2>(List<IBoundingBoxTree<T1>> aTrees, List<IBoundingBoxTree<T2>> bTrees, double tolerance)
{
List<Tuple<T1, T2>> result = new List<Tuple<T1, T2>>();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
using GShark.Geometry;
using System;
using System;
using System.Collections.Generic;
using GShark.ExtendedMethods;
using GShark.Geometry;
using GShark.Interfaces;

namespace GShark.Core.BoundingBoxTree
namespace GShark.Intersection.BoundingBoxTree
{
internal class LazyCurveBBT : IBoundingBoxTree<NurbsCurve>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using GShark.Geometry;

namespace GShark.Core.IntersectionResults
namespace GShark.Intersection
{
/// <summary>
/// This is a POC class used to collect the result from curve-plane intersections.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using GShark.Geometry;

namespace GShark.Core.IntersectionResults
namespace GShark.Intersection
{
/// <summary>
/// This is a POC class used to collect the result from curves intersection.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
using GShark.Core;
using GShark.Core.BoundingBoxTree;
using GShark.Core.IntersectionResults;
using GShark.ExtendedMethods;
using GShark.Geometry;
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using GShark.Core;
using GShark.ExtendedMethods;
using GShark.Geometry;
using GShark.Intersection.BoundingBoxTree;

namespace GShark.Operation
namespace GShark.Intersection
{
/// <summary>
/// Provides various tools for all kinds of intersection between NURBS and primitive.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
using GShark.Core.IntersectionResults;
using GShark.Geometry;
using GShark.Geometry;
using GShark.Optimization;

namespace GShark.Operation
namespace GShark.Intersection
{
internal static class IntersectionRefiner
{
Expand Down

0 comments on commit 55e9c06

Please sign in to comment.