fix(view): ③ 철근배근도 선택한 구조물만 3D에 표시

- 교각을 선택하면 교대를 숨김(②와 같은 규칙). 교대 선택 시 교각 숨김은 기존대로
- ① ↔ ③ 전환 때도 장면을 다시 만들어 표시 규칙이 바로 반영되게 함

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ypshimandClaude Opus 5.5 committed 2026-11-04 15:48:09 +09:00
1 parent 603066f370
commit f4311d7f95
3 files changed
+7 -7

No files matched your search

+2 -3
View File
@@ -2,7 +2,7 @@
* What the 3D view draws for the selection (2026-11-03, 형상계획 ②).
* In ② only the selected object is drawn: a selected abutment hides the piers, and a selected pier hides the abutments.
* In ① (형상 생성) the abutments are always drawn, as before; the piers follow 전체 보기 in ①, not this rule.
* In ③ (2026-11-04, 교대 배근) a selected abutment is drawn alone too; with a pier selected, ③ draws as before.
* In ③ (2026-11-04) only the selected object is drawn too, the same as ②: a selected pier hides the abutments.
*/
/** True when the pier scene (and its rebar) should be built for this stage and selection. */
@@ -12,7 +12,6 @@ export function piersShown(stage: string, abutActive: string | null): boolean {
/** True when the abutment with this name should be drawn. */
export function abutShown(stage: string, abutActive: string | null, name: string): boolean {
if (stage === 'rebar') return abutActive === null || name === abutActive;
if (stage !== 'plan') return true;
if (stage !== 'plan' && stage !== 'rebar') return true;
return name === abutActive;
}
+3 -2
View File
@@ -2559,8 +2559,9 @@ function setStage(stage: Stage): void {
const previous = state.stage;
state.stage = stage;
// Switching 전체 보기 on or off in ① needs the scene rebuilt for the new layout.
// Entering or leaving ② changes which objects are drawn (visibility.ts), so the scene is rebuilt then.
if ((allPiers !== null) !== multiSceneOn() || stage === 'plan' || previous === 'plan') setupScene();
// Entering or leaving ② or ③ changes which objects are drawn (visibility.ts), so the scene is rebuilt then.
const selectionOnly = (s: Stage) => s === 'plan' || s === 'rebar';
if ((allPiers !== null) !== multiSceneOn() || selectionOnly(stage) !== selectionOnly(previous)) setupScene();
if (state.scene) setRebarView(state.scene, stage === 'rebar');
for (const g of abutGroups) setRebarViewOn(g, stage === 'rebar');
$<HTMLElement>('view-shape').hidden = stage !== 'shape';
+2 -2
View File
@@ -21,12 +21,12 @@ describe('형상계획 ②: 선택한 객체만 3D에 그림', () => {
expect(abutShown('shape', null, 'A1')).toBe(true);
});
it('③ draws a selected abutment alone (2026-11-04); with no abutment selected ③ and ④ draw as before', () => {
it('③ draws only the selected object, as ② (2026-11-04); ④ draws as before', () => {
expect(piersShown('rebar', 'A1')).toBe(false);
expect(abutShown('rebar', 'A1', 'A1')).toBe(true);
expect(abutShown('rebar', 'A1', 'A2')).toBe(false);
expect(piersShown('rebar', null)).toBe(true);
expect(abutShown('rebar', null, 'A1')).toBe(true);
expect(abutShown('rebar', null, 'A1')).toBe(false);
expect(piersShown('quantity', 'A1')).toBe(true);
});
});