public class SoVRMLExtrusion extends SoVRMLGeometry
SoVRMLExtrusion
node specifies geometric shapes based on a twodimensional cross section extruded along a threedimensional spine. The cross section can be scaled and rotated at each spine point to produce a wide variety of shapes.
<font color="#0000FF">NOTE:</font> This class does not exist in Open Inventor 10.0 and later.
This section describes the expected behavior of the node in a conforming VRML97 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.
This section may reference portions of the VRML97 specification that are not present in this help file. The complete VRML97 spec is available at
The SoVRMLExtrusion
node specifies geometric shapes based on a twodimensional cross section extruded along a threedimensional spine. The cross section can be scaled and rotated at each spine point to produce a wide variety of shapes.
An SoVRMLExtrusion
is defined by a 2D crossSection
piecewise linear curve (described as a series of connected vertices), a 3D spine
piecewise linear curve (also described as a series of connected vertices), a list of 2D scale
parameters, and a list of 3D orientation
parameters. Shapes are constructed as follows: The crosssection curve, which starts as a curve in the XZ plane, is first scaled about the origin by the first scale
parameter (first value scales in X, second value scales in Z). It is then rotated about the origin by the first orientation
parameter, and translated by the vector given as the first vertex of the spine
curve. It is then extruded through space along the first segment of the spine
curve. Next, it is scaled and rotated by the second scale
and orientation
parameters and extruded by the second segment of the spine
, and so on. The number of scale
and orientation
values must equal the number of spine points, or contain one value that is applied to all points. The scale
values must be > 0.
A transformed cross section is found for each joint (that is, at each vertex of the spine
curve, where segments of the extrusion connect), and the joints and segments are connected to form the surface. No check is made for selfpenetration. Each transformed cross section is determined as follows:
scale
given for the current joint.
For all points other than the first or last: The tangent for spine
[
i ] is found by normalizing the vector defined by (spine
[
i +1]  spine
[
i 1]).
If the spine curve is closed: The first and last points need to have the same tangent. This tangent is found as above, but using the points spine
[0] for spine
[
i ], spine
[1] for spine
[
i +1] and spine
[
n 2] for spine
[
i 1], where spine
[
n 2] is the next to last point on the curve. The last point in the curve, spine
[
n 1], is the same as the first, spine
[0].
If the spine curve is not closed: The tangent used for the first point is just the direction from spine
[0] to spine
[1], and the tangent used for the last is the direction from spine
[
n 2] to spine
[
n 1].
In the simple case where the spine curve is flat in the XY plane, these rotations are all just rotations about the Z axis. In the more general case where the spine curve is any 3D curve, you need to find the destinations for all 3 of the local X, Y, and Z axes so you can completely specify the rotation. The Z axis is found by taking the cross product of:
(spine
[
i 1]  spine
[
i ]) and (spine
[
i +1]  spine
[
i ]).
If the three points are collinear then this value is zero, so take the value from the previous point. Once you have the Z axis (from the cross product) and the Y axis (from the approximate tangent), calculate the X axis as the cross product of the Y and Z axes.
orientation
to the crosssection relative to this new plane. Rotate it counterclockwise about the axis and by the angle specified in the orientation
field at that joint.
spine
point.
Surfaces of revolution: If the cross section is an approximation of a circle and the spine is straight, then the SoVRMLExtrusion
is equivalent to a surface of revolution, where the scale
parameters define the size of the cross section along the spine.
Cookiecutter extrusions: If the scale is 1, 1 and the spine is straight, then the cross section acts like a cookie cutter, with the thickness of the cookie equal to the length of the spine.
Bend/twist/taper objects: These shapes are the result of using all fields. The spine curve bends the extruded shape defined by the cross section, the orientation parameters twist it around the spine, and the scale parameters taper it (by scaling about the spine).
SoVRMLExtrusion
has three parts: the sides , the beginCap
(the surface at the initial end of the spine) and the endCap
(the surface at the final end of the spine). The caps have an associated SFBool field that indicates whether it exists (true) or doesn't exist (false).
When the beginCap
or endCap
fields are specified as true, planar cap surfaces will be generated regardless of whether the crossSection
is a closed curve. (If crossSection
isn't a closed curve, the caps are generated as if it were crossSection
that's equal to the initial point. Note that an open surface can still have a cap, resulting (for a simple case) in a shape something like a soda can sliced in half vertically.) These surfaces are generated even if spine
is also a closed curve. If a field value is false, the corresponding cap is not generated.
SoVRMLExtrusion
automatically generates its own normals. Orientation of the normals is determined by the vertex ordering of the triangles generated by SoVRMLExtrusion
. The vertex ordering is in turn determined by the crossSection
curve. If the crossSection
is counterclockwise when viewed from the +Y axis, then the polygons will have counterclockwise ordering when viewed from 'outside' of the shape (and
vice versa for clockwise ordered crossSection
curves).
Texture coordinates are automatically generated by extrusions. Textures are mapped so that the coordinates range in the U direction from 0 to 1 along the crossSection
curve (with 0 corresponding to the first point in crossSection
and 1 to the last) and in the V direction from 0 to 1 along the spine
curve (again with 0 corresponding to the first listed spine
point and 1 to the last). When crossSection
is closed, the texture has a seam that follows the line traced by the crossSection
's start/end point as it travels along the spine
. If the endCap
and/or beginCap
exist, the crossSection
curve is uniformly scaled and translated so that the largest dimension of the crosssection (X or Z) produces texture coordinates that range from 0.0 to 1.0. The beginCap
and endCap
textures' S and T directions correspond to the X and Z directions in which the crossSection
coordinates are defined.
See "Concepts  Geometry Nodes" for a description of the ccw
, solid
, convex
, and creaseAngle
fields.
NOTE: If your extrusion appears to twist unexpectedly, try setting environment variable OIV_EXTRUSION_EPSILON to a value slightly smaller number than the default, which is .998.
File format/default:
VRMLExtrusion {
beginCap  true 
ccw  true 
convex  true 
creaseAngle  0 
crossSection  [ 1 1, 1 1, 1 1, 1 1, 1 1 ] 
endCap  true 
orientation  0 0 1 0 
scale  1 1 
solid  true 
spine  [ 0 0 0, 0 1 0 ] 
metadata  NULL 
SoMFVec2f  set_crossSection 
SoMFRotation  set_orientation 
SoMFVec2f  set_scale 
SoMFVec3f  set_spine 
SoSFNode  set_metadata 
SoSFNode  metadata_changed 
SoShape.ShapeTypes
Inventor.ConstructorCommand
Modifier and Type  Field and Description 

SoSFBool 
beginCap
Deprecated.
The surface at the initial end of the spine.

SoSFBool 
ccw
Deprecated.
Indicates whether the vertices are ordered in a counterclockwise direction when viewed from the outside (true) or in a clockwise direction (false).

SoSFBool 
convex
Deprecated.
Indicates whether faces of a shape are convex (true).

SoSFFloat 
creaseAngle
Deprecated.
Indicates the minimum angle (in radians) between two adjacent face normals required to form a sharp crease at the edge when default normals are computed and used.

SoMFVec2f 
crossSection
Deprecated.
A 2D crossSection piecewise linear curve (described as a series of connected vertices);.

SoSFBool 
endCap
Deprecated.
The surface at the final end of the spine.

SoMFRotation 
orientation
Deprecated.
The orientation of the crossSection at each spine point.

SoMFVec2f 
scale
Deprecated.
The scale factor of the crossSection at each spine point.

SoSFBool 
solid
Deprecated.
If you know that the shape encloses a volume, set this value to true.

SoMFVec3f 
spine
Deprecated.
A 3D spine piecewise linear curve (also described as a series of connected vertices);.

metadata
boundingBoxIgnoring, LINES, POINTS, POLYGONS, TEXT
VERBOSE_LEVEL, ZeroHandle
Constructor and Description 

SoVRMLExtrusion()
Deprecated.
Constructor.

getShapeType, isPrimitiveRestartAvailable, isPrimitiveRestartAvailable
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
dispose, getEXTERNPROTO, getName, getPROTO, isDisposable, isSynchronizable, setName, setSynchronizable
getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads
public final SoSFBool beginCap
public final SoSFBool ccw
public final SoSFBool solid
public final SoSFBool convex
public final SoSFFloat creaseAngle
public final SoMFVec2f crossSection
public final SoSFBool endCap
public final SoMFRotation orientation
public final SoMFVec2f scale
public final SoMFVec3f spine
Generated on January 29, 2020, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com