protected override void PreviewFillet() { InitSession(); bool result; bool linesChamfer = _filletNodes[0].Node.Get <ShapeFunctionsInterface.Functions.FunctionInterpreter>().Name == FunctionNames.LineTwoPoints && _filletNodes[1].Node.Get <ShapeFunctionsInterface.Functions.FunctionInterpreter>().Name == FunctionNames.LineTwoPoints; if (!linesChamfer) { Builder = new NodeBuilder(Document, FunctionNames.Fillet2D); Builder[0].ReferenceList = SelectedShapes; Builder[1].Real = SizeWindow.Value; Builder[2].Integer = (int)FilletChamferTypes.SimpleChamfer2D; result = Builder.ExecuteFunction(); SizeWindow.FailedValue = !result; } else { result = NodeBuilderUtils.BuildChamfer(_filletNodes[0], _filletNodes[1], AnimationDocument, Document, SizeWindow.Value); AnimationDocument.Revert(); } if (!result) { InitSession(); } Send(InputNames.View, NotificationNames.RefreshView); }
public override void OnDeactivate() { // ActionsGraph[InputNames.FacePickerPlane].Send(NotificationNames.Suspend); Points.Clear(); Document.Revert(); AnimationDocument.Revert(); base.OnDeactivate(); }
public override void OnActivate() { base.OnActivate(); var solverPipe = ActionsGraph[InputNames.GeometricSolverPipe]; solverPipe.Send(NotificationNames.EnableAll); solverPipe.Send(NotificationNames.ResetPreviousPoint); Document.Transact(); var contextInterpreter = AnimationDocument.Root.Set <DocumentContextInterpreter>(); contextInterpreter.Context = Document.Root.Get <DocumentContextInterpreter>().Context; contextInterpreter.Document = AnimationDocument; AnimationDocument.Root.Set <ActionGraphInterpreter>().ActionsGraph = ActionsGraph; AnimationDocument.Transact(); }
protected void InitAnimateSession() { AnimationDocument.Revert(); AnimationDocument.Transact(); }