TraceMaker
C++ API of the engine
Loading...
Searching...
No Matches
legality.hpp File Reference

Placement legality (design doc 04 §3 D/E): exact integer tests of courtyards, through-hole obstacles, the board outline, keepouts and pad-to-edge clearance, plus a bucket index of placed parts and a conservative occupancy raster used as a fast path by the legaliser. More...

#include <cstdint>
#include <vector>
#include "place/problem.hpp"

Go to the source code of this file.

Classes

struct  tmk::place::Placement
class  tmk::place::Legality
class  tmk::place::Raster
 Conservative occupancy raster per side (cell 0.05–0.1 mm). More...
struct  tmk::place::Violations
 Every conflict in a placement (for the final report and tests): movable-involved pairs and parts outside. More...

Namespaces

namespace  tmk
namespace  tmk::place

Functions

bool tmk::place::closer (const Shape &a, Point da, const Shape &b, Point db, Coord clearance)
 Exact test with translation (no copies): same semantics as geom::closer_than(a + da, b + db, clearance).
bool tmk::place::copper_conflict (const CopperShape &a, Point pa, const CopperShape &b, Point pb)
 Copper clearance violation between two copper shapes (different nets, shared layer, max of the two needs).
Violations tmk::place::check_all (const Problem &p, const Placement &pl)

Variables

constexpr Coord tmk::place::kThroughMargin = 100'000
 through obstacle vs courtyard on the other side
constexpr Coord tmk::place::kThroughThrough = 250'000
 through obstacle vs through obstacle

Detailed Description

Placement legality (design doc 04 §3 D/E): exact integer tests of courtyards, through-hole obstacles, the board outline, keepouts and pad-to-edge clearance, plus a bucket index of placed parts and a conservative occupancy raster used as a fast path by the legaliser.

Definition in file legality.hpp.