Class Face

  • Direct Known Subclasses:
    GenericFace

    public class Face
    extends java.lang.Object
    Abstract interface for geometric faces.

    A face consist of a surface and curves that form the boundary of the face.

    For all faces there must be the same number of vertices and curves.
    The order of vertices and curves are ordered such that a curve at a certain index will have a
    corresponding start vertex at the same vertex index.
    • Constructor Summary

      Constructors 
      Constructor Description
      Face​(long cPtr, boolean cMemoryOwn)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long curveCount()
      Get the number of curves in the face.
      void delete()  
      pair_d_d extremums​(Vector3D dir)
      Find the extent of the surface along a specific direction.
      static long getCPtr​(Face obj)  
      Curve getCurve​(long i)
      Get a curve of the face.
      TriMeshPtr getTriMesh()
      Create a TriMesh representation of the face.

      This function relies on the resolution set with setMeshResolution.
      The resolution is passed on to Curve::discretizeAdaptive and
      Surface::setDiscretizationResolution.


      TriMeshPtr getTriMesh​(boolean forceCopy)
      Create a TriMesh representation of the face.

      This function relies on the resolution set with setMeshResolution.
      The resolution is passed on to Curve::discretizeAdaptive and
      Surface::setDiscretizationResolution.

      OBB obb()
      Create Oriented Bounding Box.

      The default implementation forms a TriMesh in order to estimate the directions for the
      OBB.

      void setMeshResolution​(double resolution)
      Set the resolution used for discretization in the getTriMesh and faceTriMesh
      functions.

      The meaning of this parameter depends on the type of surface.

      Surface surface()
      Get the surface of the face.
      void transform​(Transform3D T)
      Transform the face.
      void transform​(Vector3D P)
      Translation of face.
      SWIGTYPE_p_std__vectorT_rw__math__Vector3DT_double_t_t vertices()
      Get the vertices of the face.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Face

        public Face​(long cPtr,
                    boolean cMemoryOwn)
    • Method Detail

      • getCPtr

        public static long getCPtr​(Face obj)
      • delete

        public void delete()
      • surface

        public Surface surface()
        Get the surface of the face.
        Returns:
        a reference to the surface data.
      • curveCount

        public long curveCount()
        Get the number of curves in the face.
        Returns:
        the number of curves.
      • getCurve

        public Curve getCurve​(long i)
        Get a curve of the face.
        Parameters:
        i - [in] the curve index, which should be less than the number returned by
        curveCount().
        Returns:
        a reference to the curve data.
      • transform

        public void transform​(Transform3D T)
        Transform the face.
        Parameters:
        T - [in] transform.
      • transform

        public void transform​(Vector3D P)
        Translation of face.
        Parameters:
        P - [in] translation vector.
      • getTriMesh

        public TriMeshPtr getTriMesh​(boolean forceCopy)
        Create a TriMesh representation of the face.

        This function relies on the resolution set with setMeshResolution.
        The resolution is passed on to Curve::discretizeAdaptive and
        Surface::setDiscretizationResolution.

        Parameters:
        forceCopy - [in] (not currently used in default implementation)
        Returns:
        a new TriMesh.
      • getTriMesh

        public TriMeshPtr getTriMesh()
        Create a TriMesh representation of the face.

        This function relies on the resolution set with setMeshResolution.
        The resolution is passed on to Curve::discretizeAdaptive and
        Surface::setDiscretizationResolution.


        Returns:
        a new TriMesh.
      • extremums

        public pair_d_d extremums​(Vector3D dir)
        Find the extent of the surface along a specific direction.
        Parameters:
        dir - [in] a normalized direction vector.
        Returns:
        the minimum and maximum values along the given direction.
      • obb

        public OBB obb()
        Create Oriented Bounding Box.

        The default implementation forms a TriMesh in order to estimate the directions for the
        OBB.

        Returns:
        an OBB around the Face.
      • setMeshResolution

        public void setMeshResolution​(double resolution)
        Set the resolution used for discretization in the getTriMesh and faceTriMesh
        functions.

        The meaning of this parameter depends on the type of surface.

        Parameters:
        resolution - [in] the resolution parameter.