Skip to content

Commit

Permalink
Merge pull request DynamoDS#3 from ikeough/MAGN-6936
Browse files Browse the repository at this point in the history
MAGN-6936 Create Display.BySurfaceUVsColors Node and deprecate SurfaceData
  • Loading branch information
ramramps committed Jun 18, 2015
2 parents c1a35f9 + 2643e60 commit edcdb5c
Show file tree
Hide file tree
Showing 117 changed files with 1,895 additions and 444 deletions.
Binary file modified extern/Helix3D/NET40/HelixToolkit.Wpf.SharpDX.dll
Binary file not shown.
Binary file modified extern/Helix3D/NET40/HelixToolkit.Wpf.dll
Binary file not shown.
Binary file modified extern/Helix3D/NET40/HelixToolkit.dll
Binary file not shown.
Binary file modified extern/LibG_219/LibG.AsmPreloader.Managed.dll
Binary file not shown.
Binary file modified extern/LibG_219/LibG.AsmPreloader.Unmanaged.dll
Binary file not shown.
Binary file modified extern/LibG_219/LibG.Managed.dll
Binary file not shown.
Binary file modified extern/LibG_219/LibG.ProtoInterface.dll
Binary file not shown.
Binary file modified extern/LibG_219/LibG.dll
Binary file not shown.
Binary file modified extern/LibG_219/LibGCore.dll
Binary file not shown.
Binary file modified extern/LibG_220/LibG.AsmPreloader.Managed.dll
Binary file not shown.
Binary file modified extern/LibG_220/LibG.AsmPreloader.Unmanaged.dll
Binary file not shown.
Binary file modified extern/LibG_220/LibG.Managed.dll
Binary file not shown.
Binary file modified extern/LibG_220/LibG.ProtoInterface.dll
Binary file not shown.
Binary file modified extern/LibG_220/LibG.dll
Binary file not shown.
Binary file modified extern/LibG_220/LibGCore.dll
Binary file not shown.
Binary file modified extern/LibG_221/LibG.AsmPreloader.Managed.dll
Binary file not shown.
Binary file modified extern/LibG_221/LibG.AsmPreloader.Unmanaged.dll
Binary file not shown.
Binary file modified extern/LibG_221/LibG.Managed.dll
Binary file not shown.
Binary file modified extern/LibG_221/LibG.ProtoInterface.dll
Binary file not shown.
Binary file modified extern/LibG_221/LibG.dll
Binary file not shown.
Binary file modified extern/LibG_221/LibGCore.dll
Binary file not shown.
29 changes: 14 additions & 15 deletions extern/ProtoGeometry/ProtoGeometry.XML

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified extern/ProtoGeometry/ProtoGeometry.dll
Binary file not shown.
Binary file modified extern/ProtoGeometry/ProtoInterface.dll
Binary file not shown.
Binary file modified extern/ProtoGeometry/en-US/ProtoGeometry.resources.dll
Binary file not shown.
12 changes: 7 additions & 5 deletions src/Dynamo.All.2013.sln
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleLibraryZeroTouch", "L
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleLibraryUI", "Libraries\Samples\SampleLibraryUI\SampleLibraryUI.csproj", "{0A4B4EEA-8FAB-4AC8-90D4-27DBC5B0CF2A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{4466E6F6-F644-43AB-96B3-5ECE1622E711}"
ProjectSection(SolutionItems) = preProject
Config.xml = Config.xml
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SystemTestServices", "..\test\Libraries\SystemTestServices\SystemTestServices.csproj", "{89563CD0-509B-40A5-8728-9D3EC6FE8410}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleLibraryTests", "Libraries\Samples\SampleLibraryTests\SampleLibraryTests.csproj", "{933B8108-4E74-470A-86C7-4B7F633115B9}"
Expand All @@ -207,6 +202,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GeometryUIWpf", "Libraries\
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Display", "Libraries\Display\Display.csproj", "{A50C198C-DA6E-4081-BC53-0F44D287F207}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DisplayTests", "..\test\Libraries\DisplayTests\DisplayTests.csproj", "{F8D2E3E5-4505-4463-9367-2EB2629D7DCD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -445,6 +442,10 @@ Global
{A50C198C-DA6E-4081-BC53-0F44D287F207}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A50C198C-DA6E-4081-BC53-0F44D287F207}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A50C198C-DA6E-4081-BC53-0F44D287F207}.Release|Any CPU.Build.0 = Release|Any CPU
{F8D2E3E5-4505-4463-9367-2EB2629D7DCD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F8D2E3E5-4505-4463-9367-2EB2629D7DCD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F8D2E3E5-4505-4463-9367-2EB2629D7DCD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F8D2E3E5-4505-4463-9367-2EB2629D7DCD}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -507,5 +508,6 @@ Global
{E674F1A1-BE83-475A-9CC9-F55CADBEC448} = {FA7BE306-A3B0-45FA-9D87-0C69E6932C13}
{C068DE76-0651-4F6C-8807-B90EF749D104} = {FA7BE306-A3B0-45FA-9D87-0C69E6932C13}
{A50C198C-DA6E-4081-BC53-0F44D287F207} = {FA7BE306-A3B0-45FA-9D87-0C69E6932C13}
{F8D2E3E5-4505-4463-9367-2EB2629D7DCD} = {0E492D35-2310-4849-9694-A2A53C09F21B}
EndGlobalSection
EndGlobal
6 changes: 6 additions & 0 deletions src/DynamoCore/Core/PreferenceSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ public int MaxNumRecentFiles
public bool PackageDownloadTouAccepted { get; set; }

/// <summary>
/// Indicates whether surface and solid edges will
/// be rendered.
/// </summary>
public bool ShowEdges { get; set; }

/// Indicates the default state of the "Open in Manual Mode"
/// checkbox in OpenFileDialog
/// </summary>
Expand All @@ -175,6 +180,7 @@ public PreferenceSettings()
UseHardwareAcceleration = true;
PackageDownloadTouAccepted = false;
maxNumRecentFiles = DefaultMaxNumRecentFiles;
ShowEdges = false;
OpenFileInManualExecutionMode = false;

BackupInterval = 60000; // 1 minute
Expand Down
9 changes: 4 additions & 5 deletions src/DynamoCore/Core/Threading/UpdateRenderPackageAsyncTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ class UpdateRenderPackageAsyncTask : AsyncTask
private const byte DefB = 130;
private const byte DefA = 255;
private const byte MidTone = 180;
private bool renderEdges = false;

#region Class Data Members and Properties

Expand Down Expand Up @@ -169,16 +168,16 @@ private void GetRenderPackagesFromMirrorData(MirrorData mirrorData, bool display

try
{
graphicItem.Tessellate(package, -1.0, factory.MaxTessellationDivisions);
graphicItem.Tessellate(package, factory.TessellationParameters);

if (renderEdges)
if (factory.TessellationParameters.ShowEdges)
{
var surf = graphicItem as Surface;
if (surf != null)
{
foreach (var curve in surf.PerimeterCurves())
{
curve.Tessellate(package, -1.0, factory.MaxTessellationDivisions);
curve.Tessellate(package, factory.TessellationParameters);
curve.Dispose();
}
}
Expand All @@ -188,7 +187,7 @@ private void GetRenderPackagesFromMirrorData(MirrorData mirrorData, bool display
{
foreach (var geom in solid.Edges.Select(edge => edge.CurveGeometry))
{
geom.Tessellate(package, -1.0, factory.MaxTessellationDivisions);
geom.Tessellate(package, factory.TessellationParameters);
geom.Dispose();
}
}
Expand Down
7 changes: 2 additions & 5 deletions src/DynamoCore/Interfaces/IRenderPackageFactory.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Autodesk.DesignScript.Interfaces;
using Dynamo.Annotations;

namespace Dynamo.Interfaces
{
Expand All @@ -10,11 +11,7 @@ namespace Dynamo.Interfaces
/// </summary>
public interface IRenderPackageFactory
{
/// <summary>
/// The maximum number of subdivisions of a surface for tesselation.
/// Used only by methods that tessellate BReps.
/// </summary>
int MaxTessellationDivisions { get; set; }
TessellationParameters TessellationParameters { get; set; }

/// <summary>
/// Create an IRenderPackage object of the type manufactured by this factory.
Expand Down
12 changes: 6 additions & 6 deletions src/DynamoCore/Library/LibraryServices.cs
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.Linq;

using Dynamo.Interfaces;
using Dynamo.Library;
using Dynamo.Utilities;
using DynamoUtilities;

using ProtoCore.AST.AssociativeAST;
using ProtoCore.BuildData;
using ProtoCore.DSASM;
using ProtoCore.Utils;
using ProtoFFI;

using RestSharp;

using Operator = ProtoCore.DSASM.Operator;
using ProtoCore;
using ProtoCore.Namespace;

namespace Dynamo.DSEngine
{
Expand Down Expand Up @@ -820,7 +816,11 @@ private void ImportProcedure(string library, ProcedureNode proc)
defaultArgumentNode = binaryExpr.RightNode;
}
}

if (defaultArgumentNode != null)
{
var rewriter = new ElementRewriter(LibraryManagementCore.ClassTable, LibraryManagementCore.BuildStatus.LogSymbolConflictWarning);
defaultArgumentNode = defaultArgumentNode.Accept(rewriter);
}
return new TypedParameter(arg.Name, argType, defaultArgumentNode);
}).ToList();

Expand Down
4 changes: 4 additions & 0 deletions src/DynamoCore/Nodes/DummyNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ public DummyNode(int inputCount, int outputCount, string legacyName, XmlElement
var helper = new XmlElementHelper(originalElement);
X = helper.ReadDouble("x", 0.0);
Y = helper.ReadDouble("y", 0.0);

//Take the GUID from the old node (dummy nodes should have their
//GUID's. This will allow the Groups to work as expected. MAGN-7568)
GUID = helper.ReadGuid("guid", this.GUID);
}

private void LoadNode(XmlNode nodeElement)
Expand Down
7 changes: 5 additions & 2 deletions src/DynamoCore/Rendering/DefaultRenderPackageFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ namespace Dynamo
{
public class DefaultRenderPackageFactory : IRenderPackageFactory
{
public int MaxTessellationDivisions { get; set; }
public TessellationParameters TessellationParameters { get; set; }

public DefaultRenderPackageFactory()
{
MaxTessellationDivisions = 32;
TessellationParameters = new TessellationParameters()
{
MaxTessellationDivisions = 32
};
}

public IRenderPackage CreateRenderPackage()
Expand Down
6 changes: 6 additions & 0 deletions src/DynamoCore/Utilities/Configurations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,12 @@ public class Configurations

#endregion

#region InCanvasSearch

public const double InCanvasSearchTextBoxHeight = 40.0;

#endregion

#region Backup

public static string BackupFileNamePrefix = "backup";
Expand Down
18 changes: 17 additions & 1 deletion src/DynamoCoreWpf/Controls/IncanvasSearchControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
xmlns:controls="clr-namespace:Dynamo.Controls"
xmlns:views="clr-namespace:Dynamo.UI.Views"
xmlns:ui="clr-namespace:Dynamo.UI"
xmlns:uicontrols="clr-namespace:Dynamo.UI.Controls"
xmlns:resx="clr-namespace:Dynamo.Properties;assembly=DynamoCore"
xmlns:viewmodels="clr-namespace:Dynamo.ViewModels;assembly=DynamoCoreWpf"
mc:Ignorable="d"
Width="250"
MinWidth="250"
IsVisibleChanged="OnInCanvasSearchControlVisibilityChanged">
<UserControl.Resources>
<ResourceDictionary>
Expand All @@ -24,6 +25,10 @@
TargetType="{x:Type ListBoxItem}">
<EventSetter Event="PreviewMouseLeftButtonUp"
Handler="OnMouseLeftButtonUp" />
<EventSetter Event="MouseEnter"
Handler="OnMouseEnter" />
<EventSetter Event="MouseLeave"
Handler="OnMouseLeave" />
</Style>

<Style TargetType="{x:Type ScrollViewer}"
Expand Down Expand Up @@ -152,5 +157,16 @@
</Style>
</Border.Style>
</Border>


<Border Margin="-3,0,-3,0">
<Popup StaysOpen="True"
AllowsTransparency="True"
Placement="Right"
x:Name="toolTipPopup">
<uicontrols:ToolTipWindow />
</Popup>
</Border>

</Grid>
</UserControl>
16 changes: 16 additions & 0 deletions src/DynamoCoreWpf/Controls/IncanvasSearchControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,22 @@ private void ExecuteSearchElement(ListBoxItem listBoxItem)
}
}

private void OnMouseEnter(object sender, MouseEventArgs e)
{
FrameworkElement fromSender = sender as FrameworkElement;
if (fromSender == null) return;

toolTipPopup.DataContext = fromSender.DataContext;
toolTipPopup.IsOpen = true;

}

private void OnMouseLeave(object sender, MouseEventArgs e)
{
toolTipPopup.DataContext = null;
toolTipPopup.IsOpen = false;
}

private void OnInCanvasSearchControlVisibilityChanged(object sender, DependencyPropertyChangedEventArgs e)
{
// If visibility is false, then stop processing it.
Expand Down
1 change: 1 addition & 0 deletions src/DynamoCoreWpf/DynamoCoreWpf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@
<Compile Include="NodeViewCustomization\NodeViewCustomizations\VariableInputNodeViewCustomization.cs" />
<Compile Include="ViewModels\Search\SearchCategory.cs" />
<Compile Include="ViewModels\Search\SearchMemberGroup.cs" />
<Compile Include="ViewModels\RenderPackageFactoryViewModel.cs" />
<Compile Include="Views\About\AboutWindow.xaml.cs">
<DependentUpon>AboutWindow.xaml</DependentUpon>
</Compile>
Expand Down
4 changes: 4 additions & 0 deletions src/DynamoCoreWpf/Interfaces/IVisualizationManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,9 @@ public interface IVisualizationManager : IDisposable
/// An event triggered when a workspace is closed / open.
/// </summary>
event Action InitializeGeomtery;

/// Update all Node RenderPackages and raise notification.
/// </summary>
void UpdateAllNodeVisualsAndNotify();
}
}
Loading

0 comments on commit edcdb5c

Please sign in to comment.