Example #1
0
        /// <summary>
        /// Internal utility method
        /// </summary>
        /// <param name="profile"></param>
        /// <param name="distance"></param>
        /// <param name="direction"></param>
        /// <returns></returns>
        internal static IBSplineSurfaceEntity[] ExtrudeAsBSplineSurfaces(this ICurveEntity profile, double distance, Vector direction)
        {
            if (null == profile || direction.IsZeroVector())
            {
                return(null);
            }

            using (IPointEntity startPt = profile.PointAtParameter(0.5))
            {
                Vector offset = direction.Normalize().Scale(distance);
                using (IPointEntity endPt = startPt.CopyAndTranslate(offset.IVector) as IPointEntity)
                {
                    using (ILineEntity path = HostFactory.Factory.LineByStartPointEndPoint(startPt, endPt))
                    {
                        using (ISurfaceEntity surf = HostFactory.Factory.SurfaceBySweep(profile, path))
                        {
                            return(surf.ConvertToBSplineSurface());
                        }
                    }
                }
            }
        }
Example #2
0
 public ISurfaceEntity Trim(ICurveEntity[] curves, IPlaneEntity[] planes, ISurfaceEntity[] surfaces, ISolidEntity[] solids, IPointEntity point, bool bAutoExtend)
 {
     return this;
 }
Example #3
0
 public ISurfaceEntity SurfaceBySweep(ICurveEntity profile, ICurveEntity path)
 {
     DSGeometryApplication.Check();
     return new SurfaceEntity();
 }
 public virtual ISolidEntity SolidBySweep(ICurveEntity profile, ICurveEntity path)
 {
     throw new NotImplementedException("Factory method SolidBySweep not implemented");
 }
Example #5
0
 public bool UpdateSolidByRevolve(ICurveEntity profileCurve, IPointEntity originPoint, IVectorEntity revolveAxis, double startAngle, double sweepAngle)
 {
     return false;
 }
Example #6
0
        internal static List<ICurveEntity> GetHostCurves(DSCurve[] contextCurves, out ICurveEntity firstCurve)
        {
            firstCurve = null;
            List<ICurveEntity> hostCurves = new List<ICurveEntity>();
            foreach (var curve in contextCurves)
            {
                if (null == curve)
                    continue;
                if (null == firstCurve)
                    firstCurve = curve.CurveEntity;
                else
                    hostCurves.Add(curve.CurveEntity);
            }
            if (null == firstCurve)
                throw new System.ArgumentException(string.Format(Properties.Resources.InvalidArguments, "contextCurves"), "contextCurves");

            return hostCurves;
        }
Example #7
0
 public IPolyCurveEntity Join(ICurveEntity curve)
 {
     throw new NotImplementedException();
 }
Example #8
0
 public virtual ISurfaceEntity SurfaceByLoftCrossSectionsPath(ICurveEntity[] crossSections, ICurveEntity path)
 {
     throw new NotImplementedException("Factory method SurfaceByLoftCrossSectionsPath not implemented");
 }
Example #9
0
 public ISurfaceEntity SurfacePatchFromCurve(ICurveEntity profile)
 {
     DSGeometryApplication.Check();
     return(new SurfaceEntity());
 }
Example #10
0
 public bool UpdateRevolve(ICurveEntity profile, IPointEntity origin, IVector revolveAxis, double startAngle, double sweepAngle)
 {
     return false;
 }
Example #11
0
 public ISurfaceEntity SurfaceByLoftCrossSectionsPath(ICurveEntity[] crossSections, ICurveEntity path)
 {
     DSGeometryApplication.Check();
     return(new SurfaceEntity());
 }
Example #12
0
 public virtual INurbsCurveEntity JoinWith(ICurveEntity[] curves)
 {
     return new NurbsCurveEntity();
 }
Example #13
0
 public INurbsCurveEntity Merge(ICurveEntity curve)
 {
     throw new NotImplementedException();
 }
Example #14
0
 public virtual IBSplineCurveEntity JoinWith(ICurveEntity[] curves)
 {
     return new BSplineCurveEntity();
 }
Example #15
0
 public INurbsCurveEntity Merge(ICurveEntity curve)
 {
     throw new NotImplementedException();
 }
Example #16
0
 public virtual IPointEntity[] IntersectWith(ICurveEntity otherCurve)
 {
     return new IPointEntity[2] { new PointEntity(), new PointEntity() };
 }
Example #17
0
 public bool UpdateSolidByLoftedCrossSectionsPath(ICurveEntity[] crossSections, ICurveEntity path)
 {
     return(false);
 }
Example #18
0
 public virtual ISurfaceEntity SurfaceBySweep(ICurveEntity profile, ICurveEntity path)
 {
     throw new NotImplementedException("Factory method SurfaceBySweep not implemented");
 }
Example #19
0
 public bool UpdateSolidByRevolve(ICurveEntity profileCurve, IPointEntity originPoint, IVector revolveAxis, double startAngle, double sweepAngle)
 {
     return(false);
 }
Example #20
0
 private UnknownCurve(ICurveEntity host, bool persist = false)
     : base(host, persist)
 {
 }
Example #21
0
 public bool UpdateSolidBySweep(ICurveEntity profile, ICurveEntity path)
 {
     return(false);
 }
Example #22
0
 public bool UpdateSolidByLoftedCrossSections(ICurveEntity[] crossSections)
 {
     return false;
 }
Example #23
0
 private UnknownCurve(ICurveEntity host, bool persist = false)
     : base(host, persist)
 {
 }
Example #24
0
 public virtual ISurfaceEntity SurfacePatchFromCurve(ICurveEntity profile)
 {
     throw new NotImplementedException("Factory method SurfacePatchFromCurve not implemented");
 }
Example #25
0
 public virtual IPointEntity GetClosestPointTo(ICurveEntity iCurveEntity)
 {
     return(this.StartPoint);
 }
Example #26
0
 public IPolyCurveEntity Join(ICurveEntity curve)
 {
     throw new NotImplementedException();
 }
Example #27
0
 public virtual IPointEntity[] IntersectWith(ICurveEntity otherCurve)
 {
     return(new IPointEntity[2] {
         new PointEntity(), new PointEntity()
     });
 }
Example #28
0
 public ISurfaceEntity SurfacePatchFromCurve(ICurveEntity profile)
 {
     DSGeometryApplication.Check();
     return new SurfaceEntity();
 }
Example #29
0
 public ILineEntity LineByTangency(ICurveEntity curve, double parameter)
 {
     throw new NotImplementedException();
 }
Example #30
0
 public virtual ICurveEntity[] JoinWith(ICurveEntity[] curves, double bridgeTolerance)
 {
     return new ICurveEntity[3] { new LineEntity(), new LineEntity(), new LineEntity() };
 }
Example #31
0
 public ISurfaceEntity SurfaceByLoft(ICurveEntity[] crossSections, ICurveEntity guides)
 {
     DSGeometryApplication.Check();
     return(new SurfaceEntity());
 }
Example #32
0
 public virtual IPointEntity GetClosestPointTo(ICurveEntity iCurveEntity)
 {
     return this.StartPoint;
 }
Example #33
0
 public ISurfaceEntity SurfaceByPatch(ICurveEntity iCurveEntity)
 {
     throw new NotImplementedException();
 }
Example #34
0
 public virtual ISolidEntity SolidByLoftCrossSectionsGuides(ICurveEntity[] crossSections, ICurveEntity[] guides)
 {
     throw new NotImplementedException("Factory method SolidByLoftCrossSectionsGuides not implemented");
 }
Example #35
0
 public ISolidEntity SolidByLoft(ICurveEntity[] crossSections, ICurveEntity path)
 {
     DSGeometryApplication.Check();
     return(new SolidEntity());
 }
Example #36
0
 public virtual ISurfaceEntity SurfaceByRevolve(ICurveEntity profile, IPointEntity axisOrigin, IVector axisDirection, double startAngle, double sweepAngle)
 {
     throw new NotImplementedException("Factory method SurfaceByRevolve not implemented");
 }
Example #37
0
 public ISolidEntity SolidBySweep(ICurveEntity profile, ICurveEntity path)
 {
     DSGeometryApplication.Check();
     return(new SolidEntity());
 }
Example #38
0
 public virtual ISurfaceEntity SurfacePatchFromCurve(ICurveEntity profile)
 {
     throw new NotImplementedException("Factory method SurfacePatchFromCurve not implemented");
 }
Example #39
0
 public ISolidEntity SolidBySweep2Rails(ICurveEntity rail1, ICurveEntity rail2, ICurveEntity profile)
 {
     throw new NotImplementedException();
 }
Example #40
0
 internal DSCurve(ICurveEntity host, bool persist)
     : base(host, persist)
 {
 }
Example #41
0
 public ISolidEntity SolidByRevolve(ICurveEntity profile, IPointEntity axisOrigin, IVectorEntity axisDirection, double startAngle, double sweepAngle)
 {
     DSGeometryApplication.Check();
     return(new SolidEntity());
 }
Example #42
0
 internal static Curve ToCurve(this ICurveEntity host, bool persist, Geometry context)
 {
     return(host.ToGeometry <Curve, ICurveEntity>(persist, context));
 }
Example #43
0
 public ISolidEntity SolidByLoftCrossSections(ICurveEntity[] crossSections)
 {
     DSGeometryApplication.Check();
     return new SolidEntity();
 }
Example #44
0
 public bool UpdateSolidByLoftFromCrossSectionsGuides(ICurveEntity[] crossSections, ICurveEntity[] guides)
 {
     return false;
 }
Example #45
0
 public ISolidEntity SolidBySweep(ICurveEntity profile, ICurveEntity path)
 {
     DSGeometryApplication.Check();
     return new SolidEntity();
 }
Example #46
0
 public bool UpdateSolidByLoftedCrossSectionsPath(ICurveEntity[] crossSections, ICurveEntity path)
 {
     return false;
 }
Example #47
0
 public ISurfaceEntity SurfaceByLoftCrossSectionsGuides(ICurveEntity[] crossSections, ICurveEntity[] guides)
 {
     DSGeometryApplication.Check();
     return new SurfaceEntity();
 }
Example #48
0
 public bool UpdateSolidBySweep(ICurveEntity profile, ICurveEntity path)
 {
     return false;
 }
Example #49
0
 public ISurfaceEntity SurfaceByLoftCrossSectionsPath(ICurveEntity[] crossSections, ICurveEntity path)
 {
     DSGeometryApplication.Check();
     return new SurfaceEntity();
 }
Example #50
0
 public virtual ISolidEntity SolidByLoftCrossSectionsPath(ICurveEntity[] crossSections, ICurveEntity path)
 {
     throw new NotImplementedException("Factory method SolidByLoftCrossSectionsPath not implemented");
 }
Example #51
0
 public ISurfaceEntity SurfaceByRevolve(ICurveEntity profile, IPointEntity axisOrigin, IVector axisDirection, double startAngle, double sweepAngle)
 {
     DSGeometryApplication.Check();
     return new SurfaceEntity();
 }
Example #52
0
 public virtual ISolidEntity SolidByRevolve(ICurveEntity profile, IPointEntity axisOrigin, IVector axisDirection, double startAngle, double sweepAngle)
 {
     throw new NotImplementedException("Factory method SolidByRevolve not implemented");
 }
Example #53
0
 public ISolidEntity SolidBySweep2Rails(ICurveEntity rail1, ICurveEntity rail2, ICurveEntity profile) { throw new NotImplementedException(); }