Class SoBevelAction

  • public class SoBevelAction
    extends SoAction
    Creates a scene graph containing beveled shapes. This action traverses a scene graph or paths, looking for shapes to bevel, then creating another scene graph containing the beveled shapes (in the form of SoCoordinate3 and SoIndexedFaceSet nodes). Typically it is applied to a subgraph that contains only a single shape.

    SoBevelAction does not take into consideration PER_FACE or PER_VERTEX materials. Therefore, the shapes to be beveled should have a uniform material (SoMaterialBinding.OVERALL).

    It works like other actions, but does not modify the source scene graph. The scene graph containing beveled shapes can be accessed by calling getSceneGraph() after applying the action.

    The methods setAngle(), setRadius(), and enableAbsoluteRadius() set the default behavior of the beveling of the shapes this action will be applied to. If bevel property values have been set by the SoBevelProperty node, they are used. Otherwise, the values set by these methods are used.

    See Also:
    SoBevelProperty, SoEdgeFlag, SoVertexFlag
    • Constructor Detail

      • SoBevelAction

        public SoBevelAction()
    • Method Detail

      • enableAbsoluteRadius

        public void enableAbsoluteRadius()
        Calls enableAbsoluteRadius(true).
      • enableCoplanarTest

        public void enableCoplanarTest()
        Calls enableCoplanarTest(true).
      • enableDuplicateTest

        public void enableDuplicateTest()
        Calls enableDuplicateTest(true).
      • enableOrderingTest

        public void enableOrderingTest()
        Calls enableOrderingTest(true).
      • getAngle

        public float getAngle()
        Returns the minimum angle (in radians) between two adjacent face normals required to bevel the edge common to these two faces. The default value is 0.5.
      • setRadius

        public void setRadius​(float radius)
        Sets the bevel radius. The default value is 0.05.
      • getRadius

        public float getRadius()
        Returns the bevel radius. The default value is 0.05.
      • enableElement

        public static void enableElement​(java.lang.Class<? extends Inventor> t,
                                         int stkIndex)
      • setAngle

        public void setAngle​(float angle)
        Sets the minimum angle (in radians) between two adjacent face normals required to bevel the edge common to these two faces. The default value is 0.5.
      • enableAbsoluteRadius

        public void enableAbsoluteRadius​(boolean flag)
        Sets the absolute radius flag. If true, the radius value is absolute. Otherwise the radius is a value between 0.0 and 1.0; the real radius corresponding is max * radius , where max is the length of the longest edge of the current shape to be beveled. The default is false.
      • enableDuplicateTest

        public void enableDuplicateTest​(boolean flag)
        If true, examine each shape to bevel, removing duplicate faces if found. As this test is time consuming, it can be turned on/off depending on whether the shapes to be beveled contain duplicate faces or not. If a shape contains duplicate faces the test is off, no beveling will be performed on the shape. Default value is false.
      • enableCoplanarTest

        public void enableCoplanarTest​(boolean flag)
        If true, a coplanar test is performed on each shape before beveling it. This test combines contiguous coplanar faces into one larger face because the bevel method will not work properly on contiguous coplanar faces.

        If false, each shape is assumed not to have contiguous coplanar faces. This provides better performance because the coplanar test is not performed.

        It is recommended that you turn off this test only if the shapes to be beveled do not contain contiguous coplanar faces. Default value is true.

      • getSceneGraph

        public SoGroup getSceneGraph()
        This method returns the scene graph containing the beveled shapes created by the action.
      • enableOrderingTest

        public void enableOrderingTest​(boolean flag)
        If true, each shape to bevel is re-ordered so that each face is oriented like the first face of the shape. This test is not time consuming. However, it may be desirable to disable this test when it is not needed. Default value is true.
      • isCoplanarTestEnabled

        public boolean isCoplanarTestEnabled()
        Returns true if a coplanar test is performed before the beveling.
      • isAbsoluteRadiusEnabled

        public boolean isAbsoluteRadiusEnabled()
        Returns true if the radius is absolute, false if it is relative to the shape.
      • isOrderingTestEnabled

        public boolean isOrderingTestEnabled()
        Returns true if the shapes are re-ordered before being beveled.
      • isDuplicateTestEnabled

        public boolean isDuplicateTestEnabled()
        If true, a test is performed to remove duplicate faces in the shapes being beveled.