WireFrame class for generate the model lines and fit the picture box's size to display
Inheritance: ObjectSketch
Example #1
0
        /// <summary>
        /// get Profile of Opening
        /// </summary>
        private void GetProfile()
        {
            CurveArray curveArray = m_opening.BoundaryCurves;

            if (null != curveArray)
            {
                m_lines.Clear();
                foreach (Curve curve in curveArray)
                {
                    List <XYZ> points = curve.Tessellate() as List <XYZ>;
                    AddLine(points);
                }
                WireFrame wireFrameSketch = new WireFrame(new ReadOnlyCollection <Line3D>(m_lines));
                m_sketch = wireFrameSketch;
            }
            else if (m_opening.IsRectBoundary)
            {
                //if opening profile is RectBoundary,
                //just can get profile info from BoundaryRect Property
                m_lines.Clear();
                List <XYZ> boundRect  = m_opening.BoundaryRect as List <XYZ>;
                List <XYZ> RectPoints = GetPoints(boundRect);
                AddLine(RectPoints);
                WireFrame wireFrameSketch = new WireFrame(new ReadOnlyCollection <Line3D>(m_lines));
                m_sketch = wireFrameSketch;
            }
            else
            {
                m_sketch = null;
            }
        }
Example #2
0
 /// <summary>
 /// get Profile of Opening
 /// </summary>
 private void GetProfile()
 {
     CurveArray curveArray = m_opening.BoundaryCurves;
     if (null != curveArray)
     {
         m_lines.Clear();
         foreach (Curve curve in curveArray)
         {
             List<XYZ> points = curve.Tessellate() as List<XYZ>;
             AddLine(points);
         }
         WireFrame wireFrameSketch = new WireFrame(new ReadOnlyCollection<Line3D>(m_lines));
         m_sketch = wireFrameSketch;
     }
     else if (m_opening.IsRectBoundary)
     {
         //if opening profile is RectBoundary,
         //just can get profile info from BoundaryRect Property
         m_lines.Clear();
         List<XYZ> boundRect = m_opening.BoundaryRect as List<XYZ>;
         List<XYZ> RectPoints = GetPoints(boundRect);
         AddLine(RectPoints);
         WireFrame wireFrameSketch = new WireFrame(new ReadOnlyCollection<Line3D>(m_lines));
         m_sketch = wireFrameSketch;
     }
     else
     {
         m_sketch = null;
     }
 }