Tutorial 04
hfVisualizer Basics
목표
이 튜토리얼은 hfVisualizer 원격 제어를 처음 사용할 때 알아야 하는 기본 개념을 설명합니다.
특히 다음 항목을 현재 구현 기준으로 정리합니다.
- remote target 선택
currentView와activeRenderViewviewId기반 view 제어- display/camera 명령과
--view-id
1. 먼저 target을 정한다
인스턴스가 하나뿐이면 --target 없이 바로 명령을 보내도 됩니다.
여러 인스턴스를 반복해서 다뤄야 하면 먼저 기본 대상을 설정하는 편이 좋습니다.
hfVisualizer --remote list
hfVisualizer --remote target set 8f6d1c2b
hfVisualizer --remote status
hfVisualizer --remote focus
핵심 규칙:
--target <id>는 1회성 overridetarget set <id>는 로컬 기본 대상 설정target clear는 저장된 기본 대상 제거
2. 파일을 열고 저장한다
hfVisualizer --remote open D:\Work\frame.h5.hdb
hfVisualizer --remote save
hfVisualizer --remote write-scene D:\Work\frame.png
가장 먼저 익혀 두면 좋은 흐름은 다음과 같습니다.
opencamera fitrepresentation bothwrite-scene
아래 그림은 tutorial frame.inp 모델을 import한 뒤 camera fit, representation both, display-control grid off를 적용한 프로그램 화면 예시입니다.

3. view는 --id로 다룬다
이제 view 명령은 index가 아니라 viewId를 기준으로 동작합니다.
hfVisualizer --remote view list
hfVisualizer --remote view add render
hfVisualizer --remote view activate --id r1
hfVisualizer --remote view close --id c0
대표적인 viewId 형식:
- render view:
r0,r1 - node table:
n0 - element table:
e0 - chart:
c0
4. currentView와 activeRenderView는 다를 수 있다
중앙 화면에서 지금 선택된 view는 currentView입니다.
하지만 display, camera, visibility 같은 명령의 기본 대상은 activeRenderView입니다.
예를 들어:
- 현재 중앙 탭이
chart여도 - 마지막 작업 대상 render view는
r1일 수 있습니다.
그래서 view list를 보면 두 정보를 함께 확인해야 합니다.
5. display와 camera는 기본적으로 activeRenderView를 쓴다
hfVisualizer --remote representation both
hfVisualizer --remote transparency on
hfVisualizer --remote display-control grid off
hfVisualizer --remote camera fit
이 명령들은 기본적으로 현재 activeRenderView에 적용됩니다.
6. 다른 render view를 직접 겨냥하려면 --view-id를 쓴다
다른 render view를 조정하고 싶다고 해서 반드시 현재 active를 바꿀 필요는 없습니다.
hfVisualizer --remote --view-id r0 camera view +z
hfVisualizer --remote --view-id r1 camera view +z
hfVisualizer --remote --view-id r1 display-control grid off
hfVisualizer --remote --view-id r1 visibility element all on
이 방식의 장점:
currentView를 건드리지 않는다activeRenderView를 임시로 바꾸지 않아도 된다- 여러 render view를 나란히 비교하기 쉽다
7. 시작할 때 추천하는 점검 순서
새 모델을 열었을 때는 다음 순서가 안정적입니다.
statusview listcamera fitrepresentation both- 필요한 경우
display-control grid off - 장면 저장은
write-scene
같이 보면 좋은 문서
다음 문서
- 선택과 가시성 제어로 이어가려면 Tutorial 05 - Selection and Visibility