diff --git a/src/Mod/TechDraw/App/CMakeLists.txt b/src/Mod/TechDraw/App/CMakeLists.txt index d1dfb37415..8546b1f6bc 100644 --- a/src/Mod/TechDraw/App/CMakeLists.txt +++ b/src/Mod/TechDraw/App/CMakeLists.txt @@ -61,6 +61,34 @@ generate_from_xml(DrawWeldSymbolPy) generate_from_xml(CosmeticExtensionPy) generate_from_xml(DrawBrokenViewPy) +generate_from_py_(DrawHatchPy) +generate_from_py_(DrawViewPy) +generate_from_py_(DrawPagePy) +generate_from_py_(DrawViewPartPy) +generate_from_py_(DrawViewSymbolPy) +generate_from_py_(DrawTemplatePy) +generate_from_py_(DrawParametricTemplatePy) +generate_from_py_(DrawSVGTemplatePy) +generate_from_py_(DrawViewClipPy) +generate_from_py_(DrawViewDimensionPy) +generate_from_py_(DrawViewDimExtentPy) +generate_from_py_(DrawGeomHatchPy) +generate_from_py_(DrawViewCollectionPy) +generate_from_py_(DrawProjGroupPy) +generate_from_py_(DrawProjGroupItemPy) +generate_from_py_(DrawViewAnnotationPy) +generate_from_py_(DrawLeaderLinePy) +generate_from_py_(DrawRichAnnoPy) +generate_from_py_(GeomFormatPy) +generate_from_py_(CenterLinePy) +generate_from_py_(CosmeticEdgePy) +generate_from_py_(CosmeticVertexPy) +generate_from_py_(DrawTilePy) +generate_from_py_(DrawTileWeldPy) +generate_from_py_(DrawWeldSymbolPy) +generate_from_py_(CosmeticExtensionPy) +generate_from_py_(DrawBrokenViewPy) + SET(Draw_SRCS DrawPage.cpp DrawPage.h diff --git a/src/Mod/TechDraw/App/CenterLinePy.pyi b/src/Mod/TechDraw/App/CenterLinePy.pyi new file mode 100644 index 0000000000..67cddea8a1 --- /dev/null +++ b/src/Mod/TechDraw/App/CenterLinePy.pyi @@ -0,0 +1,66 @@ +from typing import Any, Final + +from Base.PyObjectBase import PyObjectBase +from Base.Metadata import constmethod, export + +@export( + Father="PyObjectBase", + Name="CenterLinePy", + Twin="CenterLine", + TwinPointer="CenterLine", + Include="Mod/TechDraw/App/CenterLine.h", + Namespace="TechDraw", + FatherInclude="Base/PyObjectBase.h", + FatherNamespace="Base", + Constructor=True, + Delete=True, +) +class CenterLinePy(PyObjectBase): + """ + CenterLine specifies additional mark up edges in a View + """ + + @constmethod + def clone(self) -> Any: + """Create a clone of this centerline""" + ... + + @constmethod + def copy(self) -> Any: + """Create a copy of this centerline""" + ... + Tag: Final[str] + """Gives the tag of the CenterLine as string.""" + + Type: Final[int] + """0 - face, 1 - 2 line, 2 - 2 point.""" + + Mode: int + """0 - vert/ 1 - horiz/ 2 - aligned.""" + + Format: dict[str, Any] + """The appearance attributes (style, color, weight, visible) for this CenterLine.""" + + HorizShift: float + """The left/right offset for this CenterLine.""" + + VertShift: float + """The up/down offset for this CenterLine.""" + + Rotation: float + """The rotation of the Centerline in degrees.""" + + Extension: float + """The additional length to be added to this CenterLine.""" + + Flip: bool + """Reverse the order of points for 2 point CenterLine.""" + + Edges: list[Any] + """The names of source edges for this CenterLine.""" + + Faces: list[Any] + """The names of source Faces for this CenterLine.""" + + Points: list[Any] + """The names of source Points for this CenterLine.""" diff --git a/src/Mod/TechDraw/App/CosmeticEdgePy.pyi b/src/Mod/TechDraw/App/CosmeticEdgePy.pyi new file mode 100644 index 0000000000..346d9f3fa0 --- /dev/null +++ b/src/Mod/TechDraw/App/CosmeticEdgePy.pyi @@ -0,0 +1,39 @@ +from typing import Final + +from Base.PyObjectBase import PyObjectBase +from Base.Metadata import export + +@export( + Father="PyObjectBase", + Name="CosmeticEdgePy", + Twin="CosmeticEdge", + TwinPointer="CosmeticEdge", + Include="Mod/TechDraw/App/Cosmetic.h", + Namespace="TechDraw", + FatherInclude="Base/GeometryPyCXX.h", + FatherNamespace="Base", + Constructor=True, + Delete=True, +) +class CosmeticEdgePy(PyObjectBase): + """ + CosmeticEdge specifies an extra (cosmetic) edge in Views + """ + + Tag: Final[str] + """Gives the tag of the CosmeticEdge as string.""" + + Start: PyCXXVector + """Gives the position of one end of this CosmeticEdge as vector.""" + + End: PyCXXVector + """Gives the position of one end of this CosmeticEdge as vector.""" + + Center: PyCXXVector + """Gives the position of center point of this CosmeticEdge as vector.""" + + Radius: float + """Gives the radius of CosmeticEdge in mm.""" + + Format: dict + """The appearance attributes (style, weight, color, visible) for this CosmeticEdge.""" diff --git a/src/Mod/TechDraw/App/CosmeticExtensionPy.pyi b/src/Mod/TechDraw/App/CosmeticExtensionPy.pyi new file mode 100644 index 0000000000..0756427c91 --- /dev/null +++ b/src/Mod/TechDraw/App/CosmeticExtensionPy.pyi @@ -0,0 +1,18 @@ +from Base.Metadata import export + +from App.DocumentObjectExtension import DocumentObjectExtension + +@export( + Father="DocumentObjectExtensionPy", + Name="CosmeticExtensionPy", + Twin="CosmeticExtension", + TwinPointer="CosmeticExtension", + Include="Mod/TechDraw/App/CosmeticExtension.h", + Namespace="TechDraw", + FatherInclude="App/DocumentObjectExtensionPy.h", + FatherNamespace="App", +) +class CosmeticExtensionPy(DocumentObjectExtension): + """ + This object represents cosmetic features for a DrawViewPart. + """ diff --git a/src/Mod/TechDraw/App/CosmeticVertexPy.pyi b/src/Mod/TechDraw/App/CosmeticVertexPy.pyi new file mode 100644 index 0000000000..d0f508042c --- /dev/null +++ b/src/Mod/TechDraw/App/CosmeticVertexPy.pyi @@ -0,0 +1,48 @@ +from typing import Any, Final + +from Base.PyObjectBase import PyObjectBase +from Base.Metadata import constmethod, export + +@export( + Father="PyObjectBase", + Name="CosmeticVertexPy", + Twin="CosmeticVertex", + TwinPointer="CosmeticVertex", + Include="Mod/TechDraw/App/Cosmetic.h", + Namespace="TechDraw", + FatherInclude="Base/PyObjectBase.h", + FatherNamespace="Base", + Constructor=True, + Delete=True, +) +class CosmeticVertexPy(PyObjectBase): + """ + CosmeticVertex specifies an extra (cosmetic) vertex in Views + """ + + @constmethod + def clone(self) -> Any: + """Create a clone of this CosmeticVertex""" + ... + + @constmethod + def copy(self) -> Any: + """Create a copy of this CosmeticVertex""" + ... + Tag: Final[str] + """Gives the tag of the CosmeticVertex as string.""" + + Point: Any + """Gives the position of this CosmeticVertex as vector.""" + + Show: bool + """Show/hide the vertex.""" + + Color: Any # type: tuple[float, float, float, float]] + """set/return the vertex's colour using a tuple (rgba).""" + + Size: Any + """set/return the vertex's radius in mm.""" + + Style: Any + """set/return the vertex's style as integer.""" diff --git a/src/Mod/TechDraw/App/DrawBrokenViewPy.pyi b/src/Mod/TechDraw/App/DrawBrokenViewPy.pyi new file mode 100644 index 0000000000..bea3460a3b --- /dev/null +++ b/src/Mod/TechDraw/App/DrawBrokenViewPy.pyi @@ -0,0 +1,31 @@ +from typing import Any + +from Base.Metadata import export +from TechDraw.DrawViewPart import DrawViewPart + +@export( + Father="DrawViewPartPy", + Name="DrawBrokenViewPy", + Twin="DrawBrokenView", + TwinPointer="DrawBrokenView", + Include="Mod/TechDraw/App/DrawBrokenView.h", + Namespace="TechDraw", + FatherInclude="Mod/TechDraw/App/DrawViewPartPy.h", + FatherNamespace="TechDraw", +) +class DrawBrokenViewPy(DrawViewPart): + """ + Feature for creating and manipulating Technical Drawing broken views + """ + + def mapPoint3dToView(self) -> Any: + """point2d = mapPoint3dToView(point3d) - returns the position of the 3d point within the broken view.""" + ... + + def mapPoint2dFromView(self) -> Any: + """point2d = mapPoint2dFromView(point3d) - returns the position of the 2d point within an unbroken view.""" + ... + + def getCompressedCenter(self) -> Any: + """point3d = getCompressedCenter() - returns the geometric center of the source shapes after break cuts and gap compression.""" + ... diff --git a/src/Mod/TechDraw/App/DrawGeomHatchPy.pyi b/src/Mod/TechDraw/App/DrawGeomHatchPy.pyi new file mode 100644 index 0000000000..33fa33eae9 --- /dev/null +++ b/src/Mod/TechDraw/App/DrawGeomHatchPy.pyi @@ -0,0 +1,26 @@ +from typing import Any + +from Base.Metadata import export +from App.DocumentObject import DocumentObject + +@export( + Father="DocumentObjectPy", + Name="DrawGeomHatchPy", + Twin="DrawGeomHatch", + TwinPointer="DrawGeomHatch", + Include="Mod/TechDraw/App/DrawGeomHatch.h", + Namespace="TechDraw", + FatherInclude="App/DocumentObjectPy.h", + FatherNamespace="App", +) +class DrawGeomHatchPy(DocumentObject): + """ + Feature for creating and manipulating Technical Drawing GeomHatch areas + """ + + def translateLabel(self) -> Any: + """ + translateLabel(translationContext, objectBaseName, objectUniqueName). + No return value. Replace the current label with a translated version where possible. + """ + ... diff --git a/src/Mod/TechDraw/App/DrawGeomHatchPy.xml b/src/Mod/TechDraw/App/DrawGeomHatchPy.xml index c061dd0812..5102c35aed 100644 --- a/src/Mod/TechDraw/App/DrawGeomHatchPy.xml +++ b/src/Mod/TechDraw/App/DrawGeomHatchPy.xml @@ -16,7 +16,7 @@ translateLabel(translationContext, objectBaseName, objectUniqueName). - No return value. Replace the current label with a translated version where possible. +No return value. Replace the current label with a translated version where possible. diff --git a/src/Mod/TechDraw/App/DrawHatchPy.pyi b/src/Mod/TechDraw/App/DrawHatchPy.pyi new file mode 100644 index 0000000000..b20e0e95cf --- /dev/null +++ b/src/Mod/TechDraw/App/DrawHatchPy.pyi @@ -0,0 +1,25 @@ +from typing import Any +from Base.Metadata import export +from App.DocumentObject import DocumentObject + +@export( + Father="DocumentObjectPy", + Name="DrawHatchPy", + Twin="DrawHatch", + TwinPointer="DrawHatch", + Include="Mod/TechDraw/App/DrawHatch.h", + Namespace="TechDraw", + FatherInclude="App/DocumentObjectPy.h", + FatherNamespace="App", +) +class DrawHatchPy(DocumentObject): + """ + Feature for creating and manipulating Technical Drawing Hatch areas + """ + + def translateLabel(self) -> Any: + """ + translateLabel(translationContext, objectBaseName, objectUniqueName). + No return value. Replace the current label with a translated version where possible. + """ + ... diff --git a/src/Mod/TechDraw/App/DrawHatchPy.xml b/src/Mod/TechDraw/App/DrawHatchPy.xml index 835b6acbdc..a88d174cc9 100644 --- a/src/Mod/TechDraw/App/DrawHatchPy.xml +++ b/src/Mod/TechDraw/App/DrawHatchPy.xml @@ -16,7 +16,7 @@ translateLabel(translationContext, objectBaseName, objectUniqueName). - No return value. Replace the current label with a translated version where possible. +No return value. Replace the current label with a translated version where possible. diff --git a/src/Mod/TechDraw/App/DrawLeaderLinePy.pyi b/src/Mod/TechDraw/App/DrawLeaderLinePy.pyi new file mode 100644 index 0000000000..a25a5b0dfb --- /dev/null +++ b/src/Mod/TechDraw/App/DrawLeaderLinePy.pyi @@ -0,0 +1,17 @@ +from Base.Metadata import export +from DrawView import DrawView + +@export( + Father="DrawViewPy", + Name="DrawLeaderLinePy", + Twin="DrawLeaderLine", + TwinPointer="DrawLeaderLine", + Include="Mod/TechDraw/App/DrawLeaderLine.h", + Namespace="TechDraw", + FatherInclude="Mod/TechDraw/App/DrawViewPy.h", + FatherNamespace="TechDraw", +) +class DrawLeaderLinePy(DrawView): + """ + Feature for adding leaders to Technical Drawings + """ diff --git a/src/Mod/TechDraw/App/DrawPagePy.pyi b/src/Mod/TechDraw/App/DrawPagePy.pyi new file mode 100644 index 0000000000..33f33dd1f9 --- /dev/null +++ b/src/Mod/TechDraw/App/DrawPagePy.pyi @@ -0,0 +1,54 @@ +from typing import Any, Final + +from Base.Metadata import export +from App.DocumentObject import DocumentObject + +@export( + Father="DocumentObjectPy", + Name="DrawPagePy", + Twin="DrawPage", + TwinPointer="DrawPage", + Include="Mod/TechDraw/App/DrawPage.h", + Namespace="TechDraw", + FatherInclude="App/DocumentObjectPy.h", + FatherNamespace="App", +) +class DrawPagePy(DocumentObject): + """ + Feature for creating and manipulating Technical Drawing Pages + """ + + def addView(self) -> Any: + """addView(DrawView) - Add a View to this Page""" + ... + + def removeView(self) -> Any: + """removeView(DrawView) - Remove a View to this Page""" + ... + + def getViews(self) -> Any: + """getViews() - returns a list of all the views on page excluding Views inside Collections""" + ... + + def getAllViews(self) -> Any: + """getAllViews() - returns a list of all the views on page including Views inside Collections""" + ... + + def translateLabel(self) -> Any: + """ + translateLabel(translationContext, objectBaseName, objectUniqueName). + No return value. Replace the current label with a translated version where possible. + """ + ... + + def requestPaint(self) -> Any: + """Ask the Gui to redraw this page""" + ... + PageWidth: Final[float] + """Returns the width of this page""" + + PageHeight: Final[float] + """Returns the height of this page""" + + PageOrientation: Final[str] + """Returns the orientation of this page""" diff --git a/src/Mod/TechDraw/App/DrawPagePy.xml b/src/Mod/TechDraw/App/DrawPagePy.xml index 53faba733c..db6d79bd2d 100644 --- a/src/Mod/TechDraw/App/DrawPagePy.xml +++ b/src/Mod/TechDraw/App/DrawPagePy.xml @@ -36,7 +36,7 @@ translateLabel(translationContext, objectBaseName, objectUniqueName). - No return value. Replace the current label with a translated version where possible. +No return value. Replace the current label with a translated version where possible. diff --git a/src/Mod/TechDraw/App/DrawParametricTemplatePy.pyi b/src/Mod/TechDraw/App/DrawParametricTemplatePy.pyi new file mode 100644 index 0000000000..fc105c115f --- /dev/null +++ b/src/Mod/TechDraw/App/DrawParametricTemplatePy.pyi @@ -0,0 +1,25 @@ +from typing import Any, Final + +from Base.Metadata import export +from DrawTemplate import DrawTemplate + +@export( + Father="DrawTemplatePy", + Name="DrawParametricTemplatePy", + Twin="DrawParametricTemplate", + TwinPointer="DrawParametricTemplate", + Include="Mod/TechDraw/App/DrawParametricTemplate.h", + Namespace="TechDraw", + FatherInclude="DrawTemplatePy.h", + FatherNamespace="TechDraw", +) +class DrawParametricTemplatePy(DrawTemplate): + """ + Feature for creating and manipulating Technical Drawing Templates + """ + + def drawLine(self) -> Any: + """Draw a line""" + ... + GeometryCount: Final[int] + """Number of geometry in template""" diff --git a/src/Mod/TechDraw/App/DrawProjGroupItemPy.pyi b/src/Mod/TechDraw/App/DrawProjGroupItemPy.pyi new file mode 100644 index 0000000000..1639c1a507 --- /dev/null +++ b/src/Mod/TechDraw/App/DrawProjGroupItemPy.pyi @@ -0,0 +1,23 @@ +from typing import Any + +from Base.Metadata import export +from TechDraw.DrawViewPart import DrawViewPart + +@export( + Father="DrawViewPartPy", + Name="DrawProjGroupItemPy", + Twin="DrawProjGroupItem", + TwinPointer="DrawProjGroupItem", + Include="Mod/TechDraw/App/DrawProjGroupItem.h", + Namespace="TechDraw", + FatherInclude="Mod/TechDraw/App/DrawViewPartPy.h", + FatherNamespace="TechDraw", +) +class DrawProjGroupItemPy(DrawViewPart): + """ + Feature for creating and manipulating component Views Technical Drawing Projection Groups + """ + + def autoPosition(self) -> Any: + """autoPosition() - Move to AutoDistribute/Unlocked position on Page. Returns none.""" + ... diff --git a/src/Mod/TechDraw/App/DrawProjGroupPy.pyi b/src/Mod/TechDraw/App/DrawProjGroupPy.pyi new file mode 100644 index 0000000000..c5cb16d40f --- /dev/null +++ b/src/Mod/TechDraw/App/DrawProjGroupPy.pyi @@ -0,0 +1,39 @@ +from typing import Any + +from Base.Metadata import export +from TechDraw.DrawViewCollection import DrawViewCollection + +@export( + Father="DrawViewCollectionPy", + Name="DrawProjGroupPy", + Twin="DrawProjGroup", + TwinPointer="DrawProjGroup", + Include="Mod/TechDraw/App/DrawProjGroup.h", + Namespace="TechDraw", + FatherInclude="Mod/TechDraw/App/DrawViewCollectionPy.h", + FatherNamespace="TechDraw", +) +class DrawProjGroupPy(DrawViewCollection): + """ + Feature for creating and manipulating Technical Drawing Projection Groups + """ + + def addProjection(self) -> Any: + """addProjection(string projectionType) - Add a new Projection Item to this Group. Returns DocObj.""" + ... + + def removeProjection(self) -> Any: + """removeProjection(string projectionType) - Remove specified Projection Item from this Group. Returns int number of views in Group.""" + ... + + def purgeProjections(self) -> Any: + """purgeProjections() - Remove all Projection Items from this Group. Returns int number of views in Group (0).""" + ... + + def getItemByLabel(self) -> Any: + """getItemByLabel(string projectionType) - return specified Projection Item""" + ... + + def getXYPosition(self) -> Any: + """getXYPosition(string projectionType) - return the AutoDistribute position for specified Projection Item""" + ... diff --git a/src/Mod/TechDraw/App/DrawRichAnnoPy.pyi b/src/Mod/TechDraw/App/DrawRichAnnoPy.pyi new file mode 100644 index 0000000000..f4f4fed40e --- /dev/null +++ b/src/Mod/TechDraw/App/DrawRichAnnoPy.pyi @@ -0,0 +1,17 @@ +from Base.Metadata import export +from TechDraw.DrawView import DrawView + +@export( + Father="DrawViewPy", + Name="DrawRichAnnoPy", + Twin="DrawRichAnno", + TwinPointer="DrawRichAnno", + Include="Mod/TechDraw/App/DrawRichAnno.h", + Namespace="TechDraw", + FatherInclude="Mod/TechDraw/App/DrawViewPy.h", + FatherNamespace="TechDraw", +) +class DrawRichAnnoPy(DrawView): + """ + Feature for adding rich annotation blocks to Technical Drawings + """ diff --git a/src/Mod/TechDraw/App/DrawSVGTemplatePy.pyi b/src/Mod/TechDraw/App/DrawSVGTemplatePy.pyi new file mode 100644 index 0000000000..445ea12961 --- /dev/null +++ b/src/Mod/TechDraw/App/DrawSVGTemplatePy.pyi @@ -0,0 +1,34 @@ +from typing import Any + +from Base.Metadata import export +from DrawTemplate import DrawTemplate + +@export( + Father="DrawTemplatePy", + Name="DrawSVGTemplatePy", + Twin="DrawSVGTemplate", + TwinPointer="DrawSVGTemplate", + Include="Mod/TechDraw/App/DrawSVGTemplate.h", + Namespace="TechDraw", + FatherInclude="DrawTemplatePy.h", + FatherNamespace="TechDraw", +) +class DrawSVGTemplatePy(DrawTemplate): + """ + Feature for creating and manipulating Technical Drawing SVG Templates + """ + + def getEditFieldContent(self) -> Any: + """getEditFieldContent(EditFieldName) - returns the content of a specific Editable Text Field""" + ... + + def setEditFieldContent(self) -> Any: + """setEditFieldContent(EditFieldName, NewContent) - sets a specific Editable Text Field to a new value""" + ... + + def translateLabel(self) -> Any: + """ + translateLabel(translationContext, objectBaseName, objectUniqueName). + No return value. Replace the current label with a translated version where possible. + """ + ... diff --git a/src/Mod/TechDraw/App/DrawSVGTemplatePy.xml b/src/Mod/TechDraw/App/DrawSVGTemplatePy.xml index 99f28d9f9e..9ef9701824 100644 --- a/src/Mod/TechDraw/App/DrawSVGTemplatePy.xml +++ b/src/Mod/TechDraw/App/DrawSVGTemplatePy.xml @@ -26,7 +26,7 @@ translateLabel(translationContext, objectBaseName, objectUniqueName). - No return value. Replace the current label with a translated version where possible. +No return value. Replace the current label with a translated version where possible. diff --git a/src/Mod/TechDraw/App/DrawTemplatePy.pyi b/src/Mod/TechDraw/App/DrawTemplatePy.pyi new file mode 100644 index 0000000000..dfbf810397 --- /dev/null +++ b/src/Mod/TechDraw/App/DrawTemplatePy.pyi @@ -0,0 +1,18 @@ +from Base.Metadata import export + +from App.DocumentObject import DocumentObject + +@export( + Father="DocumentObjectPy", + Name="DrawTemplatePy", + Twin="DrawTemplate", + TwinPointer="DrawTemplate", + Include="Mod/TechDraw/App/DrawTemplate.h", + Namespace="TechDraw", + FatherInclude="App/DocumentObjectPy.h", + FatherNamespace="App", +) +class DrawTemplatePy(DocumentObject): + """ + Feature for creating and manipulating Technical Drawing Templates + """ diff --git a/src/Mod/TechDraw/App/DrawTilePy.pyi b/src/Mod/TechDraw/App/DrawTilePy.pyi new file mode 100644 index 0000000000..6fd272c2b2 --- /dev/null +++ b/src/Mod/TechDraw/App/DrawTilePy.pyi @@ -0,0 +1,18 @@ +from Base.Metadata import export + +from App.DocumentObject import DocumentObject + +@export( + Father="DocumentObjectPy", + Name="DrawTilePy", + Twin="DrawTile", + TwinPointer="DrawTile", + Include="Mod/TechDraw/App/DrawTile.h", + Namespace="TechDraw", + FatherInclude="App/DocumentObjectPy.h", + FatherNamespace="App", +) +class DrawTilePy(DocumentObject): + """ + Feature for adding tiles to leader lines + """ diff --git a/src/Mod/TechDraw/App/DrawTileWeldPy.pyi b/src/Mod/TechDraw/App/DrawTileWeldPy.pyi new file mode 100644 index 0000000000..2a8bcf3c47 --- /dev/null +++ b/src/Mod/TechDraw/App/DrawTileWeldPy.pyi @@ -0,0 +1,17 @@ +from Base.Metadata import export +from TechDraw.DrawTile import DrawTile + +@export( + Father="DrawTilePy", + Name="DrawTileWeldPy", + Twin="DrawTileWeld", + TwinPointer="DrawTileWeld", + Include="Mod/TechDraw/App/DrawTileWeld.h", + Namespace="TechDraw", + FatherInclude="Mod/TechDraw/App/DrawTilePy.h", + FatherNamespace="TechDraw", +) +class DrawTileWeldPy(DrawTile): + """ + Feature for adding welding tiles to leader lines + """ diff --git a/src/Mod/TechDraw/App/DrawViewAnnotationPy.pyi b/src/Mod/TechDraw/App/DrawViewAnnotationPy.pyi new file mode 100644 index 0000000000..adb71d3b33 --- /dev/null +++ b/src/Mod/TechDraw/App/DrawViewAnnotationPy.pyi @@ -0,0 +1,17 @@ +from Base.Metadata import export +from TechDraw.Drawview import DrawView + +@export( + Father="DrawViewPy", + Name="DrawViewAnnotationPy", + Twin="DrawViewAnnotation", + TwinPointer="DrawViewAnnotation", + Include="Mod/TechDraw/App/DrawViewAnnotation.h", + Namespace="TechDraw", + FatherInclude="Mod/TechDraw/App/DrawViewPy.h", + FatherNamespace="TechDraw", +) +class DrawViewAnnotationPy(DrawView): + """ + Feature for creating and manipulating Technical Drawing Annotation Views + """ diff --git a/src/Mod/TechDraw/App/DrawViewClipPy.pyi b/src/Mod/TechDraw/App/DrawViewClipPy.pyi new file mode 100644 index 0000000000..0245b557a1 --- /dev/null +++ b/src/Mod/TechDraw/App/DrawViewClipPy.pyi @@ -0,0 +1,31 @@ +from typing import Any + +from Base.Metadata import export +from TechDraw.DrawView import DrawView + +@export( + Father="DrawViewPy", + Name="DrawViewClipPy", + Twin="DrawViewClip", + TwinPointer="DrawViewClip", + Include="Mod/TechDraw/App/DrawViewClip.h", + Namespace="TechDraw", + FatherInclude="Mod/TechDraw/App/DrawViewPy.h", + FatherNamespace="TechDraw", +) +class DrawViewClipPy(DrawView): + """ + Feature for creating and manipulating Technical Drawing Clip Views + """ + + def addView(self) -> Any: + """addView(DrawView) - Add a View to this ClipView""" + ... + + def removeView(self) -> Any: + """removeView(DrawView) - Remove specified View to this ClipView""" + ... + + def getChildViewNames(self) -> Any: + """getChildViewNames() - get a list of the DrawViews in this ClipView""" + ... diff --git a/src/Mod/TechDraw/App/DrawViewCollectionPy.pyi b/src/Mod/TechDraw/App/DrawViewCollectionPy.pyi new file mode 100644 index 0000000000..6852681b7f --- /dev/null +++ b/src/Mod/TechDraw/App/DrawViewCollectionPy.pyi @@ -0,0 +1,27 @@ +from typing import Any + +from Base.Metadata import export +from TechDraw.DrawView import DrawView + +@export( + Father="DrawViewPy", + Name="DrawViewCollectionPy", + Twin="DrawViewCollection", + TwinPointer="DrawViewCollection", + Include="Mod/TechDraw/App/DrawViewCollection.h", + Namespace="TechDraw", + FatherInclude="Mod/TechDraw/App/DrawViewPy.h", + FatherNamespace="TechDraw", +) +class DrawViewCollectionPy(DrawView): + """ + Feature for creating and manipulating Technical Drawing View Collections + """ + + def addView(self) -> Any: + """addView(DrawView object) - Add a new View to this Group. Returns count of views.""" + ... + + def removeView(self) -> Any: + """removeView(DrawView object) - Remove specified Viewfrom this Group. Returns count of views in Group.""" + ... diff --git a/src/Mod/TechDraw/App/DrawViewDimExtentPy.pyi b/src/Mod/TechDraw/App/DrawViewDimExtentPy.pyi new file mode 100644 index 0000000000..a2149365e9 --- /dev/null +++ b/src/Mod/TechDraw/App/DrawViewDimExtentPy.pyi @@ -0,0 +1,23 @@ +from typing import Any + +from Base.Metadata import export +from TechDraw.DrawViewDimension import DrawViewDimension + +@export( + Father="DrawViewDimensionPy", + Name="DrawViewDimExtentPy", + Twin="DrawViewDimExtent", + TwinPointer="DrawViewDimExtent", + Include="Mod/TechDraw/App/DrawViewDimExtent.h", + Namespace="TechDraw", + FatherInclude="Mod/TechDraw/App/DrawViewDimensionPy.h", + FatherNamespace="TechDraw", +) +class DrawViewDimExtentPy(DrawViewDimension): + """ + Feature for creating and manipulating Technical Drawing DimExtents + """ + + def tbd(self) -> Any: + """tbd() - returns tbd.""" + ... diff --git a/src/Mod/TechDraw/App/DrawViewDimensionPy.pyi b/src/Mod/TechDraw/App/DrawViewDimensionPy.pyi new file mode 100644 index 0000000000..207e32ec1e --- /dev/null +++ b/src/Mod/TechDraw/App/DrawViewDimensionPy.pyi @@ -0,0 +1,47 @@ +from typing import Any + +from Base.Metadata import export +from TechDraw.DrawView import DrawView + +@export( + Father="DrawViewPy", + Name="DrawViewDimensionPy", + Twin="DrawViewDimension", + TwinPointer="DrawViewDimension", + Include="Mod/TechDraw/App/DrawViewDimension.h", + Namespace="TechDraw", + FatherInclude="Mod/TechDraw/App/DrawViewPy.h", + FatherNamespace="TechDraw", +) +class DrawViewDimensionPy(DrawView): + """ + Feature for creating and manipulating Technical Drawing Dimensions + """ + + def getRawValue(self) -> Any: + """getRawValue() - returns Dimension value in mm.""" + ... + + def getText(self) -> Any: + """getText() - returns Dimension text.""" + ... + + def getLinearPoints(self) -> Any: + """getLinearPoints() - returns list of points for linear Dimension""" + ... + + def getArcPoints(self) -> Any: + """getArcPoints() - returns list of points for circle/arc Dimension""" + ... + + def getAnglePoints(self) -> Any: + """getAnglePoints() - returns list of points for angle Dimension""" + ... + + def getAreaPoints(self) -> Any: + """getAreaPoints() - returns list of values (center, filled area, actual area) for area Dimension.""" + ... + + def getArrowPositions(self) -> Any: + """getArrowPositions() - returns list of locations or Dimension Arrowheads. Locations are in unscaled coordinates of parent View""" + ... diff --git a/src/Mod/TechDraw/App/DrawViewPartPy.pyi b/src/Mod/TechDraw/App/DrawViewPartPy.pyi new file mode 100644 index 0000000000..f42b16f290 --- /dev/null +++ b/src/Mod/TechDraw/App/DrawViewPartPy.pyi @@ -0,0 +1,171 @@ +from typing import Any + +from Base.Metadata import export +from TechDraw.rawView import DrawView + +@export( + Father="DrawViewPy", + Name="DrawViewPartPy", + Twin="DrawViewPart", + TwinPointer="DrawViewPart", + Include="Mod/TechDraw/App/DrawViewPart.h", + Namespace="TechDraw", + FatherInclude="Mod/TechDraw/App/DrawViewPy.h", + FatherNamespace="TechDraw", +) +class DrawViewPartPy(DrawView): + """ + Feature for creating and manipulating Technical Drawing Part Views + """ + + def getVisibleEdges(self) -> Any: + """ + getVisibleEdges([conventionalCoords]) - get the visible edges in the View as Part::TopoShapeEdges. Edges are returned + in conventional coordinates if conventionalCoords is True. The default is to return Qt inverted Y coordinates. + """ + ... + + def getVisibleVertexes(self) -> Any: + """ + getVisibleVertexes() - get the visible vertexes as App.Vector in the View's coordinate system. App.Vectors are returned + in conventional coordinates if conventionalCoords is True. The default is to return Qt inverted Y coordinates. + """ + ... + + def getHiddenEdges(self) -> Any: + """ + getHiddenEdges([conventionalCoords]) - get the hidden edges in the View as Part::TopoShapeEdges. Edges are returned + in conventional coordinates if conventionalCoords is True. The default is to return Qt inverted Y coordinates. + """ + ... + + def getHiddenVertexes(self) -> Any: + """ + getHiddenVertexes() - get the hidden vertexes as App.Vector in the View's coordinate system. App.Vectors are returned + in conventional coordinates if conventionalCoords is True. The default is to return Qt inverted Y coordinates. + """ + ... + + def makeCosmeticVertex(self) -> Any: + """id = makeCosmeticVertex(p1) - add a CosmeticVertex at p1 (View coordinates). Returns unique id vertex.""" + ... + + def makeCosmeticVertex3d(self) -> Any: + """id = makeCosmeticVertex3d(p1) - add a CosmeticVertex at p1 (3d model coordinates). Returns unique id vertex.""" + ... + + def getCosmeticVertex(self) -> Any: + """cv = getCosmeticVertex(id) - returns CosmeticVertex with unique id.""" + ... + + def getCosmeticVertexBySelection(self) -> Any: + """cv = getCosmeticVertexBySelection(name) - returns CosmeticVertex with name (Vertex6). Used in selections.""" + ... + + def removeCosmeticVertex(self) -> Any: + """removeCosmeticVertex(cv) - remove CosmeticVertex from View. Returns None.""" + ... + + def clearCosmeticVertices(self) -> Any: + """clearCosmeticVertices() - remove all CosmeticVertices from the View. Returns None.""" + ... + + def makeCosmeticLine(self) -> Any: + """tag = makeCosmeticLine(p1, p2) - add a CosmeticEdge from p1 to p2(View coordinates). Returns tag of new CosmeticEdge.""" + ... + + def makeCosmeticLine3D(self) -> Any: + """tag = makeCosmeticLine3D(p1, p2) - add a CosmeticEdge from p1 to p2(3D coordinates). Returns tag of new CosmeticEdge.""" + ... + + def makeCosmeticCircle(self) -> Any: + """tag = makeCosmeticCircle(center, radius) - add a CosmeticEdge at center with radius radius(View coordinates). Returns tag of new CosmeticEdge.""" + ... + + def makeCosmeticCircleArc(self) -> Any: + """tag = makeCosmeticCircleArc(center, radius, start, end) - add a CosmeticEdge at center with radius radius(View coordinates) from start angle to end angle. Returns tag of new CosmeticEdge.""" + ... + + def makeCosmeticCircle3d(self) -> Any: + """tag = makeCosmeticCircle3d(center, radius) - add a CosmeticEdge at center (3d point) with radius. Returns tag of new CosmeticEdge.""" + ... + + def makeCosmeticCircleArc3d(self) -> Any: + """tag = makeCosmeticCircleArc3d(center, radius, start, end) - add a CosmeticEdge at center (3d point) with radius from start angle to end angle. Returns tag of new CosmeticEdge.""" + ... + + def getCosmeticEdge(self) -> Any: + """ce = getCosmeticEdge(id) - returns CosmeticEdge with unique id.""" + ... + + def getCosmeticEdgeBySelection(self) -> Any: + """ce = getCosmeticEdgeBySelection(name) - returns CosmeticEdge by name (Edge25). Used in selections""" + ... + + def removeCosmeticEdge(self) -> Any: + """removeCosmeticEdge(ce) - remove CosmeticEdge ce from View. Returns None.""" + ... + + def makeCenterLine(self) -> Any: + """makeCenterLine(subNames, mode) - draw a center line on this viewPart. SubNames is a list of n Faces, 2 Edges or 2 Vertices (ex [Face1,Face2,Face3]. Returns unique tag of added CenterLine.""" + ... + + def getCenterLine(self) -> Any: + """cl = getCenterLine(id) - returns CenterLine with unique id.""" + ... + + def getCenterLineBySelection(self) -> Any: + """cl = getCenterLineBySelection(name) - returns CenterLine by name (Edge25). Used in selections""" + ... + + def removeCenterLine(self) -> Any: + """removeCenterLine(cl) - remove CenterLine cl from View. Returns None.""" + ... + + def clearCosmeticEdges(self) -> Any: + """clearCosmeticEdges() - remove all CosmeticLines from the View. Returns None.""" + ... + + def clearCenterLines(self) -> Any: + """clearCenterLines() - remove all CenterLines from the View. Returns None.""" + ... + + def clearGeomFormats(self) -> Any: + """clearGeomFormats() - remove all GeomFormats from the View. Returns None.""" + ... + + def formatGeometricEdge(self) -> Any: + """formatGeometricEdge(index, style, weight, color, visible). Returns None.""" + ... + + def getEdgeByIndex(self) -> Any: + """getEdgeByIndex(edgeIndex). Returns Part.TopoShape.""" + ... + + def getEdgeBySelection(self) -> Any: + """getEdgeBySelection(edgeName). Returns Part.TopoShape.""" + ... + + def getVertexByIndex(self) -> Any: + """getVertexByIndex(vertexIndex). Returns Part.TopoShape.""" + ... + + def getVertexBySelection(self) -> Any: + """getVertexBySelection(vertexName). Returns Part.TopoShape.""" + ... + + def projectPoint(self) -> Any: + """ + projectPoint(vector3d point, [bool invert]). Returns the projection of point in the + projection coordinate system of this DrawViewPart. Optionally inverts the Y coordinate of the + result. + """ + ... + + def getGeometricCenter(self) -> Any: + """point3d = getGeometricCenter() - returns the geometric center of the source shapes.""" + ... + + def requestPaint(self) -> Any: + """requestPaint(). Redraw the graphic for this View.""" + ... diff --git a/src/Mod/TechDraw/App/DrawViewPartPy.xml b/src/Mod/TechDraw/App/DrawViewPartPy.xml index 0d494262c0..6ffc963e7f 100644 --- a/src/Mod/TechDraw/App/DrawViewPartPy.xml +++ b/src/Mod/TechDraw/App/DrawViewPartPy.xml @@ -15,26 +15,26 @@ - getVisibleEdges([conventionalCoords]) - get the visible edges in the View as Part::TopoShapeEdges. Edges are returned\ - in conventional coordinates if conventionalCoords is True. The default is to return Qt inverted Y coordinates. + getVisibleEdges([conventionalCoords]) - get the visible edges in the View as Part::TopoShapeEdges. Edges are returned +in conventional coordinates if conventionalCoords is True. The default is to return Qt inverted Y coordinates. - getVisibleVertexes() - get the visible vertexes as App.Vector in the View's coordinate system. App.Vectors are returned\ - in conventional coordinates if conventionalCoords is True. The default is to return Qt inverted Y coordinates. + getVisibleVertexes() - get the visible vertexes as App.Vector in the View's coordinate system. App.Vectors are returned +in conventional coordinates if conventionalCoords is True. The default is to return Qt inverted Y coordinates. - getHiddenEdges([conventionalCoords]) - get the hidden edges in the View as Part::TopoShapeEdges. Edges are returned\ - in conventional coordinates if conventionalCoords is True. The default is to return Qt inverted Y coordinates. + getHiddenEdges([conventionalCoords]) - get the hidden edges in the View as Part::TopoShapeEdges. Edges are returned +in conventional coordinates if conventionalCoords is True. The default is to return Qt inverted Y coordinates. - getHiddenVertexes() - get the hidden vertexes as App.Vector in the View's coordinate system. App.Vectors are returned\ - in conventional coordinates if conventionalCoords is True. The default is to return Qt inverted Y coordinates. + getHiddenVertexes() - get the hidden vertexes as App.Vector in the View's coordinate system. App.Vectors are returned +in conventional coordinates if conventionalCoords is True. The default is to return Qt inverted Y coordinates. @@ -175,8 +175,9 @@ projectPoint(vector3d point, [bool invert]). Returns the projection of point in the - projection coordinate system of this DrawViewPart. Optionally inverts the Y coordinate of the - result. +projection coordinate system of this DrawViewPart. Optionally inverts the Y coordinate of the +result. + diff --git a/src/Mod/TechDraw/App/DrawViewPy.pyi b/src/Mod/TechDraw/App/DrawViewPy.pyi new file mode 100644 index 0000000000..1ce4ce3940 --- /dev/null +++ b/src/Mod/TechDraw/App/DrawViewPy.pyi @@ -0,0 +1,34 @@ +from typing import Any + +from Base.Metadata import export + +from App.DocumentObject import DocumentObject + +@export( + Father="DocumentObjectPy", + Name="DrawViewPy", + Twin="DrawView", + TwinPointer="DrawView", + Include="Mod/TechDraw/App/DrawView.h", + Namespace="TechDraw", + FatherInclude="App/DocumentObjectPy.h", + FatherNamespace="App", +) +class DrawViewPy(DocumentObject): + """ + Feature for creating and manipulating Technical Drawing Views + """ + + def translateLabel(self) -> Any: + """ + translateLabel(translationContext, objectBaseName, objectUniqueName). + No return value. Replace the current label with a translated version where possible. + """ + ... + + def getScale(self) -> Any: + """ + float scale = getScale(). Returns the correct scale for this view. Handles whether to + use this view's scale property or a parent's view (as in a projection group). + """ + ... diff --git a/src/Mod/TechDraw/App/DrawViewPy.xml b/src/Mod/TechDraw/App/DrawViewPy.xml index 4e368bd30d..8b61459a55 100644 --- a/src/Mod/TechDraw/App/DrawViewPy.xml +++ b/src/Mod/TechDraw/App/DrawViewPy.xml @@ -16,14 +16,14 @@ translateLabel(translationContext, objectBaseName, objectUniqueName). - No return value. Replace the current label with a translated version where possible. +No return value. Replace the current label with a translated version where possible. float scale = getScale(). Returns the correct scale for this view. Handles whether to - use this view's scale property or a parent's view (as in a projection group). +use this view's scale property or a parent's view (as in a projection group). diff --git a/src/Mod/TechDraw/App/DrawViewSymbolPy.pyi b/src/Mod/TechDraw/App/DrawViewSymbolPy.pyi new file mode 100644 index 0000000000..decbb8c772 --- /dev/null +++ b/src/Mod/TechDraw/App/DrawViewSymbolPy.pyi @@ -0,0 +1,23 @@ +from typing import Any + +from Base.Metadata import export +from TechDraw.DrawView import DrawView + +@export( + Father="DrawViewPy", + Name="DrawViewSymbolPy", + Twin="DrawViewSymbol", + TwinPointer="DrawViewSymbol", + Include="Mod/TechDraw/App/DrawViewSymbol.h", + Namespace="TechDraw", + FatherInclude="Mod/TechDraw/App/DrawViewPy.h", + FatherNamespace="TechDraw", +) +class DrawViewSymbolPy(DrawView): + """ + Feature for creating and manipulating Drawing SVG Symbol Views + """ + + def dumpSymbol(self) -> Any: + """dumpSymbol(fileSpec) - dump the contents of Symbol to a file""" + ... diff --git a/src/Mod/TechDraw/App/DrawWeldSymbolPy.pyi b/src/Mod/TechDraw/App/DrawWeldSymbolPy.pyi new file mode 100644 index 0000000000..0069900aa8 --- /dev/null +++ b/src/Mod/TechDraw/App/DrawWeldSymbolPy.pyi @@ -0,0 +1,17 @@ +from Base.Metadata import export +from TechDraw.DrawView import DrawView + +@export( + Father="DrawViewPy", + Name="DrawWeldSymbolPy", + Twin="DrawWeldSymbol", + TwinPointer="DrawWeldSymbol", + Include="Mod/TechDraw/App/DrawWeldSymbol.h", + Namespace="TechDraw", + FatherInclude="Mod/TechDraw/App/DrawViewPy.h", + FatherNamespace="TechDraw", +) +class DrawWeldSymbolPy(DrawView): + """ + Feature for adding welding tiles to leader lines + """ diff --git a/src/Mod/TechDraw/App/GeomFormatPy.pyi b/src/Mod/TechDraw/App/GeomFormatPy.pyi new file mode 100644 index 0000000000..4ed58a36c3 --- /dev/null +++ b/src/Mod/TechDraw/App/GeomFormatPy.pyi @@ -0,0 +1,33 @@ +from typing import Any, Final + +from Base.PyObjectBase import PyObjectBase +from Base.Metadata import constmethod, export + +@export( + Father="PyObjectBase", + Name="GeomFormatPy", + Twin="GeomFormat", + TwinPointer="GeomFormat", + Include="Mod/TechDraw/App/Cosmetic.h", + Namespace="TechDraw", + FatherInclude="Base/PyObjectBase.h", + FatherNamespace="Base", + Constructor=True, + Delete=True, +) +class GeomFormatPy(PyObjectBase): + """ + GeomFormat specifies appearance parameters for TechDraw Geometry objects + """ + + @constmethod + def clone(self) -> Any: + """Create a clone of this geomformat""" + ... + + @constmethod + def copy(self) -> Any: + """Create a copy of this geomformat""" + ... + Tag: Final[str] + """Gives the tag of the GeomFormat as string.""" diff --git a/src/Tools/bindings/model/generateModel_Python.py b/src/Tools/bindings/model/generateModel_Python.py index d00b4352d2..b48e0d5883 100644 --- a/src/Tools/bindings/model/generateModel_Python.py +++ b/src/Tools/bindings/model/generateModel_Python.py @@ -138,6 +138,8 @@ def _python_type_to_parameter_type(py_type: str) -> ParameterType: return ParameterType.SEQUENCE case _ if py_type.startswith(("tuple", "typing.tuple")): return ParameterType.TUPLE + case _ if py_type.startswith(("pycxxvector")): + return ParameterType.VECTOR case _: return ParameterType.OBJECT diff --git a/src/Tools/bindings/model/typedModel.py b/src/Tools/bindings/model/typedModel.py index e27603b092..a3d34b3033 100644 --- a/src/Tools/bindings/model/typedModel.py +++ b/src/Tools/bindings/model/typedModel.py @@ -24,6 +24,7 @@ class ParameterType(str, Enum): MODULE = "Module" CALLABLE = "Callable" SEQUENCE = "Sequence" + VECTOR = "Vector" def __str__(self): return self.value