예제 #1
0
        public POP(SEEdge initEdge)
        {
            StandardEdge = initEdge.edge;

            //partDoc = (SolidEdgePart.PartDocument)StandardEdge.Document;
            //sk = partDoc.Sketches3D.Add();

            validpoint(initEdge.edge);
        }
예제 #2
0
        private void button4_Click(object sender, EventArgs e)
        {
            YCC_solidedge.getEdgeApplication(ref SEApp, true);
            partDoc = (SolidEdgePart.PartDocument)SEApp.ActiveDocument;
            SolidEdgePart.Model     md = partDoc.Models.Item(1);
            SolidEdgeGeometry.Body  by = (SolidEdgeGeometry.Body)md.Body;
            SolidEdgeGeometry.Edges ed = (SolidEdgeGeometry.Edges)by.Edges[SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryStraight];

            List <SolidEdgeGeometry.Edge> ListExceptionEdge = new List <SolidEdgeGeometry.Edge>();

            int Count = 0;

            foreach (SolidEdgeGeometry.Edge _e in ed)
            {
                if (ListExceptionEdge.Contains(_e))
                {
                    continue;
                }

                SEEdge newpoint = new SEEdge(_e);

                if (newpoint.Len == 23.09 || newpoint.Len == 11.55)
                {
                    POP newPOP = new POP(newpoint);
                    Count = Count + 1;

                    if (newPOP.ListHexagonEdge.Count == 6)
                    {
                        foreach (SolidEdgeGeometry.Edge _edge in newPOP.ListHexagonEdge)
                        {
                            ListExceptionEdge.Add(_edge);
                        }
                        foreach (SolidEdgeGeometry.Edge _edge in newPOP.ListHoleEdge)
                        {
                            ListExceptionEdge.Add(_edge);
                        }
                        foreach (SolidEdgeGeometry.Edge _edge in newPOP.ListOtherHexagonEdge)
                        {
                            ListExceptionEdge.Add(_edge);
                        }
                    }
                }
            }


            //bool done = true;
            //int count = 0;
            //while (done)
            //{
            //    foreach (SEEdge _p in point23)
            //    {
            //        if (www(ref point23, _p))
            //        {
            //            count++;
            //            break;
            //        }

            //        if (_p == point23[point23.Count() - 1]) done = false;
            //    }

            //    if (point23.Count == 0) done = false;
            //}
        }