TechDraw SectionView: Difference between revisions

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

<!--T:22-->
<!--T:22-->
{{Docnav
{{Docnav
|[[TechDraw_ProjectionGroup|ProjectionGroup]]
|[[TechDraw_ProjectionGroup|ProjectionGroup]]
|[[TechDraw_ComplexSection|ComplexSection]]
|[[TechDraw_DetailView|DetailView]]
|[[TechDraw_Workbench|TechDraw]]
|[[TechDraw_Workbench|TechDraw]]
|IconL=TechDraw_ProjectionGroup.svg
|IconL=TechDraw_ProjectionGroup.svg
|IconR=TechDraw_DetailView.svg
|IconR=TechDraw_ComplexSection.svg
|IconC=Workbench_TechDraw.svg
|IconC=Workbench_TechDraw.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_Workbench|TechDraw]]
|Workbenches=[[TechDraw_Workbench|TechDraw]]
|SeeAlso=[[TechDraw_View|TechDraw View]], [[TechDraw_ProjectionGroup|TechDraw 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:
# 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.
# 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.
#* Select the {{MenuCommand|TechDraw → TechDraw Views → [[Image:TechDraw_SectionView.svg|16px]] Insert Section View}} option from the menu.
# 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.
# A task panel opens which will help calculate the various properties. Reasonable values for the view Direction are calculated, but these can be changed.


<!--T:13-->
<!--T:13-->
Line 42: 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]].
See also [[TechDraw_View#Properties|TechDraw View]].


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


<!--T:39-->
{{TitleProperty|Cut Operation}}

<!--T:40-->
* {{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.

<!--T:34-->
{{TitleProperty|Cut Surface Format}}
{{TitleProperty|Cut Surface Format}}


Line 63: Line 78:
* {{PropertyData|Hatch Scale|Float}}: Hatch pattern size adjustment.
* {{PropertyData|Hatch Scale|Float}}: Hatch pattern size adjustment.


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


Line 69: Line 85:
* {{PropertyData|Base View|Link}}: The view on which this section is based.
* {{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 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 Origin|Vector}}: A vector describing a point on the cutting plane. Typically the centroid of the original part.
* {{PropertyData|Section Direction|Vector}}: The direction in the Base View for this section.
* {{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}}.
* {{PropertyData|Fuse Before Cut|Bool}}: Fuse the source shapes before performing the section cut.


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


<!--T:36-->
{{TitleProperty|Cut Surface}}
{{TitleProperty|Cut Surface}}


Line 81: Line 97:
* {{PropertyView|Show Cut Surface|Bool|Hidden}}: Show/hide the cut surface.
* {{PropertyView|Show Cut Surface|Bool|Hidden}}: Show/hide the cut surface.


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


<!--T:27-->
<!--T:27-->
* {{PropertyView|Geom Hatch Color|Color}}. The color of the Geometric hath pattern.
* {{PropertyView|Geom Hatch Color|Color}}: The color of the Geometric hath pattern.
* {{PropertyView|Hatch Color|Color}}: The color of the Svg hath pattern.
* {{PropertyView|Hatch Color|Color}}: The color of the Svg hatch pattern.
* {{PropertyView|Hatch Cut Surface|Bool|Hidden}}: Hatch the cut surface.
* {{PropertyView|Hatch Cut Surface|Bool|Hidden}}: Hatch the cut surface.
* {{PropertyView|Weight Pattern|Float}}: Line weight of the Geometric hatch pattern.
* {{PropertyView|Weight Pattern|Float}}: Line weight of the Geometric hatch pattern.


== Properties Base View ==
== Properties Base View == <!--T:38-->


<!--T:29-->
<!--T:29-->
Line 104: Line 121:


<!--T:19-->
<!--T:19-->
* '''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.
* '''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.
* '''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.
* '''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>


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

<!--T:42-->
For some more information about section views and some use cases, have a look at: [[TechDraw_Section_Examples|TechDraw section examples]].

</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|ProjectionGroup]]
|[[TechDraw_ProjectionGroup|ProjectionGroup]]
|[[TechDraw_ComplexSection|ComplexSection]]
|[[TechDraw_DetailView|DetailView]]
|[[TechDraw_Workbench|TechDraw]]
|[[TechDraw_Workbench|TechDraw]]
|IconL=TechDraw_ProjectionGroup.svg
|IconL=TechDraw_ProjectionGroup.svg
|IconR=TechDraw_DetailView.svg
|IconR=TechDraw_ComplexSection.svg
|IconC=Workbench_TechDraw.svg
|IconC=Workbench_TechDraw.svg
}}
}}
Line 147: 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.