Std SendToPythonConsole/ko

This page has been updated for FreeCAD v26.3.

표준 파이썬 콘솔로 보내기

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

설명

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

The following variables are created:

Variable Referenced object(s)
sels A list of selection objects (one for each selected object)
sel The last item in sels (belonging to the last selected object)
doc The document containing the selected objects
objs A list with an item for each selected object:

The selected object itself (if it is not a Link)
The linked object (if the selected object is a Link)

obj The last item in objs (belonging to the last selected object)
lnks A list with an item for each selected object:

The selected object itself (if it is a Link)
None (if the selected object is not a Link)

lnk The last item in lnks (belonging to the last selected object)
shps A list with an item for each obj in objs:

The Shape property of obj (for objects that have that property)
The Mesh property of obj (for Mesh objects)
The Points property of obj (for Points objects)
None (for other objects)

shp The last item in shps (belonging to the last item in objs)
subs A list with the selected subobjects. The list is empty if no subobjects have been selected.
sub The last item in subs, or None if subs is empty.
names A list with a tuple for each selected object. Each tuple contains the names of the subobjects belonging to that object. The tuple is empty if no subobjects have been selected for the object.
name The last item in the last tuple in names, or None if that tuple is empty.

용법

  1. 단일 개체를 선택합니다.
  2. 이 명령을 실행하는 방법은 여러 가지입니다:
    • 메뉴에서 편집 → 파이썬 콘솔로 보내기 옵션을 선택합니다.
    • 트리 보기의 상황에 맞는 메뉴 혹은 3D 보기의 상황에 맞는 메뉴에서 파이썬 콘솔로 보내기 옵션을 선택합니다.
    • 단축키를 사용합니다: Ctrl+Shift+P.

Notes

lnk_shps = [Part.getShape(l) if l else None for l in lnks]
lnk_shp = Part.getShape(lnk) if lnk else None