#VRML_SIM R2022b utf8
# license: Copyright Cyberbotics Ltd. Licensed for use only with Webots.
# license url: https://cyberbotics.com/webots_assets_license
# A section of pipe.

EXTERNPROTO "webots://projects/appearances/protos/MetalPipePaint.proto"

PROTO PipeSection [
  field SFVec3f    translation   0 0 0.25
  field SFRotation rotation      0 0 1 0
  field SFString   name          "pipe section"
  field SFFloat    height        0.5                                                                   # Defines the height of the pipe.
  field SFFloat    radius        0.03                                                                  # Defines the radius of the pipe.
  field SFInt32    subdivision   24                                                                    # Defines the number of polygons used to represent the pipe cylinder and so its resolution.
  field SFNode     appearance    MetalPipePaint { textureTransform TextureTransform { scale 1 1.5 } }  # Defines the appearance of the pipe.
]
{
  Solid {
    translation IS translation
    rotation IS rotation
    children [
      Shape {
        appearance IS appearance
        geometry DEF PIPE Cylinder {
          bottom FALSE
          height IS height
          radius IS radius
          top FALSE
          subdivision IS subdivision
        }
      }
    ]
    name IS name
    model "pipe section"
    boundingObject USE PIPE
  }
}