Draft Shape2DView/cs: Difference between revisions

From FreeCAD Documentation
(Created page with "# Vyberte objekt, ze kterého chcete extrahovat 2D pohled # Stiskněte tlačítko {{KEY|16px Kreslení TělesoDo2D}}")
(Updating to match new version of source page)
(20 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<languages/>
{{GuiCommand/cs|Name=Draft_Shape2DView|Name=Kreslení 2DTvarPohledu|Workbenches=[[Draft Module/cs|Kreslení]], [[Arch Module/cs|Architektura]]|MenuLocation=Kreslení -> 2D tvar z pohledu}}
{{Docnav|[[Draft_DelPoint|Delete point]]|[[Draft_Draft2Sketch|Draft to Sketch]]|[[Draft_Module|Draft]]|IconL=Draft_DelPoint.svg|IconC=Workbench_Draft.svg|IconR=Draft_Draft2Sketch.svg}}

<div class="mw-translate-fuzzy">
{{GuiCommand/cs|Name=Draft_Shape2DView|Name/cs=Kreslení TělesoDo2DPohledu|Workbenches=[[Draft Module/cs|Kreslení]], [[Arch Module/cs|Architektura]]|MenuLocation=Kreslení -> TělesoDo2D}}
</div>


==Popis==
==Popis==


<div class="mw-translate-fuzzy">
Tento nástroj umístí do dokumentu 2D objekt, který vznikne zploštěním pohledu vybraného tvaru založeného na objektu [[Part Module/cs|díl]].
Tento nástroj umístí do dokumentu 2D objekt, který vznikne zploštěním pohledu vybraného tvaru založeného na objektu [[Part Module/cs|díl]].
</div>

The resulting projection is a Draft object and is placed in the 3D view. This object can be displayed on a {{Button|[[Image:Workbench_TechDraw.svg|16px]] [[TechDraw Workbench|TechDraw]]}} Workbench page, using the [[TechDraw NewDraft]] tool. Alternatively, TechDraw has its own tools to create projected views, the {{Button|[[Image:TechDraw_NewView.svg|16px]] [[TechDraw NewView]]}} and {{Button|[[Image:TechDraw_NewProjGroup.svg|16px]] [[TechDraw NewProjGroup|TechDraw NewProjGroup]]}} tools; however, these tools are meant for preparing technical drawings, so they create the views only in the drawing page, and not in the 3D view.


[[Image:Draft_Shape2DView_example.jpg]]
[[Image:Draft_Shape2DView_example.jpg]]
{{Caption|Projection of solid shapes into the XY plane}}


==Použití==
==Použití==


<div class="mw-translate-fuzzy">
# Vyberte objekt, ze kterého chcete extrahovat 2D pohled
# Vyberte objekt, ze kterého chcete extrahovat 2D pohled
# Stiskněte tlačítko {{KEY|[[Image:Draft Shape2DView.png|16px]] [[Draft Shape2DView/cs|Kreslení TělesoDo2D]]}}
# Stiskněte tlačítko {{KEY|[[Image:Draft Shape2DView.png|16px]] [[Draft Shape2DView/cs|Kreslení TělesoDo2D]]}}
</div>


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]].
==Options==


* If the selected object is an [[Arch SectionPlane]], the 2D projection will be of the contents of the Section plane, and the projection vector will be taken from the section plane instead of the Projection property below.
'''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.
* The normal operating mode is '''Solid''', which projects the whole shape, but, if you selected some faces of the base object when creating the 2D view, you can also set the '''Individual Faces''' mode, which will project only the faces that were selected.
* If the selected object is an [[Arch SectionPlane]], a '''cutlines''' projection mode is also available, which projects only the edges being cut by the section plane.


==Properties==
==Volby==


<div class="mw-translate-fuzzy">
* {{PropertyData|Projection}}: The direction of the projection.
* Je-li vybraný objekt v [[Arch SectionPlane/cs|Architektura Řez]], bude ve 2D projekci obsah řezu, a projekční vektor bude převzat z řezu místo z vlastnosti Projekce (dále).
* {{PropertyData|Projection Mode}}: The mode of the projection: solid, individual faces, or cutlines.
* Normální operační mód je '''Těleso''', který promítá celý tvar, ale pokud při vytváření 2D pohledu vyberete některou plochu ze základního objektu, můžete také nastavit mód '''Individuální plochy''', což zajistí, že budou promítnuty pouze vybrané povrchy.
* Je-li vybraný objekt v [[Arch SectionPlane/cs|Architektura Řez]], je k dispozici i projekční mód '''řezné čáry''', který promítá pouze hrany řezu.
</div>


==Scripting==
==Vlastnosti==


<div class="mw-translate-fuzzy">
The Draft Shape2DView tool can by used in [[macros]] and from the python console by using the following function:
* {{PropertyData|Projection}}: Směr projekce.
* {{PropertyData|Projection Mode}}: Projekční mód: těleso, individuální plochy nebo řezné čáry.
</div>


<div class="mw-translate-fuzzy">
<syntaxhighlight>
==Skriptování==
makeShape2DView (object,[projection],[facenumbers])
</div>
</syntaxhighlight>
* Adds a 2D shape to the document, which is a 2D projection of the given object.
* A specific projection vector can also be given.
* Returns the generated object.
* You can also provide a list of face numbers to be considered.


<div class="mw-translate-fuzzy">
Example:
Nástroj TělesoDo2D může být použit v [[macros/cs|makrech]] a z konzoly Pythonu použitím následující funkce:
</div>


{{Code|code=
<syntaxhighlight>
Shape2DView = makeShape2DView(baseobj, projectionVector=None, facenumbers=[])
import FreeCAD,Draft
}}
Draft.makeShape2DView(FreeCAD.ActiveDocument.ActiveObject)
</syntaxhighlight>


<div class="mw-translate-fuzzy">
<languages/>
* Přidá 2D tvar do dokumentu, tvar je 2D projekce zadaného objektu.
* Může být specifikován projekční vektor.
* Vrací vygenerovaný objekt.
* Může být zadán seznam čísel ploch, které mají být použity.
</div>

The {{incode|ProjectionMode}} attribute needs to be overwritten with the desired mode, which can be {{incode|"Solid"}}, {{incode|"Individual Faces"}}, {{incode|"Cutlines"}}, or {{incode|"Cutfaces"}}.

Příklad:

{{Code|code=
import FreeCAD, Draft

Box = FreeCAD.ActiveDocument.addObject("Part::Box", "Box")
Box.Length = 2300
Box.Width = 800
Box.Height = 1000

Shape1 = Draft.makeShape2DView(Box)

Shape2 = Draft.makeShape2DView(Box, FreeCAD.Vector(1, -1, 1))

Shape3 = Draft.makeShape2DView(Box, FreeCAD.Vector(-1, 1, 1), [4,5])
Shape3.ProjectionMode = "Individual Faces"

FreeCAD.ActiveDocument.recompute()
}}

{{Docnav|[[Draft_DelPoint|Delete point]]|[[Draft_Draft2Sketch|Draft to Sketch]]|[[Draft_Module|Draft]]|IconL=Draft_DelPoint.svg|IconC=Workbench_Draft.svg|IconR=Draft_Draft2Sketch.svg}}

{{Draft Tools navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{clear}}

Revision as of 21:27, 21 February 2020

Kreslení TělesoDo2DPohledu

Umístění Menu
Kreslení -> TělesoDo2D
Pracovní stoly
Kreslení, Architektura
Výchozí zástupce
Nikdo
Představen ve verzi
-
Viz také
Nikdo

Popis

Tento nástroj umístí do dokumentu 2D objekt, který vznikne zploštěním pohledu vybraného tvaru založeného na objektu díl.

The resulting projection is a Draft object and is placed in the 3D view. This object can be displayed on a TechDraw Workbench page, using the TechDraw NewDraft tool. Alternatively, TechDraw has its own tools to create projected views, the File:TechDraw NewView.svg TechDraw NewView and File:TechDraw NewProjGroup.svg TechDraw NewProjGroup tools; however, these tools are meant for preparing technical drawings, so they create the views only in the drawing page, and not in the 3D view.

Projection of solid shapes into the XY plane

Použití

  1. Vyberte objekt, ze kterého chcete extrahovat 2D pohled
  2. Stiskněte tlačítko Kreslení TělesoDo2D

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.

Note: If the selected object is an Arch SectionPlane, the projection will use the contents and direction of that Section plane; in this case, the "Projection" property will be ignored.

Volby

  • Je-li vybraný objekt v Architektura Řez, bude ve 2D projekci obsah řezu, a projekční vektor bude převzat z řezu místo z vlastnosti Projekce (dále).
  • Normální operační mód je Těleso, který promítá celý tvar, ale pokud při vytváření 2D pohledu vyberete některou plochu ze základního objektu, můžete také nastavit mód Individuální plochy, což zajistí, že budou promítnuty pouze vybrané povrchy.
  • Je-li vybraný objekt v Architektura Řez, je k dispozici i projekční mód řezné čáry, který promítá pouze hrany řezu.

Vlastnosti

  • ÚdajeProjection: Směr projekce.
  • ÚdajeProjection Mode: Projekční mód: těleso, individuální plochy nebo řezné čáry.

Skriptování

Nástroj TělesoDo2D může být použit v makrech a z konzoly Pythonu použitím následující funkce:

Shape2DView = makeShape2DView(baseobj, projectionVector=None, facenumbers=[])
  • Přidá 2D tvar do dokumentu, tvar je 2D projekce zadaného objektu.
  • Může být specifikován projekční vektor.
  • Vrací vygenerovaný objekt.
  • Může být zadán seznam čísel ploch, které mají být použity.

The ProjectionMode attribute needs to be overwritten with the desired mode, which can be "Solid", "Individual Faces", "Cutlines", or "Cutfaces".

Příklad:

import FreeCAD, Draft

Box = FreeCAD.ActiveDocument.addObject("Part::Box", "Box")
Box.Length = 2300
Box.Width = 800
Box.Height = 1000

Shape1 = Draft.makeShape2DView(Box)

Shape2 = Draft.makeShape2DView(Box, FreeCAD.Vector(1, -1, 1))

Shape3 = Draft.makeShape2DView(Box, FreeCAD.Vector(-1, 1, 1), [4,5])
Shape3.ProjectionMode = "Individual Faces"

FreeCAD.ActiveDocument.recompute()