use the new split on plane
This commit is contained in:
parent
6d0b6621ef
commit
2a48d0ffe9
2 changed files with 5 additions and 18 deletions
|
|
@ -64,7 +64,7 @@ namespace MatterHackers.MatterControl.DesignTools
|
|||
|
||||
[Range(3, 360, ErrorMessage = "Value for {0} must be between {1} and {2}.")]
|
||||
[Description("Ensures the rotated part has a minimum number of sides per complete rotation")]
|
||||
public double MinSidesPerRotation { get; set; } = 10;
|
||||
public double MinSidesPerRotation { get; set; } = 30;
|
||||
|
||||
[Range(0, 100, ErrorMessage = "Value for {0} must be between {1} and {2}.")]
|
||||
[Description("Where to start the bend as a percent of the width of the part")]
|
||||
|
|
@ -207,23 +207,10 @@ namespace MatterHackers.MatterControl.DesignTools
|
|||
|
||||
public static void SplitMeshAlongX(Mesh mesh, List<double> cuts, double onPlaneDistance)
|
||||
{
|
||||
var faceSplit = false;
|
||||
do
|
||||
for (int j = 0; j < cuts.Count; j++)
|
||||
{
|
||||
faceSplit = false;
|
||||
for (int i = 0; i < mesh.Faces.Count; i++)
|
||||
{
|
||||
for (int j = 0; j < cuts.Count; j++)
|
||||
{
|
||||
if (mesh.SplitFace(i, new Plane(Vector3.UnitX, cuts[j]), .1))
|
||||
{
|
||||
faceSplit = true;
|
||||
i = mesh.Faces.Count;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} while (faceSplit);
|
||||
mesh.Split(new Plane(Vector3.UnitX, cuts[j]), .1);
|
||||
}
|
||||
return;
|
||||
|
||||
List<Vector3Float> finalVertices = new List<Vector3Float>();
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 0518c411a09f4a8b22c417412cd8533d6fcb31db
|
||||
Subproject commit d06689e6155b9048cd3a91c208d2352f55a64b55
|
||||
Loading…
Add table
Add a link
Reference in a new issue