Example #1
0
 private Plane(IPlaneEntity entity, double size, bool display = false)
     : base(entity, false)
 {
     InitializeGuaranteedProperties();
     if (display && size>1)
         mDisplayPolygon = CreatePlaneVisuals(size,true);
 }
Example #2
0
 private Plane(IPlaneEntity entity, double size, bool display = false)
     : base(entity, false)
 {
     InitializeGuaranteedProperties();
     if (display && size > 1)
     {
         mDisplayPolygon = CreatePlaneVisuals(size, true);
     }
 }
Example #3
0
        private static ILineEntity GetPerpBisector(Point startPt, Point endPt,
                                                   IPlaneEntity planeOfCircle)
        {
            Vector dir = startPt.DirectionTo(endPt);

            dir = dir.Normalize();

            IPointEntity midPt = HostFactory.Factory.CreatePoint((startPt.X + endPt.X) / 2, (startPt.Y + endPt.Y) / 2, (startPt.Z + endPt.Z) / 2);

            //  get the perpendicular plane to plane of circle at mid point of segment[startPt, endPt]
            //
            IPlaneEntity perpPlane = HostFactory.Factory.PlaneByOriginNormal(midPt, dir.IVector);

            //  this intersection results in line perp to segment[startPt, endPt] & plane normal
            //  and happens to be the perpBisector of mentioned segment in planeOfCircle
            //
            ILineEntity perpBisector = planeOfCircle.IntersectWith(perpPlane);

            return(perpBisector);
        }
Example #4
0
        private static Point GetCircumCenter(Point firstPt, Point secondPt, Point thirdPt, Vector normal)
        {
            var one = firstPt.PointEntity;
            var two = secondPt.PointEntity;
            var thr = thirdPt.PointEntity;

            using (IPlaneEntity planeOfCircle = HostFactory.Factory.PlaneByOriginNormal(one, normal.IVector))
            {
                using (ILineEntity perpBisector1 = GetPerpBisector(firstPt, secondPt, planeOfCircle))
                {
                    using (ILineEntity perpBisector2 = GetPerpBisector(secondPt, thirdPt, planeOfCircle))
                    {
                        IPointEntity[] circumCntr = perpBisector1.IntersectWith(perpBisector2);
                        if (circumCntr == null || circumCntr.Length < 1)
                        {
                            return(null);
                        }
                        return(circumCntr[0].ToPoint(false, null));
                    }
                }
            }
        }
Example #5
0
        private static IPlaneEntity ByOriginNormalCore(Point origin, ref Vector normal, double size)
        {
            if (origin == null)
            {
                throw new ArgumentNullException("origin");
            }
            else if (normal == null)
            {
                throw new ArgumentNullException("normal");
            }
            else if (normal.IsZeroVector())
            {
                throw new ArgumentException(string.Format(Properties.Resources.IsZeroVector, normal), "normal");
            }

            normal = normal.IsNormalized ? normal : normal.Normalize();
            IPlaneEntity entity = HostFactory.Factory.PlaneByOriginNormal(origin.PointEntity, normal.IVector);

            if (null == entity)
            {
                throw new System.Exception(string.Format(Properties.Resources.OperationFailed, "Plane.ByOriginNormal"));
            }
            return(entity);
        }
Example #6
0
 public ISolidEntity Trim(IPlaneEntity[] planes, ISurfaceEntity[] surfaces, ISolidEntity[] solids, IPointEntity point)
 {
     return new SolidEntity();
 }
Example #7
0
 public IGeometryEntity[] SliceWithPlane(IPlaneEntity plane)
 {
     return new IGeometryEntity[2] { new GeometryEntity(), new GeometryEntity() };
 }
Example #8
0
 public ICoordinateSystemEntity Mirror(IPlaneEntity mirror_plane)
 {
     throw new NotImplementedException();
 }
Example #9
0
 public void Split(IPlaneEntity plane, ref ISurfaceEntity[] negativeHalf, ref ISurfaceEntity[] positiveHalf)
 {
     //split complete
 }
Example #10
0
 public ICircleEntity CircleByPlaneRadius(IPlaneEntity plane, double radius) { throw new NotImplementedException(); }
Example #11
0
 public ILineEntity IntersectWith(IPlaneEntity perpPlane)
 {
     return(new LineEntity());
 }
Example #12
0
 public virtual ICurveEntity ProjectOn(IPlaneEntity plane, IVector direction)
 {
     return new LineEntity();
 }
Example #13
0
 public ILineEntity IntersectWith(IPlaneEntity perpPlane)
 {
     return new LineEntity();
 }
Example #14
0
 public ISolidEntity NonRegularSliceWithPlane(IPlaneEntity plane)
 {
     return(new SolidEntity());
 }
Example #15
0
 public IGeometryEntity[] IntersectWith(IPlaneEntity geometry)
 {
     return(new IGeometryEntity[2] {
         new GeometryEntity(), new GeometryEntity()
     });
 }
Example #16
0
 public IGeometryEntity[] SliceWithPlane(IPlaneEntity plane)
 {
     return(new IGeometryEntity[2] {
         new GeometryEntity(), new GeometryEntity()
     });
 }
Example #17
0
 public ICurveEntity PullOntoPlane(IPlaneEntity plane)
 {
     throw new NotImplementedException();
 }
Example #18
0
 public ISurfaceEntity[] Split(IPlaneEntity plane)
 {
     return(new ISurfaceEntity[4] {
         new SurfaceEntity(), new SurfaceEntity(), new SurfaceEntity(), new SurfaceEntity()
     });
 }
Example #19
0
 public ISolidEntity NonRegularSliceWithPlane(IPlaneEntity plane)
 {
     return new SolidEntity();
 }
Example #20
0
 public IRectangleEntity RectangleByWidthHeight(IPlaneEntity plane, double width, double length) { throw new NotImplementedException(); }
Example #21
0
 public virtual ICurveEntity ProjectOn(IPlaneEntity plane, IVector direction)
 {
     return(new LineEntity());
 }
Example #22
0
 public virtual IGeometryEntity[] IntersectWith(IPlaneEntity plane)
 {
     return new IGeometryEntity[2] { new GeometryEntity(), new GeometryEntity() };
 }
Example #23
0
 public ICoordinateSystemEntity Mirror(IPlaneEntity mirror_plane)
 {
     throw new NotImplementedException();
 }
Example #24
0
 public ICoordinateSystemEntity CoordinateSystemByPlane(IPlaneEntity plane) { throw new NotImplementedException(); }
Example #25
0
 internal static Plane ToPlane(this IPlaneEntity host, bool persist, Geometry context)
 {
     return(host.ToGeometry <Plane, IPlaneEntity>(persist, context));
 }
Example #26
0
 public virtual IGeometryEntity[] IntersectWith(IPlaneEntity plane)
 {
     return(new IGeometryEntity[2] {
         new GeometryEntity(), new GeometryEntity()
     });
 }
Example #27
0
 public ICurveEntity PullOntoPlane(IPlaneEntity plane)
 {
     throw new NotImplementedException();
 }
Example #28
0
 public void Rotate(IPlaneEntity origin, double degrees)
 {
     throw new NotImplementedException();
 }
Example #29
0
 public ICoordinateSystemEntity CoordinateSystemByPlane(IPlaneEntity plane)
 {
     throw new NotImplementedException();
 }
Example #30
0
 public IEllipseEntity EllipseByPlaneRadii(IPlaneEntity plane, double xAxisRadius, double yAxisRadius)
 {
     throw new NotImplementedException();
 }
Example #31
0
 public IRectangleEntity RectangleByWidthHeight(IPlaneEntity plane, double width, double length)
 {
     throw new NotImplementedException();
 }
Example #32
0
 public IPolygonEntity Trim(IPlaneEntity[] halfSpaces)
 {
     return this;
 }
Example #33
0
 public ICircleEntity CircleByPlaneRadius(IPlaneEntity plane, double radius)
 {
     throw new NotImplementedException();
 }
Example #34
0
 public void Rotate(IPlaneEntity origin, double degrees)
 {
     throw new NotImplementedException();
 }
Example #35
0
 public void Split(IPlaneEntity plane, ref ISurfaceEntity[] negativeHalf, ref ISurfaceEntity[] positiveHalf)
 {
     //split complete
 }
Example #36
0
 public IGeometryEntity[] SliceWithPlanes(IPlaneEntity[] planeHosts)
 {
     return new IGeometryEntity[2] { new GeometryEntity(), new GeometryEntity() };
 }
Example #37
0
 public ISurfaceEntity[] Split(IPlaneEntity plane)
 {
     return new ISurfaceEntity[4] { new SurfaceEntity(), new SurfaceEntity(), new SurfaceEntity(), new SurfaceEntity() };
 }
Example #38
0
 public IGeometryEntity[] IntersectWith(IPlaneEntity geometry)
 {
     return new IGeometryEntity[2] { new GeometryEntity(), new GeometryEntity() };
 }
Example #39
0
 public ISurfaceEntity Trim(ICurveEntity[] curves, IPlaneEntity[] planes, ISurfaceEntity[] surfaces, ISolidEntity[] solids, IPointEntity point, bool bAutoExtend)
 {
     return this;
 }
Example #40
0
 public ISolidEntity NonRegularSliceWithPlanes(IPlaneEntity[] planes)
 {
     return new SolidEntity();
 }
Example #41
0
 public IEllipseEntity EllipseByPlaneRadii(IPlaneEntity plane, double xAxisRadius, double yAxisRadius) { throw new NotImplementedException(); }