Std DrawStyle: Difference between revisions

From FreeCAD Documentation
No edit summary
No edit summary
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
<languages/>
<languages/>

{{Page in progress}}

<translate>
<translate>

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

<!--T:1-->
<!--T:1-->
{{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]]
}}
}}


Line 12: Line 26:


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

==Usage== <!--T:5-->

<!--T:6-->
# There are several ways to invoke the command:
#* 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. Note: 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 draw styles==

===[[Image:DrawStyleAsIs.svg|16px]] As is===

The '''As is''' style does not override the {{PropertyView|Display Mode}} of objects.


</translate>
</translate>
[[Image:Std_DrawStyleAsIs_example.png]]
[[File:FreeCAD_draw_styles.svg|800px]]
<translate>
<translate>
{{Caption|4 identical objects each with a different Display Mode (from left to right: {{incode|Points}}, {{incode|Wireframe}}, {{incode|Shaded}} and {{incode|Flat lines}}) with the {{incode|As is}} draw style applied}}
<!--T:4-->
{{Caption|Different drawing styles: (0) as is, (1) flat lines, (2) shaded, (3) wireframe, (4) points, (5) hidden line, (6) no shading.}}


===[[Image:DrawStylePoints.svg|16px]] Points===
==Usage== <!--T:5-->


The '''Points''' style overrides the {{PropertyView|Display Mode}} of objects. This style matches the {{incode|Points}} Display Mode. Vertices are displayed in solid colors. Edges and faces are not displayed.
<!--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


</translate>
<!--T:7-->
[[Image:Std_DrawStylePoints_example.png]]
* Or press the corresponding button in the view toolbar.
<translate>
{{Caption|The same objects with the {{incode|Points}} draw style applied}}


===[[Image:DrawStyleWireFrame.svg|16px]] Wireframe===
=== Notes === <!--T:8-->


The '''Wireframe''' style overrides the {{PropertyView|Display Mode}} of objects. This style matches the {{incode|Wireframe}} Display Mode. Vertices and edges are displayed in solid colors. Faces are not displayed.
<!--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.


</translate>
== Scripting == <!--T:10-->
[[Image:Std_DrawStyleWireframe_example.png]]
<translate>
{{Caption|The same objects with the {{incode|Wireframe}} draw style applied}}


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


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


</translate>
</translate>
[[Image:Std_DrawStyleHiddenLine_example.png]]
{{Code|code=
<translate>
import FreeCADGui as Gui
{{Caption|The same objects with the {{incode|Hidden line}} draw style applied}}


===[[Image:DrawStyleNoShading.svg|16px]] No shading===
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)
}}


The '''No shading''' style overrides the {{PropertyView|Display Mode}} of objects. Vertices, edges and faces are displayed in solid colors.


</translate>
{{Std Base{{#translation:}}}}
[[Image:Std_DrawStyleNoShading_example.png]]
<translate>
{{Caption|The same objects with the {{incode|No shading}} draw style applied}}

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

The '''Shaded''' style overrides the {{PropertyView|Display Mode}} of objects. This style matches the {{incode|Shaded}} Display Mode. Vertices and edges are not displayed. Faces are illuminated depending on their orientation.

</translate>
[[Image:Std_DrawStyleShaded_example.png]]
<translate>
{{Caption|The same objects with the {{incode|Shaded}} draw style applied}}

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

The '''Flat lines''' style overrides the {{PropertyView|Display Mode}} of objects. This style matches the {{incode|Flat lines}} Display Mode. Vertices and edges are displayed in solid colors. Faces are illuminated depending on their orientation.

</translate>
[[Image:Std_DrawStyleFlatLines_example.png]]
<translate>
{{Caption|The same objects with the {{incode|Flat lines}} draw style applied}}

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

<!--T:9-->
* Objects in the [[3D_view|3D view]] also have a {{PropertyView|Draw Style}} property. This property controls the linetype used for the edges. The Std DrawStyle command does not override this property.
* For a macro to toggle between two draw styles see: [[Macro_Toggle_Drawstyle|Macro Toggle Drawstyle]].

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

Revision as of 19:05, 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 override the effect of the ViewDisplay Mode property of objects in a 3D view.

Usage

  1. There are several ways to invoke the command:
    • Click on the black down arrow to the right of the Std DrawStyle button and select a style from the flyout. Note: 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 draw styles

As is

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

4 identical objects each with a different Display Mode (from left to right: Points, Wireframe, Shaded and Flat lines) with the As is draw style applied

Points

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

The same objects with the Points draw style applied

Wireframe

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

The same objects with the Wireframe draw style applied

Hidden line

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

The same objects with the Hidden line draw style applied

No shading

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

The same objects with the No shading draw style applied

Shaded

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

The same objects with the Shaded draw style applied

Flat lines

The Flat lines style overrides the ViewDisplay 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.

The same objects with the Flat lines draw style applied

Notes

  • Objects in the 3D view also have a ViewDraw Style property. This property controls the linetype used for the edges. The Std DrawStyle command does not override this property.
  • For a macro to toggle between two draw styles see: Macro Toggle Drawstyle.