Std DrawStyle

From FreeCAD Documentation
Revision as of 03:36, 19 February 2020 by Kunda1 (talk | contribs) (Add {{StdMenu}})

Std DrawStyle

Menu location
View → Draw style
Workbenches
All
Default shortcut
None
Introduced in version
-
See also
SelBoundingBox

Description

All objects of the 3D view are shown in different drawing styles, including solid lines, wireframe, and as points.

File:FreeCAD draw styles.svg

Different drawing styles: (0) as is, (1) flat lines, (2) shaded, (3) wireframe, (4) points, (5) hidden line, (6) no shading.

Usage

  • Go to the menu View → Draw styles, and select an option.
    • As is
    • Flat lines
    • Shaded
    • Wireframe
    • Points
    • Hidden line
    • No shading
  • Or press the corresponding button in the view toolbar.

Notes

  • The "Flat lines" style gives a solid color to the edges, and the faces are differently illuminated depending on the orientation of the view.
  • The "Shaded" style removes the color of the edges. This style is better when displaying objects that have many different faces with normals that are in different directions, particularly directions distinct to the X, Y, and Z axes.
  • The "Wireframe" style removes the color of the faces, leaving only the edges and vertices. This results in a see-through mode, so it is possible to see objects that are completely or partially hidden by other objects.
  • The "Points" style only shows the vertices where two edges connect. For solids that are made of relatively simple shapes, only a few vertices will be seen. This style is better when displaying meshes, as in this case typically there will be a lot of vertices. To improve visibility, with this style it could be helpful to increase the value of ViewPoint Size.
  • The "Hidden line" style shows the triangular faces and their edges as if the objects were converted to triangular meshes.
  • The "No shading" style gives a solid color to the edges, and all faces are equally illuminated regardless of the orientation of the view.

Scripting

The draw style can be set from the Python console.

The argument to the "Std_DrawStyle" command determines the style.

  • 0, As is
  • 1, Flat lines
  • 2, Shaded
  • 3, Wireframe
  • 4, Points
  • 5, Hidden line
  • 6, No shading
import FreeCADGui as Gui

Gui.runCommand('Std_DrawStyle', 0)
Gui.runCommand('Std_DrawStyle', 1)
Gui.runCommand('Std_DrawStyle', 2)
Gui.runCommand('Std_DrawStyle', 3)
Gui.runCommand('Std_DrawStyle', 4)
Gui.runCommand('Std_DrawStyle', 5)
Gui.runCommand('Std_DrawStyle', 6)