Std DrawStyle: Difference between revisions

From FreeCAD Documentation
(→‎How to use: Or press the corresponding button in the view toolbar. Notes describing how each style behaves)
m (Add {{StdMenu}})
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
<translate>
<translate>
<!--T:1-->
{{GuiCommand
{{GuiCommand
|Name=Std DrawStyle
|Name=Std DrawStyle
|MenuLocation=[[Std View Menu|View]] → Draw style
|MenuLocation={{StdMenu|[[Std View Menu|View]]}} → Draw style
|Workbenches=All
|Workbenches=All
|SeeAlso=[[Std_SelBoundingBox|SelBoundingBox]]
|SeeAlso=[[Std_SelBoundingBox|SelBoundingBox]]
}}
}}


==Description==
==Description== <!--T:2-->


<!--T:3-->
All objects of the [[3D view|3D view]] are shown in different drawing styles, including solid lines, wireframe, and as points.
All objects of the [[3D view|3D view]] are shown in different drawing styles, including solid lines, wireframe, and as points.


</translate>
</translate>
[[File:FreeCAD_draw_styles.png]]
[[File:FreeCAD_draw_styles.svg|800px]]
<translate>
<translate>
<!--T:4-->
{{Caption|Different drawing styles: (0) as is, (1) flat lines, (2) shaded, (3) wireframe, (4) points, (5) hidden line, (6) no shading.}}
{{Caption|Different drawing styles: (0) as is, (1) flat lines, (2) shaded, (3) wireframe, (4) points, (5) hidden line, (6) no shading.}}


==Usage== <!--T:5-->
==How to use==


<!--T:6-->
* Go to the menu {{MenuCommand|View → Draw styles}}, and select an option.
* Go to the menu {{MenuCommand|{{StdMenu|[[Std View Menu|View]]}} → Draw styles}}, and select an option.
** [[File:DrawStyleAsIs.svg|24px]] As is
** [[File:DrawStyleAsIs.svg|24px]] As is
** [[File:DrawStyleFlatLines.svg|24px]] Flat lines
** [[File:DrawStyleFlatLines.svg|24px]] Flat lines
Line 28: Line 32:
** [[File:DrawStyleWireFrame.svg|24px]] No shading
** [[File:DrawStyleWireFrame.svg|24px]] No shading


<!--T:7-->
* Or press the corresponding button in the view toolbar.
* Or press the corresponding button in the view toolbar.


=== Notes ===
=== Notes === <!--T:8-->


<!--T:9-->
* 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 "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 "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.
Line 39: Line 45:
* The "No shading" style gives a solid color to the edges, and all faces are equally illuminated regardless of the orientation of the view.
* 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 ==
== Scripting == <!--T:10-->


<!--T:11-->
The draw style can be set from the [[Python console|Python console]].
The draw style can be set from the [[Python console|Python console]].


<!--T:12-->
The argument to the {{incode|"Std_DrawStyle"}} command determines the style.
The argument to the {{incode|"Std_DrawStyle"}} command determines the style.
* {{incode|0}}, As is
* {{incode|0}}, As is
Line 66: Line 74:
<translate>
<translate>


<!--T:13-->
{{Std Base}}
{{Std Base navi}}
{{Userdocnavi}}
{{Userdocnavi}}
</translate>
</translate>

Revision as of 03:36, 19 February 2020

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)