/// <summary>
 /// Overrides <see cref="CADability.GeoObject.ISurfaceImpl.SameGeometry (BoundingRect, ISurface, BoundingRect, double, out ModOp2D)"/>
 /// </summary>
 /// <param name="thisBounds"></param>
 /// <param name="other"></param>
 /// <param name="otherBounds"></param>
 /// <param name="precision"></param>
 /// <param name="firstToSecond"></param>
 /// <returns></returns>
 public override bool SameGeometry(BoundingRect thisBounds, ISurface other, BoundingRect otherBounds, double precision, out ModOp2D firstToSecond)
 {
     if (other is SurfaceOfLinearExtrusion)
     {
         firstToSecond = ModOp2D.Null;
         SurfaceOfLinearExtrusion sleother = other as SurfaceOfLinearExtrusion;
         // es würde genügen, wenn die beiden Kurven sich überlappen. Dann auf das Überlappungsintervall testen
         bool reverse;
         if (!Curves.SameGeometry(BasisCurve, sleother.BasisCurve, precision, out reverse))
         {
             return(false);
         }
         // zwei Extrempunkte bestimmen, damit sollte es OK sein
         GeoPoint2D uv1 = new GeoPoint2D(curveStartParameter, 0.0);
         GeoPoint   p1  = PointAt(uv1);
         GeoPoint2D uv2 = sleother.PositionOf(p1);
         GeoPoint   p2  = sleother.PointAt(uv2);
         if ((p1 | p2) > precision)
         {
             return(false);
         }
         uv1 = new GeoPoint2D(curveEndParameter, 1.0);
         p1  = PointAt(uv1);
         uv2 = sleother.PositionOf(p1);
         p2  = sleother.PointAt(uv2);
         if ((p1 | p2) > precision)
         {
             return(false);
         }
         firstToSecond = ModOp2D.Translate(uv2 - uv1);
         return(true);
     }
     return(base.SameGeometry(thisBounds, other, otherBounds, precision, out firstToSecond));
 }
        /// <summary>
        /// Overrides <see cref="CADability.GeoObject.ISurfaceImpl.Clone ()"/>
        /// </summary>
        /// <returns></returns>
        public override ISurface Clone()
        {
            SurfaceOfLinearExtrusion res = new SurfaceOfLinearExtrusion(basisCurve.Clone(), direction, curveStartParameter, curveEndParameter);

            res.usedArea = usedArea;
            return(res);
        }
        /// <summary>
        /// Overrides <see cref="CADability.GeoObject.ISurfaceImpl.CopyData (ISurface)"/>
        /// </summary>
        /// <param name="CopyFrom"></param>
        public override void CopyData(ISurface CopyFrom)
        {
            SurfaceOfLinearExtrusion cc = CopyFrom as SurfaceOfLinearExtrusion;

            if (cc != null)
            {
                this.basisCurve          = cc.basisCurve.Clone();
                this.direction           = cc.direction;
                this.curveStartParameter = cc.curveStartParameter;
                this.curveEndParameter   = cc.curveEndParameter;
            }
        }