Example #1
0
        private MasterGeoObj[] checkStraightedgeStraightedge(straightEdgeBehave straightEdgeBehave1, straightEdgeBehave straightEdgeBehave2)
        {
            intersectionFigData data = IntersectionMath.LineLineIntersection(straightEdgeBehave1, straightEdgeBehave2);

            MasterGeoObj[] mgoResult = null;
            if (data.figtype == GeoObjType.point)
            {
                mgoResult = new MasterGeoObj[] { GeoObjConstruction.dPoint(data.vectordata[0]).setIntersectionFigure(0) };
            }
            return(mgoResult);
        }
Example #2
0
        private MasterGeoObj[] checkSphereStraightEdge(AbstractSphere abstractSphere, straightEdgeBehave straightEdgeBehave)
        {
            intersectionFigData data = IntersectionMath.SphereLineIntersection(abstractSphere, straightEdgeBehave);

            MasterGeoObj[] mgoResult = null;
            if (data.figtype == GeoObjType.point)
            {
                if (data.vectordata.Length == 1)
                {
                    mgoResult = new MasterGeoObj[] { GeoObjConstruction.dPoint(data.vectordata[0]).setIntersectionFigure(0) };
                }
                else if (data.vectordata.Length == 2)
                {
                    mgoResult = new MasterGeoObj[] { GeoObjConstruction.dPoint(data.vectordata[0]).setIntersectionFigure(0), GeoObjConstruction.dPoint(data.vectordata[1]).setIntersectionFigure(1) };
                }
            }
            return(mgoResult);
        }
Example #3
0
 /// <summary>
 /// Finds the point of intersection between a flatface and a straightedge
 /// </summary>
 /// <param name="plane"></param>
 /// <param name="line"></param>
 /// <returns></returns>
 internal static intersectionFigData LinePlaneIntersection(flatfaceBehave plane, straightEdgeBehave line)
 {
     return(LinePlaneIntersection(line.center, line.normalDir, plane.Position3, plane.normalDir));
 }
Example #4
0
 internal static intersectionFigData SphereLineIntersection(AbstractSphere sphere, straightEdgeBehave line)
 {
     return(SphereLineIntersection(sphere.centerPosition, sphere.radius, line.center, line.normalDir));
 }
Example #5
0
 /// <summary>
 /// Returns the intersection between two striaghtedges.
 /// </summary>
 /// <param name="line1"></param>
 /// <param name="line2"></param>
 /// <returns></returns>
 internal static intersectionFigData LineLineIntersection(straightEdgeBehave line1, straightEdgeBehave line2)
 {
     return(LineLineIntersection(line1.center, line2.center, line1.normalDir, line2.normalDir));
 }
Example #6
0
 internal static intersectionFigData CircleLineIntersection(AbstractCircle circle, straightEdgeBehave line)
 {
     return(CircleLineIntersection(circle, line.center, line.normalDir));
 }
        private AbstractGeoObj[] checkFlatfaceStraightedge(flatfaceBehave flatfaceBehave, straightEdgeBehave straightEdgeBehave)
        {
            intersectionFigData data = IntersectionMath.LinePlaneIntersection(flatfaceBehave, straightEdgeBehave);

            AbstractGeoObj[] mgoResult = null;
            if (data.figtype == GeoObjType.point)
            {
                mgoResult = new AbstractGeoObj[] { GeoObjConstruction.dPoint(data.vectordata[0]).setIntersectionFigure(0) };
            }
            return(mgoResult);
        }