예제 #1
0
 public override bool SameGeometry(BoundingRect thisBounds, ISurface other, BoundingRect otherBounds, double precision, out ModOp2D firstToSecond)
 {
     if (other is OffsetSurface)
     {
         OffsetSurface oos = (other as OffsetSurface);
         return(baseSurface.SameGeometry(thisBounds, oos.baseSurface, otherBounds, precision, out firstToSecond) && oos.offset == offset);
     }
     return(base.SameGeometry(thisBounds, other, otherBounds, precision, out firstToSecond));
 }
예제 #2
0
 protected FixedCurve(SerializationInfo info, StreamingContext context)
 {
     fixedCurve    = info.GetValue("FixedCurve", typeof(ICurve)) as ICurve;
     fixedU        = info.GetBoolean("FixedU");
     offsetSurface = info.GetValue("OffsetSurface", typeof(OffsetSurface)) as OffsetSurface;
     param         = info.GetDouble("Param");
     pmin          = info.GetDouble("Pmin");
     pmax          = info.GetDouble("Pmax");
 }
예제 #3
0
        /// <summary>
        /// Overrides <see cref="CADability.GeoObject.ISurfaceImpl.CopyData (ISurface)"/>
        /// </summary>
        /// <param name="CopyFrom"></param>
        public override void CopyData(ISurface CopyFrom)
        {
            OffsetSurface cc = CopyFrom as OffsetSurface;

            if (cc != null)
            {
                this.baseSurface = cc.baseSurface.Clone();
                this.offset      = cc.offset;
            }
        }
예제 #4
0
        /// <summary>
        /// Overrides <see cref="CADability.GeoObject.ISurfaceImpl.Clone ()"/>
        /// </summary>
        /// <returns></returns>
        public override ISurface Clone()
        {
            OffsetSurface res = new OffsetSurface(baseSurface.Clone(), offset);

            res.umin     = umin;
            res.umax     = umax;
            res.vmin     = vmin;
            res.vmax     = vmax;
            res.usedArea = usedArea;
            return(res);
        }
예제 #5
0
 /// <summary>
 /// Overrides <see cref="CADability.GeoObject.ISurfaceImpl.GetModified (ModOp)"/>
 /// </summary>
 /// <param name="m"></param>
 /// <returns></returns>
 public override ISurface GetModified(ModOp m)
 {
     if (m.IsIsogonal)
     {
         OffsetSurface res = new OffsetSurface(baseSurface.GetModified(m), offset * m.Factor, usedArea);
         return(res);
     }
     else
     {
         throw new NotImplementedException("Modify OffsetSurface with non ortogonal Matrix");
     }
 }
예제 #6
0
 public FixedCurve(OffsetSurface offsetSurface, double param, double pmin, double pmax, bool fixedU)
 {
     this.fixedU        = fixedU;
     this.offsetSurface = offsetSurface;
     this.param         = param;
     this.pmin          = pmin;
     this.pmax          = pmax;
     if (fixedU)
     {
         fixedCurve = offsetSurface.baseSurface.FixedU(param, pmin, pmax);
     }
     else
     {
         fixedCurve = offsetSurface.baseSurface.FixedV(param, pmin, pmax);
     }
     if (fixedCurve is BSpline)
     {
         GeoPoint dbg = (fixedCurve as BSpline).GetPole(0);
         if (double.IsNaN(dbg.x))
         {
         }
     }
 }