#include <place/legality.hpp>
|
| | Legality (const Problem &p) |
| bool | inside_ok (int part, Point pos, int rot, bool lenient=false) const |
| | Board test (outline, cut-outs, keepouts, pad-to-edge clearance); independent of other parts.
|
| bool | pair_conflict (int a, Point pa, int ra, int b, Point pb, int rb) const |
| | Exact test of two parts.
|
| void | reset (const Placement &pl) |
| | Index of placed parts (all parts present after reset).
|
| void | clear () |
| void | insert (int part, Point pos, int rot) |
| void | remove (int part) |
| bool | present (int part) const |
| int | find_conflict (int part, Point pos, int rot, int skip1=-1, int skip2=-1) const |
| | First placed part that conflicts with part at (pos, rot), skipping part itself and skip1/skip2; -1 if none.
|
| void | conflicts (int part, Point pos, int rot, std::vector< int > &out) const |
| | Every placed part that conflicts (sorted).
|
| bool | legal (int part, Point pos, int rot, int skip1=-1, int skip2=-1) const |
| void | neighbours (const Box &box, std::vector< int > &out) const |
| | Placed parts whose bodies are within margin of the box.
|
Definition at line 32 of file legality.hpp.
◆ Legality()
| tmk::place::Legality::Legality |
( |
const Problem & | p | ) |
|
|
explicit |
◆ clear()
| void tmk::place::Legality::clear |
( |
| ) |
|
◆ conflicts()
| void tmk::place::Legality::conflicts |
( |
int | part, |
|
|
Point | pos, |
|
|
int | rot, |
|
|
std::vector< int > & | out ) const |
Every placed part that conflicts (sorted).
◆ find_conflict()
| int tmk::place::Legality::find_conflict |
( |
int | part, |
|
|
Point | pos, |
|
|
int | rot, |
|
|
int | skip1 = -1, |
|
|
int | skip2 = -1 ) const |
First placed part that conflicts with part at (pos, rot), skipping part itself and skip1/skip2; -1 if none.
◆ insert()
| void tmk::place::Legality::insert |
( |
int | part, |
|
|
Point | pos, |
|
|
int | rot ) |
◆ inside_ok()
| bool tmk::place::Legality::inside_ok |
( |
int | part, |
|
|
Point | pos, |
|
|
int | rot, |
|
|
bool | lenient = false ) const |
Board test (outline, cut-outs, keepouts, pad-to-edge clearance); independent of other parts.
lenient: pads only need to be inside the outline, without the copper-to-edge clearance.
◆ legal()
| bool tmk::place::Legality::legal |
( |
int | part, |
|
|
Point | pos, |
|
|
int | rot, |
|
|
int | skip1 = -1, |
|
|
int | skip2 = -1 ) const |
|
inline |
◆ neighbours()
| void tmk::place::Legality::neighbours |
( |
const Box & | box, |
|
|
std::vector< int > & | out ) const |
Placed parts whose bodies are within margin of the box.
◆ pair_conflict()
| bool tmk::place::Legality::pair_conflict |
( |
int | a, |
|
|
Point | pa, |
|
|
int | ra, |
|
|
int | b, |
|
|
Point | pb, |
|
|
int | rb ) const |
◆ present()
| bool tmk::place::Legality::present |
( |
int | part | ) |
const |
|
inline |
◆ remove()
| void tmk::place::Legality::remove |
( |
int | part | ) |
|
◆ reset()
| void tmk::place::Legality::reset |
( |
const Placement & | pl | ) |
|
Index of placed parts (all parts present after reset).
The documentation for this class was generated from the following file: