export hr_polygon_error

This commit is contained in:
Zeno Rogue 2020-06-06 18:40:08 +02:00
parent 66b2b3277a
commit 0739a7c16e
1 changed files with 14 additions and 10 deletions

View File

@ -75,6 +75,7 @@ EX arbi_tiling& current_or_slided() {
EX short& id_of(heptagon *h) { return h->zebraval; }
#if HDR
struct hr_polygon_error : hr_exception {
vector<transmatrix> v;
eGeometryClass c;
@ -83,7 +84,11 @@ struct hr_polygon_error : hr_exception {
map<string, cld> params;
hr_polygon_error(const vector<transmatrix>& _v, int _id, transmatrix _e) : v(_v), c(cgclass), id(_id), end(_e) {}
~hr_polygon_error() noexcept(true) {}
string generate_error() {
string generate_error();
};
#endif
string hr_polygon_error::generate_error() {
cld dist = (hdist0(tC0(end)) / params["distunit"]);
bool angle = abs(dist) < 1e-9;
if(angle) dist = (atan2(end * xpush0(1)) / params["angleunit"]);
@ -93,7 +98,6 @@ struct hr_polygon_error : hr_exception {
lalign(0, dist)
);
}
};
struct connection_debug_request : hr_exception {
int id;