Table of Contents

Method GetFreeSpace

Namespace
OpenCAD2D.Remote
Assembly
OpenCAD2D.Remote.dll

GetFreeSpace(string, double, double, double, double, IEnumerable<string>, double, double, double, double)

Asks the app for the empty rectangles of a frame: the largest rectangles, not turned, that no line or word of the kinds asked about runs through or comes within the margin of, and that cannot be made larger, the largest first.

public CadRemoteFreeSpace GetFreeSpace(string layout, double minX, double minY, double maxX, double maxY, IEnumerable<string> kinds, double margin, double minWidth, double minHeight, double tolerance)

Parameters

layout string

The name of a layout, or null or empty for model space.

minX double

The least X of the frame.

minY double

The least Y of the frame.

maxX double

The greatest X of the frame.

maxY double

The greatest Y of the frame.

kinds IEnumerable<string>

The DXF names of the entities that take room; null for every kind.

margin double

The clear room left round them, nought or more.

minWidth double

The least width of a rectangle to give; 0 for any.

minHeight double

The least height of a rectangle to give; 0 for any.

tolerance double

How little still counts as touching, in drawing units; 0.001 is the library's.

Returns

CadRemoteFreeSpace

The rectangles.

Exceptions

CadRemoteException

Thrown when the drawing is closed, has no layout of that name, or the frame, margin or sizes are not usable.