Beispiel #1
0
        private bool Recalc()
        {
            if (theBaseCurve == null)
            {
                return(false);
            }
            Plane pln;

            if (theBaseCurve.GetPlanarState() == PlanarState.Planar)
            {
                pln = theBaseCurve.GetPlane();
            }
            else
            {
                pln = base.ActiveDrawingPlane;
            }
            ICurve2D c2d = theBaseCurve.GetProjectedCurve(pln);
            ICurve2D app = c2d.Approximate(false, Frame.GetDoubleSetting("Approximate.Precision", 0.01));
            Border   bdr = new Border(app);

            Border[] res = bdr.GetParallel(theDistance, true, 0.0, theMinAngle);
            Block    blk = Block.Construct();

            for (int i = 0; i < res.Length; ++i)
            {
                IGeoObject go = res[i].AsPath().MakeGeoObject(pln);
                go.CopyAttributes(theBaseCurve as IGeoObject);
                (go as IColorDef).ColorDef = (theBaseCurve as IColorDef).ColorDef;
                blk.Add(go);
            }
            base.ActiveObject = blk;
            return(true);
        }