private Plane(IPlaneEntity entity, double size, bool display = false) : base(entity, false) { InitializeGuaranteedProperties(); if (display && size>1) mDisplayPolygon = CreatePlaneVisuals(size,true); }
private Plane(IPlaneEntity entity, double size, bool display = false) : base(entity, false) { InitializeGuaranteedProperties(); if (display && size > 1) { mDisplayPolygon = CreatePlaneVisuals(size, true); } }
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); }
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)); } } } }
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); }
public ISolidEntity Trim(IPlaneEntity[] planes, ISurfaceEntity[] surfaces, ISolidEntity[] solids, IPointEntity point) { return new SolidEntity(); }
public IGeometryEntity[] SliceWithPlane(IPlaneEntity plane) { return new IGeometryEntity[2] { new GeometryEntity(), new GeometryEntity() }; }
public ICoordinateSystemEntity Mirror(IPlaneEntity mirror_plane) { throw new NotImplementedException(); }
public void Split(IPlaneEntity plane, ref ISurfaceEntity[] negativeHalf, ref ISurfaceEntity[] positiveHalf) { //split complete }
public ICircleEntity CircleByPlaneRadius(IPlaneEntity plane, double radius) { throw new NotImplementedException(); }
public ILineEntity IntersectWith(IPlaneEntity perpPlane) { return(new LineEntity()); }
public virtual ICurveEntity ProjectOn(IPlaneEntity plane, IVector direction) { return new LineEntity(); }
public ILineEntity IntersectWith(IPlaneEntity perpPlane) { return new LineEntity(); }
public ISolidEntity NonRegularSliceWithPlane(IPlaneEntity plane) { return(new SolidEntity()); }
public IGeometryEntity[] IntersectWith(IPlaneEntity geometry) { return(new IGeometryEntity[2] { new GeometryEntity(), new GeometryEntity() }); }
public IGeometryEntity[] SliceWithPlane(IPlaneEntity plane) { return(new IGeometryEntity[2] { new GeometryEntity(), new GeometryEntity() }); }
public ICurveEntity PullOntoPlane(IPlaneEntity plane) { throw new NotImplementedException(); }
public ISurfaceEntity[] Split(IPlaneEntity plane) { return(new ISurfaceEntity[4] { new SurfaceEntity(), new SurfaceEntity(), new SurfaceEntity(), new SurfaceEntity() }); }
public ISolidEntity NonRegularSliceWithPlane(IPlaneEntity plane) { return new SolidEntity(); }
public IRectangleEntity RectangleByWidthHeight(IPlaneEntity plane, double width, double length) { throw new NotImplementedException(); }
public virtual ICurveEntity ProjectOn(IPlaneEntity plane, IVector direction) { return(new LineEntity()); }
public virtual IGeometryEntity[] IntersectWith(IPlaneEntity plane) { return new IGeometryEntity[2] { new GeometryEntity(), new GeometryEntity() }; }
public ICoordinateSystemEntity CoordinateSystemByPlane(IPlaneEntity plane) { throw new NotImplementedException(); }
internal static Plane ToPlane(this IPlaneEntity host, bool persist, Geometry context) { return(host.ToGeometry <Plane, IPlaneEntity>(persist, context)); }
public virtual IGeometryEntity[] IntersectWith(IPlaneEntity plane) { return(new IGeometryEntity[2] { new GeometryEntity(), new GeometryEntity() }); }
public void Rotate(IPlaneEntity origin, double degrees) { throw new NotImplementedException(); }
public IEllipseEntity EllipseByPlaneRadii(IPlaneEntity plane, double xAxisRadius, double yAxisRadius) { throw new NotImplementedException(); }
public IPolygonEntity Trim(IPlaneEntity[] halfSpaces) { return this; }
public IGeometryEntity[] SliceWithPlanes(IPlaneEntity[] planeHosts) { return new IGeometryEntity[2] { new GeometryEntity(), new GeometryEntity() }; }
public ISurfaceEntity[] Split(IPlaneEntity plane) { return new ISurfaceEntity[4] { new SurfaceEntity(), new SurfaceEntity(), new SurfaceEntity(), new SurfaceEntity() }; }
public IGeometryEntity[] IntersectWith(IPlaneEntity geometry) { return new IGeometryEntity[2] { new GeometryEntity(), new GeometryEntity() }; }
public ISurfaceEntity Trim(ICurveEntity[] curves, IPlaneEntity[] planes, ISurfaceEntity[] surfaces, ISolidEntity[] solids, IPointEntity point, bool bAutoExtend) { return this; }
public ISolidEntity NonRegularSliceWithPlanes(IPlaneEntity[] planes) { return new SolidEntity(); }