Table of Contents

Method Fits

Namespace
OpenCAD2D.Remote
Assembly
OpenCAD2D.Remote.dll

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

Asks the app whether a candidate place is free: nothing of the kinds asked about runs through it or comes within the margin of it.

public bool Fits(string layout, double x, double y, double width, double height, double rotation, IEnumerable<string> kinds, double margin, double tolerance)

Parameters

layout string

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

x double

The X of the candidate's first corner.

y double

The Y of the candidate's first corner.

width double

The width, above nought.

height double

The height, above nought.

rotation double

The angle the width runs at, in radians.

kinds IEnumerable<string>

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

margin double

The clear room to leave, nought or more.

tolerance double

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

Returns

bool

True where nothing is in the way.

Exceptions

CadRemoteException

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