Package geomss.geom

Class GeomPlane

    • Method Detail

      • immutable

        public abstract Plane immutable()
        Return an immutable version of this plane.
        Returns:
        An immutable version of this plane.
      • size

        public int size()
        Returns the number of child-elements that make up this geometry element. This implementation always returns 0 as a GeomPlane is not made up of any other elements.
        Specified by:
        size in interface GeomElement<GeomPlane>
        Returns:
        The number of child-elements that make up this geometry element.
      • getParDimension

        public int getParDimension()
        Returns the number of parametric dimensions of the geometry element. This implementation always returns 0 as a GeomPlane is not parametric.
        Specified by:
        getParDimension in interface GeomElement<GeomPlane>
        Returns:
        The number of parametric dimensions of this geometry element.
      • getNormal

        public abstract GeomVector<javax.measure.quantity.Dimensionless> getNormal()
        Return the normal vector for the plane. The normal vector is a unit vector that is perpendicular to the plane.
        Returns:
        The normal vector for the plane.
      • getConstant

        public abstract Parameter<javax.measure.quantity.Length> getConstant()
        Return the constant term of the plane equation (e.g.: "D" for a 3D plane: A*x + B*y + C*z = D).
        Returns:
        The constant term of the plane equation for this plane.
      • getRefPoint

        public abstract GeomPoint getRefPoint()
        Return the reference point for this plane. The reference point is an arbitrary point that is contained in the plane and is used as a reference when drawing the plane.
        Returns:
        The reference point for this plane.
      • toDimension

        public abstract GeomPlane toDimension​(int newDim)
        Return a copy of this plane converted to the specified number of physical dimensions. If the number of dimensions is greater than this element, then zeros are added to the additional dimensions. If the number of dimensions is less than this element, then the extra dimensions are simply dropped (truncated). If the new dimensions are the same as the dimension of this element, then this element is simply returned.
        Specified by:
        toDimension in interface GeomElement<GeomPlane>
        Parameters:
        newDim - The dimension of the plane to return.
        Returns:
        A copy of this plane converted to the new dimensions.
      • changeRefPoint

        public Plane changeRefPoint​(GeomPoint p)
        Return a new Plane that is identical to this plane, but with a different reference point (the plane is shifted to pass through the specified point).
        Parameters:
        p - The new reference point that the plane should pass through. May not be null.
        Returns:
        A new Plane that is identical to this plane, but with a different reference point.
      • getBoundsMin

        public Point getBoundsMin()
        Return the coordinate point representing the minimum bounding box corner (e.g.: min X, min Y, min Z).
        Specified by:
        getBoundsMin in interface GeomElement<GeomPlane>
        Returns:
        The minimum bounding box coordinate for this geometry element.
      • getBoundsMax

        public Point getBoundsMax()
        Return the coordinate point representing the maximum bounding box corner (e.g.: max X, max Y, max Z).
        Specified by:
        getBoundsMax in interface GeomElement<GeomPlane>
        Returns:
        The maximum bounding box coordinate for this geometry element.
      • getLimitPoint

        public GeomPoint getLimitPoint​(int dim,
                                       boolean max,
                                       double tol)
        Returns the most extreme point, either minimum or maximum, in the specified coordinate direction on this geometry element. This implementation simply returns this plane's reference point.
        Specified by:
        getLimitPoint in interface GeomElement<GeomPlane>
        Parameters:
        dim - An index indicating the dimension to find the min/max point for (0=X, 1=Y, 2=Z, etc).
        max - Set to true to return the maximum value, false to return the minimum.
        tol - Fractional tolerance to refine the min/max point position to if necessary.
        Returns:
        The point found on this element that is the min or max in the specified coordinate direction.
        See Also:
        getBoundsMin(), getBoundsMax()
      • getClosest

        public Point getClosest​(GeomPoint p)
        Return the closest point on this plane to the input point.
        Parameters:
        p - The point to find the closest point on this plane to. May not be null.
        Returns:
        The point on the plane closest to the input point.
      • intersect

        public PointString intersect​(Curve curve,
                                     double tol)
        Return the intersection between a curve and this plane.
        Parameters:
        curve - The curve to intersect with this plane. May not be null.
        tol - Fractional tolerance (in parameter space) to refine the point positions to.
        Returns:
        A PointString containing zero or more subrange points made by the intersection of this plane with the specified curve. If no intersection is found, an empty PointString is returned.
      • intersect

        public IntersectType intersect​(GeomPoint L0,
                                       GeomVector Lu,
                                       MutablePoint out)
                                throws DimensionException
        Return the intersection between an infinite line/ray and this plane.
        Parameters:
        L0 - A point on the line (origin of the line). May not be null.
        Lu - The direction vector for the line (does not have to be a unit vector). May not be null.
        out - The pre-defined output point on the line that will be filled in to represent the intersection of the line and the plane (not modified if there is no intersection). If null is passed, then the point is not calculated, but the return codes of this method are still valid.
        Returns:
        DISJOINT if the line and plane are disjoint (parallel), INTERSECT if there is a unique intersection and COINCIDENT if the line is coincident with the plane.
        Throws:
        DimensionException
      • intersect

        public PointString<SubrangePointintersect​(LineSegment line)
                                             throws DimensionException
        Return the intersection between a line segment and this plane.
        Parameters:
        line - The line segment to intersect with this plane. May not be null.
        Returns:
        A PointString containing zero or one subrange points on the line made by the intersection of the line segment with this plane. If no intersection is found, an empty PointString is returned.
        Throws:
        DimensionException
      • copy

        public abstract GeomPlane copy()
        Returns a copy of this GeomPlane instance allocated by the calling thread (possibly on the stack).
        Specified by:
        copy in interface GeomElement<GeomPlane>
        Returns:
        an identical and independent copy of this point.
      • isValid

        public boolean isValid()
        Return true if this GeomPlane contains valid and finite numerical components. A value of false will be returned if any of the coordinate values are NaN or Inf.
        Specified by:
        isValid in interface GeomElement<GeomPlane>
        Returns:
        true if this geometry element contains valid and finite data.
      • toText

        public javolution.text.Text toText()
        Returns the text representation of this geometry element that consists of the name followed by the equation of a plane. For example:
           {aPlane = {1, 0, 0, 2 ft}}
         
        If there is no name, then the output looks like this:
           {1, 0, 0, 2 ft}
         
        Specified by:
        toText in interface GeomElement<GeomPlane>
        Overrides:
        toText in class AbstractGeomElement<GeomPlane>
        Returns:
        the text representation of this geometry element.