Class Surface


  • public class Surface
    extends java.lang.Object
    Surface is an abstract representation of a smooth surface geometry.

    The interface provides functions for affine transformations, such as
    scaling, rotation and translation.
    In case of a trimmed surface, it is also possible to make a discretization
    of the surface to triangle mesh.
    • Constructor Summary

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

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      SurfacePtr clone()
      Clone the surface.
      void delete()  
      pair_d_d extremums​(Vector3D direction)
      Find the extent of the surface along a specific direction.

      If the surface has no lower bound, the value -%std::numeric_limits<double>::%max() can
      be returned to indicate that the surface has unbounded minimum value in the given
      direction.

      If the surface has no upper bound, the value %std::numeric_limits<double>::%max() can
      be returned to indicate that the surface has unbounded maximum value in the given
      direction.

      static long getCPtr​(Surface obj)  
      TriMeshPtr getTriMesh()
      Discretize the surface into a triangle mesh representation.

      If the border of a trimmed surface must fit with other surface triangulations,
      a discretized border must be given to this triangulation function.

      If the same border points are used for different surfaces for their common edges, the
      triangulations will fit together.


      TriMeshPtr getTriMesh​(SWIGTYPE_p_std__vectorT_rw__math__Vector3DT_double_t_t border)
      Discretize the surface into a triangle mesh representation.

      If the border of a trimmed surface must fit with other surface triangulations,
      a discretized border must be given to this triangulation function.

      If the same border points are used for different surfaces for their common edges, the
      triangulations will fit together.

      SurfacePtr scale​(double factor)
      Get a scaled version of the surface.
      void setDiscretizationResolution​(double resolution)
      Set the resolution used for discretization in the getTriMesh function.

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

      boolean SurfaceEqual​(Surface surface, double threshold)
      Check if this surface is identical to other surface .
      SurfacePtr transform​(Transform3D T)  
      SurfacePtr transform​(Vector3D P)
      Move the surface without rotation.

      If there is no rotation, this function is better to use than #transform(const
      rw::math::Transform3D<>&) const for some surfaces.
      • Methods inherited from class java.lang.Object

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

      • Surface

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

      • getCPtr

        public static long getCPtr​(Surface obj)
      • delete

        public void delete()
      • transform

        public SurfacePtr transform​(Vector3D P)
        Move the surface without rotation.

        If there is no rotation, this function is better to use than #transform(const
        rw::math::Transform3D<>&) const for some surfaces. This is because certain properties can
        be preserved.

        Parameters:
        P - [in] the translation vector to the new surface.
        Returns:
        pointer to a new surface.
      • scale

        public SurfacePtr scale​(double factor)
        Get a scaled version of the surface.
        Parameters:
        factor - [in] the factor to scale with.
        Returns:
        a new scaled surface.
      • clone

        public SurfacePtr clone()
        Clone the surface.
        Returns:
        pointer to copy of surface.
      • extremums

        public pair_d_d extremums​(Vector3D direction)
        Find the extent of the surface along a specific direction.

        If the surface has no lower bound, the value -%std::numeric_limits<double>::%max() can
        be returned to indicate that the surface has unbounded minimum value in the given
        direction.

        If the surface has no upper bound, the value %std::numeric_limits<double>::%max() can
        be returned to indicate that the surface has unbounded maximum value in the given
        direction.

        Parameters:
        direction - [in] a normalized direction vector.
        Returns:
        the minimum and maximum values along the given direction.
        Note: This function does not take trimming conditions into account.
        For trimmed surfaces, create a Face with the boundary curves and use Face::extremums.
      • getTriMesh

        public TriMeshPtr getTriMesh​(SWIGTYPE_p_std__vectorT_rw__math__Vector3DT_double_t_t border)
        Discretize the surface into a triangle mesh representation.

        If the border of a trimmed surface must fit with other surface triangulations,
        a discretized border must be given to this triangulation function.

        If the same border points are used for different surfaces for their common edges, the
        triangulations will fit together.

        Parameters:
        border - [in] (optional) an ordered list of points on the surface, that forms the
        border of the patch to triangulate.
        Returns:
        a new TriMesh.
      • getTriMesh

        public TriMeshPtr getTriMesh()
        Discretize the surface into a triangle mesh representation.

        If the border of a trimmed surface must fit with other surface triangulations,
        a discretized border must be given to this triangulation function.

        If the same border points are used for different surfaces for their common edges, the
        triangulations will fit together.


        Returns:
        a new TriMesh.
      • setDiscretizationResolution

        public void setDiscretizationResolution​(double resolution)
        Set the resolution used for discretization in the getTriMesh function.

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

        Parameters:
        resolution - [in] the resolution parameter.
      • SurfaceEqual

        public boolean SurfaceEqual​(Surface surface,
                                    double threshold)
        Check if this surface is identical to other surface .
        Parameters:
        surface - [in] other surface to compare to.
        threshold - [in] threshold for when surfaces can be considered
        identical.
        Returns:
        true if identical, false otherwise.