private void BuildDialog(string dialogTitle)
 {
     if (_sizeWindow != null)
     {
         return;
     }
     _builder    = new NodeBuilder(_selectedNodes[0]);
     _axis       = GeomUtils.ExtractAxis(new NodeBuilder(_selectedNodes[1]).Shape);
     _sizeWindow = new ToolRangeValuesWindow(-360, 360, dialogTitle);
     _sizeWindow.OnValueChange  += PreviewRotate;
     _sizeWindow.OnDialogClosed += OnClosed;
     _sizeWindow.Show();
 }
Beispiel #2
0
        protected override void OnMouseClick3DAction(Mouse3DPosition mouseData)
        {
            if (!mouseData.MouseDown)
            {
                return;
            }
            if (_stage >= Stages.SecondShape)
            {
                return;
            }
            if (_selectedNode == null)
            {
                return;
            }
            if (_entities.Count != 0 && _selectedNode.ShapeCount == _entities[0].ShapeCount)
            {
                return;
            }
            _entities.Add(_selectedNode);
            NextStage();

            if (_stage != Stages.SecondShape)
            {
                return;
            }
            if (_sizeWindow != null)
            {
                return;
            }

            var referenceShapeDirection = GeomUtils.ExtractDirection(_entities[1].TargetShape());

            if (referenceShapeDirection == null)
            {
                NaroMessage.Show("Invalid face selected!");
                return;
            }
            _axis.Direction = referenceShapeDirection;

            ActionsGraph[InputNames.FacePickerPlane].Send(NotificationNames.Suspend);
            ActionsGraph[InputNames.SelectionContainerPipe].Send(NotificationNames.SwitchSelectionMode,
                                                                 TopAbsShapeEnum.TopAbs_SOLID);

            //_sizeWindow = new ToolRangeValuesWindow(-Math.PI/2, Math.PI/2, "Angle Draft");
            _sizeWindow = new ToolRangeValuesWindow(-90, 90, "Angle Draft");
            _sizeWindow.OnValueChange  += PreviwFillet;
            _sizeWindow.OnDialogClosed += OnClosed;
            _sizeWindow.Show();
        }