예제 #1
0
        public override void OnSetAction()
        {
            base.TitleId   = "Constr.Dimension.Direction.3Points";
            dim            = Dimension.Construct();
            dim.DimType    = Dimension.EDimType.DimAngle;
            dim.DimLineRef = ConstrDefaults.DefaultDimPoint;
            dim.Normal     = base.ActiveDrawingPlane.Normal;
            dim.AddPoint(new GeoPoint(0.0, 0.0, 0.0));
            dim.AddPoint(new GeoPoint(0.0, 0.0, 0.0));
            dim.AddPoint(new GeoPoint(0.0, 0.0, 0.0));

            gPoint1 = ActionFeedBack.FeedbackPoint(base.Frame);
            gPoint2 = ActionFeedBack.FeedbackPoint(base.Frame);
            gPoint3 = ActionFeedBack.FeedbackPoint(base.Frame);
            base.FeedBack.Add(gPoint1);
            base.FeedBack.Add(gPoint2);
            base.FeedBack.Add(gPoint3);

            base.ActiveObject = dim;

            dimPoint1Input = new GeoPointInput("Constr.Dimension.Direction.3Points.Point1");
            dimPoint1Input.SetGeoPointEvent += new ConstructAction.GeoPointInput.SetGeoPointDelegate(SetDimPoint1);
            dimPoint2Input = new GeoPointInput("Constr.Dimension.Direction.3Points.Point2");
            dimPoint2Input.SetGeoPointEvent += new ConstructAction.GeoPointInput.SetGeoPointDelegate(SetDimPoint2);
            dimPoint3Input = new GeoPointInput("Constr.Dimension.Direction.3Points.Point3");
            dimPoint3Input.SetGeoPointEvent += new ConstructAction.GeoPointInput.SetGeoPointDelegate(SetDimPoint3);

            dimLocationInput = new GeoPointInput("Constr.Dimension.Location");
            dimLocationInput.DefaultGeoPoint   = ConstrDefaults.DefaultDimPoint;
            dimLocationInput.SetGeoPointEvent += new ConstructAction.GeoPointInput.SetGeoPointDelegate(SetDimLocation);

            base.SetInput(dimPoint1Input, dimPoint2Input, dimPoint3Input, dimLocationInput);
            base.ShowAttributes = true;
            base.OnSetAction();
        }
예제 #2
0
        public override void OnSetAction()
        {
            dim            = Dimension.Construct();
            dim.DimType    = Dimension.EDimType.DimAngle;
            dim.DimLineRef = ConstrDefaults.DefaultDimPoint;
            dim.Normal     = base.ActiveDrawingPlane.Normal;
            dim.AddPoint(new GeoPoint(0.0, 0.0, 0.0));
            dim.AddPoint(new GeoPoint(0.0, 0.0, 0.0));
            dim.AddPoint(new GeoPoint(0.0, 0.0, 0.0));
            base.ActiveObject     = dim;
            base.ShowActiveObject = false;


            base.TitleId = "Constr.Dimension.Direction.Objects";

            curveInput                             = new CurveInput("Constr.Dimension.Direction.Object1");
            curveInput.Decomposed                  = true; // nur Einzelelemente, auch bei Polyline und Pfad
            curveInput.MouseOverCurvesEvent       += new CADability.Actions.ConstructAction.CurveInput.MouseOverCurvesDelegate(inputDimCurves);
            curveInput.CurveSelectionChangedEvent += new CADability.Actions.ConstructAction.CurveInput.CurveSelectionChangedDelegate(inputDimCurvesChanged);

            curve2Input                             = new CurveInput("Constr.Dimension.Direction.Object2");
            curve2Input.Decomposed                  = true; // nur Einzelelemente, auch bei Polyline und Pfad
            curve2Input.MouseOverCurvesEvent       += new CADability.Actions.ConstructAction.CurveInput.MouseOverCurvesDelegate(input2DimCurves);
            curve2Input.CurveSelectionChangedEvent += new CADability.Actions.ConstructAction.CurveInput.CurveSelectionChangedDelegate(input2DimCurvesChanged);

            dimLocationInput = new GeoPointInput("Constr.Dimension.Location");
            dimLocationInput.DefaultGeoPoint   = ConstrDefaults.DefaultDimPoint;
            dimLocationInput.SetGeoPointEvent += new ConstructAction.GeoPointInput.SetGeoPointDelegate(SetDimLocation);

            base.SetInput(curveInput, curve2Input, dimLocationInput);
            base.ShowAttributes = true;
            base.OnSetAction();
        }
예제 #3
0
        public override void OnSetAction()
        {
            dim = Dimension.Construct();
            if (dimArcType == DimArcType.Radius)
            {
                idString    = "Constr.Dimension.Arc.Radius";
                dim.DimType = Dimension.EDimType.DimRadius;
            }
            else
            {
                idString    = "Constr.Dimension.Arc.Diameter";
                dim.DimType = Dimension.EDimType.DimDiameter;
            }
            dim.DimLineRef = ConstrDefaults.DefaultDimPoint;
            dim.Normal     = base.ActiveDrawingPlane.Normal;
            dim.AddPoint(new GeoPoint(0.0, 0.0, 0.0));

            base.TitleId      = idString;
            base.ActiveObject = dim;

            CurveInput curveInput = new CurveInput("Constr.Dimension.Arc.Object");

            curveInput.Decomposed                  = true; // nur Einzelelemente, auch bei Polyline und Pfad
            curveInput.MouseOverCurvesEvent       += new CADability.Actions.ConstructAction.CurveInput.MouseOverCurvesDelegate(inputDimCurves);
            curveInput.CurveSelectionChangedEvent += new CADability.Actions.ConstructAction.CurveInput.CurveSelectionChangedDelegate(inputDimCurvesChanged);

            GeoPointInput dimLocationInput = new GeoPointInput("Constr.Dimension.Location");

            dimLocationInput.DefaultGeoPoint   = ConstrDefaults.DefaultDimPoint;
            dimLocationInput.SetGeoPointEvent += new ConstructAction.GeoPointInput.SetGeoPointDelegate(SetDimLocation);


            base.SetInput(curveInput, dimLocationInput);
            base.ShowAttributes   = true;
            base.ShowActiveObject = false;
            base.OnSetAction();
        }
예제 #4
0
        public override void OnSetAction()
        {
            dim = Dimension.Construct();
            switch (dimDir)
            {
            case DimDirection.Horizontal:
                idString             = "Constr.Dimension.Horizontal";
                dim.DimLineDirection = base.ActiveDrawingPlane.DirectionX;
                break;

            case DimDirection.Vertical:
                idString             = "Constr.Dimension.Vertical";
                dim.DimLineDirection = base.ActiveDrawingPlane.DirectionY;
                break;

            case DimDirection.Sloping:
                idString             = "Constr.Dimension.Sloping";
                dim.DimLineDirection = base.ActiveDrawingPlane.DirectionX;
                break;
            }
            dim.DimLineRef = ConstrDefaults.DefaultDimPoint;
            dim.Normal     = base.ActiveDrawingPlane.Normal;
            methodSelect   = ConstrDefaults.DefaultDimensionMethod;
            if (methodSelect == 2) // Kordinatenbem. bezgl eines Punktes
            {
                dim.DimType = Dimension.EDimType.DimCoord;
            }
            else
            {
                dim.DimType = Dimension.EDimType.DimPoints;
            }


            base.ActiveObject = dim;

            base.TitleId = idString;

            mi            = new MultiPointInput(this);
            mi.ResourceId = "Constr.Dimension.Point";

            dimLocationInput = new GeoPointInput("Constr.Dimension.Location");
            dimLocationInput.DefaultGeoPoint   = ConstrDefaults.DefaultDimPoint;
            dimLocationInput.SetGeoPointEvent += new ConstructAction.GeoPointInput.SetGeoPointDelegate(SetDimLocation);
            dimLocationInput.GetGeoPointEvent += new ConstructAction.GeoPointInput.GetGeoPointDelegate(GetDimLocation);

            dimDirInput                    = new GeoVectorInput("Constr.Dimension.Direction");
            dimDirInput.Optional           = true;
            dimDirInput.SetGeoVectorEvent += new CADability.Actions.ConstructAction.GeoVectorInput.SetGeoVectorDelegate(DimDirectionInput);
            dimDirInput.IsAngle            = true;

            dimMethod                 = new MultipleChoiceInput("Constr.Dimension.Points.Method", "Constr.Dimension.Points.Method.Values");
            dimMethod.Optional        = true;
            dimMethod.DefaultChoice   = ConstrDefaults.DefaultDimensionMethod;
            dimMethod.SetChoiceEvent += new CADability.Actions.ConstructAction.MultipleChoiceInput.SetChoiceDelegate(SetMethod);
            if (dimDir == DimDirection.Sloping)
            {
                base.SetInput(mi, dimLocationInput, dimDirInput, dimMethod);
            }
            else
            {
                base.SetInput(mi, dimLocationInput, dimMethod);
            }
            base.ShowAttributes = true;
            base.OnSetAction();
        }
예제 #5
0
        public override void OnSetAction()
        {
            dim = Dimension.Construct();
            if (dimLabelType == DimLabelType.Point)
            {
                idString       = "Constr.Dimension.Point";
                pointString    = "Constr.Dimension.Point.Point";
                objectString   = "Constr.Dimension.Point.Object";
                locationString = "Constr.Dimension.Location";
                dim.DimType    = Dimension.EDimType.DimLocation;
            }
            else
            {
                idString       = "Constr.Dimension.Labeling";
                pointString    = "Constr.Dimension.Labeling.Point";
                objectString   = "Constr.Dimension.Labeling.Object";
                locationString = "Constr.Dimension.Labeling.Location";
                dim.DimType    = Dimension.EDimType.DimLocation;
            }
            dim.DimLineRef = ConstrDefaults.DefaultDimPoint;
            dim.Normal     = base.ActiveDrawingPlane.Normal;
            dim.AddPoint(new GeoPoint(0.0, 0.0, 0.0));

            dimMethodPoint = ConstrDefaults.DefaultDimensionPointMethod;

            base.TitleId                           = idString;
            base.ActiveObject                      = dim;
            base.ShowActiveObject                  = false;
            curveInput                             = new CurveInput(objectString);
            curveInput.Decomposed                  = true; // nur Einzelelemente, auch bei Polyline und Pfad
            curveInput.ReadOnly                    = !dimMethodPoint;
            curveInput.Optional                    = !dimMethodPoint;
            curveInput.MouseOverCurvesEvent       += new CADability.Actions.ConstructAction.CurveInput.MouseOverCurvesDelegate(inputDimCurves);
            curveInput.CurveSelectionChangedEvent += new CADability.Actions.ConstructAction.CurveInput.CurveSelectionChangedDelegate(inputDimCurvesChanged);

            dimPointInput                   = new GeoPointInput(pointString);
            dimPointInput.ReadOnly          = dimMethodPoint;
            dimPointInput.Optional          = dimMethodPoint;
            dimPointInput.SetGeoPointEvent += new ConstructAction.GeoPointInput.SetGeoPointDelegate(SetDimPoint);

            dimLocationInput = new GeoPointInput(locationString);
            dimLocationInput.SetGeoPointEvent += new ConstructAction.GeoPointInput.SetGeoPointDelegate(SetDimLocation);
            dimLocationInput.MouseClickEvent  += new MouseClickDelegate(DimLocationOnMouseClick);

            dimStringInput = new StringInput("Constr.Dimension.Labeling.Point.Text");
            dimStringInput.SetStringEvent += new CADability.Actions.ConstructAction.StringInput.SetStringDelegate(SetDimString);
            dimStringInput.GetStringEvent += new CADability.Actions.ConstructAction.StringInput.GetStringDelegate(GetDimString);

            dimMethod = new BooleanInput("Constr.Dimension.Point.Method", "Constr.Dimension.Point.Method.Values");
            dimMethod.DefaultBoolean   = ConstrDefaults.DefaultDimensionPointMethod;
            dimMethod.SetBooleanEvent += new CADability.Actions.ConstructAction.BooleanInput.SetBooleanDelegate(SetMethod);


            if (dimLabelType == DimLabelType.Point)
            {
                base.SetInput(curveInput, dimPointInput, dimLocationInput, dimMethod);
            }
            else
            {
                base.SetInput(curveInput, dimPointInput, dimLocationInput, dimStringInput, dimMethod);
            }
            base.ShowAttributes = true;
            base.OnSetAction();
        }