Decompose constructive solid geometry into minimal regions

**2-D geometry functions are the same for both the recommended
and the legacy workflows.**

decomposes
the geometry description matrix `dl`

= decsg(`gd`

,`sf`

,`ns`

)`gd`

into the geometry
matrix `dl`

and returns the minimal regions that
satisfy the set formula `sf`

. The name-space matrix `ns`

is
a text matrix that relates the columns in `gd`

to
variable names in `sf`

.

Typically, you draw a geometry in the PDE app, then export it
to the MATLAB^{®} Command Window by selecting **Export
Geometry Description, Set Formula, Labels** from the **Draw** menu
in the app. The resulting geometry description matrix `gd`

represents
the CSG model. `decsg`

analyzes the model and constructs
a set of disjointed minimal regions bounded by boundary segments and
border segments. This set of minimal regions constitutes the *decomposed
geometry* and allows other Partial Differential Equation Toolbox™ functions
to work with the geometry.

Alternatively, you can use the `decsg`

function
when creating a geometry without using the app. See Create CSG Geometry at the Command Line for details.

To return all minimal regions (`sf`

corresponds
to the union of all shapes in `gd`

), use the shorter
syntax

.`dl`

= decsg(`gd`

)

`csgchk`

| `csgdel`

| `geometryFromEdges`

| `pdecirc`

| `pdeellip`

| `pdepoly`

| `pderect`

| `pdetool`

| `wgeom`

Was this topic helpful?