當前位置: 首頁>>代碼示例>>C#>>正文


C# Point.SetSuccess方法代碼示例

本文整理匯總了C#中System.Point.SetSuccess方法的典型用法代碼示例。如果您正苦於以下問題:C# Point.SetSuccess方法的具體用法?C# Point.SetSuccess怎麽用?C# Point.SetSuccess使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.Point的用法示例。


在下文中一共展示了Point.SetSuccess方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Point

        public bool ClosestPointOnSurf

            (

            FeatureUpdateContext updateContext,
            [DefaultExpression("baseCS")]                CoordinateSystem cs,
            [Replicatable]                              IPoint point,
            [Replicatable]                              BSplineSurface surf,
            [DefaultValue(0.01)]                        double tol,
            [Out]                                       ref Point CPpoint,
            [Out]                                       ref double Dist,
            [Out]                                       ref DVector3d Normal


            )
        {

            this.LetConstituentFeaturesBeDirectlyIndexible();
            this.DeleteConstituentFeatures(updateContext);

            Point2d tempPt;

            DPoint3d dp = CerverFunctions.closestPointOnSurf(point.DPoint3d, surf, tol, out Dist, out tempPt, out Normal);

            Point outPt = new Point(this);
            outPt.FromDPoint3d(updateContext, cs, dp);
            outPt.SetSuccess(true);
            AddConstituentFeature(outPt);
            
            CPpoint = outPt;

            return true;
        } 
開發者ID:cerver,項目名稱:CERVERFunctions,代碼行數:33,代碼來源:CerverNodes.cs

示例2: foreach

        public bool MeshConnectedVerticies

            (
            FeatureUpdateContext updateContext,
            [DefaultExpression("baseCS")]                CoordinateSystem cs,
                                                                     Mesh mesh,
            [Replicatable]                                         IPoint SearchPoint,
            [DefaultValue(false)]                                    bool generatePoints,
            [Out]                                       ref int[] ConnectedVtxID,
            [Out]                                       ref Point[] ConnectedVtx,
            [Out]                                       ref DPoint3d[] DConnectedVtx

            )
        {

            this.LetConstituentFeaturesBeDirectlyIndexible();
            this.DeleteConstituentFeatures(updateContext);

            //System.Diagnostics.Stopwatch stp = new Stopwatch();

           // stp.Start();
            DPoint3d[] cntVtx = mesh.ConnectedVtx(SearchPoint.DPoint3d, out ConnectedVtxID);
            DConnectedVtx = cntVtx;
           // Feature.Print("area 1 " + stp.ElapsedMilliseconds.ToString());
           // stp.Reset();

            if (generatePoints)
            {
                List<Point> vtx = new List<Point>(cntVtx.Length);

                foreach (var v in cntVtx)
                {
                    Point p = new Point(this);
                    p.FromDPoint3d(updateContext, cs, v);
                    p.SetSuccess(true);
                    vtx.Add(p);

                }
                this.AddReplicatedChildFeatures(ConnectedVtx);
                ConnectedVtx = vtx.ToArray();
            }
           // Feature.Print("area 2 " + stp.ElapsedMilliseconds.ToString());
           // stp.Stop();

            return true;
        }
開發者ID:cerver,項目名稱:CERVERFunctions,代碼行數:46,代碼來源:CerverNodes.cs


注:本文中的System.Point.SetSuccess方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。