discontinuedPackage jet_cad_floor_plan has been discontinued and replaced by jet_cad_2d_plan.

faceRunsOf function

List<FaceRun> faceRunsOf(
  1. DraftDocument doc,
  2. Handle wall, {
  3. bool accept(
    1. DraftDocument,
    2. Handle
    )?,
})

The face runs of wall wall of doc (spec 09c D3) through the document adapter (wallsInDocument: every other live wall can cut it). Empty when wall is not a live wall, is degenerate, or accept refuses it (the shell passes isUsableHost: a hidden or locked wall hosts nothing). accept is asked only for a live wall.

Implementation

List<FaceRun> faceRunsOf(DraftDocument doc, Handle wall,
    {bool Function(DraftDocument, Handle)? accept}) {
  final w = wallsInDocument(doc, wall);
  if (w == null) return const [];
  if (accept != null && !accept(doc, wall)) return const [];
  return faceRunsAmong(w.host, w.walls);
}