Cleaned up bug with union and intersection editor re-doing work

Made drawing selection optional
This commit is contained in:
Lars Brubaker 2018-03-06 14:48:14 -08:00
parent 2de4a22810
commit c2adfbc48f
6 changed files with 20 additions and 12 deletions

View file

@ -149,7 +149,7 @@ namespace MatterHackers.MatterControl
public static void PlaceOnBed(IObject3D object3D)
{
AxisAlignedBoundingBox bounds = object3D.GetAxisAlignedBoundingBox(Matrix4X4.Identity, true);
AxisAlignedBoundingBox bounds = object3D.GetAxisAlignedBoundingBox(Matrix4X4.Identity);
Vector3 boundsCenter = (bounds.maxXYZ + bounds.minXYZ) / 2;
object3D.Matrix *= Matrix4X4.CreateTranslation(new Vector3(0, 0, -boundsCenter.Z + bounds.ZSize / 2));

View file

@ -58,7 +58,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.View3D
var mainContainer = new FlowLayoutWidget(FlowDirection.TopToBottom);
if (group is MeshWrapperOperation operationNode
&& operationNode.Children.All(c => c.OutputType != PrintOutputTypes.Hole))
&& operationNode.Descendants().Where((obj) => obj.OwnerID == group.ID).All(c => c.OutputType != PrintOutputTypes.Hole))
{
bool first = true;
// set all but one mesh to look like holes

View file

@ -58,7 +58,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.View3D
var mainContainer = new FlowLayoutWidget(FlowDirection.TopToBottom);
if (group is MeshWrapperOperation operationNode
&& operationNode.Children.All(c => c.OutputType != PrintOutputTypes.Hole))
&& operationNode.Descendants().Where((obj) => obj.OwnerID == group.ID).All(c => c.OutputType != PrintOutputTypes.Hole))
{
bool first = true;
// set all but one mesh to look like holes

View file

@ -484,15 +484,16 @@ namespace MatterHackers.MeshVisualizer
bool isSelected = parentSelected ||
scene.HasSelection && (object3D == scene.SelectedItem || scene.SelectedItem.Children.Contains(object3D));
if (isSelected)
if (isSelected && scene.DrawSelection)
{
var totalVertices = 0;
int maxVerticesToRenderOutline = 1000;
foreach (var visibleMesh in object3D.VisibleMeshes())
{
totalVertices += visibleMesh.Mesh.Vertices.Count;
if (totalVertices > 1000)
if (totalVertices > maxVerticesToRenderOutline)
{
break;
}
@ -517,8 +518,7 @@ namespace MatterHackers.MeshVisualizer
Invalidate();
}
bool tooBigForComplexSelection = totalVertices > 1000;
if (tooBigForComplexSelection
if (totalVertices > maxVerticesToRenderOutline
&& scene.DebugItem == null)
{
GLHelper.PrepareFor3DLineRender(true);

@ -1 +1 @@
Subproject commit 2e011242b083bf6ebdc723dc5768a85ac6b8227d
Subproject commit d0db172015d632bda42184e18a63158c94b7dd97

View file

@ -1,11 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="OpenTK" publicKeyToken="bad199fe84eb3df4" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-1.0.0.0" newVersion="1.0.0.0"/>
<assemblyIdentity name="OpenTK" publicKeyToken="bad199fe84eb3df4" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.0.0.0" newVersion="1.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Reactive.Linq" publicKeyToken="94bc3704cddfc263" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /></startup></configuration>