Enum SoBaseExtrusion.ExtrusionModes

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      BASIC
      Old extrusion algorithm.
      SMOOTH
      Default extrusion algorithm.
      SMOOTH_WITHOUT_SELF_INTERSECTIONS
      Smooth but avoids self intersections caused by large curvature radius of the spine.
    • Enum Constant Detail

      • SMOOTH

        public static final SoBaseExtrusion.ExtrusionModes SMOOTH
        Default extrusion algorithm. The algorithm uses constant section parts cut at spine points in a way similar to what a framer would do to build a frame. This provides a better continuity of the shape and avoids cracks.

        This algorithm determines the piecewise extrusion directions as a vector between consecutive spine points. This means that zero or really small distances between consecutive points can produce odd extrusion directions and result in wrong geometry. It is up to the application to filter spine points to avoid these cases. The algorithm can produce odd geometries when spines points are overlapping or zigzags.

      • BASIC

        public static final SoBaseExtrusion.ExtrusionModes BASIC
        Old extrusion algorithm. It does not guarantee that extrusion portions have constant section and shapes could be more twisted.
      • SMOOTH_WITHOUT_SELF_INTERSECTIONS

        public static final SoBaseExtrusion.ExtrusionModes SMOOTH_WITHOUT_SELF_INTERSECTIONS
        Smooth but avoids self intersections caused by large curvature radius of the spine. When the spine has curves with a large curvature radius compared to the radius of the extrusion section, SMOOTH generation might produce self intersections. Use this mode to avoid self intersections at the cost of some localized violation of the extrusion smoothness. (Section parts at spine joints may not be constant where self intersections were present.) This mode is useful to avoid artifacts in boolean results when SoBaseExtrusion derived objects are used as operands for CSG operations.
    • Method Detail

      • values

        public static SoBaseExtrusion.ExtrusionModes[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (SoBaseExtrusion.ExtrusionModes c : SoBaseExtrusion.ExtrusionModes.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static SoBaseExtrusion.ExtrusionModes valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • valueOf

        public static SoBaseExtrusion.ExtrusionModes valueOf​(int val)
        Returns the enum constant of this type with the specified integer value
        Returns:
        the enum constant of this type with the specified integer value.
      • getValue

        public int getValue()
        Description copied from interface: IntegerValuedEnum
        Returns the integer value of the enum constant.
        Specified by:
        getValue in interface IntegerValuedEnum
        Returns:
        the integer value of the enum constant.