コード例 #1
0
ファイル: ConicalSurfaceNP.cs プロジェクト: SOFAgh/CADability
        public override IPropertyEntry GetPropertyEntry(IFrame frame)
        {
            List <IPropertyEntry> se       = new List <IPropertyEntry>();
            GeoPointProperty      location = new GeoPointProperty("ConicalSurface.Location", frame, false);

            location.ReadOnly          = true;
            location.GetGeoPointEvent += delegate(GeoPointProperty sender) { return(this.location); };
            se.Add(location);
            GeoVectorProperty dirx = new GeoVectorProperty("ConicalSurface.DirectionX", frame, false);

            dirx.ReadOnly           = true;
            dirx.IsAngle            = false;
            dirx.GetGeoVectorEvent += delegate(GeoVectorProperty sender) { return(xAxis); };
            se.Add(dirx);
            GeoVectorProperty diry = new GeoVectorProperty("ConicalSurface.DirectionY", frame, false);

            diry.ReadOnly           = true;
            diry.IsAngle            = false;
            diry.GetGeoVectorEvent += delegate(GeoVectorProperty sender) { return(yAxis); };
            se.Add(diry);
            AngleProperty openingAngle = new AngleProperty("ConicalSurface.OpeningAngle", frame, false);

            openingAngle.ReadOnly       = true;
            openingAngle.GetAngleEvent += delegate() { return(OpeningAngle); };
            se.Add(openingAngle);
            return(new GroupProperty("ConicalSurface", se.ToArray()));
        }
コード例 #2
0
 public ConstructAngleTwoPoints(AngleProperty angleProperty)
 {
     // sollte hier vielleicht eine Ebene mit reingehen? Oder immer ActiveDrawingPlane verwenden?
     this.angleProperty = angleProperty;
     firstPointIsValid  = false;
     secondPointIsValid = false;
     succeeded          = false;
 }
コード例 #3
0
        private void setAreaRatio(IFeature feature)
        {
            AngleProperty property = new AngleProperty(feature);

            foreach (var oA in property.outArea)
            {
                double index = oA;//"外交面积"
                outAr.Add(index);
            }
        }
コード例 #4
0
        private void setPolygen(IFeature feature)
        {
            AngleProperty property = new AngleProperty(feature);

            foreach (var polygen in property.Polygens)
            {
                double index = (polygen.Area);//"线与多边形相交面积"
                Polygen.Add(index);
            }
        }
コード例 #5
0
ファイル: Indexs.cs プロジェクト: taoqijingjing/code
        private void setPolygen(IFeature feature)
        {
            AngleProperty property = new AngleProperty(feature);

            foreach (var polygen in property.Polygens)
            {
                Index index = new Index(polygen.Area, "线与多边形相交面积");
                Polygen.Add(index);
            }
        }
コード例 #6
0
ファイル: Indexs.cs プロジェクト: taoqijingjing/code
        private void setTitio(IFeature feature)
        {
            AngleProperty property = new AngleProperty(feature);

            foreach (var titio in property.Titio)
            {
                Index index = new Index(titio, "三角形比率");
                Titio.Add(index);
            }
        }
コード例 #7
0
ファイル: Indexs.cs プロジェクト: taoqijingjing/code
        private void setAreaRatio(IFeature feature)
        {
            AngleProperty property = new AngleProperty(feature);

            foreach (var oA in property.outArea)
            {
                Index index = new Index(oA, "外交面积");
                outAr.Add(index);
            }
        }
コード例 #8
0
ファイル: Indexs.cs プロジェクト: taoqijingjing/code
        private void setMaxCha(IFeature feature)
        {
            ILineString   maxLine  = MaxPoints.getMaxVector(feature);
            AngleProperty property = new AngleProperty(feature);

            foreach (var line in property.Lines)
            {
                Index index = new Index(maxLine.Coordinates[1].Distance(maxLine.Coordinates[0]) - line.Coordinates[1].Distance(line.Coordinates[0]), "外圆与外边界差");
                MaxCha.Add(index);
            }
        }
コード例 #9
0
        private void setMaxCha(IFeature feature)
        {
            ILineString   maxLine  = MaxPoints.getMaxVector(feature);
            AngleProperty property = new AngleProperty(feature);

            foreach (var line in property.Lines)
            {
                //double index = (maxLine.Coordinates[1].Distance(maxLine.Coordinates[0]) - line.Coordinates[1].Distance(line.Coordinates[0]));
                double index = (maxLine.Length - line.Length);
                MaxCha.Add(index);//外圆与外边界差
            }
        }
コード例 #10
0
        private void setTitio(IFeature feature)
        {
            AngleProperty property = new AngleProperty(feature);

            foreach (var titio in property.Titio)
            {
                double index  = titio;//"三角形比率"
                Index  index1 = new Index(titio, "三角形比");
                Titio.Add(index);
                Titio1.Add(index1);
            }
        }
コード例 #11
0
ファイル: Indexs.cs プロジェクト: taoqijingjing/code
        private void setMinCha(IFeature feature)
        {
            ILineString   minLine  = MinPoints.getMinVector(feature);
            AngleProperty property = new AngleProperty(feature);

            foreach (var line in property.Lines)
            {
                Index index = new Index(line.Coordinates[1].Distance(line.Coordinates[0]) - minLine.Coordinates[1].Distance(minLine.Coordinates[0]), "最小差");
                MinCha.Add(index);
            }
            #region
            //ILineString minLine = MinPoints.getMinVector(feature);
            //AngleProperty property = new AngleProperty(feature);
            //foreach (var line in property.Lines)
            //{
            //    if (line.Intersection(feature.Geometry.Boundary).NumPoints == 2)
            //    {
            //        line.Intersection(feature.Geometry.Boundary).Coordinates[0].X -= feature.Geometry.Centroid.Coordinate.X;
            //        line.Intersection(feature.Geometry.Boundary).Coordinates[0].Y -= feature.Geometry.Centroid.Coordinate.Y;
            //        line.Intersection(feature.Geometry.Boundary).Coordinates[1].X -= feature.Geometry.Centroid.Coordinate.X;
            //        line.Intersection(feature.Geometry.Boundary).Coordinates[1].Y -= feature.Geometry.Centroid.Coordinate.Y;
            //        if (AngleProperty.getAngle(line.Intersection(feature.Geometry.Boundary).Coordinates[0]) > 90 && AngleProperty.getAngle(line.Intersection(feature.Geometry.Boundary).Coordinates[0]) < 270)
            //        {
            //            Index index1 = new Index(line.Coordinates[0].Distance(line.Intersection(feature.Geometry.Boundary).Coordinates[1]) - minLine.Coordinates[1].Distance(minLine.Coordinates[0]), "最小差");
            //            MinCha.Add(index1);
            //        }
            //       else if (AngleProperty.getAngle(line.Intersection(feature.Geometry.Boundary).Coordinates[0]) > 0 && AngleProperty.getAngle(line.Intersection(feature.Geometry.Boundary).Coordinates[0]) < 90||AngleProperty.getAngle(line.Intersection(feature.Geometry.Boundary).Coordinates[0])>270&& AngleProperty.getAngle(line.Intersection(feature.Geometry.Boundary).Coordinates[0])<360)
            //        {
            //            Index index1 = new Index(line.Coordinates[0].Distance(line.Intersection(feature.Geometry.Boundary).Coordinates[0]) - minLine.Coordinates[1].Distance(minLine.Coordinates[0]), "最小差");
            //            MinCha.Add(index1);
            //        }

            //    }
            //    else if (line.Intersection(feature.Geometry.Boundary).NumPoints == 1 || line.Intersection(feature.Geometry.Boundary).NumPoints == 0)
            //    {
            //        Index index = new Index(line.Coordinates[1].Distance(line.Coordinates[0]) - minLine.Coordinates[1].Distance(minLine.Coordinates[0]), "最小差");
            //        MinCha.Add(index);
            //    }
            //    //else
            //    //{
            //    //    Console.WriteLine("交点超过三个,请检查小班");
            //    //}
            //}
            #endregion
        }
コード例 #12
0
 set => this.SetValue(AngleProperty, value);
コード例 #13
0
 public GeneralAngleAction(AngleProperty angleProperty, Plane localPlane)
 {
     this.angleProperty = angleProperty;
     this.localPlane    = localPlane;
     usesLocalPlane     = true;
 }
コード例 #14
0
 public GeneralAngleAction(AngleProperty angleProperty, GeoPoint fixPoint)
 {
     this.angleProperty = angleProperty;
     this.fixPoint      = fixPoint;
     usesLocalPlane     = false;
 }
コード例 #15
0
 SetValue(AngleProperty, angle);
コード例 #16
0
 set => SetValue(AngleProperty, value);
コード例 #17
0
 get => (double)GetValue(AngleProperty); set => SetValue(AngleProperty, value);