표준 파이썬 콘솔로 보내기(Std SendToPythonConsole)
Appearance
Outdated translations are marked like this.
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) |
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) |
lnk |
The last item in lnks (belonging to the last selected object)
|
shps |
A list with an item for each obj in objs:The |
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.
|
용법
Notes
- All previously created variables are deleted each time the command is run.
- For selected objects that are Links (
App::Link) and whose linked object has aShape, the item inshpswill be the shape of the linked object. If the Links have been transformed or scaled and you want to access the scaled/transformed shapes, you can do so with this code:
lnk_shps = [Part.getShape(l) if l else None for l in lnks] lnk_shp = Part.getShape(lnk) if lnk else None
- File: New Document, Open, Open Recent, Close, Close All, Save, Save As, Save Copy, Save All, Revert, Import, Export,Merge Document, Document Information, Print, Print Preview, Export PDF, Exit
- Edit:
- Miscellaneous: Undo, Redo, Cut, Copy, Paste, Duplicate Object, Delete, Recompute, Box Selection, Box Element Selection, Select All, Transform, Placement, Align To, Send to Python Console, Properties, Toggle Edit Mode, Edit Mode, Preferences
- Create: New Part, New Group, Variable Set, Annotation Label, Text Document
- Datums: Coordinate System, Datum Plane, Datum Line, Datum Point
- Link Actions: Make Link, Make Sub-Link, Replace With Link, Unlink, Import Link, Import All Links
- View:
- Miscellaneous: New 3D View, Orthographic View, Perspective View, Fullscreen, Bounding Box, Toggle Axis Cross, Clipping View, Texture Mapping, Toggle Navigation/Edit Mode, Material, Appearance, Random Color, Appearance per Face, Toggle Transparency, Workbench, Status Bar
- Standard Views: Fit All, Fit Selection, Align to Selection, Isometric, Dimetric, Trimetric, Home, Front, Top, Right, Rear, Bottom, Left, Rotate Left, Rotate Right, Store Working View, Recall Working View
- Freeze Display: Save Views, Load Views, Freeze View, Clear Views
- Draw Style: As Is, Points, Wireframe, Hidden Line, No Shading, Shaded, Flat Lines
- Stereo: Stereo Red/Cyan, Stereo Quad Buffer, Stereo Interleaved Rows, Stereo Interleaved Columns, Stereo Off, Issue Camera Position
- Zoom: Zoom In, Zoom Out, Box Zoom
- Document Window: Docked, Undocked, Fullscreen
- Visibility: Toggle Visibility, Show Selection, Hide Selection, Select Visible Objects, Toggle All Objects, Show All Objects, Hide All Objects, Toggle Selectability
- Toolbars: File, Edit, Clipboard, Workbench, Macro, View, Individual Views, Structure, Help, Lock Toolbars
- Panels: Tree View, Property View, Model, Selection View, Python Console, Report View, Tasks, DAG View
- Overlay Docked Panel: Toggle Overlay for All Panels, Toggle Transparent Panels, Toggle Overlay, Toggle Transparent Mode, Bypass Mouse Events in Overlay Panels, Toggle Left, Toggle Right, Toggle Top, Toggle Bottom
- Link Navigation: Go to Linked Object, Go to Deepest Linked Object, Select All Links
- Tree View Actions: Sync View, Sync Selection, Sync Placement, Preselection, Record Selection, Single Document, Multi Document, Collapse/Expand, Initiate Dragging, Go to Selection, Selection Back, Selection Forward
- Tools: Addon Manager, Measure, Clarify Selection, Quick Measure, Units Converter, Load Image, Save Image, View Turntable, Scene Inspector, Dependency Graph, Export Dependency Graph, Document Utility, Edit Parameters, Customize
- Macro: Record Macro, Macros, Recent Macros, Execute Macro, Attach to Remote Debugger, Debug Macro, Stop Debugging, Step Over, Step Into, Toggle Breakpoint
- Help: What's This, Start Page, Users Documentation, FreeCAD Forum, Report an Issue, Restart in Safe Mode, Developers Handbook, Python Modules Documentation, FreeCAD Website, Donate to FreeCAD, About FreeCAD
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Assembly, BIM, CAM, Draft, FEM, Inspection, Material, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework
- Hubs: User hub, Power users hub, Developer hub