Skip to content

union2d

arnholm edited this page May 1, 2017 · 1 revision

union2d

The boolean operator <union2d> specifies the union of the set of 2d shapes contained. The result is a new 2d shape. The set may contain multiple 2d shapes. No 3d objects may occur in this context.

Example with the 2d union of a circle and an offset square extruded to create a 3d solid.

<?xml version="1.0" encoding="utf-8"?>
<xcsg version="1.0">
    <linear_extrude dz="1">
        <union2d>
            <square size="11" center="false"/>
            <circle r="5">
                <tmatrix>
                    <trow c0="1" c1="0" c2="0" c3="8"/>
                    <trow c0="0" c1="1" c2="0" c3="8"/>
                    <trow c0="0" c1="0" c2="1" c3="0"/>
                    <trow c0="0" c1="0" c2="0" c3="1"/>
                </tmatrix>
            </circle>
        </union2d>
    </linear_extrude>
</xcsg>

Clone this wiki locally