mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-05 06:08:59 +00:00
+14
-9
@@ -16423,7 +16423,7 @@ class HouseplanCard extends LitElement {
|
||||
+ r.positionsRemapped + r.markersDetached;
|
||||
const modelMaintenance = r.migrated + r.canonicalized + r.coordsCanonicalized
|
||||
+ r.wallsMerged + r.spansMerged + r.partitionsMerged
|
||||
+ r.partitionsReconciled + r.openingsRehosted;
|
||||
+ r.partitionsReconciled + r.openingsRehosted + r.redundantDraftsRemoved;
|
||||
const gridWarning = r.moved + r.rotated + r.removedDrafts
|
||||
+ r.coordsCanonicalized + r.wallsStraightened;
|
||||
const straightenCm = Math.ceil(r.maxStraightenShiftCm * 10) / 10;
|
||||
@@ -16512,6 +16512,11 @@ class HouseplanCard extends LitElement {
|
||||
n: String(r.removedDrafts),
|
||||
})}</p>`
|
||||
: nothing}
|
||||
${r.redundantDraftsRemoved
|
||||
? html`<p class="alignmsg">${this._t('gs.optimize_redundant_drafts', {
|
||||
n: String(r.redundantDraftsRemoved),
|
||||
})}</p>`
|
||||
: nothing}
|
||||
${modelMaintenance ? html`<p class="alignmsg">${this._t('gs.optimize_changes', {
|
||||
m: String(r.migrated), c: String(r.canonicalized),
|
||||
p: String(r.coordsCanonicalized), w: String(r.wallsMerged),
|
||||
@@ -17379,19 +17384,19 @@ class HouseplanCard extends LitElement {
|
||||
inside thick jambs without changing the stored span. */}
|
||||
${!this._editing ? this._renderOpenWalls(disp) : nothing}
|
||||
${this._renderWallBodies(disp)}
|
||||
${this._markup ? svg`<g class="hp-editor-only-layer"
|
||||
opacity="${modeVisual?.editorWeight ?? 1}">${this._renderOpeningPlacementPreview()}</g>` : nothing}
|
||||
${opMeasure ? this._renderOpeningDimensionGuides(opMeasure) : nothing}
|
||||
${opMeasure?.guide ? this._renderOpeningCenterTick(opMeasure.guide) : nothing}
|
||||
${this._renderRoomHoverOutline(roomHover)}
|
||||
${''/* Editors: saved virtual boundaries and the live two-click
|
||||
preview deliberately paint AFTER real wall bodies. Their
|
||||
full centreline geometry remains visible for editing. */}
|
||||
${this._editing ? this._renderOpenWalls(disp) : nothing}
|
||||
${this._markup ? svg`<g class="hp-editor-only-layer"
|
||||
opacity="${modeVisual?.editorWeight ?? 1}">${this._tool === 'draw'
|
||||
? this._renderPlanSnapOverlay()
|
||||
: this._renderHiddenWallDiagnosticOverlay()}</g>` : nothing}
|
||||
opacity="${modeVisual?.editorWeight ?? 1}">${this._renderHiddenWallDiagnosticOverlay()}</g>` : nothing}
|
||||
${this._markup ? svg`<g class="hp-editor-only-layer"
|
||||
opacity="${modeVisual?.editorWeight ?? 1}">${this._renderOpeningPlacementPreview()}</g>` : nothing}
|
||||
${opMeasure ? this._renderOpeningDimensionGuides(opMeasure) : nothing}
|
||||
${opMeasure?.guide ? this._renderOpeningCenterTick(opMeasure.guide) : nothing}
|
||||
${this._markup && this._tool === 'draw' ? svg`<g class="hp-editor-only-layer"
|
||||
opacity="${modeVisual?.editorWeight ?? 1}">${this._renderPlanSnapOverlay()}</g>` : nothing}
|
||||
${disp.hideOpenings && !this._markup
|
||||
? nothing
|
||||
: isoLayers && !isoLayers.floorSymbols
|
||||
@@ -19580,7 +19585,7 @@ class HouseplanCard extends LitElement {
|
||||
}
|
||||
|
||||
private _renderHiddenWallDiagnosticOverlay(): TemplateResult {
|
||||
if (!this._markup || this._tool === 'draw') return svg`` as unknown as TemplateResult;
|
||||
if (!this._markup) return svg`` as unknown as TemplateResult;
|
||||
const geometry = this._hiddenWallDiagnosticSnapshot().value;
|
||||
if (!geometry.segments.length) return svg`` as unknown as TemplateResult;
|
||||
const radius = wallCmToUnits(5, this._cellCm, this._gridPitch);
|
||||
|
||||
@@ -811,6 +811,7 @@
|
||||
"gs.align_where": "The largest shift is in “{s}”.",
|
||||
"gs.align_turned": "Openings whose angle is corrected: {n}.",
|
||||
"gs.align_removed_drafts": "Invalid outlines collapsed by the grid and removed: {n}.",
|
||||
"gs.optimize_redundant_drafts": "Saved wall chains hidden by solid room walls and removed: {n}.",
|
||||
"gs.align_preflight_failed": "Could not safely verify the geometry of the following spaces: {spaces}{more}.",
|
||||
"gs.align_preflight_hint": "Plans were not changed. Update House Plan and try again. If the error persists, attach a space export to the bug report.",
|
||||
"gs.align_preflight_space": "Space {n}",
|
||||
|
||||
@@ -811,6 +811,7 @@
|
||||
"gs.align_where": "Наибольший сдвиг — в пространстве «{s}».",
|
||||
"gs.align_turned": "Проёмов с исправлением угла: {n}.",
|
||||
"gs.align_removed_drafts": "Схлопнувшиеся на сетке некорректные контуры удалены: {n}.",
|
||||
"gs.optimize_redundant_drafts": "Сохранённые цепочки стен, полностью скрытые стенами комнат, удалены: {n}.",
|
||||
"gs.align_preflight_failed": "Не удалось безопасно проверить геометрию следующих пространств: {spaces}{more}.",
|
||||
"gs.align_preflight_hint": "Планы не изменены. Обновите House Plan и повторите. Если ошибка останется, приложите экспорт пространства к отчёту об ошибке.",
|
||||
"gs.align_preflight_space": "Пространство {n}",
|
||||
|
||||
@@ -66,6 +66,8 @@ export interface OptimizeReport extends AlignReport, SpaceReferenceReport {
|
||||
partitionsReconciled: number;
|
||||
/** Hosted openings materialised onto the coincident shared room wall. */
|
||||
openingsRehosted: number;
|
||||
/** Saved wall chains removed because solid room masonry covers every segment. */
|
||||
redundantDraftsRemoved: number;
|
||||
/** Unique physical near-axis walls accepted for explicit straightening. */
|
||||
wallsStraightened: number;
|
||||
/** Near-axis walls found but rejected by structural safety checks. */
|
||||
@@ -498,6 +500,7 @@ export function optimizePlans(
|
||||
let partitionsMerged = 0;
|
||||
let partitionsReconciled = 0;
|
||||
let openingsRehosted = 0;
|
||||
let redundantDraftsRemoved = 0;
|
||||
let canonicalized = 0;
|
||||
for (let i = 0; i < config.spaces.length; i++) {
|
||||
const before = beforeSpaces[i];
|
||||
@@ -632,7 +635,7 @@ export function optimizePlans(
|
||||
else delete space.walls;
|
||||
}
|
||||
if (reconciled.removedDrafts) {
|
||||
alignReport.removedDrafts += reconciled.removedDrafts;
|
||||
redundantDraftsRemoved += reconciled.removedDrafts;
|
||||
if (reconciled.roomDrafts.length) space.room_drafts = reconciled.roomDrafts;
|
||||
else delete space.room_drafts;
|
||||
}
|
||||
@@ -709,6 +712,7 @@ export function optimizePlans(
|
||||
partitionsMerged: changed ? partitionsMerged : 0,
|
||||
partitionsReconciled: changed ? partitionsReconciled : 0,
|
||||
openingsRehosted: changed ? openingsRehosted : 0,
|
||||
redundantDraftsRemoved: changed ? redundantDraftsRemoved : 0,
|
||||
wallsStraightened: changed ? wallsStraightened : 0,
|
||||
wallsStraightenSkipped,
|
||||
maxStraightenShiftCm: changed ? maxStraightenShiftCm : 0,
|
||||
|
||||
Reference in New Issue
Block a user