[142] Test Musterhaus komplex: Stützen und Bäume als Schattenwerfer; Goldens EG (Schatten aufs Gelände)
This commit is contained in:
3 files changed
+14
-7
No files matched your search
@@ -78,7 +78,14 @@ describe("Schatten in eine Richtung (Musterhaus komplex)", () => {
|
||||
const sun = sunPosition(lat, lon, new Date(p.sunStudy!.when));
|
||||
const az = (sun.azimuth * Math.PI) / 180;
|
||||
const dot = (v: Vec2) => v.x * Math.sin(az) + v.y * Math.cos(az);
|
||||
const casters: Vec2[] = [...p.walls.flatMap((w) => [w.start, w.end]), ...(p.extrudedSolids ?? []).flatMap((s) => s.points)];
|
||||
// [142] auch Stützen und Bäume (Kreise der Ebene 13) werfen Schatten; Baum: sonnennächster Kronenpunkt.
|
||||
const trees = p.drawings2d.flatMap((d) => (d.categoryCode === "13" && d.geom.shape === "circle" ? [{ x: d.geom.center.x + d.geom.r * Math.sin(az), y: d.geom.center.y + d.geom.r * Math.cos(az) }] : []));
|
||||
const casters: Vec2[] = [
|
||||
...p.walls.flatMap((w) => [w.start, w.end]),
|
||||
...(p.extrudedSolids ?? []).flatMap((s) => s.points),
|
||||
...(p.columns ?? []).map((c) => c.position),
|
||||
...trees,
|
||||
];
|
||||
const shadows = shadowPolygons(p, sun);
|
||||
expect(shadows.length).toBeGreaterThan(0);
|
||||
const pts = shadows.flatMap((poly) => poly[0]);
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
viewBox -41.5 0 95 63.6
|
||||
bytes 109717
|
||||
bytes 113400
|
||||
circle 16
|
||||
g 1
|
||||
line 338
|
||||
path 39
|
||||
polygon 259
|
||||
polygon 266
|
||||
polyline 126
|
||||
rect 1
|
||||
svg 1
|
||||
text 121
|
||||
hash 6872e879c06f7f46
|
||||
hash 06d354bb6d5e9b73
|
||||
@@ -1,12 +1,12 @@
|
||||
viewBox -41.5 0 95 63.6
|
||||
bytes 114546
|
||||
bytes 118229
|
||||
circle 16
|
||||
g 1
|
||||
line 349
|
||||
path 45
|
||||
polygon 259
|
||||
polygon 266
|
||||
polyline 151
|
||||
rect 1
|
||||
svg 1
|
||||
text 121
|
||||
hash 49fa5877b4a27a36
|
||||
hash d03241231291e547
|
||||
Reference in new issue
Block a user