Main Content

extrudeRotate

Extrude 2-D shape by angle about z-axis

Since R2023b

    Description

    extrudeRotate(shape,angle) extrudes the 2-D shape by the specified angle about the z-axis.

    example

    extrudeRotate(___,Name=Value) extrudes the 2-D shape by the specified angle with additional options specified by one or more Name-Value Arguments.

    Examples

    collapse all

    This example shows how to create a tube shape from a circle. Create a circle centered at (2,0).

    Extrude it by a rotation of 90 degrees to generate a tube shape.

    circ = shape.Circle(Center=[2 0]);
    extrudeRotate(circ,90,NumSegments=30);
    view([54.39 40.18])

    Figure contains an axes object. The axes object with xlabel x (m), ylabel y (m) contains an object of type patch.

    Input Arguments

    collapse all

    Shape to extrude, specified as a 2-D shape object.

    Example: shape.Circle

    Extrusion angle, specified as a numeric scalar.

    Example: 40

    Data Types: double

    Name-Value Arguments

    Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

    Example: NumSegments=4

    Number of divisions along the extrusion, specified as a positive scalar.

    Example: 5

    Data Types: double

    Option to put cap enclosure for extruded shape, specified as false or 0 for no caps, and true or 1 for capping the extruded shape.

    Example: true

    Data Types: double | logical

    Distance along the z-axis for one complete rotation of the shape during extrusion, specified as a positive scalar in meters.

    Example: 2

    Data Types: double

    Version History

    Introduced in R2023b