Method Fits
- Namespace
- OpenCAD2D
- Assembly
- OpenCAD2D.Core.dll
Fits(CadDocument, CadSpace, CadFrame, CadFreeSpaceOptions, Tolerance)
Whether a candidate place is free: nothing of the kinds asked about runs through it or comes within the margin of it. The candidate is taken as a word is by Overlaps(CadDocument, CadSpace, CadOverlapOptions, Tolerance), on the real shapes and not their boxes: a line passing a turned frame's corner at 1 mm is outside it, a word whose frame overlaps it by a hair inside the tolerance is outside it. A candidate from (40, 10) to (60, 20) fits beside a line at x 70, and does not fit with a margin of 15 or with the line at x 50.
public static bool Fits(CadDocument document, CadSpace space, CadFrame candidate, CadFreeSpaceOptions options, Tolerance tolerance)
Parameters
documentCadDocumentThe drawing.
spaceCadSpaceThe space: model space or a layout of the drawing.
candidateCadFrameThe place, as Frames gives one or FromBox(DisplayBox) makes one.
optionsCadFreeSpaceOptionsThe kinds that take room and the margin; null for every kind and no margin. The least size is not used.
toleranceToleranceHow near an edge still counts as touching it: EqualPoint. Pass the tolerance, never a global.
Returns
- bool
True where nothing is in the way.
Exceptions
- ArgumentNullException
Thrown when the document, the space or the candidate is null.
- ArgumentException
Thrown when the margin is not a finite number of nought or more.