[61] Raumprogramm: Schnitt-/Ansichtsmarker nicht auf freien Zeichnungsebenen
Claude-Session: https://claude.ai/code/session_01NTYBZBvLYCtugMJoKXaB67
This commit is contained in:
2 files changed
+27
No files matched your search
@@ -121,6 +121,11 @@ pub fn plan_section_lines(c: &Ctx, out: &mut Vec<Primitive>) {
|
||||
if !c.shown(SECTION_LINE_CATEGORY) {
|
||||
return;
|
||||
}
|
||||
// Auf freien Zeichnungsebenen (Blätter wie „Raumprogramm", Detail) gehören die Symbole nicht hin:
|
||||
// sie beziehen sich auf die Geschoss-Grundrisse.
|
||||
if c.p.drawing_levels.iter().any(|l| l.id == c.a.floor && matches!(l.kind, DrawingLevelKind::Drawing)) {
|
||||
return;
|
||||
}
|
||||
let greyed = Some(c.greyed(SECTION_LINE_CATEGORY));
|
||||
for level in &c.p.drawing_levels {
|
||||
if !matches!(level.kind, DrawingLevelKind::Section | DrawingLevelKind::Elevation) {
|
||||
|
||||
@@ -74,6 +74,28 @@ describe("generatePlan — Schnittführungs-Symbol", () => {
|
||||
expect(labels.length).toBe(2);
|
||||
});
|
||||
|
||||
it("zeichnet NICHTS auf einer freien Zeichnungsebene (kind drawing), aber weiter auf Geschossen", () => {
|
||||
const p = baseProject([
|
||||
floor,
|
||||
{ id: "blatt", name: "Raumprogramm", kind: "drawing", visible: true, locked: false },
|
||||
{
|
||||
id: "s-a",
|
||||
name: "Schnitt A",
|
||||
kind: "section",
|
||||
visible: true,
|
||||
locked: false,
|
||||
linePoints: [{ x: 0, y: 2 }, { x: 6, y: 2 }],
|
||||
directionSign: 1,
|
||||
},
|
||||
]);
|
||||
const onSheet = generatePlan(p, "blatt", visible).primitives;
|
||||
expect(onSheet.some((pr) => pr.kind === "polygon" && pr.sectionLineId != null)).toBe(false);
|
||||
expect(onSheet.some((pr) => pr.kind === "line" && pr.cls === "section-line")).toBe(false);
|
||||
expect(onSheet.some((pr) => pr.kind === "drawingText" && pr.text === "A")).toBe(false);
|
||||
const onFloor = generatePlan(p, "eg", visible).primitives;
|
||||
expect(onFloor.some((pr) => pr.kind === "polygon" && pr.sectionLineId === "s-a")).toBe(true);
|
||||
});
|
||||
|
||||
it("zeichnet NICHTS für eine Schnittebene ohne linePoints", () => {
|
||||
const p = baseProject([
|
||||
floor,
|
||||
|
||||
Reference in new issue
Block a user