首选项编辑器

From FreeCAD Documentation
Revision as of 22:46, 26 February 2020 by FuzzyBot (talk | contribs) (Updating to match new version of source page)

Introduction

FreeCAD的首选项系统位于Edit menu → Preferences

FreeCAD中的功能被分为不同的模块,每个模块负责实现一种特定workbench的具体工作。 FreeCAD采用的是延迟加载方式,意即只有当需要使用特定组件时才会进行加载。您在FreeCAD的工具栏中选择工作台时可能会注意到这一点,因为在加载工作台及其所有组件时需要花费一点儿时间。在进行首选项设置时也是如此。

在没有加载任何模块时,您可以访问两个配置部分,分别用于应用通用设置(general)与显示设置(display)。当您使用特定的工作台时,便会在新选项卡中显示对应工作台的首选项设置,并在Import-Export新加部分显示该工作台所支持的文件格式。

点击首选项左下角的Reset按钮,即可将FreeCAD中的所有首选项设置还原为其默认值。

通用设置

本首选项部分包含6个选项卡:

General

General选项卡中,您可以指定下列内容:

名称 描述
Change language 选择FreeCAD的用户界面语言
Size of recent file list 指定有多少最近用过的文件显示在recent files列表中
Enable tiled background 如果选中此复选框,则FreeCAD的主窗口背景将默认由以下图片填充:
本选项只有在Style sheet/No style sheet被选中时才会生效。
将图片加入到下列路径中的Gui/Images文件夹下即可改变贴图内容
%APPDATA%/FreeCAD (在Windows上),
$HOME/.FreeCAD (在Linux上) or
$HOME/Library/Preferences/FreeCAD (在MacOS上)。
将图片文件命名为background.png,再依次取消/选中本选项来查看效果。
Style sheet 选择样式表。样式表定义了FreeCAD用户界面的外观。
Size of toolbar icons 选择工具栏图标的大小。
Auto load module after start up 选择FreeCAD开启后将直接打开的工作台。
Enable splash screen at start up 如果选中此项, 则在FreeCAD开启时展示启动画面。
可通过向%APPDATA%/FreeCAD( %APPDATA%是用户在操作系统中为FreeCAD指定的应用文件夹)添加Gui/Images文件夹来修改启动画面。将作为启动画面的图像命名为splash_image.png并重启FreeCAD即可看到效果。
Enable word wrap 利用此选项可实现在Python控制台中令超出一行中的文本自动换行。利用View → Panels → Python console菜单来开启Python控制台。

This option only has an effect if in Style sheet/No style sheet is selected.

The image can be changed by adding the folders Gui/Images in the folder

%APPDATA%/FreeCAD (on Windows),

$HOME/.FreeCAD (on Linux) or

$HOME/Library/Preferences/FreeCAD (on MacOS).

Put there a file named background.png and uncheck/check this option to see the changed file. |- | Style sheet | Selection of a style sheet. The style sheets define how the user interface of FreeCAD looks. |- | Size of toolbar icons | Selection of the size for the toolbar icons |- | Auto load module after start up | Selection what workbench will be used directly after starting FreeCAD |- | Enable splash screen at start up | If checked, the splash screen of FreeCAD is shown when starting.

The splash screen image can be changed by adding the folders Gui/Images in the folder %APPDATA%/FreeCAD (where %APPDATA% is the the user-specific application folder of FreeCAD of your operating system). Put there a file named splash_image.png and restart FreeCAD to see the changed splash screen. |- | Enable word wrap | Words will be wrapped when they exceed the available horizontal space in the Python console. This console is shown using the menu View → Panels → Python console. |}

Document

Document选项卡中,您可以指定以下内容:

名称 描述
Create new document at start up 如果选中此选项,FreeCAD将在启动时创建一个新文档。
Document save compression level 指定FCStd文件的压缩级别。FCStd文件为ZIP压缩文件。因此,您可以将其后缀.FCStd改为.zip,并用ZIP归档程序来打开它们。
Using Undo/Redo on documents 如果选中此选项,所有文档的更改情况将被保存下来,因此即可实现undone/redone。
Maximum Undo/Redo steps 指定可以记录多少次Undo/Redo操作。
Run AutoRecovery at startup 如果存在恢复文件,则FreeCAD将在开启时自动运行此文件进行恢复。此法可对程序崩溃时的文件进行恢复。
Save AutoRecovery information every 指定多久写一次恢复文件。
Save thumbnail into project file when saving document 如果选中此选项,在保存文档时,也将存储一份项目的缩略图。此缩略图将显示在启动工作台中的最近打开文件列表中。
Add the program logo to the generated thumbnail 如果选中此选项,则会将FreeCAD程序的logo 添加至缩略图中。此选项仅在开启Save thumbnail into project file when saving document选项后才会生效。
Maximum number of backup files to keep when resaving document 如果选中此选项,在保存文档时也会保留备份文件。您可以指定保留备份文件的数量。这些文件中保存的是此前(previously)的文档版本。第一个备份文件的后缀为 .FCStd1, 第二个后缀为.FCStd2,并以此类推。
Allow duplicate object labels in one document 如果选中此选项,则不同的对象可以使用相同的标签/名称。例如,同一文档中的不同零件与features可用相同的名字。
Author name 创建的所有文档均采用此指定的作者名。对于匿名作者而言,作者名字的区域为空白内容。若开启了Set on save选项,则在保存文件时将Last modified by的内容设置为此作者名。可通过File → Project information菜单来查看该文本域。
Company 将创建的所有文档都指定为此公司名称。
Default license 为新文档所指定的默认许可证。对于预定义的许可证而言,License URL将自动做出对应的设置。而针对自定义许可证或特殊许可证来讲,可选择'Other(其他)'项。
License URL 指定URL来描述Default license中所选的许可证。

Editor

编辑器首选项设置影响的是宏编辑器的行为。此编辑器可通过Macro → Macros... → Edit/Create菜单打开。
请注意: 这里的颜色和字体设置也会影响到Python控制台。此控制台可通过View → Panels → Python console菜单打开。

The color and font settings also affect the Python console. This console is shown using the menu View → Panels → Python console.

Editor选项卡中,您可以指定以下内容:

名称 描述
Display Items 选择代码类型。此处的颜色与字体设置将应用于所选的代码类型。可以从Preview框中预览效果。
Family 指定应用于所选代码类型的字体系列(font family)。
Size 指定应用于所选代码类型的字体大小。
Enable line numbers 若开启此项,将显示代码行号。
Tab size 指定一个tab符占多少空格位置。若将此值设置为'6',则多次按下Tab键后,将根据当前光标位置,依次跳至其后的第7个字符、第13个字符或第19个字符等处。只有在选中Keep tabs后,本选项才可生效。
Indent size 指定在按下Tab键后将会插入多少个空格。只有在选中Insert spaces后,本选项才会生效。
Keep tabs 如果选择本项,则按下Tab键将插入占空为Tab size的tab符。
Insert spaces 如果选择本项,则按下Tab键将插入数量为Indent size的空格符。

Output window

The output preferences affect the behavior of the Report view.

In the Output tab you can specify the following:

Name Description
Record log messages If checked, also log messages will be recorded. They will be output in the Report view panel with the color set in Log messages. This panel is shown using the menu View → Panels → Report view.
Record warnings If checked, warnings will be recorded. They will be output in the Report view panel with the color set in Warnings.
Record error messages If checked, error messages will be recorded. They will be output in the Report view panel with the color set in Errors
Show report view on error or warning If checked, report view panel will show up automatically as soon as an error or warning is logged.
Normal messages Specification of the font color for normal messages in the Report view panel.
Log messages Specification of the font color for log messages in the Report view panel.
Warnings Specification of the font color for warning messages in the Report view panel.
Errors Specification of the font color for error messages in the Report view panel.
Redirect internal Python output to report view If checked, internal Python output will be redirected from the Python console to the Report view panel. The Python console is shown using the menu View → Panels → Python console
Redirect internal Python errors to report view If checked, internal Python error messages will be redirected from the Python console to the Report view panel.

Macro

These options control certain aspects of running macros.

In the Macro tab you can specify the following:

Name Description
Run macros in local environment If checked, variables defined by macros are created as local variables, otherwise as global Python variable
Macro path Specification of a path to macro files
Recording GUI commands If checked, recorded macros will also contain user interface commands
Record as comment If checked, recorded macros will also contain user interface commands but as comments. This is useful if you don't want to execute visible actions when running the macro but to see what could be done visibly.
Show script commands in python console If checked, the commands executed by the macro scripts are shown in the Python console. This console is shown using the menu View → Panels → Python console.

Units

This tab configures how Units are shown.

In the Units tab you can specify the following:

Name Description
User system Selection of a unit system that should be used for all parts of FreeCAD
Number of decimals The number of decimals that should be shown for numbers and dimensions in FreeCAD
Minimum fractional inch Minimum fractional inch that should be displayed. This setting is only available if the unit system Building US (ft-in/sqft/cuft) is used.

Display settings

This preferences section has two general tabs, 3D View and Colors, and further tabs depending in the used workbenches.

3D View

This tab is always available, and controls certain characteristics of the 3D view.

In the 3D View tab you can specify the following:

Name Description
Show coordinate system in the corner If checked, the main coordinate system will always be shown at the lower right in opened files
Show counter of frames per second If checked, the time needed for the last operation and the resulting frame rate will always be shown at the lower left in opened files
Show navigation cube If checked, the navigation cube will always be shown at the selected Corner in opened files
Use OpenGL Vertex Buffer Object If checked, Vertex Buffer Objects (VBO) will be used. A VBO is an OpenGL feature that provides methods for uploading vertex data (position, normal vector, color, etc.) to the graphics card. VBOs offer substantial performance gains because the data resides in the graphics memory rather than the system memory and so it can be rendered directly by GPU. For more background info see this webpage.
Render Cache introduced in version 0.19 "Render Cache" or "Render Acceleration" is explained in more detail in Link#render-caching. There are 3 options:
  • Auto (default), let Coin3D decide where to cache.
  • Distributed, manually turn on cache for all view provider root nodes.
  • Centralized, manually turn off cache in all nodes of all view providers, and only cache at the scene graph root node. This offers the fastest rendering speed, but slower response to any scene changes.
Enable animation If checked, rotations can be animated. If for example the 3D Navigation set CAD is used and the mouse is moved while the scroll wheel and the right mouse button is pressed, parts are rotated. If one keeps the mouse moving while releasing e.g. the right mouse button, the rotation will continue as animation. To end the animation left-click with the mouse.
3D Navigation Selection of a navigation settings set. To see what each set defines, select a set and press the button Mouse....
Orbit style Selection of the rotation orbit style. When viewing a part in the x-y plane an being in the rotation mode of the 3D navigation, the difference is: If Trackball is selected, moving the mouse horizontally will rotate the part around the y-axis, if Turntable is selected the part will be rotated around the z-axis.
Anti-Aliasing Selection if and what kind of multisample anti-aliasing is used
New Document Camera Orientation Selection of the camera orientation for new documents
New Document Scale Affects the initial "zoom level" of camera for new documents. The value you set is the diameter of a sphere that fits in 3D view. Default is 100 mm, convenient for objects like boxes for Arduino. It also sets initial size of origin features (base planes in a new PartDesign Body).
Zoom at cursor If checked, zoom operations will be performed at the position of the mouse pointer. Otherwise zoom operations will be performed at the center of the current view. The Zoom step defines how much will be zoomed. A zoom step of '1' means a factor of 7.5 for every zoom step.
Invert zoom If checked, the direction of zoom operations will be inverted.
Disable touchscreen tilt gesture If checked, the tilting gesture will be disabled for pinch-zooming (two-finger zooming). This only affects the 3D Navigation set Gesture.
Drag at cursor If checked, rotations in 3D will use the current cursor position as center for the rotation. Otherwise always the center of the screen will be used.
Marker size Selection of the size of vertices (points) in the Sketcher workbench. The clickable area of points can be additionally enlarged by increasing Pick radius (on Colors tab).
Eye to eye distance for stereo modes Specification of the eye-to-eye distance used for stereo projections. The specified value is a factor that will be multiplied with the bounding box size of the 3D object that is currently displayed.
Enable backlight color If checked, backlight is enabled with the defined color. Backlight is used for rendering back sides of faces (usually, you don't see them in solids, unless you slice one with a clipping plane, or if the faces aren't oriented correctly). It is only active for objects whose Lighting property (on View tab) is set to "One side". If disabled, back sides of faces of objects in "One side" lighting mode will be black.
Intensity of backlight Specification of the intensity of the backlight. This setting is only enabled if Enable backlight color is checked.
Camera type Selection of the camera projection type.

Colors

This tab is always available.

In the Colors tab you can specify the following:

Name Description
Enable preselection highlighting If checked, preselection is turned on and will be highlighted by the specified color. Preselection means that for example edges in parts will be highlighted while hovering with the mouse over them to indicate that they can be selected.
Enable selection highlighting If checked, selection highlighting is turned on and the specified color will be used for it
Pick radius Sets the area for picking elements in 3D view. Larger value makes it easier to pick things, but can make some small features impossible to select.
Simple color If selected, the background for parts will have the selected color
Color gradient If selected, the background for parts will have the selected color gradient
Middle color Is only enabled if Color gradient is selected. If checked, the color gradient will get the selected color as middle color.
Object being edited Selection of the background color for objects in the tree view that are currently edited
Active container Selection of the background color for active containers in the tree view. For example if there are several parts in the tree view and one part is toggled as active body, it will get the selected background color in the tree view.

Part colors

This tab is only shown if you are in the Part or PartDesign Workbench or if you have been in these workbenches before.

In the Part colors tab you can specify the following:

Name Description
Default shape color Selection of the default color for new shapes. If the option Random shape color is set, a random color is used instead.
Default line color Selection of the default line color for new shapes
Default line width Specification of the default line thickness for new shapes
Default vertex color Selection of the default color for new vertices
Default vertex size Specification of the default size for new vertices
Bounding box color Selection of the color of bounding boxes in the 3D view
Default text color Selection of the default text color for document annotations. There is currently no dialog to add annotations to documents. Annotations can only be added using the Python console with this command:

obj=App.ActiveDocument.addObject("App::Annotation", "Label")

This console is shown using the menu View → Panels → Python console.

Mesh view

This tab is only shown if you are in the Mesh Workbench or if you have been in this workbench before.

In the Mesh view tab you can specify the following:

Name Description
Default mesh color Selection of the default color for new meshes
Default line color Selection of the default line color for new meshes
Mesh transparency Specification of the default mesh transparency for new meshes
Line transparency Specification of the default line transparency for new meshes
Two-side rendering If checked, the bottom side of the surface will be rendered the same way than the top side. If not checked, it depends on the option Enable backlight color (see section 3D view). Either the backlight color will be used or black.
Show bounding-box for highlighted or selected meshes If checked, a yellow bounding box will be displayed for highlighted or selected meshes.
Define normal per vertex If checked, Phong shading is used, otherwise flat shading. Shading defines the appearance of surfaces.

With flat shading the surface normals are not defined per vertex that leads to a unreal appearance for curved surfaces while using Phong shading leads to a smoother appearance.

Crease angle The crease angle is a threshold angle between two faces. It can only be set if the option Define normal per vertex is used.
If face angle ≥ crease angle, facet shading is used
If face angle < crease angle, smooth shading is used

Import-Export Settings

The Import-Export settings affect how files are imported and exported to and from FreeCAD. They are described in the page Import Export Preference.

工作台首选项

下列为常用工作台的首选项。部分工作台并没有对应的首选项。其他可选工作台可能也未列入其中。


This section is incomplete and requires mentioning the preference pages of each core workbench

Preferences for the more common workbenches are linked below. Some workbenches have no preferences. Other optional workbenches may not be listed. These links are also listed in Category:Preferences

External workbenches

This section is incomplete and requires mentioning the preference pages of each External workbench