Class SoBevelAction
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.openinventor.inventor.actions.SoAction
SoAction.AppliedCodes, SoAction.DistribModes, SoAction.PathCodes, SoAction.PathIndices
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
Field Summary
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Calls enableAbsoluteRadius(true).void
enableAbsoluteRadius
(boolean flag) Sets the absolute radius flag.void
Calls enableCoplanarTest(true).void
enableCoplanarTest
(boolean flag) If true, a coplanar test is performed on each shape before beveling it.void
Calls enableDuplicateTest(true).void
enableDuplicateTest
(boolean flag) If true, examine each shape to bevel, removing duplicate faces if found.static void
enableElement
(Class<? extends Inventor> t, int stkIndex) void
Calls enableOrderingTest(true).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.float
getAngle()
Returns the minimum angle (in radians) between two adjacent face normals required to bevel the edge common to these two faces.float
Returns the bevel radius.This method returns the scene graph containing the beveled shapes created by the action.boolean
Returns true if the radius is absolute, false if it is relative to the shape.boolean
Returns true if a coplanar test is performed before the beveling.boolean
If true, a test is performed to remove duplicate faces in the shapes being beveled.boolean
Returns true if the shapes are re-ordered before being beveled.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.void
setRadius
(float radius) Sets the bevel radius.Methods inherited from class com.openinventor.inventor.actions.SoAction
apply, apply, clearApplyResult, forwardTraversal, forwardTraversal, getContinueActionInBranchFlag, getCurPath, getDistribMode, getNodeAppliedTo, getOriginalPathListAppliedTo, getPathAppliedTo, getPathCode, getPathListAppliedTo, getPipeId, getSceneManager, getState, getWhatAppliedTo, hasTerminated, invalidateState, isBeingApplied, isLastPathListAppliedTo, isUsingAlternateRep, nullAction, postDelayedTraversal, preDelayedTraversal, resetContinueActionInBranchFlag, setPipeId, setSceneManager, setUpState, stopActionInBranch, traverse, useAlternateRep
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
Constructor Details
-
SoBevelAction
public SoBevelAction()Constructor.
-
-
Method Details
-
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
-
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
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.
-