mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-05 14:19:04 +00:00
fix: preserve authored wall paths across identity barrier
Issue: #282 User-Visible: yes
This commit is contained in:
@@ -80,7 +80,9 @@ const canonicalSpan = (a: number[], b: number[]): [Point, Point] => (
|
||||
const lengthOf = (a: number[], b: number[]): number => Math.hypot(b[0] - a[0], b[1] - a[1]);
|
||||
|
||||
/** Unique authored/derived contour coordinates that are materially off-grid. */
|
||||
export const wallModelOffGridValueCount = (space: any): number => {
|
||||
export const wallModelOffGridValueCount = (
|
||||
space: any, additionalPoints: readonly (readonly number[])[] = [],
|
||||
): number => {
|
||||
const values = new Set<string>();
|
||||
const inspect = (value: unknown): void => {
|
||||
const number = Number(value);
|
||||
@@ -101,6 +103,9 @@ export const wallModelOffGridValueCount = (space: any): number => {
|
||||
inspect(segment?.b?.[0]); inspect(segment?.b?.[1]);
|
||||
}
|
||||
}
|
||||
for (const additionalPoint of additionalPoints) {
|
||||
inspect(additionalPoint?.[0]); inspect(additionalPoint?.[1]);
|
||||
}
|
||||
return values.size;
|
||||
};
|
||||
const projectT = (p: number[], a: number[], b: number[]): number => {
|
||||
|
||||
Reference in New Issue
Block a user