표준 파이썬 콘솔로 보내기(Std SendToPythonConsole)

From FreeCAD Documentation
Revision as of 01:29, 31 December 2020 by Saltsalt (talk | contribs) (Created page with "{{Caption|출력 예시: 부품 상자의 모서리가 선택된 경우}}")

표준 파이썬 콘솔로 보내기

메뉴 위치
편집 → 파이썬 콘솔로 보내기
작업대
모두
기본 단축키
Ctrl+Shift+P
도입 버전
0.19
참조
없음

설명

표준 파이썬 콘솔로 보내기(Std SendToPythonConsole) 명령은 선택한 개체를 참조하는 변수를 파이썬 콘솔 안에 생성합니다. 만약 개체의 하위 셰이프를 선택했다면 변수 2개가 더 생성됩니다. 하나는 개체의 셰이프를 참조하고 다른 하나는 하위 셰이프 자체를 참조합니다. 관련 변수와 코드는 파이썬 코드를 작성하는데 사용할 수 있습니다.

>>> ### Begin command Std_SendToPythonConsole
>>> obj = App.getDocument("Unnamed").getObject("Box")
>>> shp = App.getDocument("Unnamed").getObject("Box").Shape
>>> elt = App.getDocument("Unnamed").getObject("Box").Shape.Edge8
>>> ### End command Std_SendToPythonConsole

출력 예시: 부품 상자의 모서리가 선택된 경우

Usage

  1. Select a single object.
  2. There are several ways to invoke the command:
    • Select the Edit → Send to Python Console option from the menu.
    • Select the Send to Python Console option from the Tree view context menu or 3D view context menu.
    • Use the keyboard shortcut: Ctrl+Shift+P.