Document structure/zh: Difference between revisions

From FreeCAD Documentation
(Created page with "Category:User Documentation/zh")
 
(Updating to match new version of source page)
 
(25 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<languages/>
[[Image:Screenshot treeview.jpg|left]]
A FreeCAD document contains all the objects of your scene. It can contain groups, and objects made with any workbench. You can therefore switch between workbenches, and still work on the same document. The document is what gets saved to disk when you save your work. You can also open several documents at the same time in FreeCAD, and open several views of the same document.


{{Docnav
Inside the document, the objects can be moved into groups, and have a unique name. Managing groups, objects and object names is done mainly from the Tree view. It can also be done, of course, like everything in FreeCAD, from the python interpreter. In the Tree view, you can create groups, move objects to groups, delete objects or groups, by right-clicking in the tree view or on an object, rename objects by double-clicking on their names, or possibly other operations, depending on the current workbench.
|[[Navigation_Cube|Navigation Cube]]
|[[Property_editor|Property editor]]
}}


{{TOCright}}
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.


FreeCad文档包含场景的所有对象。它可以包含组和使用任何工作台生成的对象。您可以在工作台之间切换但仍然编辑同一文档。文档是进行保存操作时存储到磁盘上的内容。您还可以在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.


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


<div class="mw-translate-fuzzy">
Like almost everything else in FreeCAD, the 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.
FreeCad文档中的对象可以是不同类型的。每个工作台都可以创建自己的对象类型,例如[[Mesh Workbench|网格工作台]]用来创建网格对象,[[Part Workbench|零件工作台]]用来创建零件对象,[[Draft Workbench|草稿工作台]]也可以用来创建零件对象等。
</div>


如果在FreeCad中至少有一个打开的文档,则始终只有一个活动文档。这是显示在当前三维视图中的文档,即当前正在处理的文档。
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.


与FreeCad中的其他功能一样,图形用户界面部分(GUI)与基本应用程序部分(app)是分开的。这对文件也是有效的。文档也由两部分组成:包含对象的应用程序文档和包含对象在屏幕上的表示方式的视图文档。
==Scripting==


把它想象成两个空间,在其中定义对象。它们的构造参数存储在应用程序文档中(是立方体吗?一个圆锥体?多大?),而它们的图形表示形式存储在视图文档中(用黑线绘制?蓝色的面?)。为什么会这样?因为FreeCad也可以在{{emphasis|没有}}图形界面的情况下使用,例如,在其他程序中运行Freecad,即使屏幕上没有绘制任何内容,我们也必须能够操控我们的对象。
Documents can be easily created, accessed and modified from the python interpreter. For example:

视图文档中包含的另一个内容是三维视图。一个文档可以打开多个视图,因此您可以同时从多个视图检查文档。也许你想同时看到你工作的俯视图和俯视图。然后,您将拥有同一文档的两个视图,它们都存储在视图文档中。可以从“视图”菜单或右键单击“视图”选项卡来创建新视图或关闭视图。

==编程==

<div class="mw-translate-fuzzy">
可以通过[[python|Python]]解释器轻松创建、访问和修改文档。例如:
</div>
{{Code|code=
{{Code|code=
FreeCAD.ActiveDocument
FreeCAD.ActiveDocument
}}
}}
将返回当前(激活)文档
Will return the current (active) document
{{Code|code=
{{Code|code=
FreeCAD.ActiveDocument.Blob
FreeCAD.ActiveDocument.Blob
}}
}}
会访问你的文档中一个叫做“Blob“的对象。
Would access an object called "Blob" inside your document
{{Code|code=
{{Code|code=
FreeCADGui.ActiveDocument
FreeCADGui.ActiveDocument
}}
}}
将返回与当前文档关联的视图文档
Will return the view document associated to the current document
{{Code|code=
{{Code|code=
FreeCADGui.ActiveDocument.Blob
FreeCADGui.ActiveDocument.Blob
}}
}}
将访问对象Blob的图形表示(视图)部分
Would access the graphical representation (view) part of our Blob object
{{Code|code=
{{Code|code=
FreeCADGui.ActiveDocument.ActiveView
FreeCADGui.ActiveDocument.ActiveView
}}
}}
将返回当前视图
Will return the current view


{{docnav|Mouse Model|Preferences Editor}}


<div class="mw-translate-fuzzy">
[[Category:User Documentation/zh]]
{{docnav|Mouse Model/zh|Preferences Editor/zh}}
<languages/>
</div>

{{Userdocnavi{{#translation:}}}}

Latest revision as of 15:52, 30 December 2020

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

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

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

如果在FreeCad中至少有一个打开的文档,则始终只有一个活动文档。这是显示在当前三维视图中的文档,即当前正在处理的文档。

应用程序和用户界面

与FreeCad中的其他功能一样,图形用户界面部分(GUI)与基本应用程序部分(app)是分开的。这对文件也是有效的。文档也由两部分组成:包含对象的应用程序文档和包含对象在屏幕上的表示方式的视图文档。

把它想象成两个空间,在其中定义对象。它们的构造参数存储在应用程序文档中(是立方体吗?一个圆锥体?多大?),而它们的图形表示形式存储在视图文档中(用黑线绘制?蓝色的面?)。为什么会这样?因为FreeCad也可以在没有图形界面的情况下使用,例如,在其他程序中运行Freecad,即使屏幕上没有绘制任何内容,我们也必须能够操控我们的对象。

视图文档中包含的另一个内容是三维视图。一个文档可以打开多个视图,因此您可以同时从多个视图检查文档。也许你想同时看到你工作的俯视图和俯视图。然后,您将拥有同一文档的两个视图,它们都存储在视图文档中。可以从“视图”菜单或右键单击“视图”选项卡来创建新视图或关闭视图。

编程

可以通过Python解释器轻松创建、访问和修改文档。例如:

FreeCAD.ActiveDocument

将返回当前(激活)文档

FreeCAD.ActiveDocument.Blob

会访问你的文档中一个叫做“Blob“的对象。

FreeCADGui.ActiveDocument

将返回与当前文档关联的视图文档

FreeCADGui.ActiveDocument.Blob

将访问对象Blob的图形表示(视图)部分

FreeCADGui.ActiveDocument.ActiveView

将返回当前视图


Mouse Model/zh
Preferences Editor/zh