Skip to content

difference2d

arnholm edited this page May 1, 2017 · 1 revision

difference2d

The boolean operator <difference2d> specifies the difference between the first 2d shape contained and the subsequent ones. The result is a new 2d shape .

Example with the 2d difference 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">
        <difference2d>
            <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>
        </difference2d>
    </linear_extrude>
</xcsg>

Clone this wiki locally