Node description and application example of Extrusion Shape Extrusion

Source: Internet
Author: User

Node description and application example of Extrusion Shape Extrusion
----------------------------
1. Nodes for extrusion:
Extrusion Node
 
Extrusion
{
Spine [0 0 0 0 1 0] # MFVec3f
CrossSection [1 1, 1-1,-1-1,-1, 1] # MFVec2f
Scale [1 1] # MFVec2f
Orientation [0 0 1 0] # MFRotation
BeginCap TRUE # SFBool
EndCap TRUE # SFBool
Ccw TRUE # SFBool
Solid TRUE # SFBool
Convex TRUE # SFBool
CreaseAngle 0 # SFFloat
}

<Domain>:
Spine this field defines the keel line, including a series of three-dimensional points, connecting adjacent points in turn to get a line. The

Coordinates are defined on the local coordinate system of the node.

CrossSection defines a two-dimensional line, including a series of two-dimensional coordinates, and connects adjacent coordinate points in sequence to get

Piecewise linear line. This is first defined in the local sitting table of the node in the xz plane. The first number of two-dimensional coordinates is x

And zcoordinate.
/* We focus on the above two domains */

Scale this city defines two-dimensional line scaling parameters. In the XZ plane of the Local Coordinate System of a node, the scale is changed.

Take the x-axis point as the reference point. The first number of values corresponds to the x-axis transformation, and the second number corresponds to the z-axis. Scaling

The value must be greater than zero. Generally, the number of values in this field is the same as that in the spine field.

. If only one value is specified for the city, this value is used for every two-dimensional line.

Transform.

Orientation this field defines the 3D Rotation Transformation Parameters. Generally, the number of values in this field is the same as that in the SPine field.

The Rotation Transformation of two-dimensional line at each keel construction point. If only one value is specified for this field, the two-dimensional discount for each field

Line all use this value for transformation. Note that this rotation transformation is not defined in the Local Coordinate System of the node, but in the corresponding

Each keel is carried out on a special Coordinate System of constructor points.

BeginCap this field indicates whether the extended body has a starting face (corresponding to the first constructor point in the keel ). If

If beginCap is set to FALSE, the starting end is not generated. Otherwise, the starting end is a two-dimensional fold

A polygon formed by the beginning and end of the line, which is in the xz plane of the first construction coordinate system of the keel.
 
EndCap indicates whether the extended object has a termination end (corresponding to the last constructor point in the keel ). If endCap =

FALSE, the end is not terminated. Otherwise, the end is connected to the first and end of the two-dimensional line in the crossSection.

A polygon is located in the xz plane of the coordinate system of the last constructor.

The ccw Extlusion node automatically generates the ry surface normal, which determines the relationship between the normal direction and the two-dimensional line direction.

When cow = TRUE, the two-dimensional line direction (specified by the order defined by the discount point), the keel direction (determined by the keel construction point)

Right hand relationship to the normal direction; otherwise, when cow = FALSE, two-dimensional line direction, keel

The direction should be left-handed. If the solid field is set to TRUE, you can only view the field in the normal direction.

Geometric area.

Solid for a surface of a ry, the surface of the normal direction is considered as an "outer" surface, opposite to "inner"

Surface. When the solid field is TRUE, only the "outer" surface is displayed, and the "inner" surface is not colored. When the ry is

When closed, this domain is used for browser optimization. If solid = FALSE, it means "internal", "external" table

The surface must be displayed. the browser must calculate the two surfaces. In this case, if the material is used, a certain point on the surface is used on the two surfaces.

The same image point on the texture image.

Convex this field tells the viewer whether the ry is a complete convex body. If not, set this domain

FALSE. The convex field is used by the browser for optimization.

CreaseAngle this field affects the browser's processing of the edges between adjacent surfaces of the ry. CreaseAngle specifies a large value

The angle value (radian) at 0. If the absolute value of the angle between the adjacent surface normal is smaller than this angle

The adjacent surface is smoothed, and the edges are invisible. This domain is usually used to generate a smooth surface.
 
<Event>:
Set-SPine eventIn MFVc3f to Set the spine PATH value.
Set-CrossSection eventIn MFVec2f sets the value of the crossSection path.
Set-scale eventIn MFVec2f sets the scale value.
Set-orientation eventIn MFRotation: sets the value of orientation.

<Note>:
ExtruSion nodes provide an effective and direct way to describe shapes in multiple shapes.

This method can be used for cross-section shapes formed by moving along a path in a space.

The crossSection field describes a 2D quasi-section on the x-zplane. Copy the crossSection

Spine path connections, scale or rotate according to the scale and orientation domain values, and then connect adjacent

The corresponding vertices of the intersection are connected to form the side of the object. If beginCap endCap has been described,

A proper plane polygon cap (caps) can be added to the end of the constructed shape.

------------------------
2. The following figure shows the code for using this language:

# Fig

# User perspective
Viewpoint
{
Position 0 4 10
Description "Look"
}
# Background
Background
{
SkyColor
[
0.0 0.2, 0.7,
0.0 0.5, 1.0,
1.0 1.0 1.0
]
SkyAngle [1.309, 1.571]
}
Group
{
Children
[
DEF Body Transform # Screw Pattern, extrusion shape
{
Children Shape
{
Appearance DEF DColor Appearance
{
Material Material
{
DiffuseColor. 2. 1. 32
SpecularColor. 31. 388. 388
AmbientIntensity. 07
& Nbs

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.