Draft Shape2DView: Difference between revisions
(Marked this version for translation) |
mNo edit summary |
||
(25 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{Page_in_progress}} |
|||
<languages/> |
<languages/> |
||
<translate> |
<translate> |
||
Line 6: | Line 5: | ||
{{Docnav |
{{Docnav |
||
|[[Draft_FlipDimension|FlipDimension]] |
|[[Draft_FlipDimension|FlipDimension]] |
||
|[[Draft_SelectPlane|SelectPlane]] |
|||
|[[Draft_Layer|Layer]] |
|||
|[[ |
|[[Draft_Workbench|Draft]] |
||
|IconL=Draft_FlipDimension.svg |
|IconL=Draft_FlipDimension.svg |
||
|IconR= |
|IconR=Draft_SelectPlane.svg |
||
|IconC=Workbench_Draft.svg |
|IconC=Workbench_Draft.svg |
||
}} |
}} |
||
Line 17: | Line 16: | ||
|Name=Draft Shape2DView |
|Name=Draft Shape2DView |
||
|MenuLocation=Modification → Shape 2D view |
|MenuLocation=Modification → Shape 2D view |
||
|Workbenches=[[ |
|Workbenches=[[Draft_Workbench|Draft]], [[Arch_Workbench|Arch]] |
||
|SeeAlso=[[TechDraw_ProjectShape|TechDraw ProjectShape]] |
|||
}} |
}} |
||
Line 23: | Line 23: | ||
<!--T:3--> |
<!--T:3--> |
||
The [[Image:Draft_Shape2DView.svg|24px]] '''Draft Shape2DView''' command creates 2D projections from selected objects, usually 3D solids or [[Arch_SectionPlane|Arch SectionPlanes]]. The projections are placed in the [[3D_view|3D view]]. |
|||
The {{Button|[[Image:Draft Shape2DView.svg|16px]] [[Draft_Shape2DView|Draft Shape2DView]]}} tool produces a 2D projection from a selected 3D solid object such as those created with the {{KEY|[[Image:Workbench_Part.svg|16px]] [[Part_Workbench|Part]]}}, {{KEY|[[Image:Workbench_PartDesign.svg|16px]][[PartDesign_Workbench|PartDesign]]}}, and {{KEY|[[Image:Workbench_Arch.svg|16px]] [[Arch_Workbench|Arch]]}} Workbenches. |
|||
<!--T:14--> |
<!--T:14--> |
||
Draft Shape2DView projections can be displayed on a [[TechDraw_Workbench|TechDraw Workbench]] page using the [[TechDraw_DraftView|TechDraw DraftView]] command. Alternatively the [[TechDraw_Workbench|TechDraw Workbench]] offer its own projection commands. But these create projections that are only displayed on the drawing page and not in the [[3D_view|3D view]]. |
|||
</translate> |
</translate> |
||
Line 32: | Line 32: | ||
<translate> |
<translate> |
||
<!--T:15--> |
<!--T:15--> |
||
{{Caption|Projection of solid shapes |
{{Caption|Projection of solid shapes onto the XY plane}} |
||
==Usage== <!--T:4--> |
==Usage== <!--T:4--> |
||
<!--T:5--> |
<!--T:5--> |
||
# |
# Optionally rotate the [[3D_view|3D view]]. The camera direction in the [[3D_view|3D view]] determines the projection vector. For example, a [[Std_ViewTop|top view]] will project onto the XY plane. The projection vector is ignored for projections created from [[Arch_SectionPlane|Arch SectionPlanes]]. |
||
# Optionally select one or more objects. |
|||
# Select a 3D object. |
|||
# There are several ways to invoke the command: |
|||
# Press the {{Button|[[Image: |
#* Press the {{Button|[[Image:Draft_Shape2DView.svg|16px]] [[Draft_Shape2DView|Shape 2D view]]}} button. |
||
#* Select the {{MenuCommand|Modification → [[Image:Draft_Shape2DView.svg|16px]] Shape 2D view}} option from the menu. |
|||
# If you have not yet selected an object: select an object in the [[3D_view|3D view]]. |
|||
# The projected objects are created on the XY plane. |
|||
⚫ | |||
<!--T:16--> |
|||
The projected object will be created below the selected object, lying on the XY plane. It's position can be changed by changing its properties. The projection direction can also be changed after creation with the [[Property_editor|property editor]]. |
|||
<!--T: |
<!--T:32--> |
||
⚫ | |||
'''Note:''' If the selected object is an {{Button|[[Image:Arch SectionPlane.svg|16px]] [[Arch_SectionPlane|Arch SectionPlane]]}}, the projection will use the contents and direction of that Section plane; in this case, the "Projection" property will be ignored. |
|||
<!--T:33--> |
|||
⚫ | Drawings with different linewidths for viewed and cut lines can easily be produced by using two shape2Dview objects from a same [[Arch_SectionPlane|Arch SectionPlane]]. One of the shape2Dview objects has its projection mode set to '''Solid''', which renders the viewed lines, and another set to '''Cut lines''' or '''Cut faces''' to render the cut lines. The two shape2Dviews are then placed at the same location, one on top of the other. |
||
<!--T:7--> |
|||
There are no options for this tool. Either it works with the selected object or not. |
|||
==Properties== <!--T:8--> |
==Properties== <!--T:8--> |
||
<!--T:24--> |
<!--T:24--> |
||
See also: [[ |
See also: [[Property_editor|Property editor]]. |
||
<!--T:25--> |
<!--T:25--> |
||
A Draft Shape2DView object is derived from a [[Part_Part2DObject|Part Part2DObject]] and inherits all its properties. It also has the following additional properties: |
A Draft Shape2DView object is derived from a [[Part_Part2DObject|Part Part2DObject]] and inherits all its properties. It also has the following additional properties: |
||
=== |
===Data=== <!--T:26--> |
||
<!--T:27--> |
<!--T:27--> |
||
Line 66: | Line 67: | ||
<!--T:9--> |
<!--T:9--> |
||
* {{PropertyData|Auto Update|Bool}}: specifies if the projection should be automatically recomputed if the {{PropertyData|Base}} object changes. Selecting {{False}} can be useful if there are many Draft Shape2DViews in a document or if they are complex. If set to {{False}} the [[Std_Refresh|Std Refresh]] command must be used to update the projection. {{Version|0.20}} |
|||
* {{PropertyData|Base|Link}}: specifies the object to be projected. |
* {{PropertyData|Base|Link}}: specifies the object to be projected. |
||
* {{PropertyData|Clip|Bool}}: if this is True, the contents are clipped to the borders of the section plane, if applicable. This overrides the base object's Clip property. |
|||
* {{PropertyData|Face Numbers|IntegerList}}: specifies the indices of the faces to be projected. Only works if {{PropertyData|Projection Mode}} is {{Value|Individual Faces}}. |
* {{PropertyData|Face Numbers|IntegerList}}: specifies the indices of the faces to be projected. Only works if {{PropertyData|Projection Mode}} is {{Value|Individual Faces}}. |
||
* {{PropertyData|Fuse Arch|Bool}}: specifies if [[Arch Workbench|Arch objects]] of the same type and material are fused or not. |
* {{PropertyData|Fuse Arch|Bool}}: specifies if [[Arch Workbench|Arch objects]] of the same type and material are fused or not. |
||
* {{PropertyData|Hidden Lines|Bool}}: specifies if hidden lines are shown or not. |
* {{PropertyData|Hidden Lines|Bool}}: specifies if hidden lines are shown or not. |
||
* {{PropertyData|In Place|Bool}}: only works if the selected object is an [[Arch_SectionPlane|Arch SectionPlane]], and {{PropertyData|Projection Mode}} is {{Value|Cutlines}} or {{Value|Cutfaces}}, specifies if the projection will appear co-planar with the section plane. |
* {{PropertyData|In Place|Bool}}: only works if the selected object is an [[Arch_SectionPlane|Arch SectionPlane]], and {{PropertyData|Projection Mode}} is {{Value|Cutlines}} or {{Value|Cutfaces}}, specifies if the projection will appear co-planar with the section plane. |
||
* {{PropertyData|Projection|Vector}}: specifies the direction of the projection. |
* {{PropertyData|Projection|Vector}}: specifies the direction of the projection. Ignored if {{PropertyData|Base}} is an [[Arch_SectionPlane|Arch SectionPlane]]. |
||
* {{PropertyData|Projection Mode|Enumeration}}: specifies the projection mode. The following modes are available: |
* {{PropertyData|Projection Mode|Enumeration}}: specifies the projection mode. The following modes are available: |
||
** {{Value|Solid}}: projects the entire selected object. |
** {{Value|Solid}}: projects the entire selected object. |
||
Line 82: | Line 85: | ||
* {{PropertyData|Visible Only|Bool}}: specifies if the projection should only be recomputed if it is visible. |
* {{PropertyData|Visible Only|Bool}}: specifies if the projection should only be recomputed if it is visible. |
||
* {{PropertyData|Exclusion Points|Vector list}}: A list of exclusion points. Any edge passing through any of those points will not be drawn. {{Version|0.20}} |
* {{PropertyData|Exclusion Points|Vector list}}: A list of exclusion points. Any edge passing through any of those points will not be drawn. {{Version|0.20}} |
||
* {{PropertyData|Exclusion Names|String list}}: A list of object names. Any viewed or cut child object with a name in that list will not be drawn. {{Version|0.21}} |
|||
===View=== <!--T:28--> |
===View=== <!--T:28--> |
||
Line 91: | Line 95: | ||
* {{PropertyView|Pattern|Enumeration}}: not used. |
* {{PropertyView|Pattern|Enumeration}}: not used. |
||
* {{PropertyView|Pattern Size|Float}}: not used. |
* {{PropertyView|Pattern Size|Float}}: not used. |
||
⚫ | |||
<!--T:32--> |
|||
⚫ | |||
<!--T:33--> |
|||
⚫ | Drawings with different linewidths for viewed and cut lines can easily be produced by using two shape2Dview objects from a same [[Arch SectionPlane]]. One of the shape2Dview objects has its projection mode set to '''Solid''', which renders the viewed lines, and another set to '''Cut lines''' or '''Cut faces''' to render the cut lines. The two shape2Dviews are then placed at the same location, one on top of the other. |
||
==Scripting== <!--T:23--> |
==Scripting== <!--T:23--> |
||
<!--T:10--> |
<!--T:10--> |
||
See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation] and [[ |
See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]]. |
||
<!--T:11--> |
<!--T:11--> |
||
Line 153: | Line 149: | ||
{{Docnav |
{{Docnav |
||
|[[Draft_FlipDimension|FlipDimension]] |
|[[Draft_FlipDimension|FlipDimension]] |
||
|[[Draft_SelectPlane|SelectPlane]] |
|||
|[[Draft_Layer|Layer]] |
|||
|[[ |
|[[Draft_Workbench|Draft]] |
||
|IconL=Draft_FlipDimension.svg |
|IconL=Draft_FlipDimension.svg |
||
|IconR= |
|IconR=Draft_SelectPlane.svg |
||
|IconC=Workbench_Draft.svg |
|IconC=Workbench_Draft.svg |
||
}} |
}} |
Latest revision as of 09:32, 12 May 2024
Draft Shape2DView |
Menu location |
---|
Modification → Shape 2D view |
Workbenches |
Draft, Arch |
Default shortcut |
None |
Introduced in version |
- |
See also |
TechDraw ProjectShape |
Description
The Draft Shape2DView command creates 2D projections from selected objects, usually 3D solids or Arch SectionPlanes. The projections are placed in the 3D view.
Draft Shape2DView projections can be displayed on a TechDraw Workbench page using the TechDraw DraftView command. Alternatively the TechDraw Workbench offer its own projection commands. But these create projections that are only displayed on the drawing page and not in the 3D view.
Projection of solid shapes onto the XY plane
Usage
- Optionally rotate the 3D view. The camera direction in the 3D view determines the projection vector. For example, a top view will project onto the XY plane. The projection vector is ignored for projections created from Arch SectionPlanes.
- Optionally select one or more objects.
- There are several ways to invoke the command:
- Press the Shape 2D view button.
- Select the Modification → Shape 2D view option from the menu.
- If you have not yet selected an object: select an object in the 3D view.
- The projected objects are created on the XY plane.
How to produce plans and sections with different linewidths
Drawings with different linewidths for viewed and cut lines can easily be produced by using two shape2Dview objects from a same Arch SectionPlane. One of the shape2Dview objects has its projection mode set to Solid, which renders the viewed lines, and another set to Cut lines or Cut faces to render the cut lines. The two shape2Dviews are then placed at the same location, one on top of the other.
Properties
See also: Property editor.
A Draft Shape2DView object is derived from a Part Part2DObject and inherits all its properties. It also has the following additional properties:
Data
Draft
- DataAuto Update (
Bool
): specifies if the projection should be automatically recomputed if the DataBase object changes. Selectingfalse
can be useful if there are many Draft Shape2DViews in a document or if they are complex. If set tofalse
the Std Refresh command must be used to update the projection. introduced in version 0.20 - DataBase (
Link
): specifies the object to be projected. - DataClip (
Bool
): if this is True, the contents are clipped to the borders of the section plane, if applicable. This overrides the base object's Clip property. - DataFace Numbers (
IntegerList
): specifies the indices of the faces to be projected. Only works if DataProjection Mode isIndividual Faces
. - DataFuse Arch (
Bool
): specifies if Arch objects of the same type and material are fused or not. - DataHidden Lines (
Bool
): specifies if hidden lines are shown or not. - DataIn Place (
Bool
): only works if the selected object is an Arch SectionPlane, and DataProjection Mode isCutlines
orCutfaces
, specifies if the projection will appear co-planar with the section plane. - DataProjection (
Vector
): specifies the direction of the projection. Ignored if DataBase is an Arch SectionPlane. - DataProjection Mode (
Enumeration
): specifies the projection mode. The following modes are available:Solid
: projects the entire selected object.Individual Faces
: only projects the faces in the DataFace Numbers list.Cutlines
: only works if the selected object is an Arch SectionPlane, projects only the edges cut by the section plane.Cutfaces
: only works if the selected object is an Arch SectionPlane, projects the areas cut through solids by the section plane as faces.Solid faces
: projects the entire selected object by cutting faces one by one. Can be used if theSolid
mode gives wrong results. introduced in version 0.20
- DataSegment Length (
Float
): specifies the size in millimeters of linear segments if DataTessellation istrue
. - DataTessellation (
Bool
): specifies if tessellation should be performed. Tessellation means that curves are replaced by sequences of line segments. This can be computationally intensive if the DataSegment Length is too short. - DataVisible Only (
Bool
): specifies if the projection should only be recomputed if it is visible. - DataExclusion Points (
Vector list
): A list of exclusion points. Any edge passing through any of those points will not be drawn. introduced in version 0.20 - DataExclusion Names (
String list
): A list of object names. Any viewed or cut child object with a name in that list will not be drawn. introduced in version 0.21
View
Draft
- ViewPattern (
Enumeration
): not used. - ViewPattern Size (
Float
): not used.
Scripting
See also: Autogenerated API documentation and FreeCAD Scripting Basics.
To create a 2D projection use the make_shape2dview
method (introduced in version 0.19) of the Draft module. This method replaces the deprecated makeShape2DView
method.
shape2dview = make_shape2dview(baseobj, projectionVector=None, facenumbers=[])
baseobj
is the object to be projected.projectionVector
is the projection vector. If not supplied the Z axis is used.facenumbers
is a list of face numbers (0-based). If supplied only these faces are considered.shape2dview
is returned with the created 2D projection.
Change the ProjectionMode
property of the created object if required. It can be: "Solid"
, "Individual Faces"
, "Cutlines"
, "Cutfaces"
or "Solid faces"
.
Example:
import FreeCAD as App
import Draft
doc = App.newDocument()
box = doc.addObject("Part::Box", "Box")
box.Length = 2300
box.Width = 500
box.Height = 1000
shape1 = Draft.make_shape2dview(box)
shape2 = Draft.make_shape2dview(box, App.Vector(1, -1, 1))
shape3 = Draft.make_shape2dview(box, App.Vector(-1, 1, 1), [0, 5])
shape3.ProjectionMode = "Individual Faces"
doc.recompute()
- Drafting: Line, Polyline, Fillet, Arc, Arc by 3 points, Circle, Ellipse, Rectangle, Polygon, B-spline, Cubic Bézier curve, Bézier curve, Point, Facebinder, ShapeString, Hatch
- Annotation: Text, Dimension, Label, Annotation styles, Annotation scale
- Modification: Move, Rotate, Scale, Mirror, Offset, Trimex, Stretch, Clone, Array, Polar array, Circular array, Path array, Path link array, Point array, Point link array, Edit, Subelement highlight, Join, Split, Upgrade, Downgrade, Wire to B-spline, Draft to sketch, Set slope, Flip dimension, Shape 2D view
- Draft Tray: Select plane, Set style, Toggle construction mode, AutoGroup
- Snapping: Snap lock, Snap endpoint, Snap midpoint, Snap center, Snap angle, Snap intersection, Snap perpendicular, Snap extension, Snap parallel, Snap special, Snap near, Snap ortho, Snap grid, Snap working plane, Snap dimensions, Toggle grid
- Miscellaneous: Apply current style, Layer, Manage layers, Add a new named group, Move to group, Select group, Add to construction group, Toggle normal/wireframe display, Create working plane proxy, Heal, Show snap toolbar
- Additional: Constraining, Pattern, Preferences, Import Export Preferences, DXF/DWG, SVG, OCA, DAT
- Context menu:
- Layer container: Merge layer duplicates, Add new layer
- Layer: Activate this layer, Select layer contents
- Text: Open hyperlinks
- Wire: Flatten
- Working plane proxy: Write camera position, Write objects state
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework
- Hubs: User hub, Power users hub, Developer hub