fix parsing of bad bounds
This commit is contained in:
parent
4336fff164
commit
a216a484bb
3 changed files with 16 additions and 12 deletions
|
|
@ -147,15 +147,6 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.View3D
|
|||
|
||||
var totalOperations = touchingSets.Sum(t => t.Count);
|
||||
|
||||
#if false
|
||||
var resultsMesh = BooleanProcessing.DoArray(items,
|
||||
CsgModes.Union,
|
||||
Processing,
|
||||
InputResolution,
|
||||
OutputResolution,
|
||||
reporter,
|
||||
cancellationToken);
|
||||
#else
|
||||
double amountPerOperation = 1.0 / totalOperations;
|
||||
double ratioCompleted = 0;
|
||||
|
||||
|
|
@ -169,6 +160,16 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.View3D
|
|||
|
||||
if (set.Count > 1)
|
||||
{
|
||||
#if false
|
||||
setMesh = BooleanProcessing.DoArray(set.Select(i => (i.mesh, i.matrix)),
|
||||
CsgModes.Union,
|
||||
Processing,
|
||||
InputResolution,
|
||||
OutputResolution,
|
||||
reporter,
|
||||
cancellationToken);
|
||||
#else
|
||||
|
||||
bool first = true;
|
||||
foreach (var next in set)
|
||||
{
|
||||
|
|
@ -203,6 +204,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.View3D
|
|||
progressStatus.Progress0To1 = ratioCompleted;
|
||||
reporter?.Report(progressStatus);
|
||||
}
|
||||
#endif
|
||||
|
||||
setMeshes.Add(setMesh);
|
||||
}
|
||||
|
|
@ -229,7 +231,6 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.View3D
|
|||
resultsMesh.CopyAllFaces(setMesh, Matrix4X4.Identity);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (resultsMesh != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.View3D
|
|||
foreach (var keep in keepItems)
|
||||
{
|
||||
#if false
|
||||
var items = removeVisibleItems.Select(i => (i.Mesh, i.WorldMatrix(SourceContainer))).ToList();
|
||||
var items = removeItems.Select(i => (i.Mesh, i.WorldMatrix(SourceContainer))).ToList();
|
||||
items.Insert(0, (keep.Mesh, keep.Matrix));
|
||||
var resultsMesh = BooleanProcessing.DoArray(items,
|
||||
CsgModes.Subtract,
|
||||
|
|
|
|||
|
|
@ -748,7 +748,10 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
Tuple<double, double> nearFar = null;
|
||||
foreach (var aabb in Object3DControlLayer.MakeListOfObjectControlBoundingBoxes())
|
||||
{
|
||||
nearFar = ExpandNearAndFarToClippedBounds(nearFar, world.IsOrthographic, worldspacePlanes, world.ModelviewMatrix, aabb);
|
||||
if (!double.IsNaN(aabb.MinXYZ.X) && !double.IsInfinity(aabb.MinXYZ.X))
|
||||
{
|
||||
nearFar = ExpandNearAndFarToClippedBounds(nearFar, world.IsOrthographic, worldspacePlanes, world.ModelviewMatrix, aabb);
|
||||
}
|
||||
}
|
||||
nearFar = ExpandNearAndFarToClippedBounds(nearFar, world.IsOrthographic, worldspacePlanes, world.ModelviewMatrix, Object3DControlLayer.GetPrinterNozzleAABB());
|
||||
nearFar = ExpandNearAndFarToClippedBounds(nearFar, world.IsOrthographic, worldspacePlanes, world.ModelviewMatrix, Scene.GetAxisAlignedBoundingBox());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue