TechDraw SectionView: Difference between revisions

From FreeCAD Documentation
(clarification)
mNo edit summary
 
(66 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
<translate>
<translate>

<!--T:22-->
<!--T:22-->
{{Docnav
{{Docnav
|[[TechDraw_ProjectionGroup|Insert Projection Group]]
|[[TechDraw_ProjectionGroup|ProjectionGroup]]
|[[TechDraw_ComplexSection|ComplexSection]]
|[[TechDraw_DetailView|Insert Detail View]]
|[[TechDraw_Module|TechDraw]]
|[[TechDraw_Workbench|TechDraw]]
|IconL=TechDraw_ProjectionGroup.svg
|IconL=TechDraw_ProjectionGroup.svg
|IconR=TechDraw_ComplexSection.svg
|IconC=Workbench_TechDraw.svg
|IconC=Workbench_TechDraw.svg
|IconR=TechDraw_DetailView.svg
}}
}}


Line 14: Line 15:
{{GuiCommand
{{GuiCommand
|Name=TechDraw SectionView
|Name=TechDraw SectionView
|MenuLocation=TechDraw → Insert Section View
|MenuLocation=TechDraw → TechDraw Views → Insert Section View
|Workbenches=[[TechDraw Module|TechDraw]]
|Workbenches=[[TechDraw_Workbench|TechDraw]]
|SeeAlso=[[TechDraw_View|Insert View]], [[TechDraw_ProjectionGroup|Insert Projection Group]]
|SeeAlso=[[TechDraw_ComplexSection|TechDraw ComplexSection]], [[TechDraw_View|TechDraw View]], [[TechDraw_ProjectionGroup|TechDraw Projection Group]]
}}
}}


Line 22: Line 23:


<!--T:10-->
<!--T:10-->
The Section tool creates a cross section view based on an existing part view.
The '''TechDraw SectionView''' tool inserts a cross-section view based on an existing part view.


</translate>
</translate>
[[Image:TechDraw_Section_example.png|250px]]
[[Image:TechDraw_section_ANSI.png|350px]]<br>
[[Image:TechDraw_section_ISO.png|350px]]
<translate>
<translate>
<!--T:11-->
<!--T:11-->
{{Caption|Sectioning an already placed view, which shows the internal holes and a shaded cut surface}}
{{Caption|Sectioning an already placed view, which shows the internal holes and a hatched cut surface.<br>
The top image shows the ANSI arrow format.<br>
The bottom image shows the ISO arrow format.
}}


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


<!--T:12-->
<!--T:12-->
# Select a part view in the 3D window or tree.
# Select a part view in the [[3D_view|3D view]] or [[Tree_view|Tree view]].
# There are several ways to invoke the tool:
# If you have multiple drawing pages in your document, you will also need to select the desired page in the tree.
# Press the {{Button|[[Image:TechDraw SectionView.svg|16px]] [[TechDraw_SectionView|Insert Section View]]}} button
#* Press the {{Button|[[Image:TechDraw_SectionView.svg|16px]] [[TechDraw_SectionView|Insert Section View]]}} button.
#* Select the {{MenuCommand|TechDraw → TechDraw Views → [[Image:TechDraw_SectionView.svg|16px]] Insert Section View}} option from the menu.
# A dialog will open which will help calculate the various Section properties. The dialog calculates reasonable starting points for SectionNormal and view Direction, but these may be changed after creation for special needs.
# A task panel opens which will help calculate the various properties. Reasonable values for the view Direction are calculated, but these can be changed.
# If you make a mistake, or change your mind while setting up the Section parameters, press the {{Button|Reset}} button, and you can start over.


<!--T:13-->
<!--T:13-->
Line 43: Line 48:
{{Caption|Taskview to define the sectional cut of a view}}
{{Caption|Taskview to define the sectional cut of a view}}


==Properties== <!--T:5-->
== Properties Section View == <!--T:32-->

<!--T:33-->
See also [[TechDraw_View#Properties|TechDraw View]].


=== Data === <!--T:14-->
=== Data === <!--T:14-->


====Section==== <!--T:25-->
<!--T:39-->
{{TitleProperty|Cut Operation}}
* {{PropertyData|Base View}}: The view on which this section is based.
* {{PropertyData|Section Normal}}: A vector describing the direction normal to the cutting plane.
* {{PropertyData|Section Origin}}: A vector describing a point on the cutting plane. Typically the centroid of the original part.
* {{PropertyData|Fuse Before Cut}}: Fuse the source shapes before performing the section cut.


====Cut Surface Format==== <!--T:24-->
<!--T:40-->
* {{PropertyData|Cut Surface Display}}: Appearance of cut surface. Options:
* {{PropertyData|Fuse Before Cut|Bool}}: Fuse the source shapes before performing the section cut.
* {{PropertyData|Trim After Cut|Bool}}: Additionally trim the resulting shape after the section cut to remove any unwanted pieces.
** ''Hide'' Hides the cut surface, only the outline will be displayed.

** ''Color'': Colors the cut surface using the setting of '''Cut Surface Color''' in the [[TechDraw_Preferences|TechDraw preferences]].
<!--T:34-->
** ''SvgHatch'': Hatches the section cut using a [[TechDraw_Hatch|hatch]]
{{TitleProperty|Cut Surface Format}}
** ''PatHatch'': Hatches the section cut using a [[TechDraw_GeometricHatch|geometric hatch]]

* {{PropertyData|File Hatch Pattern}}: Full path to SVG hatch pattern file.
<!--T:24-->
* {{PropertyData|File Geom Pattern}}: Full path to PAT pattern file.
* {{PropertyData|Svg Included}}: Full path to the included SVG hatch pattern file.
* {{PropertyData|Cut Surface Display|Enumeration}}: Appearance of the cut surface. Options:
* {{PropertyData|Pat Included}}: Full path to the included PAT pattern file.
** {{Value|Hide}}: Hides the cut surface, only the outline will be displayed.
* {{PropertyData|Name Geom Pattern}}: Name of PAT pattern to use (ignored for the ''SvgHatch'' setting of '''Cut Surface Display''').
** {{Value|Color}}: Colors the cut surface using the setting of '''Cut Surface Color''' in the [[TechDraw_Preferences|TechDraw preferences]].
** {{Value|SvgHatch}}: Hatches the section cut using a [[TechDraw_Hatch|hatch]]
** {{Value|PatHatch}}: Hatches the section cut using a [[TechDraw_GeometricHatch|geometric hatch]]
* {{PropertyData|File Hatch Pattern|File}}: Full path to SVG hatch pattern file.
* {{PropertyData|File Geom Pattern|File}}: Full path to PAT pattern file.
* {{PropertyData|Svg Included|FileIncluded}}: Full path to the included SVG hatch pattern file.
* {{PropertyData|Pat Included|FileIncluded}}: Full path to the included PAT pattern file.
* {{PropertyData|Name Geom Pattern|String}}: Name of the PAT pattern to use.
* {{PropertyData|Hatch Scale|Float}}: Hatch pattern size adjustment.

<!--T:35-->
{{TitleProperty|Section}}

<!--T:25-->
* {{PropertyData|Section Symbol|String}}: The identifier for this section.
* {{PropertyData|Base View|Link}}: The view on which this section is based.
* {{PropertyData|Section Normal|Vector}}: A vector describing the direction normal to the cutting plane.
* {{PropertyData|Section Origin|Vector}}: A vector describing a point on the cutting plane. Typically the centroid of the original part.
* {{PropertyData|Section Direction|Enumeration}}: The direction in the Base View for this section. Options: {{Value|Aligned}}, {{Value|Right}}, {{Value|Left}}, {{Value|Up}} or {{Value|Down}}.


=== View === <!--T:15-->
=== View === <!--T:15-->


====Cut Surface==== <!--T:26-->
<!--T:36-->
{{TitleProperty|Cut Surface}}
* {{PropertyView|Cut Surface Color}}: Solid color for surface highlight. Used if '''Cut Surface Display''' is set to ''Color''.


====Surface Hatch==== <!--T:27-->
<!--T:26-->
* {{PropertyView|Hatch Color}}: Color for surface hatch lines.
* {{PropertyView|Cut Surface Color|Color}}: Solid color for surface highlight. Used if {{PropertyData|Cut Surface Display}} is set to {{Value|Color}}.
* {{PropertyView|Weight Pattern}}: Line weight for surface hatch lines.
* {{PropertyView|Show Cut Surface|Bool|Hidden}}: Show/hide the cut surface.


<!--T:37-->
===Base View===
{{TitleProperty|Surface Hatch}}


<!--T:27-->
A Section view inherits all applicable properties of the view specified as {{PropertyData|BaseView}}. In the properties of the view you can change the appearance of the section line:
* {{PropertyView|Geom Hatch Color|Color}}: The color of the Geometric hath pattern.
* {{PropertyView|Hatch Color|Color}}: The color of the Svg hatch pattern.
* {{PropertyView|Hatch Cut Surface|Bool|Hidden}}: Hatch the cut surface.
* {{PropertyView|Weight Pattern|Float}}: Line weight of the Geometric hatch pattern.


== Properties Base View == <!--T:38-->
* {{PropertyView|Section Line Color}}: Color for the section line.
* {{PropertyView|Section Line Style}}: Style for the section line.


<!--T:29-->
A Section view inherits all applicable properties of the view specified as {{PropertyData|Base View}}. In the properties of this view you can change the appearance of the section line:

<!--T:30-->
* {{PropertyView|Section Line Color}}: The section line color.
* {{PropertyView|Section Line Style}}: The section line style.

<!--T:31-->
The default settings for these parameters are set via the settings '''Section Line''' and '''Section Line Style''' in the [[TechDraw_Preferences|TechDraw preferences]].
The default settings for these parameters are set via the settings '''Section Line''' and '''Section Line Style''' in the [[TechDraw_Preferences|TechDraw preferences]].

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

<!--T:19-->
* '''Section Line Format''': two section line formats are supported (as depicted above) and controlled by the Preference setting "Section Line Standard" on the Annotation tab. The {{Value|ANSI}} option uses "pulling arrows" (known as the "traditional format" in some areas) and the {{Value|ISO}} option uses "pushing arrows" (also known as the "reference arrow format").
* '''Fuse Before Cut''': the section operation sometimes fails to cut the source shapes. If '''Fuse Before Cut''' is true, the source shapes are merged into a single shape before the section operation is attempted. If you encounter problems with the section operation, try flipping this value.
* '''Trim After Cut''': the section cut operation sometimes leaves behind a portion of the source shape. If '''Trim After Cut''' is true, an additional cut operation is performed on the result of the first cut which should remove any unwanted pieces.
* '''Cut Surface Display''': the cut surface can be hidden, painted in a solid color, hatched using an Svg pattern (default) or hatched using a PAT pattern. See [[TechDraw_Hatching|Hatching]].


==Scripting== <!--T:6-->
==Scripting== <!--T:6-->


<!--T:16-->
<!--T:16-->
{{Emphasis|See also:}} [[TechDraw API|TechDraw API]] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].
See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].


<!--T:17-->
<!--T:17-->
The New Section tool can be used in [[macros|macros]] and from the [[Python|Python]] console by using the following functions:
A SectionView can be created with [[Macros|macros]] and from the [[Python|Python]] console by using the following functions:


</translate>
</translate>
{{Code|code=
{{Code|code=
view = FreeCAD.ActiveDocument.addObject('TechDraw::DrawViewPart','View')
doc = FreeCAD.ActiveDocument
box = doc.Box
rc = page.addView(view)
page = doc.Page

view = doc.addObject("TechDraw::DrawViewPart", "View")
page.addView(view)
view.Source = box
view.Source = box
view.Direction = (0.0,0.0,1.0)
view.Direction = (0, 0, 1)


section = FreeCAD.ActiveDocument.addObject('TechDraw::DrawViewSection','Section')
section = doc.addObject("TechDraw::DrawViewSection", "Section")
rc = page.addView(section)
page.addView(section)
section.Source = box
section.Source = box
section.BaseView = view
section.BaseView = view
section.Direction = (0.0,1.0,0.0)
section.Direction = (0, 1, 0)
section.SectionNormal = (0.0,0.0,1.0)
section.SectionNormal = (-1, 0, 0)

section.SectionOrigin = (5.0,5.0,5.0)
doc.recompute()
}}
}}
<translate>
<translate>


== Notes == <!--T:18-->
==Examples== <!--T:41-->


<!--T:19-->
<!--T:42-->
For some more information about section views and some use cases, have a look at: [[TechDraw_Section_Examples|TechDraw section examples]].
* '''Section Line Format''': both the traditional section line format (as depicted above), and the "reference arrow method" are supported. This option is controlled by the Preference setting "Mod/TechDraw/Format/SectionFormat" (see [[Std_DlgParameter|Std_DlgParameter]]). 0 for traditional line, 1 for reference arrow method.
* '''CutSurfaceDisplay''': the cut surface can be hidden, painted in a solid color, hatched using an Svg pattern (default) or hatched using a PAT pattern. See [[TechDraw_Hatching|Hatching]].
* '''FuseBeforeCut''': the section operation sometimes fails to cut the source shapes. If FuseBeforeCut is true, the source shapes are merged into a single shape before the section operation is attempted. If you encounter problems with the section operation, try flipping this value.


</translate>
[[Image:TechDraw_ExampleSection-10.png|80px|link=]]
[[Image:TechDraw_ExampleSection-13.png|80px|link=]]
[[Image:TechDraw_ExampleSection-15.png|80px|link=]]
[[Image:TechDraw_ExampleSection-17.png|80px|link=]]
[[Image:TechDraw_ExampleSection-34.png|80px|link=]]
[[Image:TechDraw_ExampleSection-35.png|80px|link=]]
<translate>


<!--T:23-->
<!--T:23-->
{{Docnav
{{Docnav
|[[TechDraw_ProjectionGroup|Insert Projection Group]]
|[[TechDraw_ProjectionGroup|ProjectionGroup]]
|[[TechDraw_ComplexSection|ComplexSection]]
|[[TechDraw_DetailView|Insert Detail View]]
|[[TechDraw_Module|TechDraw]]
|[[TechDraw_Workbench|TechDraw]]
|IconL=TechDraw_ProjectionGroup.svg
|IconL=TechDraw_ProjectionGroup.svg
|IconR=TechDraw_ComplexSection.svg
|IconC=Workbench_TechDraw.svg
|IconC=Workbench_TechDraw.svg
|IconR=TechDraw_DetailView.svg
}}
}}


Line 129: Line 183:
{{TechDraw Tools navi{{#translation:}}}}
{{TechDraw Tools navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{clear}}

Latest revision as of 18:40, 24 July 2023

TechDraw SectionView

Menu location
TechDraw → TechDraw Views → Insert Section View
Workbenches
TechDraw
Default shortcut
None
Introduced in version
-
See also
TechDraw ComplexSection, TechDraw View, TechDraw Projection Group

Description

The TechDraw SectionView tool inserts a cross-section view based on an existing part view.


Sectioning an already placed view, which shows the internal holes and a hatched cut surface.
The top image shows the ANSI arrow format.
The bottom image shows the ISO arrow format.

Usage

  1. Select a part view in the 3D view or Tree view.
  2. There are several ways to invoke the tool:
    • Press the Insert Section View button.
    • Select the TechDraw → TechDraw Views → Insert Section View option from the menu.
  3. A task panel opens which will help calculate the various properties. Reasonable values for the view Direction are calculated, but these can be changed.

Taskview to define the sectional cut of a view

Properties Section View

See also TechDraw View.

Data

Cut Operation

  • DataFuse Before Cut (Bool): Fuse the source shapes before performing the section cut.
  • DataTrim After Cut (Bool): Additionally trim the resulting shape after the section cut to remove any unwanted pieces.

Cut Surface Format

  • DataCut Surface Display (Enumeration): Appearance of the cut surface. Options:
    • Hide: Hides the cut surface, only the outline will be displayed.
    • Color: Colors the cut surface using the setting of Cut Surface Color in the TechDraw preferences.
    • SvgHatch: Hatches the section cut using a hatch
    • PatHatch: Hatches the section cut using a geometric hatch
  • DataFile Hatch Pattern (File): Full path to SVG hatch pattern file.
  • DataFile Geom Pattern (File): Full path to PAT pattern file.
  • DataSvg Included (FileIncluded): Full path to the included SVG hatch pattern file.
  • DataPat Included (FileIncluded): Full path to the included PAT pattern file.
  • DataName Geom Pattern (String): Name of the PAT pattern to use.
  • DataHatch Scale (Float): Hatch pattern size adjustment.

Section

  • DataSection Symbol (String): The identifier for this section.
  • DataBase View (Link): The view on which this section is based.
  • DataSection Normal (Vector): A vector describing the direction normal to the cutting plane.
  • DataSection Origin (Vector): A vector describing a point on the cutting plane. Typically the centroid of the original part.
  • DataSection Direction (Enumeration): The direction in the Base View for this section. Options: Aligned, Right, Left, Up or Down.

View

Cut Surface

  • ViewCut Surface Color (Color): Solid color for surface highlight. Used if DataCut Surface Display is set to Color.
  • View (Hidden)Show Cut Surface (Bool): Show/hide the cut surface.

Surface Hatch

  • ViewGeom Hatch Color (Color): The color of the Geometric hath pattern.
  • ViewHatch Color (Color): The color of the Svg hatch pattern.
  • View (Hidden)Hatch Cut Surface (Bool): Hatch the cut surface.
  • ViewWeight Pattern (Float): Line weight of the Geometric hatch pattern.

Properties Base View

A Section view inherits all applicable properties of the view specified as DataBase View. In the properties of this view you can change the appearance of the section line:

  • ViewSection Line Color: The section line color.
  • ViewSection Line Style: The section line style.

The default settings for these parameters are set via the settings Section Line and Section Line Style in the TechDraw preferences.

Notes

  • Section Line Format: two section line formats are supported (as depicted above) and controlled by the Preference setting "Section Line Standard" on the Annotation tab. The ANSI option uses "pulling arrows" (known as the "traditional format" in some areas) and the ISO option uses "pushing arrows" (also known as the "reference arrow format").
  • Fuse Before Cut: the section operation sometimes fails to cut the source shapes. If Fuse Before Cut is true, the source shapes are merged into a single shape before the section operation is attempted. If you encounter problems with the section operation, try flipping this value.
  • Trim After Cut: the section cut operation sometimes leaves behind a portion of the source shape. If Trim After Cut is true, an additional cut operation is performed on the result of the first cut which should remove any unwanted pieces.
  • Cut Surface Display: the cut surface can be hidden, painted in a solid color, hatched using an Svg pattern (default) or hatched using a PAT pattern. See Hatching.

Scripting

See also: Autogenerated API documentation and FreeCAD Scripting Basics.

A SectionView can be created with macros and from the Python console by using the following functions:

doc = FreeCAD.ActiveDocument
box = doc.Box
page = doc.Page

view = doc.addObject("TechDraw::DrawViewPart", "View")
page.addView(view)
view.Source = box
view.Direction = (0, 0, 1)

section = doc.addObject("TechDraw::DrawViewSection", "Section")
page.addView(section)
section.Source = box
section.BaseView = view
section.Direction = (0, 1, 0)
section.SectionNormal = (-1, 0, 0)

doc.recompute()

Examples

For some more information about section views and some use cases, have a look at: TechDraw section examples.