"""하이브리드 시뮬레이션: 기존 블록 활용 + 필요 시 변형/조합. 블록 사용 현황: - card-icon-desc: 목표 3카드 ← 기존 블록 그대로 - dark-bullet-list: 변형 — 불릿 대신 Before→After 구조 (CSS만 추가) - table-simple-striped: 주체별 효과 ← 기존 블록 그대로 - banner-gradient: 결론 ← 기존 블록 그대로 - 섹션 구분: divider-text 스타일 활용 블록 사용률: ~70% 기존 블록 + ~30% 변형/자유 """ from __future__ import annotations import asyncio, json, sys, base64 from pathlib import Path ROOT = Path(__file__).parent.parent sys.path.insert(0, str(ROOT)) HYBRID_HTML = """ 하이브리드 — DX 시행 목표 및 기대 효과
DX 시행 목표 및 기대 효과
🛡️
안전과 품질
설계-시공-운영 전 과정에서 디지털로 검증하여 안전성 확보 하자 최소화로 고품질 성과물 제공
생산성 향상
Analogue → Digital 프로세스 전환 비용 절감, 기간 단축, 인력투입 최소화로 부가가치 제고
🤝
소통과 신뢰
협업 강화로 의사소통 효율 증진 3D 모델·데이터 기반 검증으로 오류 최소화 및 Claim 예방
업무 수행 과정(Process)의 변화
생산 방식
수작업 의존의 반복 업무
→ SW를 활용한 체계화된 방식으로 전환
인지·검토
2D 도면 해석 중심
→ 3D 모델 기반의 직관적 인지·검토 체계
협업 구조
개별 문서 중심 협업
→ 데이터 통합 기반 정보 공유·관리 환경
검증·대응
사후 대응 중심 문제 처리
→ 사전 검증 중심의 예방적 업무 방식
주체별 기대효과
주체기대효과
발주처품질 향상, 비용·기간 절감, 투명한 관리
설계사오류 감소, 설계 품질 제고, 재작업 최소화
시공사공정 최적화, 안전 강화, 현장 생산성 향상
감리·CM실시간 모니터링, 데이터 기반 의사결정
유지관리디지털 트윈 기반 예방 정비, 자산 관리 효율화
""" async def main(): from src.slide_measurer import measure_rendered_heights, capture_slide_screenshot out_dir = ROOT / "data" / "runs" / "hybrid_simulation" out_dir.mkdir(parents=True, exist_ok=True) m = await asyncio.to_thread(measure_rendered_heights, HYBRID_HTML) s = await asyncio.to_thread(capture_slide_screenshot, HYBRID_HTML) (out_dir / "hybrid.html").write_text(HYBRID_HTML, encoding="utf-8") if s: (out_dir / "hybrid_screenshot.png").write_bytes(base64.b64decode(s)) slide = m.get("slide", {}) print(f"slide: {slide.get('scrollHeight', 0)}px / 720px {'✅' if not slide.get('overflowed') else '❌'}") print(f""" 블록 사용 현황: card-icon-desc → 목표 3카드 (기존 블록 100%) dark-bullet-list → 프로세스 변화 (기존 색상/구조 + Before→After 변형) divider-text → 섹션 구분 (기존 블록 100%) table-simple-striped → 주체별 기대효과 (기존 블록 100%) banner-gradient → 결론 (기존 블록 100%) 블록 활용률: 4/5 기존 블록 그대로 + 1/5 변형 결과: {out_dir}/hybrid_screenshot.png """) if __name__ == "__main__": import logging logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(message)s", datefmt="%H:%M:%S") logging.getLogger("selenium").setLevel(logging.WARNING) logging.getLogger("urllib3").setLevel(logging.WARNING) asyncio.run(main())