Skip to content

Recover from geometry exceptions thrown during manipulator creation - #7623

Merged
aparajit-pratap merged 16 commits into
DynamoDS:RC1.2.3_masterfrom
aparajit-pratap:RC1.2.3_master
Feb 21, 2017
Merged

aparajit-pratap merged 16 commits into
DynamoDS:RC1.2.3_masterfrom
aparajit-pratap:RC1.2.3_master

Conversation

@aparajit-pratap

@aparajit-pratap aparajit-pratap commented Feb 20, 2017 •

Copy link
Copy Markdown
Contributor

Purpose

This fixes:

  1. bug when very small values (to the order of -4) are used in the creation of the point manipulator. In such cases the geometry creation for the manipulator gizmo can fail, and an exception can be thrown from LibG that could cause the system to crash. This can be reproduced by setting the Geometry scaling setting to the largest value (since this setting forces all values to be scaled down by a factor of 10,000 under the hood and geometry could fail with such small values).

The fix is to catch any such exceptions thrown from the geometry library and display a warning on the manipulator node to the effect that direct manipulation has failed due to reasons mentioned in exception messages handed back from LibG.

image

Note that the node in warning state continues to run, just that its manipulator fails to generate. If inputs change and the node re-evaluates so that it can successfully generate the manipulator, the warning disappears as expected. If the node is unselected, then too the warning state disappears.

  1. Bug when the graph is re-executed upon changing the scale setting. Previously we called the ForceRunCancel command to reset the engine and rerun the graph. This caused a crash when running in Revit. The fix is to instead mark all nodes in the graph dirty and force re-execute without resetting the engine. Take a look at DynamoViewModelChangeScaleFactor in DynamoView.xaml.cs.

Declarations

Check these if you believe they are true

  • The code base is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning, and are documented in the API Changes document.

Reviewers

@benglin

FYIs

@monikaprabhu @riteshchandawar

liveRunnerServices.ReloadAllLibraries(libraryServices.ImportedLibraries);
libraryServices.SetLiveCore(LiveRunnerCore);

codeCompletionServices = new CodeCompletionServices(LiveRunnerCore);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reasons the hidden code part in OnLibraryLoaded cannot be expanded on mobile device, just want to make sure codeCompletionServices is not omitted by mistake.


dynamoViewModel.ExecuteCommand(new DynamoModel.ForceRunCancelCommand(false, false));
var allNodes = dynamoViewModel.HomeSpace.Nodes;
dynamoViewModel.HomeSpace.MarkNodesAsModifiedAndRequestRun(allNodes, forceExecute: true);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think MarkNodesAsModifiedAndRequestRun is an old method, so you have to pass nodes to it (the very same thing that HomeSpace already has access to). It just looks weird, so I'd you're in the position to change it, you might want to consider simplifying it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think MarkNodesAsModifiedAndRequestRun takes in nodes as input so that one can choose which nodes to pass to mark as modified.

@aparajit-pratap
aparajit-pratap merged commit a30fabe into DynamoDS:RC1.2.3_master Feb 21, 2017
aparajit-pratap added a commit to aparajit-pratap/Dynamo that referenced this pull request Feb 22, 2017
…ynamoDS#7623)

* update LibG binaries

* cherry-pick: update preloader for ASM223

* remove support for LibG220

* update test frameworks to preload appropriate ASM version

* remove ASM220 library version

* update LibG binaries for newer ASM 223 version used in Revit2018

* fix flaky test case

* recover from geometry exceptions thrown during manipulator creation

* fix for graph re-execution after changing scaling
aparajit-pratap added a commit that referenced this pull request Feb 22, 2017
… dirty and force re-execute upon scaling (#7629)

* Recover from geometry exceptions thrown during manipulator creation (#7623)

* update LibG binaries

* cherry-pick: update preloader for ASM223

* remove support for LibG220

* update test frameworks to preload appropriate ASM version

* remove ASM220 library version

* update LibG binaries for newer ASM 223 version used in Revit2018

* fix flaky test case

* recover from geometry exceptions thrown during manipulator creation

* fix for graph re-execution after changing scaling

* build fix

* revert unchanged files
aparajit-pratap added a commit that referenced this pull request Apr 20, 2017
* Recover from geometry exceptions thrown during manipulator creation (#7623)

* update LibG binaries

* cherry-pick: update preloader for ASM223

* remove support for LibG220

* update test frameworks to preload appropriate ASM version

* remove ASM220 library version

* update LibG binaries for newer ASM 223 version used in Revit2018

* fix flaky test case

* recover from geometry exceptions thrown during manipulator creation

* fix for graph re-execution after changing scaling

* build fix

* fix for migration of newly added default arguments

* reverting unchanged file

* added test case for instance node migration on adding default argument
aparajit-pratap added a commit that referenced this pull request Apr 24, 2017
* Recover from geometry exceptions thrown during manipulator creation (#7623)

* update LibG binaries

* cherry-pick: update preloader for ASM223

* remove support for LibG220

* update test frameworks to preload appropriate ASM version

* remove ASM220 library version

* update LibG binaries for newer ASM 223 version used in Revit2018

* fix flaky test case

* recover from geometry exceptions thrown during manipulator creation

* fix for graph re-execution after changing scaling

* build fix

* update references to MIConvexHull NuGet package used in Tessellation

* added Nuget package config file for MIConvexHull

* revert unchanged file

* remove xml file
aparajit-pratap added a commit that referenced this pull request May 24, 2017
* Recover from geometry exceptions thrown during manipulator creation (#7623)

* update LibG binaries

* cherry-pick: update preloader for ASM223

* remove support for LibG220

* update test frameworks to preload appropriate ASM version

* remove ASM220 library version

* update LibG binaries for newer ASM 223 version used in Revit2018

* fix flaky test case

* recover from geometry exceptions thrown during manipulator creation

* fix for graph re-execution after changing scaling

* build fix

* prevent ExportSAT UI node from executing by default

* revert unchanged file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants