Skip to content

rotate_extrude

arnholm edited this page May 1, 2017 · 1 revision

rotate_extrude

As for <linear_extrude>, the <rotate_extrude> operator “extrudes” a set of 2d shapes into a solid. By convention, it does so by rotating the 2d profile around the global Y-axis. No solid may occur in the set of input shapes.

Parameter name Description Status
angle Rotation angle [radians] around Y required
pitch offset in Y per revolution optional (default=0.0)

By convention, the 2d profile exists the xy-plane with z=0.0. To avoid self-intersection and ensure properly oriented faces in the result, the profile must be positioned so that that all x-coordinates are positive. The rotation angle shall be specified as positive (a positive rotate_extrude angle corresponds to a negative right hand rule rotation around the Y-axis).

Different combinations of angle and pitch have the following interpretations:

case angle pitch interpretation
1 < 2*PI 0.0 The result is a “cake slice”
2 >= 2*PI 0.0 The result is a full torus
3 > 0.0 > 0.0 The result is a spiraling thread, reverse threaded
4 > 0.0 < 0.0 The result is a spiraling thread, normal threading

case 1 : Using rotate_extrude on a transformed square

<?xml version="1.0" encoding="utf-8"?>
<xcsg version="1.0">
    <rotate_extrude angle="1.0471975511965976" pitch="0">
        <square size="10" center="false">
            <tmatrix>
                <trow c0="0.70710678118654757" c1="-0.70710678118654746" c2="0" c3="30"/>
                <trow c0="0.70710678118654746" c1="0.70710678118654757" c2="0" c3="0"/>
                <trow c0="0" c1="0" c2="1" c3="0"/>
                <trow c0="0" c1="0" c2="0" c3="1"/>
            </tmatrix>
        </square>
    </rotate_extrude>
</xcsg>

case 2 : Same as above, but rotated 2*PI, results in full torus

case 3 : Same as above, but rotated 6*PI combined with a negative pitch of -15 per revolution

Clone this wiki locally