/// <summary> /// Overrides <see cref="CADability.GeoObject.IGeoObjectImpl.GetExtent (double)"/> /// </summary> /// <param name="precision"></param> /// <returns></returns> public override BoundingCube GetExtent(double precision) { BoundingCube res = BoundingCube.EmptyBoundingCube; if (compoundShape != null) { for (int i = 0; i < compoundShape.SimpleShapes.Length; ++i) { SimpleShape ss = compoundShape.SimpleShapes[i]; Border bdr = ss.Outline; res.MinMax(bdr.AsPath().MakeGeoObject(plane).GetExtent(precision)); } } return(res); }
public void Add(Border bdr, System.Drawing.Color color, int debugHint) { IGeoObject go = bdr.AsPath().MakeGeoObject(Plane.XYPlane); ColorDef cd = new ColorDef(color.Name, color); (go as IColorDef).ColorDef = cd; IntegerProperty ip = new IntegerProperty(debugHint, "Debug.Hint"); go.UserData.Add("Debug", ip); if (go is CADability.GeoObject.Path) { CADability.GeoObject.Path path = (go as CADability.GeoObject.Path); for (int i = 0; i < path.CurveCount; ++i) { (path.Curves[i] as IGeoObject).UserData.Add("Debug", ip); toShow.Add(path.Curves[i] as IGeoObject); } } }