CSGPolygon

Inherits: CSGPrimitive < CSGShape < GeometryInstance < VisualInstance < Spatial < Node < Object

Extrudes a 2D polygon shape to create a 3D mesh.

Description

This node takes a 2D polygon shape and extrudes it to create a 3D mesh.

Properties

floatdepth1.0
Materialmaterial 
Modemode0
boolpath_continuous_u 
floatpath_interval 
boolpath_joined 
boolpath_local 
NodePathpath_node 
PathRotationpath_rotation 
PoolVector2ArraypolygonPoolVector2Array( 0, 0, 0, 1, 1, 1, 1, 0 )
boolsmooth_facesfalse
floatspin_degrees 
intspin_sides 

Enumerations

enum Mode:

  • MODE_DEPTH = 0 —- Shape is extruded to depth.
  • MODE_SPIN = 1 —- Shape is extruded by rotating it around an axis.
  • MODE_PATH = 2 —- Shape is extruded along a path set by a Shape set in path_node.

enum PathRotation:

  • PATH_ROTATION_POLYGON = 0 —- Slice is not rotated.
  • PATH_ROTATION_PATH = 1 —- Slice is rotated around the up vector of the path.
  • PATH_ROTATION_PATH_FOLLOW = 2 —- Slice is rotate to match the path exactly.

Property Descriptions

Default1.0
Setterset_depth(value)
Getterget_depth()

Extrusion depth when mode is MODE_DEPTH.


Setterset_material(value)
Getterget_material()

Material to use for the resulting mesh.


Default0
Setterset_mode(value)
Getterget_mode()

Extrusion mode.


  • bool path_continuous_u
Setterset_path_continuous_u(value)
Getteris_path_continuous_u()

If true the u component of our uv will continuously increase in unison with the distance traveled along our path when mode is MODE_PATH.


Setterset_path_interval(value)
Getterget_path_interval()

Interval at which a new extrusion slice is added along the path when mode is MODE_PATH.


Setterset_path_joined(value)
Getteris_path_joined()

If true the start and end of our path are joined together ensuring there is no seam when mode is MODE_PATH.


Setterset_path_local(value)
Getteris_path_local()

If false we extrude centered on our path, if true we extrude in relation to the position of our CSGPolygon when mode is MODE_PATH.


Setterset_path_node(value)
Getterget_path_node()

The Shape object containing the path along which we extrude when mode is MODE_PATH.


Setterset_path_rotation(value)
Getterget_path_rotation()

The method by which each slice is rotated along the path when mode is MODE_PATH.


DefaultPoolVector2Array( 0, 0, 0, 1, 1, 1, 1, 0 )
Setterset_polygon(value)
Getterget_polygon()

Point array that defines the shape that we’ll extrude.


Defaultfalse
Setterset_smooth_faces(value)
Getterget_smooth_faces()

Generates smooth normals so smooth shading is applied to our mesh.


Setterset_spin_degrees(value)
Getterget_spin_degrees()

Degrees to rotate our extrusion for each slice when mode is MODE_SPIN.


  • int spin_sides
Setterset_spin_sides(value)
Getterget_spin_sides()

Number of extrusion when mode is MODE_SPIN.