Пример #1
0
        public void CutDeleteBaseTest2()
        {
            var document = TestUtils.DefaultsSetup();

            var sketchCreator = new SketchCreator(document, false);
            var sketchNode    = sketchCreator.BuildSketchNode();

            document.Transact();

            var circleBuilder = TestUtils.Circle(document, sketchNode, new Point3D(0, 0, 0), 10);

            TestUtils.Circle(document, sketchNode, new Point3D(20, 20, 0), 10);
            Assert.AreEqual(circleBuilder.LastExecute, true);
            sketchNode.Children[2].Set <MeshTopoShapeInterpreter>().Shape = AutoGroupLogic.RebuildSketchFace(sketchNode, document);
            var extrudeBuilder = new NodeBuilder(document, FunctionNames.Extrude);

            extrudeBuilder[0].Reference = sketchNode;
            extrudeBuilder[1].Integer   = 0;
            extrudeBuilder[2].Real      = 10;
            extrudeBuilder.ExecuteFunction();
            Assert.AreEqual(extrudeBuilder.LastExecute, true);
            document.Commit("Extrude created");
            document.Transact();
            var volume = GeomUtils.GetSolidVolume(extrudeBuilder.Shape);

            Assert.AreEqual(volume, 2 * Math.PI * 1000);
            Assert.AreEqual(document.Root.Children.Count, 6);

            var sketchNode2 = sketchCreator.BuildSketchNode();

            document.Commit("Second sketch created");
            document.Transact();
            TestUtils.Circle(document, sketchNode2, new Point3D(0, 0, 0), 5);
            sketchNode2.Children[2].Set <MeshTopoShapeInterpreter>().Shape = AutoGroupLogic.RebuildSketchFace(sketchNode2, document);

            var cutBuilder = new NodeBuilder(document, FunctionNames.Cut);

            cutBuilder[0].Reference = sketchNode2;
            cutBuilder[2].Integer   = (int)ExtrusionTypes.MidPlane;
            cutBuilder[1].Real      = 10000;
            cutBuilder.ExecuteFunction();
            Assert.AreEqual(cutBuilder.LastExecute, true);
            volume = GeomUtils.GetSolidVolume(cutBuilder.Shape);
            Assert.AreEqual(volume, 2 * Math.PI * 1000 - Math.PI * 250);
            Assert.AreEqual(document.Root.Children.Count, 10);

            var nodeToDelete = document.Root[2];

            NodeBuilderUtils.DeleteNode(nodeToDelete, document);
            document.Commit("Deleted");
            document.Transact();
            NodeUtils.RebuildAllSketchFaces(document);
            extrudeBuilder.ExecuteFunction();
            cutBuilder.ExecuteFunction();
            document.Commit("Finished");
            Assert.IsTrue(cutBuilder.LastExecute);
            volume = GeomUtils.GetSolidVolume(cutBuilder.Shape);
            Assert.AreEqual(8, document.Root.Children.Count, "Circle is not deleted");
            Assert.AreEqual(volume, Math.PI * 1000);
        }
Пример #2
0
        public void DeleteLineTest()
        {
            var document = TestUtils.DefaultsSetup();

            document.Transact();
            var sketchCreator = new SketchCreator(document, false);
            var sketchNode    = sketchCreator.BuildSketchNode();

            var pointBuilder = new NodeBuilder(document, FunctionNames.Point);

            pointBuilder[0].Reference          = sketchNode;
            pointBuilder[1].TransformedPoint3D = new Point3D();
            var pointBuilder2 = new NodeBuilder(document, FunctionNames.Point);

            pointBuilder2[0].Reference          = sketchNode;
            pointBuilder2[1].TransformedPoint3D = new Point3D(1, 1, 0);
            pointBuilder.ExecuteFunction();
            var lineBuilder = new NodeBuilder(document, FunctionNames.LineTwoPoints);

            lineBuilder[0].Reference = pointBuilder.Node;
            lineBuilder[1].Reference = pointBuilder2.Node;
            lineBuilder.ExecuteFunction();

            var nodeToDelete = document.Root[3];

            NodeBuilderUtils.DeleteNode(nodeToDelete, document);
            document.Commit("Deleted");
            Assert.AreEqual(1, document.Root.Children.Count, "Line is not deleted");
            Assert.AreEqual(FunctionNames.Sketch, document.Root[0].Get <ShapeFunctionsInterface.Functions.FunctionInterpreter>().Name);
        }
Пример #3
0
        public void DeleteCircleTest()
        {
            var document = TestUtils.DefaultsSetup();

            document.Transact();
            var sketchCreator = new SketchCreator(document, false);
            var sketchNode    = sketchCreator.BuildSketchNode();

            var pointBuilder = new NodeBuilder(document, FunctionNames.Point);

            pointBuilder[0].Reference          = sketchNode;
            pointBuilder[1].TransformedPoint3D = new Point3D();
            pointBuilder.ExecuteFunction();
            var circleBuilder = new NodeBuilder(document, FunctionNames.Circle);

            circleBuilder[0].Reference = pointBuilder.Node;
            circleBuilder[1].Real      = 20;
            circleBuilder.ExecuteFunction();
            //document.Commit("Draw first circle");
            var nodeToDelete = document.Root[2];

            NodeBuilderUtils.DeleteNode(nodeToDelete, document);
            document.Commit("Deleted");
            Assert.AreEqual(1, document.Root.Children.Count, "Circle is not deleted");
            Assert.AreEqual(FunctionNames.Sketch, document.Root[0].Get <ShapeFunctionsInterface.Functions.FunctionInterpreter>().Name);
        }
Пример #4
0
        private void RemoveButtonClick(object sender, EventArgs e)
        {
            var constraintDesc = (ConstraintListItem)listConstraints.SelectedItem;

            NodeBuilderUtils.DeleteNode(constraintDesc.Builder.Node, _document);
            RefreshList();
        }
Пример #5
0
        /// <summary>
        /// Creates a fused face (FaceFuse node) with all the coliding shapes
        /// </summary>
        /// <param name="colidingShapes"></param>
        private static void CreateFusedShape(List <Node> colidingShapes, Document _document)
        {
            var builder      = new NodeBuilder(_document, FunctionNames.FaceFuse);
            var colidingList = new List <SceneSelectedEntity>();

            foreach (var node in colidingShapes)
            {
                colidingList.Add(new SceneSelectedEntity(node));
            }

            builder.Dependency[0].ReferenceList = colidingList;
            bool result = builder.ExecuteFunction();

            if (result == false)
            {
                NodeBuilderUtils.DeleteNode(builder.Node, _document);
                _nodeFused = null;
            }
            else
            {
                _nodeFused = builder.Node;
            }

            // The fused face is not visible in the scene, neither in the tree view
            if (_nodeFused != null)
            {
                Hide(_nodeFused);
                _nodeFused.Set <TreeViewVisibilityInterpreter>();
            }
        }
        public override void OnActivate()
        {
            base.OnActivate();
            _fileDialog = new SaveFileDialog {
                Filter = @"NaroXml file(*.naroxml)|*.naroxml|All files (*.*)|*.*"
            };
            var result = _fileDialog.ShowDialog();

            if (result == DialogResult.Cancel)
            {
                BackToNeutralModifier();
                return;
            }
            var entities =
                Inputs[InputNames.SelectionContainerPipe].GetData(NotificationNames.GetEntities).Get
                <List <SceneSelectedEntity> >();

            if (entities.Count == 0)
            {
                NaroMessage.Show("You should select a shape or more before exporting!");
                BackToNeutralModifier();
                return;
            }
            var nodes = new List <Node>();

            foreach (var entity in entities)
            {
                nodes.Add(entity.Node);
            }

            var existingShapes = new SortedDictionary <int, int>();

            foreach (var node in nodes)
            {
                existingShapes[node.Index] = 1;
            }

            Document.Transact();
            var toRemoveList = new List <Node>(Document.Root.Children.Values);

            foreach (var node in toRemoveList)
            {
                if (!existingShapes.ContainsKey(node.Index))
                {
                    NodeBuilderUtils.DeleteNode(node, Document);
                }
            }
            Document.OptimizeData();
            Document.Commit("Imported file: " + _fileDialog.FileName);
            Document.SaveToXml(_fileDialog.FileName);
            Document.Undo();
            BackToNeutralModifier();
        }
        private void GlassButton2Click(object sender, EventArgs e)
        {
            var items = listBox1.SelectedItems;

            foreach (ItemData item in items)
            {
                NodeBuilderUtils.DeleteNode(item.Builder.Node, _document);
            }

            RefreshList();
            glassButton2.Visible = false;
        }
Пример #8
0
        private void SplitSplineLogic(NodeBuilder builder, int splitIndex)
        {
            var splineAllPoints = ExtractSplineAllPoints(builder);

            NodeBuilderUtils.DeleteNode(builder.Node, Document);
            var firstList  = new List <Point3D>();
            var secondList = new List <Point3D>();

            SplitListPoint(splineAllPoints, splitIndex, firstList, secondList);
            Ensure.IsTrue(BuildSplineFromPoints(Document, firstList));
            Ensure.IsTrue(BuildSplineFromPoints(Document, secondList));
        }
        private void ListBox1DoubleClick(object sender, EventArgs e)
        {
            var index = listBox1.SelectedIndex;

            if (index == -1)
            {
                return;
            }
            var data = (ItemData)listBox1.SelectedItem;

            NodeBuilderUtils.DeleteNode(data.Builder.Node, _document);
            RefreshList();
        }
Пример #10
0
            public void Combine(Document document)
            {
                var sourceList = GetOrderedSplinePoints(_sourceSpline, _firstReversed);
                var destList   = GetOrderedSplinePoints(_destSpline, _secondReversed);

                Ensure.IsTrue(sourceList[sourceList.Count - 1].IsEqual(destList[0]));
                destList.RemoveAt(0);
                sourceList.AddRange(destList);

                NodeBuilderUtils.DeleteNode(_sourceSpline.Node, document);
                NodeBuilderUtils.DeleteNode(_destSpline.Node, document);

                Ensure.IsTrue(BuildSplineFromPoints(document, sourceList));
            }
Пример #11
0
        private void OnDeactivate()
        {
            if (Dependency.Steps.Count < 4)
            {
                NodeBuilderUtils.DeleteNode(Dependency.DocumentNodeBuilder.Node, Dependency.Document);
                Dependency.Document.Revert();
                return;
            }
            Dependency.Document.Transact();
            Dependency.DocumentNodeBuilder = new NodeBuilder(Dependency.Document, FunctionNames.Spline);
            var builder = Dependency.DocumentNodeBuilder;

            Dependency.Steps.RemoveAt(Dependency.Steps.Count - 1);
            Dependency.Steps.RemoveAt(Dependency.Steps.Count - 1);
            var nb = builder.Node.Get <FunctionInterpreter>();

            foreach (var step in Dependency.Steps)
            {
                var data = step.Get <Point3D?>();
                if (data == null)
                {
                    continue;
                }
                nb.Dependency.AddAttributeType(InterpreterNames.Point3D);
                var pos = builder.Count - 1;
                nb.Dependency.Children[pos].TransformedPoint3D = (Point3D)data;
            }
            builder.ExecuteFunction();

            if (Dependency.StepIndex != 0)
            {
                UnregisterUpdate(Dependency.StepIndex - 1);
            }
            Dependency.Document.Commit("Draw Spline");
            Dependency.ActionsGraph[InputNames.UiElementsItem].Send(NotificationNames.AddNewNodeToTree,
                                                                    Dependency.DocumentNodeBuilder.Node);
            Dependency.OnDisconnect = null;
        }
Пример #12
0
        // Draw two parallel lines and delete one of the points -> constraint and line should be deleted, as well
        public void ParallelLinesDeletePointTest()
        {
            var document = TestUtils.DefaultsSetup();

            var sketchCreator = new SketchCreator(document, false);
            var sketchNode    = sketchCreator.BuildSketchNode();

            document.Transact();

            TestUtils.Line(document, sketchNode, new Point3D(0, 0, 0), new Point3D(1, 1, 0));

            var lineBuilder2 = TestUtils.Line(document, sketchNode, new Point3D(0, 1, 0), new Point3D(1, 2, 0));

            document.Commit("Drawn line");
            document.Transact();
            var options = new SketchHinterOptions
            {
                ParallelAngle = GeomUtils.DegreesToRadians(5.0),
                PointRange    = 3.0
            };
            var sketchHinter = new Hinter2D(sketchNode, document, options);

            sketchHinter.Populate();

            sketchHinter.ApplyAlgorithms(lineBuilder2);
            document.Commit("Parallel constraint added");
            document.Transact();
            Assert.AreEqual(document.Root.Children.Count, 8);
            Assert.AreEqual(document.Root[7].Get <ShapeFunctionsInterface.Functions.FunctionInterpreter>().Name, Constraint2DNames.ParallelFunction);

            var nodeToDelete = document.Root[2];

            NodeBuilderUtils.DeleteNode(nodeToDelete, document);
            document.Commit("Deleted");
            // the other line point remains
            Assert.AreEqual(5, document.Root.Children.Count, "Line is not deleted");
        }
Пример #13
0
        // Draw two parallel lines and delete one of the lines -> constraint should be deleted, as well
        public void PerpendicularDeleteLineTest()
        {
            var document = TestUtils.DefaultsSetup();
            var sh       = new ShapeGraph();

            sh.SetDocument(document);

            var sketchCreator = new SketchCreator(document, false);
            var sketchNode    = sketchCreator.BuildSketchNode();

            document.Transact();

            var pointBuilder = new NodeBuilder(document, FunctionNames.Point);

            pointBuilder[0].Reference          = sketchNode;
            pointBuilder[1].TransformedPoint3D = new Point3D(4, 1, 0);
            var pointBuilder2 = new NodeBuilder(document, FunctionNames.Point);

            pointBuilder2[0].Reference          = sketchNode;
            pointBuilder2[1].TransformedPoint3D = new Point3D(2, 3, 0);
            pointBuilder.ExecuteFunction();
            var lineBuilder = new NodeBuilder(document, FunctionNames.LineTwoPoints);

            lineBuilder[0].Reference = pointBuilder.Node;
            lineBuilder[1].Reference = pointBuilder2.Node;
            lineBuilder.ExecuteFunction();

            var pointBuilder3 = new NodeBuilder(document, FunctionNames.Point);

            pointBuilder3[0].Reference          = sketchNode;
            pointBuilder3[1].TransformedPoint3D = new Point3D(4, 5, 0);
            pointBuilder3.ExecuteFunction();
            var lineBuilder2 = new NodeBuilder(document, FunctionNames.LineTwoPoints);

            lineBuilder2[0].Reference = pointBuilder2.Node;
            lineBuilder2[1].Reference = pointBuilder3.Node;
            lineBuilder2.ExecuteFunction();

            document.Commit("Drawn line");
            document.Transact();
            var options = new SketchHinterOptions
            {
                ParallelAngle = GeomUtils.DegreesToRadians(5.0),
                PointRange    = 3.0
            };
            var sketchHinter = new Hinter2D(sketchNode, document, options);

            sketchHinter.Populate();

            sketchHinter.ApplyAlgorithms(lineBuilder2);
            document.Commit("Perpendicular constraint added");
            document.Transact();
            Assert.AreEqual(document.Root.Children.Count, 7);
            Assert.AreEqual(document.Root[6].Get <ShapeFunctionsInterface.Functions.FunctionInterpreter>().Name, Constraint2DNames.PerpendicularFunction);

            var nodeToDelete = document.Root[3];

            NodeBuilderUtils.DeleteNode(nodeToDelete, document);
            document.Commit("Deleted");
            Assert.AreEqual(4, document.Root.Children.Count, "Line is not deleted");
        }
Пример #14
0
        protected override void OnMouseUpAction(Mouse3DPosition mouseData)
        {
            Inputs[InputNames.SelectionContainerPipe].Send(NotificationNames.BuildSelections, mouseData);
            var trimmedEntities =
                Inputs[InputNames.SelectionContainerPipe].GetData(NotificationNames.GetEntities).Get
                <List <SceneSelectedEntity> >();

            if (trimmedEntities.Count == 0)
            {
                return;
            }

            InitSession();
            Reset();

            var newNodes = GetTrimResult(Document, trimmedEntities, mouseData.Point);

            if (newNodes.Count == 0)
            {
                return;
            }

            var shapesGraph = new ShapeGraph(); //DocumentShapesGraph();

            shapesGraph.SetDocument(Document);
            shapesGraph.Update();

            // remove all referenced constraints
            var constraints = Document.Root.Children.Where(n => NodeUtils.NodeIsConstraint(n.Value.Index, Document)).ToList();

            foreach (var constraint in constraints)
            {
                var children = new NodeBuilder(constraint.Value).Node.Children;
                if (children.Any(child => child.Value.Get <ReferenceInterpreter>().Node.Equals(trimmedEntities[0].Node)))
                {
                    NodeBuilderUtils.DeleteNode(constraint.Value, Document);
                }
            }

            var nodes = new List <ReferenceInterpreter>();

            // remove all referenced points
            foreach (var child in trimmedEntities[0].Node.Children)
            {
                var node = child.Value.Get <ReferenceInterpreter>();
                if (node == null)
                {
                    continue;
                }
                nodes.Add(node);
            }

            foreach (var nb in newNodes)
            {
                var nodeBuilder = new NodeBuilder(nb.Node);
                nodeBuilder.ExecuteFunction();
                AddNodeToTree(nodeBuilder.Node);
            }

            if (newNodes.First().FunctionName == FunctionNames.Trim)
            {
                NodeUtils.Hide(trimmedEntities[0].Node);
            }
            else
            {
                NodeBuilderUtils.DeleteNode(trimmedEntities[0].Node, Document);
            }

            CommitFinal("Trimmed wire");
            RebuildTreeView();
            UpdateView();
        }
Пример #15
0
        // Draw two parallel lines and delete one of the lines -> constraint should be deleted, as well
        public void RectangleDeleteLineTest()
        {
            var document = TestUtils.DefaultsSetup();

            var sketchCreator = new SketchCreator(document, false);
            var sketchNode    = sketchCreator.BuildSketchNode();

            document.Transact();

            var pointBuilder = new NodeBuilder(document, FunctionNames.Point);

            pointBuilder[0].Reference          = sketchNode;
            pointBuilder[1].TransformedPoint3D = new Point3D(1, 1, 0);
            var pointBuilder2 = new NodeBuilder(document, FunctionNames.Point);

            pointBuilder2[0].Reference          = sketchNode;
            pointBuilder2[1].TransformedPoint3D = new Point3D(7, 1, 0);
            pointBuilder.ExecuteFunction();
            var pointBuilder3 = new NodeBuilder(document, FunctionNames.Point);

            pointBuilder3[0].Reference          = sketchNode;
            pointBuilder3[1].TransformedPoint3D = new Point3D(7, 4, 0);
            pointBuilder3.ExecuteFunction();
            var pointBuilder4 = new NodeBuilder(document, FunctionNames.Point);

            pointBuilder4[0].Reference          = sketchNode;
            pointBuilder4[1].TransformedPoint3D = new Point3D(1, 4, 0);
            pointBuilder4.ExecuteFunction();

            var lineBuilder = new NodeBuilder(document, FunctionNames.LineTwoPoints);

            lineBuilder[0].Reference = pointBuilder.Node;
            lineBuilder[1].Reference = pointBuilder2.Node;
            lineBuilder.ExecuteFunction();


            var lineBuilder2 = new NodeBuilder(document, FunctionNames.LineTwoPoints);

            lineBuilder2[0].Reference = pointBuilder2.Node;
            lineBuilder2[1].Reference = pointBuilder3.Node;
            lineBuilder2.ExecuteFunction();

            var lineBuilder3 = new NodeBuilder(document, FunctionNames.LineTwoPoints);

            lineBuilder3[0].Reference = pointBuilder3.Node;
            lineBuilder3[1].Reference = pointBuilder4.Node;
            lineBuilder3.ExecuteFunction();

            var lineBuilder4 = new NodeBuilder(document, FunctionNames.LineTwoPoints);

            lineBuilder4[0].Reference = pointBuilder4.Node;
            lineBuilder4[1].Reference = pointBuilder.Node;
            lineBuilder4.ExecuteFunction();
            document.Commit("Drawn line");
            document.Transact();
            var options = new SketchHinterOptions
            {
                ParallelAngle = GeomUtils.DegreesToRadians(5.0),
                PointRange    = 3.0
            };
            var sketchHinter = new Hinter2D(sketchNode, document, options);

            sketchHinter.Populate();

            sketchHinter.ApplyAlgorithms(lineBuilder2);
            sketchHinter.ApplyAlgorithms(lineBuilder);
            document.Commit("Perpendicular constraint added");
            document.Transact();

            Assert.AreEqual(document.Root.Children.Count, 15);
            var nodeToDelete = document.Root[3];

            NodeBuilderUtils.DeleteNode(nodeToDelete, document);
            document.Commit("Deleted");
            Assert.AreEqual(7, document.Root.Children.Count, "Line is not deleted");
        }
Пример #16
0
        public List <NodeBuilder> GetTrimResult(Document document, List <SceneSelectedEntity> trimmedEntities, Point3D mouseData)
        {
            var sketchCreator    = new SketchCreator(document);
            var trimmingEntities = new List <SceneSelectedEntity>();

            foreach (var node in document.Root.Children)
            {
                if (node.Value != trimmedEntities[0].Node && IsTrimmingWire(node.Value))// && !SameArc(node.Value, trimmedEntities[0].Node))
                {
                    var sse = new SceneSelectedEntity(node.Value)
                    {
                        ShapeType = TopAbsShapeEnum.TopAbs_WIRE
                    };
                    trimmingEntities.Add(sse);
                }
            }

            trimmedEntities[0].ShapeType = TopAbsShapeEnum.TopAbs_WIRE;

            var newNodes = new List <NodeBuilder>();

            if (trimmedEntities[0].Node.Get <ShapeFunctionsInterface.Functions.FunctionInterpreter>().Name == FunctionNames.LineTwoPoints)
            {
                var intervals = ExecuteTrim(trimmedEntities[0], trimmingEntities, mouseData.GpPnt);
                if (intervals == null)
                {
                    return(newNodes);
                }
                if (intervals.Count == 0)
                {
                    NodeBuilderUtils.DeleteNode(trimmedEntities[0].Node, Document);
                    return(newNodes);
                }
                else
                {
                    if (intervals.Count % 2 == 0)
                    {
                        for (int i = 0; i < intervals.Count; i += 2)
                        {
                            var builder = new NodeBuilder(document, FunctionNames.LineTwoPoints);
                            builder[0].Reference = sketchCreator.GetPoint(intervals[i]).Node;
                            builder[1].Reference = sketchCreator.GetPoint(intervals[i + 1]).Node;
                            builder.ExecuteFunction();
                            newNodes.Add(builder);
                        }
                    }
                }
            }
            else
            if (trimmedEntities[0].Node.Get <ShapeFunctionsInterface.Functions.FunctionInterpreter>().Name == FunctionNames.Circle ||
                trimmedEntities[0].Node.Get <ShapeFunctionsInterface.Functions.FunctionInterpreter>().Name == FunctionNames.Arc)
            {
                var centre    = new NodeBuilder(trimmedEntities[0].Node.Children[1].Get <ReferenceInterpreter>().Node)[1].TransformedPoint3D;
                var intervals = ExecuteTrim(trimmedEntities[0], trimmingEntities, mouseData.GpPnt);
                if (intervals != null && intervals.Count % 2 == 0)
                {
                    for (int i = 0; i < intervals.Count; i += 2)
                    {
                        newNodes.Add(BuildArc(document, centre, intervals[i], intervals[i + 1]));
                    }
                }
            }
            else
            if (trimmedEntities[0].Node.Get <ShapeFunctionsInterface.Functions.FunctionInterpreter>().Name == FunctionNames.Arc3P)
            {
                var point1 = new NodeBuilder(trimmedEntities[0].Node.Children[1].Get <ReferenceInterpreter>().Node)[1].TransformedPoint3D;
                var point2 = new NodeBuilder(trimmedEntities[0].Node.Children[2].Get <ReferenceInterpreter>().Node)[1].TransformedPoint3D;
                var point3 = new NodeBuilder(trimmedEntities[0].Node.Children[3].Get <ReferenceInterpreter>().Node)[1].TransformedPoint3D;

                var gceCirc   = new gceMakeCirc(point1.GpPnt, point2.GpPnt, point3.GpPnt);
                var centre    = new Point3D(gceCirc.Value.Axis.Location);
                var intervals = ExecuteTrim(trimmedEntities[0], trimmingEntities, mouseData.GpPnt);
                if (intervals != null && intervals.Count % 2 == 0)
                {
                    for (int i = 0; i < intervals.Count; i += 2)
                    {
                        newNodes.Add(BuildArc(document, centre, intervals[i], intervals[i + 1]));
                    }
                }
            }
            else
            {
                var builder = new NodeBuilder(document, FunctionNames.Trim);
                builder[0].ReferenceList = trimmingEntities;
                builder[1].ReferenceData = trimmedEntities[0];
                var point = sketchCreator.GetPoint(mouseData).Node;
                builder[2].Reference = point;
                if (builder.ExecuteFunction())
                {
                    newNodes.Add(builder);
                }
                //NodeBuilderUtils.DeleteNode(point, document);
                point.Set <DrawingAttributesInterpreter>().Visibility = ObjectVisibility.Hidden;
            }
            return(newNodes);
        }
Пример #17
0
 private void RemoveFromDocument(Node referenceLabel)
 {
     NodeBuilderUtils.DeleteNode(referenceLabel, Document);
 }