Check validity of Geometry Description matrix
gstat = csgchk(gd,xlim,ylim)
gstat = csgchk(gd)
gstat = csgchk(gd,xlim,ylim) checks if the solid objects
in the Geometry Description matrix
gd are valid, given optional real
ylim as current length of the
x- and y-axis, and using a special format for
polygons. For a polygon, the last vertex coordinate can be equal to the first one, to
indicate a closed polygon. If
specified and if the first and the last vertices are not equal, the polygon is
considered as closed if these vertices are within a certain “closing
distance.” These optional input arguments are meant to be used only when calling
csgchk from the PDE Modeler app.
gstat = csgchk(gd) is identical
to the preceding call, except for using the same format of
is used by
decsg. This call is recommended when
csgchk as a command-line function.
gstat is a row vector of integers that indicates
the validity status of the corresponding solid objects, i.e., columns,
For a circle solid,
gstat = 0 indicates that
the circle has a positive radius,
1 indicates a
nonpositive radius, and
2 indicates that the circle
is not unique.
For a polygon,
gstat = 0 indicates that the
polygon is closed and does not intersect itself, i.e., it has a well-defined,
unique interior region.
1 indicates an open and
2 indicates a closed
and self-intersecting polygon, and
an open and self-intersecting polygon.
For a rectangle solid,
gstat is identical
to that of a polygon. This is so because a rectangle is considered
as a polygon by
For an ellipse solid,
gstat = 0 indicates
that the ellipse has positive semiaxes,
that at least one of the semiaxes is nonpositive, and
that the ellipse is not unique.
gstat consists of zero entries only, then
valid and can be used as input argument by