TechDraw ProjectionGroup/pl: Difference between revisions

From FreeCAD Documentation
(Created page with "Zobacz również stronę: [https://freecad.github.io/SourceDoc/ Dokumentacja API generowana automatycznie] oraz Podstawy pisania skryptów dla FreeCAD.")
(Created page with "Narzędzie '''Wstaw grupę rzutów''' może być używane w makrodefinicjach i z konsoli Python. Pełny skrypt jest dostępny w dystrybucji Source w "source-dir/src/Mod/TechDraw/TDTest/DProjGroupTest.py".")
Line 91: Line 91:
Zobacz również stronę: [https://freecad.github.io/SourceDoc/ Dokumentacja API generowana automatycznie] oraz [[FreeCAD_Scripting_Basics/pl|Podstawy pisania skryptów dla FreeCAD]].
Zobacz również stronę: [https://freecad.github.io/SourceDoc/ Dokumentacja API generowana automatycznie] oraz [[FreeCAD_Scripting_Basics/pl|Podstawy pisania skryptów dla FreeCAD]].


The NewProjGroup tool can be used in [[Macros|macros]] and from the [[Python|Python]] console. A full script is available in the Source distribution in "source-dir/src/Mod/TechDraw/TDTest/DProjGroupTest.py".
Narzędzie '''Wstaw grupę rzutów''' może być używane w [[Macros/pl|makrodefinicjach]] i z konsoli [[Python/pl|Python]]. Pełny skrypt jest dostępny w dystrybucji Source w "source-dir/src/Mod/TechDraw/TDTest/DProjGroupTest.py".


{{Code|code=
{{Code|code=

Revision as of 15:02, 16 July 2023

Rysunek Techniczny: Wstaw grupę rzutów

Lokalizacja w menu
Rysunek Techniczny → Wstaw grupę rzutów
Środowisko pracy
Rysunek Techniczny
Domyślny skrót
brak
Wprowadzono w wersji
-
Zobacz także
Wstaw widok, Wstaw widok przekroju

Opis

Narzędzie Wstaw grupę rzutów tworzy rzuty z wielu widoków jednego lub więcej obiektów 3D. Można również dołączyć izometryczne widoki 4 przednich narożników.

If you only want to produce a single view, there is no advantage in using ProjectionGroup; you should then use Insert View instead. If you do not wish to use the traditional first- / third-angle projection, you should use multiple Views (Insert View) instead of ProjectionGroup.

Three orthogonal views and one isometric view of a solid object

Usage

  1. Optionally rotate the 3D view. The camera direction in the 3D view determines the initial value of the Primary Direction of the Projection Group (the DANEDirection property of the central view).
  2. Select one or more objects in the 3D view or Tree view.
  3. If there are multiple drawing pages in the document: optionally add the desired page to the selection by selecting it in the Tree view.
  4. There are several ways to invoke the tool:
  5. If there are multiple drawing pages in the document and you have not yet selected a page, the Page Chooser dialog box opens: introduced in version 0.20
    1. Select the desired page.
    2. Press the OK button.
  6. The Projection Group task panel opens.
  7. Select which views should appear in the Projection Group, and the Projection Group's scale and other parameters.
  8. Press the OK button.
  9. Optionally move the Projection Group by dragging its central view.
  10. Optionally move the Projection Group's other views relative to the central view by dragging them individually.

Projection Group task panel. The Primary Direction field indicates the current view direction.

Properties

Data

Base

  • DANESource (LinkList): Links to the drawable objects to be depicted.
  • DANEXSource (XLinkList): Links to the drawable objects in an external file.
  • DANEAnchor (Link): The central view in the group. Normally the Front view.
  • DANEProjectionType (Enumeration): First Angle or Third Angle.

For the other properties in this group see TechDraw View.

Collection

  • DANEViews (LinkList): Links to the views in this ProjectionGroup.

Distribute

  • DANEAuto Distribute (Bool): If true, space out individual views automatically. Use false to position manually.
  • DANEspacing X (Length): Horizontal space between views when automatically positioned. Note that Scale and the size of other views in the group also influence the spacing.
  • DANEspacing Y (Length): Vertical space between views when automatically positioned.

View

Base

See TechDraw View.

Notes

The ProjectionGroup as a whole inherits X, Y, ScaleType, Scale and Rotation from the basic View.

Individual Views within the group inherit all part view properties, but the ProjectionGroup object controls the scale of all its member Views.

The RotationVector property of individual Views within the group is deprecated as of v0.19. Use XDirection instead.

Note that the central box displays the current projection direction of the primary view. It cannot be used to change the direction.

Tworzenie skryptów

Zobacz również stronę: Dokumentacja API generowana automatycznie oraz Podstawy pisania skryptów dla FreeCAD.

Narzędzie Wstaw grupę rzutów może być używane w makrodefinicjach i z konsoli Python. Pełny skrypt jest dostępny w dystrybucji Source w "source-dir/src/Mod/TechDraw/TDTest/DProjGroupTest.py".

#make a page
    print("making a page")
    page = FreeCAD.ActiveDocument.addObject('TechDraw::DrawPage','Page')
    FreeCAD.ActiveDocument.addObject('TechDraw::DrawSVGTemplate','Template')
    FreeCAD.ActiveDocument.Template.Template = templateFileSpec
    FreeCAD.ActiveDocument.Page.Template = FreeCAD.ActiveDocument.Template

    #make projection group
    group = FreeCAD.ActiveDocument.addObject('TechDraw::DrawProjGroup','ProjGroup')
    rc = page.addView(group)
    group.Source = [fusion]

    #add Front(Anchor) view
    frontView = group.addProjection("Front")               ##need an Anchor

    #update group
    group.Anchor.Direction = FreeCAD.Vector(0,0,1)
    group.Anchor.RotationVector = FreeCAD.Vector(1,0,0)

    #add more projections
    leftView = group.addProjection("Left")
    topView = group.addProjection("Top")
    rightView = group.addProjection("Right")
    rearView = group.addProjection("Rear")
    BottomView = group.addProjection("Bottom")

    #remove a view from projection group
    iv = group.removeProjection("Left")

Programming note: The Projection Group should always be added to the Page (ex. page.addView(group) before adding projections to the Group. This allows the Projection Group to use default parameter values derived from the parent page.