Draft Shape2DView/ro: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<languages/>
<languages/>

{{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}}
{{Docnav
|[[Draft_FlipDimension|FlipDimension]]
|[[Draft_SelectPlane|SelectPlane]]
|[[Draft_Workbench|Draft]]
|IconL=Draft_FlipDimension.svg
|IconR=Draft_SelectPlane.svg
|IconC=Workbench_Draft.svg
}}


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
{{GuiCommand/ro
{{GuiCommand/ro|Name=Draft Shape2DView|Name/ro=Draft Shape2DView|Workbenches=[[Draft Module/ro|Draft]], [[Arch Module/ro|Arch]]|MenuLocation=Draft -> Shape 2D View}}
|Name=Draft Shape2DView
|Name/ro=Draft Shape2DView
|MenuLocation=Draft -> Shape 2D View
|Workbenches=[[Draft_Workbench/ro|Draft]], [[Arch_Workbench/ro|Arch]]
}}
</div>
</div>


<span id="Description"></span>
==Descriere==
==Descriere==


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Acest instrument plasează în document un obiect 2D care este o vedere aplatizată a unui obiect selectat [[Part Module|Shape]], proiectat în direcția curentă de vizualizare.
Acest instrument plasează în document un obiect 2D care este o vedere aplatizată a unui obiect selectat [[Part_Workbench|Shape]], proiectat în direcția curentă de vizualizare.
</div>
</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.
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]].


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


<span id="Usage"></span>
== Cum se folosește ==
== Cum se folosește ==


Line 25: Line 40:
</div>
</div>


==How to produce plans and sections with different linewidths==
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]].


[[Image:Draft_shape2dview_example_plan.png|700px]]
'''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.


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.
== Opţiuni ==

<div class="mw-translate-fuzzy">
* Dacă obiectul selectat este un [[Arch SectionPlane]], proiecția 2D va fi conținutul planului secțiunii, iar vectorul de proiecție va fi luat din planul secțiunii în locul proprietății Proiecție de mai jos.
* Modul normal de operare este '''Solid''', care proiectează întreaga formă, dar dacă ați selectat unele fețe ale obiectului de bază atunci când creați vizualizarea 2D, puteți seta și '''Individual''' care va proiecta numai fațetele care au fost selectate.
* Dacă obiectul selectat este un modul [[Arch SectionPlane]], sunt disponibile și modurile de proiecție '''Cutlines '''și'''Cutfaces''', care proiectează numai marginile tăiate de planul secțiunii. Modul Cutfaces afișează zonele tăiate ale solidelor ca fațete.
</div>


<span id="Properties"></span>
==Proprietăți==
==Proprietăți==

See also: [[Property_editor|Property editor]].

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===

{{TitleProperty|Draft}}


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 48: Line 66:
* {{PropertyData | Numai vizibil}}: Dacă este adevărat, această vizualizare va fi recuperată numai dacă este vizibilă
* {{PropertyData | Numai vizibil}}: Dacă este adevărat, această vizualizare va fi recuperată numai dacă este vizibilă
</div>
</div>

===View===

{{TitleProperty|Draft}}

* {{PropertyView|Pattern|Enumeration}}: not used.
* {{PropertyView|Pattern Size|Float}}: not used.

==Scripting==


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 58: Line 85:


{{Code|code=
{{Code|code=
Shape2DView = makeShape2DView(baseobj, projectionVector=None, facenumbers=[])
shape2dview = make_shape2dview(baseobj, projectionVector=None, facenumbers=[])
}}
}}


Line 68: Line 95:
</div>
</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"}}.
Change the {{incode|ProjectionMode}} property of the created object if required. It can be: {{incode|"Solid"}}, {{incode|"Individual Faces"}}, {{incode|"Cutlines"}}, {{incode|"Cutfaces"}} or {{incode|"Solid faces"}}.


Exempluː
Exempluː


{{Code|code=
{{Code|code=
import FreeCAD, Draft
import FreeCAD as App
import Draft


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


box = doc.addObject("Part::Box", "Box")
Shape1 = Draft.makeShape2DView(Box)
box.Length = 2300
box.Width = 500
box.Height = 1000


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


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


shape3 = Draft.make_shape2dview(box, App.Vector(-1, 1, 1), [0, 5])
FreeCAD.ActiveDocument.recompute()
shape3.ProjectionMode = "Individual Faces"

doc.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}}
{{Docnav
|[[Draft_FlipDimension|FlipDimension]]
|[[Draft_SelectPlane|SelectPlane]]
|[[Draft_Workbench|Draft]]
|IconL=Draft_FlipDimension.svg
|IconR=Draft_SelectPlane.svg
|IconC=Workbench_Draft.svg
}}


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

Latest revision as of 19:51, 29 April 2023

Draft Shape2DView

poziția meniului
Draft -> Shape 2D View
Ateliere
Draft, Arch
scurtătură
nici unul
Prezentat în versiune
-
A se vedea, de asemenea,
nici unul

Descriere

Acest instrument plasează în document un obiect 2D care este o vedere aplatizată a unui obiect selectat Shape, proiectat în direcția curentă de vizualizare.

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

Cum se folosește

  1. Selectați obiectul din care doriți să extrageți o vizualizare 2D
  2. Rotiți vizualizarea (sau utilizați comenzile rapide de presetare a vizualizării), astfel încât să reflecte direcția în care doriți să proiectați obiectul. De exemplu, folosirea unei vederi de sus va proiecta obiectul pe planul XY, pe verticală de-a lungul axei Z ca în imaginea de mai sus.
  3. Apăsați butonul Draft Shape2DView

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.

Proprietăți

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

  • Date Proiectare: direcția proiecției.
  • Date Mod de proiecție: Modul de proiecție: fețe solide, individuale sau tăieturi.
  • Date In Place: Dacă este adevărat, atunci când se utilizează Cutlines sau Cutfaces mode (doar Arch SectionPlane), rezultatul va apărea la locația planului tăiat în loc de planul de masă introduced in version 0.17
  • Date HiddenLines: Afișează linii ascunse sau nu
  • Date Tessellation: Tessellate Ellipses și BSplines în segmente de linie
  • Date Lungimea segmentului: mărimea segmentelor dacă Tessellation este activată
  • Date Numai vizibil: Dacă este adevărat, această vizualizare va fi recuperată numai dacă este vizibilă

View

Draft

  • VizualizarePattern (Enumeration): not used.
  • VizualizarePattern Size (Float): not used.

Scripting

Scrip-Programare

InstrumentulDraft Shape2DView poate fi utilizat în macros și de la consola Python folosind următoarele funcții:

shape2dview = make_shape2dview(baseobj, projectionVector=None, facenumbers=[])
  • Adăugă o formă 2D la document, care este o proiecție 2D a obiectului dat.
  • De asemenea, poate fi dat un vector specific de proiecție.
  • Returnează obiectul generat.
  • Puteți să furnizați, de asemenea, o listă cu numerele de față care trebuie luate în considerare.

Change the ProjectionMode property of the created object if required. It can be: "Solid", "Individual Faces", "Cutlines", "Cutfaces" or "Solid faces".

Exempluː

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()