Changeset 76cf7f1 in git
 Timestamp:
 04/09/19 02:27:11 (7 weeks ago)
 Branches:
 master
 Children:
 7061908
 Parents:
 6363690
 Location:
 src
 Files:

 3 edited
Legend:
 Unmodified
 Added
 Removed

src/export.cc
r6363690 r76cf7f1 3 3 */ 4 4 5 /* Copyright (C) 19942004,2005,2006,2008,2010,2011,2012,2013,2014,2015,2016,2018 Olly Betts5 /* Copyright (C) 19942004,2005,2006,2008,2010,2011,2012,2013,2014,2015,2016,2018,2019 Olly Betts 6 6 * Copyright (C) 2004 John Pybus (SVG Output code) 7 7 * … … 376 376 fprintf(fh, "0\nLINE\n"); 377 377 fprintf(fh, "8\nCrosssections\n"); /* Layer */ 378 fprintf(fh, "10\n%6.2f\n", p>x + c* d1);379 fprintf(fh, "20\n%6.2f\n", p>y + s* d1);378 fprintf(fh, "10\n%6.2f\n", p>x + s * d1); 379 fprintf(fh, "20\n%6.2f\n", p>y + c * d1); 380 380 fprintf(fh, "30\n%6.2f\n", p>z); 381 fprintf(fh, "11\n%6.2f\n", p>x  c* d2);382 fprintf(fh, "21\n%6.2f\n", p>y  s* d2);381 fprintf(fh, "11\n%6.2f\n", p>x  s * d2); 382 fprintf(fh, "21\n%6.2f\n", p>y  c * d2); 383 383 fprintf(fh, "31\n%6.2f\n", p>z); 384 384 } … … 397 397 fprintf(fh, "0\nVERTEX\n"); 398 398 fprintf(fh, "8\nWalls\n"); /* Layer */ 399 fprintf(fh, "10\n%6.2f\n", p>x + c* d);400 fprintf(fh, "20\n%6.2f\n", p>y + s* d);399 fprintf(fh, "10\n%6.2f\n", p>x + s * d); 400 fprintf(fh, "20\n%6.2f\n", p>y + c * d); 401 401 fprintf(fh, "30\n%6.2f\n", p>z); 402 402 } … … 409 409 double s = sin(rad(angle)); 410 410 double c = cos(rad(angle)); 411 double x1 = p>x + c* d1;412 double y1 = p>y + s* d1;413 double x2 = p>x  c* d2;414 double y2 = p>y  s* d2;411 double x1 = p>x + s * d1; 412 double y1 = p>y + c * d1; 413 double x2 = p>x  s * d2; 414 double y2 = p>y  c * d2; 415 415 if (*pending) { 416 416 fputs(pending, fh); … … 744 744 double c = cos(rad(angle)); 745 745 fprintf(fh, "<path d=\"M%.3f %.3fL%.3f %.3f\"/>\n", 746 (p>x + c * d1) * factor, (p>y + s* d1) * factor,747 (p>x  c * d2) * factor, (p>y  s* d2) * factor);746 (p>x + s * d1) * factor, (p>y + c * d1) * factor, 747 (p>x  s * d2) * factor, (p>y  c * d2) * factor); 748 748 } 749 749 … … 759 759 double s = sin(rad(angle)); 760 760 double c = cos(rad(angle)); 761 fprintf(fh, "%.3f %.3f", (p>x + c * d) * factor, (p>y + s* d) * factor);761 fprintf(fh, "%.3f %.3f", (p>x + s * d) * factor, (p>y + c * d) * factor); 762 762 } 763 763 … … 767 767 double s = sin(rad(angle)); 768 768 double c = cos(rad(angle)); 769 double x1 = (p>x + c* d1) * factor;770 double y1 = (p>y + s* d1) * factor;771 double x2 = (p>x  c* d2) * factor;772 double y2 = (p>y  s* d2) * factor;769 double x1 = (p>x + s * d1) * factor; 770 double y1 = (p>y + c * d1) * factor; 771 double x2 = (p>x  s * d2) * factor; 772 double y2 = (p>y  c * d2) * factor; 773 773 if (*pending) { 774 774 fputs(pending, fh); … … 1233 1233 double c = cos(rad(angle)); 1234 1234 fprintf(fh, "%.2f %.2f M %.2f %.2f R\n", 1235 p>x  c * d2, p>y  s* d2,1236 c * (d1 + d2), s* (d1 + d2));1235 p>x  s * d2, p>y  c * d2, 1236 s * (d1 + d2), c * (d1 + d2)); 1237 1237 } 1238 1238 … … 1242 1242 double s = sin(rad(angle)); 1243 1243 double c = cos(rad(angle)); 1244 fprintf(fh, "%.2f %.2f %c\n", p>x + c * d, p>y + s* d, first ? 'M' : 'L');1244 fprintf(fh, "%.2f %.2f %c\n", p>x + s * d, p>y + c * d, first ? 'M' : 'L'); 1245 1245 first = false; 1246 1246 } … … 1251 1251 double s = sin(rad(angle)); 1252 1252 double c = cos(rad(angle)); 1253 double x1 = p>x + c* d1;1254 double y1 = p>y + s* d1;1255 double x2 = p>x  c* d2;1256 double y2 = p>y  s* d2;1253 double x1 = p>x + s * d1; 1254 double y1 = p>y + c * d1; 1255 double x2 = p>x  s * d2; 1256 double y2 = p>y  c * d2; 1257 1257 fprintf(fh, "%.2f %.2f %c\n", x1, y1, first ? 'P' : 'L'); 1258 1258 first = false; … … 1611 1611 } else { 1612 1612 // Should only be enabled in plan or elevation mode. 1613 double angle = pan + xs.get_right_bearing();1613 double angle = xs.get_right_bearing()  pan; 1614 1614 if (pass_mask & XSECT) 1615 1615 filt>xsect(&p, angle + 180, xs.GetL(), xs.GetR()); 
src/kml.cc
r6363690 r76cf7f1 3 3 */ 4 4 /* Copyright (C) 2012 Olaf Kähler 5 * Copyright (C) 2012,2013,2014,2015,2016,2017,2018 Olly Betts5 * Copyright (C) 2012,2013,2014,2015,2016,2017,2018,2019 Olly Betts 6 6 * 7 7 * This program is free software; you can redistribute it and/or modify … … 166 166 double c = cos(rad(angle)); 167 167 168 double x1 = p>x + c* d1;169 double y1 = p>y + s* d1;168 double x1 = p>x + s * d1; 169 double y1 = p>y + c * d1; 170 170 double z1 = p>z; 171 171 pj_transform(pj_input, pj_output, 1, 1, &x1, &y1, &z1); … … 173 173 y1 = deg(y1); 174 174 175 double x2 = p>x  c* d2;176 double y2 = p>y  s* d2;175 double x2 = p>x  s * d2; 176 double y2 = p>y  c * d2; 177 177 double z2 = p>z; 178 178 pj_transform(pj_input, pj_output, 1, 1, &x2, &y2, &z2); … … 195 195 double c = cos(rad(angle)); 196 196 197 double x = p>x + c* d;198 double y = p>y + s* d;197 double x = p>x + s * d; 198 double y = p>y + c * d; 199 199 double z = p>z; 200 200 pj_transform(pj_input, pj_output, 1, 1, &x, &y, &z); … … 219 219 double c = cos(rad(angle)); 220 220 221 double x1 = p>x + c* d1;222 double y1 = p>y + s* d1;221 double x1 = p>x + s * d1; 222 double y1 = p>y + c * d1; 223 223 double z1 = p>z; 224 224 pj_transform(pj_input, pj_output, 1, 1, &x1, &y1, &z1); … … 226 226 y1 = deg(y1); 227 227 228 double x2 = p>x  c* d2;229 double y2 = p>y  s* d2;228 double x2 = p>x  s * d2; 229 double y2 = p>y  c * d2; 230 230 double z2 = p>z; 231 231 pj_transform(pj_input, pj_output, 1, 1, &x2, &y2, &z2); 
src/model.cc
r6363690 r76cf7f1 5 5 // 6 6 // Copyright (C) 20002002,2005,2006 Mark R. Shinwell 7 // Copyright (C) 20012003,2004,2005,2006,2010,2011,2012,2013,2014,2015,2016,2018 Olly Betts7 // Copyright (C) 20012003,2004,2005,2006,2010,2011,2012,2013,2014,2015,2016,2018,2019 Olly Betts 8 8 // Copyright (C) 2005 Martin Green 9 9 // … … 651 651 (void)cover_end; 652 652 653 pt_v.set_right_bearing(deg(atan2(right.Get Y(), right.GetX())));653 pt_v.set_right_bearing(deg(atan2(right.GetX(), right.GetY()))); 654 654 655 655 ++segment;
Note: See TracChangeset
for help on using the changeset viewer.