Document structure/zh: Difference between revisions

From FreeCAD Documentation
(Created page with "在文档中,可以将对象移动到组中,并赋予唯一的名称。管理组、对象和对象名主要是从树视图中完成的。当然,就像freecad中的所有...")
(Created page with "FreeCad文档中的对象可以是不同类型的。每个工作台都可以创建自己的对象类型,例如网格工作台用来创建网格对象,...")
Line 6: Line 6:
在文档中,可以将对象移动到组中,并赋予唯一的名称。管理组、对象和对象名主要是从树视图中完成的。当然,就像freecad中的所有操作一样,它也可以通过[[python|Python]]解释器完成。在树视图中,可以创建组、将对象移动到组、删除对象或组、在树视图中或对象上单击鼠标右键、通过双击对象的名称重命名对象或其他的操作(取决于当前工作台)。
在文档中,可以将对象移动到组中,并赋予唯一的名称。管理组、对象和对象名主要是从树视图中完成的。当然,就像freecad中的所有操作一样,它也可以通过[[python|Python]]解释器完成。在树视图中,可以创建组、将对象移动到组、删除对象或组、在树视图中或对象上单击鼠标右键、通过双击对象的名称重命名对象或其他的操作(取决于当前工作台)。


FreeCad文档中的对象可以是不同类型的。每个工作台都可以创建自己的对象类型,例如[[Mesh Workbench|网格工作台]]用来创建网格对象,[[Part Workbench|零件工作台]]用来创建零件对象,[[Draft Workbench|草稿工作台]]也可以用来创建零件对象等。
The objects inside a FreeCAD document can be of different types. Each workbench can create its own types of objects, for example the [[Mesh Workbench]] creates mesh objects, the [[Part Workbench]] create Part objects, the [[Draft Workbench]] also creates Part objects, etc.


If there is at least one document open in FreeCAD, there is always one and only one active document. That's the document that appears in the current 3D view, the document you are currently working on.
If there is at least one document open in FreeCAD, there is always one and only one active document. That's the document that appears in the current 3D view, the document you are currently working on.

Revision as of 03:44, 23 February 2019


FreeCad文档包含场景的所有对象。它可以包含组和使用任何工作台生成的对象。您可以在工作台之间切换但仍然编辑同一文档。文档是进行保存操作时存储到磁盘上的内容。您还可以在FreeCad中同时打开多个文档,并打开同一文档的多个视图。

在文档中,可以将对象移动到组中,并赋予唯一的名称。管理组、对象和对象名主要是从树视图中完成的。当然,就像freecad中的所有操作一样,它也可以通过Python解释器完成。在树视图中,可以创建组、将对象移动到组、删除对象或组、在树视图中或对象上单击鼠标右键、通过双击对象的名称重命名对象或其他的操作(取决于当前工作台)。

FreeCad文档中的对象可以是不同类型的。每个工作台都可以创建自己的对象类型,例如网格工作台用来创建网格对象,零件工作台用来创建零件对象,草稿工作台也可以用来创建零件对象等。

If there is at least one document open in FreeCAD, there is always one and only one active document. That's the document that appears in the current 3D view, the document you are currently working on.

Application and User Interface

Like almost everything else in FreeCAD, the graphical user interface part (GUI) is separated from the base application part (App). This is also valid for documents. The documents are also made of two parts: the Application document, which contains our objects, and the View document, which contains the representation on screen of our objects.

Think of it as two spaces, where the objects are defined. Their constructive parameters (is it a cube? a cone? which size?) are stored in the Application document, while their graphical representation (is it drawn with black lines? with blue faces?) are stored in the View document. Why is that? Because FreeCAD can also be used without graphical interface, for example, inside other programs, and we must still be able to manipulate our objects, even if nothing is drawn on the screen.

Another thing that is contained inside the View document are 3D views. One document can have several views opened, so you can inspect your document from several points of view at the same time. Maybe you would want to see a top view and a front view of your work at the same time? Then, you will have two views of the same document, both stored in the View document. Creating new views or closing views can be done from the View menu or by right-clicking on a view tab.

Scripting

Documents can be easily created, accessed and modified from the Python interpreter. For example:

FreeCAD.ActiveDocument

Will return the current (active) document

FreeCAD.ActiveDocument.Blob

Would access an object called "Blob" inside your document

FreeCADGui.ActiveDocument

Will return the view document associated to the current document

FreeCADGui.ActiveDocument.Blob

Would access the graphical representation (view) part of our Blob object

FreeCADGui.ActiveDocument.ActiveView

Will return the current view

Mouse Model
Preferences Editor