Std DrawStyle: Difference between revisions

From FreeCAD Documentation
No edit summary
(Revised. 'In progress' for now.)
Line 1: Line 1:
<languages/>
<languages/>

{{Page in progress}}

<translate>
<translate>

<!--T:1-->
{{Docnav
|[[Std_FreezeViews|Std FreezeViews]]
|[[Std_SelBoundingBox|Std SelBoundingBox]]
|[[Std_View_Menu|Std View Menu]]
|IconL=
|IconR=Std_SelBoundingBox.svg
|IconC=Freecad.svg
}}

{{GuiCommand
{{GuiCommand
|Name=Std DrawStyle
|Name=Std DrawStyle
|MenuLocation={{StdMenu|[[Std View Menu|View]]}} → Draw style
|MenuLocation=View → Draw style → ...
|Workbenches=All
|Workbenches=All
|Shortcut={{KEY|V}} {{KEY|1}} - {{KEY|V}} {{KEY|7}}
|SeeAlso=[[Std_SelBoundingBox|SelBoundingBox]]
|SeeAlso=[[Std_SelBoundingBox|Std SelBoundingBox]]
}}
}}


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


The '''Std DrawStyle''' command can be used to override the effect of the Display Mode property of objects in a 3D view.
<!--T:3-->
All objects of the [[3D view|3D view]] are shown in different drawing styles, including solid lines, wireframe, and as points.


==Usage==
</translate>
[[File:FreeCAD_draw_styles.svg|800px]]
<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.}}


# There are several ways to change the draw style:
==Usage== <!--T:5-->
#* Click on the black down arrow to the right of the {{Button|[[Image:DrawStyleAsIs.svg|16px]] [[Std_DrawStyle|Std DrawStyle]]}} button and select a style from the flyout. The button image will change to reflect the active document’s draw style.
#* In the menu go to {{MenuCommand|View → Draw style}} and select a style.
#* In the [[3D_view|3D view]] context menu go to {{MenuCommand|Draw style}} and select a style.
#* Use one of the keyboard shortcut: {{KEY|V}} then {{KEY|1}}, {{KEY|2}}, {{KEY|3}}, {{KEY|4}}, {{KEY|5}}, {{KEY|6}} or {{KEY|7}}.


==Available styles==
<!--T:6-->
* Go to the menu {{MenuCommand|{{StdMenu|[[Std View Menu|View]]}} → Draw styles}}, and select an option.
** [[File:DrawStyleAsIs.svg|24px]] As is
** [[File:DrawStyleFlatLines.svg|24px]] Flat lines
** [[File:DrawStyleShaded.svg|24px]] Shaded
** [[File:DrawStyleWireFrame.svg|24px]] Wireframe
** [[File:DrawStylePoints.svg|24px]] Points
** [[File:DrawStyleWireFrame.svg|24px]] Hidden line
** [[File:DrawStyleWireFrame.svg|24px]] No shading


===[[Image:DrawStyleAsIs.svg|16px]] As is===
<!--T:7-->
* Or press the corresponding button in the view toolbar.


The "As is" style does not override the Display Mode of objects.
=== Notes === <!--T:8-->


===[[Image:DrawStylePoints.svg|16px]] Points===
<!--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 "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 {{PropertyView|Point 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.


The "Points" style overrides the Display Mode of objects. This style matches the Points Display Mode. Vertices are displayed in solid colors. Edges and faces are not displayed.
== Scripting == <!--T:10-->


===[[Image:DrawStyleWireFrame.svg|16px]] Wireframe===
<!--T:11-->
The draw style can be set from the [[Python console|Python console]].


The "Wireframe" style overrides the Display Mode of objects. This style matches the Wireframe Display Mode. Vertices and edges are displayed in solid colors. Faces are not displayed.
<!--T:12-->
The argument to the {{incode|"Std_DrawStyle"}} command determines the style.
* {{incode|0}}, As is
* {{incode|1}}, Flat lines
* {{incode|2}}, Shaded
* {{incode|3}}, Wireframe
* {{incode|4}}, Points
* {{incode|5}}, Hidden line
* {{incode|6}}, No shading


===[[Image:DrawStyleHiddenLine.svg|16px]] Hidden line===
</translate>
{{Code|code=
import FreeCADGui as Gui


The "Hidden line" style overrides the Display Mode of objects. Objects are displayed as if converted to triangular meshes.
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)
}}


===[[Image:DrawStyleNoShading.svg|16px]] No shading===


The "No shading" style overrides the Display Mode of objects. Vertices, edges and faces are displayed in solid colors.
{{Std Base{{#translation:}}}}

===[[Image:DrawStyleShaded.svg|16px]] Shaded===

The "Shaded” style overrides the Display Mode of objects. This style matches the Shaded Display Mode. Vertices and edges are not displayed. Faces are illuminated depending on their orientation.

===[[Image:DrawStyleFlatLines.svg|16px]] Flat lines===

The "Flat lines” style overrides the Display Mode of objects. This style matches the Flat lines Display Mode. Vertices and edges are displayed in solid colors. Faces are illuminated depending on their orientation.

==Notes==

* Todo.

==Preferences==

* Todo.

==Properties==

* Todo.

==Scripting==

* Todo.

{{Docnav
|[[Std_FreezeViews|Std FreezeViews]]
|[[Std_SelBoundingBox|Std SelBoundingBox]]
|[[Std_View_Menu|Std View Menu]]
|IconL=
|IconR=Std_SelBoundingBox.svg
|IconC=Freecad.svg
}}

</translate>
{{Std Base navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{clear}}
{{clear}}

[[Category:Sandbox]]

Revision as of 14:52, 31 March 2020

This documentation is a work in progress. Please don't mark it as translatable since it will change in the next hours and days.


Std DrawStyle

Menu location
View → Draw style → ...
Workbenches
All
Default shortcut
V 1 - V 7
Introduced in version
-
See also
Std SelBoundingBox

Description

The Std DrawStyle command can be used to override the effect of the Display Mode property of objects in a 3D view.

Usage

  1. There are several ways to change the draw style:
    • Click on the black down arrow to the right of the Std DrawStyle button and select a style from the flyout. The button image will change to reflect the active document’s draw style.
    • In the menu go to View → Draw style and select a style.
    • In the 3D view context menu go to Draw style and select a style.
    • Use one of the keyboard shortcut: V then 1, 2, 3, 4, 5, 6 or 7.

Available styles

As is

The "As is" style does not override the Display Mode of objects.

Points

The "Points" style overrides the Display Mode of objects. This style matches the Points Display Mode. Vertices are displayed in solid colors. Edges and faces are not displayed.

Wireframe

The "Wireframe" style overrides the Display Mode of objects. This style matches the Wireframe Display Mode. Vertices and edges are displayed in solid colors. Faces are not displayed.

Hidden line

The "Hidden line" style overrides the Display Mode of objects. Objects are displayed as if converted to triangular meshes.

No shading

The "No shading" style overrides the Display Mode of objects. Vertices, edges and faces are displayed in solid colors.

Shaded

The "Shaded” style overrides the Display Mode of objects. This style matches the Shaded Display Mode. Vertices and edges are not displayed. Faces are illuminated depending on their orientation.

Flat lines

The "Flat lines” style overrides the Display Mode of objects. This style matches the Flat lines Display Mode. Vertices and edges are displayed in solid colors. Faces are illuminated depending on their orientation.

Notes

  • Todo.

Preferences

  • Todo.

Properties

  • Todo.

Scripting

  • Todo.