Fix a bug in intersect objects

improve subtract processing
improve subtract editor rendering
clean up editor draw aip
This commit is contained in:
Lars Brubaker 2021-11-19 15:44:00 -08:00
parent dd8404644c
commit 1ccca5779a
40 changed files with 195 additions and 178 deletions

View file

@ -353,8 +353,15 @@ namespace MatterHackers.PolygonMesh
}
else
{
var preAddCount = resultsMesh.Vertices.Count;
// mesh the new polygon and add it to the resultsMesh
polygonShape.Vertices().TriangulateFaces(null, resultsMesh, 0, flattenedMatrixInverted);
// TODO: map all the added vertices that can be back to the original polygon positions
// for (int i = preAddCount; i< resultsMesh.Vertices.Count; i++)
{
}
}
if (resultsMesh.Faces.Count - faceCountPreAdd > 0)
@ -395,7 +402,7 @@ namespace MatterHackers.PolygonMesh
// check if more than one mesh has this polygons on this plan
var flattenedMatrix = CoPlanarFaces.GetFlattenedMatrix(plane);
// depending on the opperation add or remove polygons that are planar
// depending on the operation add or remove polygons that are planar
switch (operation)
{
case CsgModes.Union: