[bindings] fix signatures in pyi files
This commit is contained in:
@@ -13,7 +13,7 @@ class ApplicationDirectories(PyObjectBase):
|
||||
"""
|
||||
|
||||
@staticmethod
|
||||
def usingCurrentVersionConfig(path: str) -> bool:
|
||||
def usingCurrentVersionConfig(path: str, /) -> bool:
|
||||
"""
|
||||
Determine if a given config path is for the current version of the program.
|
||||
|
||||
@@ -23,7 +23,7 @@ class ApplicationDirectories(PyObjectBase):
|
||||
...
|
||||
|
||||
@staticmethod
|
||||
def migrateAllPaths(paths: list[str]) -> None:
|
||||
def migrateAllPaths(paths: list[str], /) -> None:
|
||||
"""
|
||||
Migrate a set of versionable configuration directories from the given paths to a new version.
|
||||
|
||||
@@ -47,7 +47,7 @@ class ApplicationDirectories(PyObjectBase):
|
||||
...
|
||||
|
||||
@staticmethod
|
||||
def versionStringForPath(major: int, minor: int) -> str:
|
||||
def versionStringForPath(major: int, minor: int, /) -> str:
|
||||
"""
|
||||
Given a major and minor version number.
|
||||
|
||||
@@ -62,7 +62,7 @@ class ApplicationDirectories(PyObjectBase):
|
||||
...
|
||||
|
||||
@staticmethod
|
||||
def isVersionedPath(startingPath: str) -> bool:
|
||||
def isVersionedPath(startingPath: str, /) -> bool:
|
||||
"""
|
||||
Determine if a given path is versioned.
|
||||
|
||||
@@ -80,7 +80,7 @@ class ApplicationDirectories(PyObjectBase):
|
||||
...
|
||||
|
||||
@staticmethod
|
||||
def mostRecentAvailableConfigVersion(startingPath: str) -> str:
|
||||
def mostRecentAvailableConfigVersion(startingPath: str, /) -> str:
|
||||
"""
|
||||
Given a base path that is expected to contain versioned subdirectories, locate the
|
||||
directory name (*not* the path, only the final component, the version string itself)
|
||||
@@ -97,7 +97,7 @@ class ApplicationDirectories(PyObjectBase):
|
||||
...
|
||||
|
||||
@staticmethod
|
||||
def mostRecentConfigFromBase(startingPath: str) -> str:
|
||||
def mostRecentConfigFromBase(startingPath: str, /) -> str:
|
||||
"""
|
||||
Given a base path that is expected to contained versioned subdirectories, locate the
|
||||
directory corresponding to the most recent version of the software, up to and including
|
||||
@@ -113,7 +113,7 @@ class ApplicationDirectories(PyObjectBase):
|
||||
...
|
||||
|
||||
@staticmethod
|
||||
def migrateConfig(oldPath: str, newPath: str) -> None:
|
||||
def migrateConfig(oldPath: str, newPath: str, /) -> None:
|
||||
"""
|
||||
A utility method to copy all files and directories from oldPath to newPath, handling the
|
||||
case where newPath might itself be a subdirectory of oldPath (and *not* attempting that
|
||||
|
||||
@@ -74,19 +74,19 @@ class ComplexGeoData(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def applyTranslation(self, translation: Vector) -> None:
|
||||
def applyTranslation(self, translation: Vector, /) -> None:
|
||||
"""
|
||||
Apply an additional translation to the placement
|
||||
"""
|
||||
...
|
||||
|
||||
def applyRotation(self, rotation: Rotation) -> None:
|
||||
def applyRotation(self, rotation: Rotation, /) -> None:
|
||||
"""
|
||||
Apply an additional rotation to the placement
|
||||
"""
|
||||
...
|
||||
|
||||
def transformGeometry(self, transformation: Matrix) -> None:
|
||||
def transformGeometry(self, transformation: Matrix, /) -> None:
|
||||
"""
|
||||
Apply a transformation to the underlying geometry
|
||||
"""
|
||||
@@ -117,21 +117,21 @@ class ComplexGeoData(Persistence):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def getElementName(self, name: str, direction: int = 0) -> str:
|
||||
def getElementName(self, name: str, direction: int = 0, /) -> str:
|
||||
"""
|
||||
Return a mapped element name or reverse.
|
||||
"""
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def getElementIndexedName(self, name: str) -> str | tuple[str, list[int]]:
|
||||
def getElementIndexedName(self, name: str, /) -> str | tuple[str, list[int]]:
|
||||
"""
|
||||
Return the indexed element name.
|
||||
"""
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def getElementMappedName(self, name: str) -> str | tuple[str, list[int]]:
|
||||
def getElementMappedName(self, name: str, /) -> str | tuple[str, list[int]]:
|
||||
"""
|
||||
Return the mapped element name
|
||||
"""
|
||||
|
||||
@@ -89,19 +89,19 @@ class Document(PropertyContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def saveAs(self, path: str) -> None:
|
||||
def saveAs(self, path: str, /) -> None:
|
||||
"""
|
||||
Save the document under a new name to disk.
|
||||
"""
|
||||
...
|
||||
|
||||
def saveCopy(self, path: str) -> None:
|
||||
def saveCopy(self, path: str, /) -> None:
|
||||
"""
|
||||
Save a copy of the document under a new name to disk.
|
||||
"""
|
||||
...
|
||||
|
||||
def load(self, path: str) -> None:
|
||||
def load(self, path: str, /) -> None:
|
||||
"""
|
||||
Load the document from the given path.
|
||||
"""
|
||||
@@ -132,7 +132,7 @@ class Document(PropertyContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def getUniqueObjectName(self, objName: str) -> str:
|
||||
def getUniqueObjectName(self, objName: str, /) -> str:
|
||||
"""
|
||||
Return the same name, or the name made unique, for Example Box -> Box002 if there are conflicting name
|
||||
already in the document.
|
||||
@@ -145,13 +145,13 @@ class Document(PropertyContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def mergeProject(self, path: str) -> None:
|
||||
def mergeProject(self, path: str, /) -> None:
|
||||
"""
|
||||
Merges this document with another project file.
|
||||
"""
|
||||
...
|
||||
|
||||
def exportGraphviz(self, path: str = None) -> str | None:
|
||||
def exportGraphviz(self, path: str = None, /) -> str | None:
|
||||
"""
|
||||
Export the dependencies of the objects as graph.
|
||||
|
||||
@@ -159,7 +159,7 @@ class Document(PropertyContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def openTransaction(self, name: str) -> None:
|
||||
def openTransaction(self, name: str, /) -> None:
|
||||
"""
|
||||
Open a new Undo/Redo transaction.
|
||||
|
||||
@@ -185,7 +185,6 @@ class Document(PropertyContainer):
|
||||
|
||||
def addObject(
|
||||
self,
|
||||
*,
|
||||
type: str,
|
||||
name: str = None,
|
||||
objProxy: object = None,
|
||||
@@ -210,7 +209,6 @@ class Document(PropertyContainer):
|
||||
|
||||
def addProperty(
|
||||
self,
|
||||
*,
|
||||
type: str,
|
||||
name: str,
|
||||
group: str = "",
|
||||
@@ -219,7 +217,8 @@ class Document(PropertyContainer):
|
||||
read_only: bool = False,
|
||||
hidden: bool = False,
|
||||
locked: bool = False,
|
||||
) -> Document:
|
||||
enum_vals: list[str] | None = None,
|
||||
) -> Document:
|
||||
"""
|
||||
Add a generic property.
|
||||
|
||||
@@ -238,7 +237,7 @@ class Document(PropertyContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def removeProperty(self, name: str) -> None:
|
||||
def removeProperty(self, name: str, /) -> None:
|
||||
"""
|
||||
Remove a generic property.
|
||||
|
||||
@@ -246,7 +245,7 @@ class Document(PropertyContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def removeObject(self, name: str) -> None:
|
||||
def removeObject(self, name: str, /) -> None:
|
||||
"""
|
||||
Remove an object from the document.
|
||||
"""
|
||||
@@ -271,7 +270,10 @@ class Document(PropertyContainer):
|
||||
...
|
||||
|
||||
def moveObject(
|
||||
self, object: DocumentObject, with_dependencies: bool = False
|
||||
self,
|
||||
object: DocumentObject,
|
||||
with_dependencies: bool = False,
|
||||
/,
|
||||
) -> DocumentObject:
|
||||
"""
|
||||
Transfers an object from another document to this document.
|
||||
@@ -283,7 +285,9 @@ class Document(PropertyContainer):
|
||||
...
|
||||
|
||||
def importLinks(
|
||||
self, object: DocumentObject = None
|
||||
self,
|
||||
object: DocumentObject = None,
|
||||
/,
|
||||
) -> tuple[DocumentObject, ...]:
|
||||
"""
|
||||
Import any externally linked object given a list of objects in
|
||||
@@ -319,7 +323,7 @@ class Document(PropertyContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def setClosable(self, closable: bool) -> None:
|
||||
def setClosable(self, closable: bool, /) -> None:
|
||||
"""
|
||||
Set a flag that allows or forbids to close a document
|
||||
"""
|
||||
@@ -331,7 +335,7 @@ class Document(PropertyContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def setAutoCreated(self, autoCreated: bool) -> None:
|
||||
def setAutoCreated(self, autoCreated: bool, /) -> None:
|
||||
"""
|
||||
Set a flag that indicates if a document is autoCreated
|
||||
"""
|
||||
@@ -348,6 +352,7 @@ class Document(PropertyContainer):
|
||||
objs: Sequence[DocumentObject] = None,
|
||||
force: bool = False,
|
||||
check_cycle: bool = False,
|
||||
/,
|
||||
) -> int:
|
||||
"""
|
||||
Recompute the document and returns the amount of recomputed features.
|
||||
@@ -372,13 +377,13 @@ class Document(PropertyContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def getObject(self, name: str) -> DocumentObject:
|
||||
def getObject(self, name: str, /) -> DocumentObject:
|
||||
"""
|
||||
Return the object with the given name
|
||||
"""
|
||||
...
|
||||
|
||||
def getObjectsByLabel(self, label: str) -> list[DocumentObject]:
|
||||
def getObjectsByLabel(self, label: str, /) -> list[DocumentObject]:
|
||||
"""
|
||||
Return the objects with the given label name.
|
||||
|
||||
@@ -388,7 +393,6 @@ class Document(PropertyContainer):
|
||||
|
||||
def findObjects(
|
||||
self,
|
||||
*,
|
||||
Type: str = None,
|
||||
Name: str = None,
|
||||
Label: str = None,
|
||||
@@ -410,6 +414,7 @@ class Document(PropertyContainer):
|
||||
obj: DocumentObject,
|
||||
options: int = 0,
|
||||
maxCount: int = 0,
|
||||
/,
|
||||
) -> tuple[DocumentObject, ...]:
|
||||
"""
|
||||
Return objects linked to 'obj'
|
||||
@@ -432,7 +437,7 @@ class Document(PropertyContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def getDependentDocuments(self, sort: bool = True) -> list[DocumentObject]:
|
||||
def getDependentDocuments(self, sort: bool = True, /) -> list[DocumentObject]:
|
||||
"""
|
||||
Returns a list of documents that this document directly or indirectly links to including itself.
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import constmethod
|
||||
from Base.Matrix import Matrix
|
||||
from Document import Document
|
||||
@@ -79,7 +83,7 @@ class DocumentObject(ExtensionContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def removeProperty(self, string: str) -> None:
|
||||
def removeProperty(self, string: str, /) -> None:
|
||||
"""
|
||||
removeProperty(string) -- Remove a generic property.
|
||||
|
||||
@@ -111,26 +115,26 @@ class DocumentObject(ExtensionContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def setExpression(self, name: str, expression: str) -> None:
|
||||
def setExpression(self, name: str, expression: str, /) -> None:
|
||||
"""
|
||||
Register an expression for a property
|
||||
"""
|
||||
...
|
||||
|
||||
def clearExpression(self, name: str) -> None:
|
||||
def clearExpression(self, name: str, /) -> None:
|
||||
"""
|
||||
Clear the expression for a property
|
||||
"""
|
||||
...
|
||||
|
||||
@classmethod
|
||||
def evalExpression(cls, expression: str) -> Any:
|
||||
def evalExpression(cls, expression: str, /) -> Any:
|
||||
"""
|
||||
Evaluate an expression
|
||||
"""
|
||||
...
|
||||
|
||||
def recompute(self, recursive: bool = False) -> None:
|
||||
def recompute(self, recursive: bool = False, /) -> None:
|
||||
"""
|
||||
recompute(recursive=False): Recomputes this object
|
||||
"""
|
||||
@@ -191,7 +195,7 @@ class DocumentObject(ExtensionContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def getSubObjectList(self, subname: str) -> list:
|
||||
def getSubObjectList(self, subname: str, /) -> list:
|
||||
"""
|
||||
getSubObjectList(subname)
|
||||
|
||||
@@ -199,7 +203,7 @@ class DocumentObject(ExtensionContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def getSubObjects(self, reason: int = 0) -> list:
|
||||
def getSubObjects(self, reason: int = 0, /) -> list:
|
||||
"""
|
||||
getSubObjects(reason=0): Return subname reference of all sub-objects
|
||||
"""
|
||||
@@ -229,14 +233,14 @@ class DocumentObject(ExtensionContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def setElementVisible(self, element: str, visible: bool) -> int:
|
||||
def setElementVisible(self, element: str, visible: bool, /) -> int:
|
||||
"""
|
||||
setElementVisible(element,visible): Set the visibility of a child element
|
||||
Return -1 if element visibility is not supported, 0 if element not found, 1 if success
|
||||
"""
|
||||
...
|
||||
|
||||
def isElementVisible(self, element: str) -> int:
|
||||
def isElementVisible(self, element: str, /) -> int:
|
||||
"""
|
||||
isElementVisible(element): Check if a child element is visible
|
||||
Return -1 if element visibility is not supported or element not found, 0 if invisible, or else 1
|
||||
@@ -283,7 +287,7 @@ class DocumentObject(ExtensionContainer):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def resolve(self, subname: str) -> tuple:
|
||||
def resolve(self, subname: str, /) -> tuple:
|
||||
"""
|
||||
resolve(subname) -- resolve the sub object
|
||||
|
||||
@@ -296,7 +300,7 @@ class DocumentObject(ExtensionContainer):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def resolveSubElement(self, subname: str, append: bool, type: int) -> tuple:
|
||||
def resolveSubElement(self, subname: str, append: bool, type: int, /) -> tuple:
|
||||
"""
|
||||
resolveSubElement(subname,append,type) -- resolve both new and old style sub element
|
||||
|
||||
@@ -308,14 +312,14 @@ class DocumentObject(ExtensionContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def adjustRelativeLinks(self, parent: DocumentObject, recursive: bool = True) -> bool:
|
||||
def adjustRelativeLinks(self, parent: DocumentObject, recursive: bool = True, /) -> bool:
|
||||
"""
|
||||
adjustRelativeLinks(parent,recursive=True) -- auto correct potential cyclic dependencies
|
||||
"""
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def getElementMapVersion(self, property_name: str) -> str:
|
||||
def getElementMapVersion(self, property_name: str, /) -> str:
|
||||
"""
|
||||
getElementMapVersion(property_name): return element map version of a given geometry property
|
||||
"""
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Extension import Extension
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from DocumentObject import DocumentObject
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Final, Any
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export, constmethod
|
||||
from PropertyContainer import PropertyContainer
|
||||
|
||||
@@ -13,14 +17,14 @@ class ExtensionContainer(PropertyContainer):
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
def addExtension(self, identifier: str) -> None:
|
||||
def addExtension(self, identifier: str, /) -> None:
|
||||
"""
|
||||
Adds an extension to the object. Requires the string identifier for the python extension as argument
|
||||
"""
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def hasExtension(self, identifier: str) -> bool:
|
||||
def hasExtension(self, identifier: str, /) -> bool:
|
||||
"""
|
||||
Returns if this object has the specified extension
|
||||
"""
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from DocumentObject import DocumentObject
|
||||
from Base import Placement
|
||||
from typing import Any, Final, Optional
|
||||
@@ -39,7 +43,7 @@ class GeoFeature(DocumentObject):
|
||||
...
|
||||
|
||||
@staticmethod
|
||||
def getGlobalPlacementOf(targetObj: Any, rootObj: Any, subname: str) -> Placement:
|
||||
def getGlobalPlacementOf(targetObj: Any, rootObj: Any, subname: str, /) -> Placement:
|
||||
"""
|
||||
getGlobalPlacementOf(targetObj, rootObj, subname) -> Base.Placement
|
||||
Selection example: obj = "part1" sub = "linkToPart2.LinkToBody.Pad.face1"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from GroupExtension import GroupExtension
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export
|
||||
from DocumentObjectExtension import DocumentObjectExtension
|
||||
from typing import Any, List
|
||||
@@ -13,37 +17,37 @@ class GroupExtension(DocumentObjectExtension):
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
def newObject(self, type: str, name: str) -> Any:
|
||||
def newObject(self, type: str, name: str, /) -> Any:
|
||||
"""
|
||||
Create and add an object with given type and name to the group
|
||||
"""
|
||||
...
|
||||
|
||||
def addObject(self, obj: Any) -> List[Any]:
|
||||
def addObject(self, obj: Any, /) -> List[Any]:
|
||||
"""
|
||||
Add an object to the group. Returns all objects that have been added.
|
||||
"""
|
||||
...
|
||||
|
||||
def addObjects(self, objects: List[Any]) -> List[Any]:
|
||||
def addObjects(self, objects: List[Any], /) -> List[Any]:
|
||||
"""
|
||||
Adds multiple objects to the group. Expects a list and returns all objects that have been added.
|
||||
"""
|
||||
...
|
||||
|
||||
def setObjects(self, objects: List[Any]) -> List[Any]:
|
||||
def setObjects(self, objects: List[Any], /) -> List[Any]:
|
||||
"""
|
||||
Sets the objects of the group. Expects a list and returns all objects that are now in the group.
|
||||
"""
|
||||
...
|
||||
|
||||
def removeObject(self, obj: Any) -> List[Any]:
|
||||
def removeObject(self, obj: Any, /) -> List[Any]:
|
||||
"""
|
||||
Remove an object from the group and returns all objects that have been removed.
|
||||
"""
|
||||
...
|
||||
|
||||
def removeObjects(self, objects: List[Any]) -> List[Any]:
|
||||
def removeObjects(self, objects: List[Any], /) -> List[Any]:
|
||||
"""
|
||||
Remove multiple objects from the group. Expects a list and returns all objects that have been removed.
|
||||
"""
|
||||
@@ -55,20 +59,20 @@ class GroupExtension(DocumentObjectExtension):
|
||||
"""
|
||||
...
|
||||
|
||||
def getObject(self, name: str) -> Any:
|
||||
def getObject(self, name: str, /) -> Any:
|
||||
"""
|
||||
Return the object with the given name
|
||||
"""
|
||||
...
|
||||
|
||||
def getObjectsOfType(self, typename: str) -> List[Any]:
|
||||
def getObjectsOfType(self, typename: str, /) -> List[Any]:
|
||||
"""
|
||||
Returns all object in the group of given type
|
||||
@param typename The Freecad type identifier
|
||||
"""
|
||||
...
|
||||
|
||||
def hasObject(self, obj: Any, recursive: bool = False) -> bool:
|
||||
def hasObject(self, obj: Any, recursive: bool = False, /) -> bool:
|
||||
"""
|
||||
hasObject(obj, recursive=false)
|
||||
|
||||
@@ -78,7 +82,7 @@ class GroupExtension(DocumentObjectExtension):
|
||||
"""
|
||||
...
|
||||
|
||||
def allowObject(self, obj: Any) -> bool:
|
||||
def allowObject(self, obj: Any, /) -> bool:
|
||||
"""
|
||||
Returns true if obj is allowed in the group extension.
|
||||
"""
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export
|
||||
from DocumentObjectExtension import DocumentObjectExtension
|
||||
from typing import Any, Final, List, Tuple, Optional, Union, overload
|
||||
@@ -41,31 +45,31 @@ class LinkBaseExtension(DocumentObjectExtension):
|
||||
"""
|
||||
...
|
||||
|
||||
def getLinkExtProperty(self, name: str) -> Any:
|
||||
def getLinkExtProperty(self, name: str, /) -> Any:
|
||||
"""
|
||||
getLinkExtProperty(name): return the property value by its predefined name
|
||||
"""
|
||||
...
|
||||
|
||||
def getLinkExtPropertyName(self, name: str) -> str:
|
||||
def getLinkExtPropertyName(self, name: str, /) -> str:
|
||||
"""
|
||||
getLinkExtPropertyName(name): lookup the property name by its predefined name
|
||||
"""
|
||||
...
|
||||
|
||||
@overload
|
||||
def getLinkPropertyInfo(self) -> tuple:
|
||||
def getLinkPropertyInfo(self, /) -> tuple:
|
||||
...
|
||||
|
||||
@overload
|
||||
def getLinkPropertyInfo(self, index: int) -> tuple:
|
||||
def getLinkPropertyInfo(self, index: int, /) -> tuple:
|
||||
...
|
||||
|
||||
@overload
|
||||
def getLinkPropertyInfo(self, name: str) -> tuple:
|
||||
def getLinkPropertyInfo(self, name: str, /) -> tuple:
|
||||
...
|
||||
|
||||
def getLinkPropertyInfo(self, arg: Any = None) -> tuple:
|
||||
def getLinkPropertyInfo(self, arg: Any = None, /) -> tuple:
|
||||
"""
|
||||
getLinkPropertyInfo(): return a tuple of (name,type,doc) for all supported properties.
|
||||
|
||||
@@ -75,7 +79,7 @@ class LinkBaseExtension(DocumentObjectExtension):
|
||||
"""
|
||||
...
|
||||
|
||||
def setLink(self, obj: Any, subName: Optional[str] = None, subElements: Optional[Union[str, Tuple[str, ...]]] = None) -> None:
|
||||
def setLink(self, obj: Any, subName: Optional[str] = None, subElements: Optional[Union[str, Tuple[str, ...]]] = None, /) -> None:
|
||||
"""
|
||||
setLink(obj,subName=None,subElements=None): Set link object.
|
||||
|
||||
@@ -92,7 +96,7 @@ class LinkBaseExtension(DocumentObjectExtension):
|
||||
"""
|
||||
...
|
||||
|
||||
def cacheChildLabel(self, enable: bool = True) -> None:
|
||||
def cacheChildLabel(self, enable: bool = True, /) -> None:
|
||||
"""
|
||||
cacheChildLabel(enable=True): enable/disable child label cache
|
||||
|
||||
@@ -101,7 +105,7 @@ class LinkBaseExtension(DocumentObjectExtension):
|
||||
"""
|
||||
...
|
||||
|
||||
def flattenSubname(self, subname: str) -> str:
|
||||
def flattenSubname(self, subname: str, /) -> str:
|
||||
"""
|
||||
flattenSubname(subname) -> string
|
||||
|
||||
@@ -109,7 +113,7 @@ class LinkBaseExtension(DocumentObjectExtension):
|
||||
"""
|
||||
...
|
||||
|
||||
def expandSubname(self, subname: str) -> str:
|
||||
def expandSubname(self, subname: str, /) -> str:
|
||||
"""
|
||||
expandSubname(subname) -> string
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export, class_declarations
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
from typing import Any, overload
|
||||
@@ -25,7 +29,7 @@ class Material(PyObjectBase):
|
||||
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
||||
...
|
||||
|
||||
def set(self, string: str) -> None:
|
||||
def set(self, string: str, /) -> None:
|
||||
"""
|
||||
Set(string) -- Set the material.
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export, no_args
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
from typing import List, Tuple, TypeAlias
|
||||
@@ -21,7 +25,7 @@ class MeasureManager(PyObjectBase):
|
||||
"""
|
||||
|
||||
@staticmethod
|
||||
def addMeasureType(id: str, label: str, measureType: MeasureType) -> None:
|
||||
def addMeasureType(id: str, label: str, measureType: MeasureType, /) -> None:
|
||||
"""
|
||||
addMeasureType(id, label, measureType) -> None
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export, class_declarations
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
from typing import Any, List, Dict, overload, Optional
|
||||
@@ -217,7 +221,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def getGenericMetadata(self, name: str) -> List[Any]:
|
||||
def getGenericMetadata(self, name: str, /) -> List[Any]:
|
||||
"""
|
||||
getGenericMetadata(name) -> list
|
||||
|
||||
@@ -228,7 +232,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def addContentItem(self, content_type: str, metadata: "Metadata") -> None:
|
||||
def addContentItem(self, content_type: str, metadata: "Metadata", /) -> None:
|
||||
"""
|
||||
addContentItem(content_type,metadata)
|
||||
|
||||
@@ -236,7 +240,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def removeContentItem(self, content_type: str, name: str) -> None:
|
||||
def removeContentItem(self, content_type: str, name: str, /) -> None:
|
||||
"""
|
||||
removeContentItem(content_type,name)
|
||||
|
||||
@@ -244,7 +248,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def addMaintainer(self, name: str, email: str) -> None:
|
||||
def addMaintainer(self, name: str, email: str, /) -> None:
|
||||
"""
|
||||
addMaintainer(name, email)
|
||||
|
||||
@@ -252,7 +256,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def removeMaintainer(self, name: str, email: str) -> None:
|
||||
def removeMaintainer(self, name: str, email: str, /) -> None:
|
||||
"""
|
||||
removeMaintainer(name, email)
|
||||
|
||||
@@ -260,7 +264,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def addLicense(self, short_code: str, path: str) -> None:
|
||||
def addLicense(self, short_code: str, path: str, /) -> None:
|
||||
"""
|
||||
addLicense(short_code,path)
|
||||
|
||||
@@ -268,7 +272,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def removeLicense(self, short_code: str) -> None:
|
||||
def removeLicense(self, short_code: str, /) -> None:
|
||||
"""
|
||||
removeLicense(short_code)
|
||||
|
||||
@@ -276,7 +280,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def addUrl(self, url_type: str, url: str, branch: str) -> None:
|
||||
def addUrl(self, url_type: str, url: str, branch: str, /) -> None:
|
||||
"""
|
||||
addUrl(url_type,url,branch)
|
||||
|
||||
@@ -288,7 +292,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def removeUrl(self, url_type: str, url: str) -> None:
|
||||
def removeUrl(self, url_type: str, url: str, /) -> None:
|
||||
"""
|
||||
removeUrl(url_type,url)
|
||||
|
||||
@@ -296,7 +300,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def addAuthor(self, name: str, email: str) -> None:
|
||||
def addAuthor(self, name: str, email: str, /) -> None:
|
||||
"""
|
||||
addAuthor(name, email)
|
||||
|
||||
@@ -304,7 +308,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def removeAuthor(self, name: str, email: str) -> None:
|
||||
def removeAuthor(self, name: str, email: str, /) -> None:
|
||||
"""
|
||||
removeAuthor(name, email)
|
||||
|
||||
@@ -312,7 +316,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def addDepend(self, name: str, kind: str, optional: bool) -> None:
|
||||
def addDepend(self, name: str, kind: str, optional: bool, /) -> None:
|
||||
"""
|
||||
addDepend(name, kind, optional)
|
||||
|
||||
@@ -322,7 +326,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def removeDepend(self, name: str, kind: str) -> None:
|
||||
def removeDepend(self, name: str, kind: str, /) -> None:
|
||||
"""
|
||||
removeDepend(name, kind)
|
||||
|
||||
@@ -332,7 +336,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def addConflict(self, name: str, kind: str) -> None:
|
||||
def addConflict(self, name: str, kind: str, /) -> None:
|
||||
"""
|
||||
addConflict(name, kind)
|
||||
|
||||
@@ -340,7 +344,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def removeConflict(self, name: str, kind: str) -> None:
|
||||
def removeConflict(self, name: str, kind: str, /) -> None:
|
||||
"""
|
||||
removeConflict(name, kind)
|
||||
|
||||
@@ -348,7 +352,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def addReplace(self, name: str) -> None:
|
||||
def addReplace(self, name: str, /) -> None:
|
||||
"""
|
||||
addReplace(name)
|
||||
|
||||
@@ -356,7 +360,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def removeReplace(self, name: str) -> None:
|
||||
def removeReplace(self, name: str, /) -> None:
|
||||
"""
|
||||
removeReplace(name)
|
||||
|
||||
@@ -364,7 +368,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def addTag(self, tag: str) -> None:
|
||||
def addTag(self, tag: str, /) -> None:
|
||||
"""
|
||||
addTag(tag)
|
||||
|
||||
@@ -372,7 +376,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def removeTag(self, tag: str) -> None:
|
||||
def removeTag(self, tag: str, /) -> None:
|
||||
"""
|
||||
removeTag(tag)
|
||||
|
||||
@@ -380,7 +384,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def addFile(self, filename: str) -> None:
|
||||
def addFile(self, filename: str, /) -> None:
|
||||
"""
|
||||
addFile(filename)
|
||||
|
||||
@@ -388,7 +392,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def removeFile(self, filename: str) -> None:
|
||||
def removeFile(self, filename: str, /) -> None:
|
||||
"""
|
||||
removeFile(filename)
|
||||
|
||||
@@ -396,7 +400,7 @@ class Metadata(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def write(self, filename: str) -> None:
|
||||
def write(self, filename: str, /) -> None:
|
||||
"""
|
||||
write(filename)
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from GeoFeatureGroupExtension import GeoFeatureGroupExtension
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from GeoFeature import GeoFeature
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export, constmethod
|
||||
from Base.Persistence import Persistence
|
||||
from typing import Any, Final, Union, List, Optional
|
||||
@@ -14,7 +18,7 @@ class PropertyContainer(Persistence):
|
||||
PropertiesList: Final[list] = []
|
||||
"""A list of all property names."""
|
||||
|
||||
def getPropertyByName(self, name: str, checkOwner: int = 0) -> Any:
|
||||
def getPropertyByName(self, name: str, checkOwner: int = 0, /) -> Any:
|
||||
"""
|
||||
getPropertyByName(name, checkOwner=0) -> object or Tuple
|
||||
|
||||
@@ -30,7 +34,7 @@ class PropertyContainer(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def getPropertyTouchList(self, name: str) -> tuple:
|
||||
def getPropertyTouchList(self, name: str, /) -> tuple:
|
||||
"""
|
||||
getPropertyTouchList(name) -> tuple
|
||||
|
||||
@@ -41,7 +45,7 @@ class PropertyContainer(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def getTypeOfProperty(self, name: str) -> list:
|
||||
def getTypeOfProperty(self, name: str, /) -> list:
|
||||
"""
|
||||
getTypeOfProperty(name) -> list
|
||||
|
||||
@@ -53,7 +57,7 @@ class PropertyContainer(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def getTypeIdOfProperty(self, name: str) -> str:
|
||||
def getTypeIdOfProperty(self, name: str, /) -> str:
|
||||
"""
|
||||
getTypeIdOfProperty(name) -> str
|
||||
|
||||
@@ -64,7 +68,7 @@ class PropertyContainer(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def setEditorMode(self, name: str, type: Union[int, List[str]]) -> None:
|
||||
def setEditorMode(self, name: str, type: Union[int, List[str]], /) -> None:
|
||||
"""
|
||||
setEditorMode(name, type) -> None
|
||||
|
||||
@@ -79,7 +83,7 @@ class PropertyContainer(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def getEditorMode(self, name: str) -> list:
|
||||
def getEditorMode(self, name: str, /) -> list:
|
||||
"""
|
||||
getEditorMode(name) -> list
|
||||
|
||||
@@ -95,7 +99,7 @@ class PropertyContainer(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def getGroupOfProperty(self, name: str) -> str:
|
||||
def getGroupOfProperty(self, name: str, /) -> str:
|
||||
"""
|
||||
getGroupOfProperty(name) -> str
|
||||
|
||||
@@ -107,7 +111,7 @@ class PropertyContainer(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def setGroupOfProperty(self, name: str, group: str) -> None:
|
||||
def setGroupOfProperty(self, name: str, group: str, /) -> None:
|
||||
"""
|
||||
setGroupOfProperty(name, group) -> None
|
||||
|
||||
@@ -121,8 +125,7 @@ class PropertyContainer(Persistence):
|
||||
...
|
||||
|
||||
def setPropertyStatus(
|
||||
self, name: str, val: Union[int, str, List[Union[str, int]]]
|
||||
) -> None:
|
||||
self, name: str, val: Union[int, str, List[Union[str, int]]], /) -> None:
|
||||
"""
|
||||
setPropertyStatus(name, val) -> None
|
||||
|
||||
@@ -136,7 +139,7 @@ class PropertyContainer(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def getPropertyStatus(self, name: str = "") -> list:
|
||||
def getPropertyStatus(self, name: str = "", /) -> list:
|
||||
"""
|
||||
getPropertyStatus(name='') -> list
|
||||
|
||||
@@ -147,7 +150,7 @@ class PropertyContainer(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def getDocumentationOfProperty(self, name: str) -> str:
|
||||
def getDocumentationOfProperty(self, name: str, /) -> str:
|
||||
"""
|
||||
getDocumentationOfProperty(name) -> str
|
||||
|
||||
@@ -158,7 +161,7 @@ class PropertyContainer(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def setDocumentationOfProperty(self, name: str, docstring: str) -> None:
|
||||
def setDocumentationOfProperty(self, name: str, docstring: str, /) -> None:
|
||||
"""
|
||||
setDocumentationOfProperty(name, docstring) -> None
|
||||
|
||||
@@ -171,7 +174,7 @@ class PropertyContainer(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def getEnumerationsOfProperty(self, name: str) -> Optional[list]:
|
||||
def getEnumerationsOfProperty(self, name: str, /) -> Optional[list]:
|
||||
"""
|
||||
getEnumerationsOfProperty(name) -> list or None
|
||||
|
||||
@@ -198,7 +201,7 @@ class PropertyContainer(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def restorePropertyContent(self, name: str, obj: object) -> None:
|
||||
def restorePropertyContent(self, name: str, obj: object, /) -> None:
|
||||
"""
|
||||
restorePropertyContent(name, obj) -> None
|
||||
|
||||
@@ -213,7 +216,7 @@ class PropertyContainer(Persistence):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def renameProperty(self, oldName: str, newName: str) -> None:
|
||||
def renameProperty(self, oldName: str, newName: str, /) -> None:
|
||||
"""
|
||||
renameProperty(oldName, newName) -> None
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export, constmethod
|
||||
from Base.BaseClass import BaseClass
|
||||
from typing import Any, Final, overload, Dict
|
||||
@@ -19,7 +23,7 @@ class StringHasher(BaseClass):
|
||||
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
||||
...
|
||||
|
||||
def getID(self, arg: Any, base64: bool = False) -> Any:
|
||||
def getID(self, arg: Any, base64: bool = False, /) -> Any:
|
||||
"""
|
||||
getID(txt|id, base64=False) -> StringID
|
||||
|
||||
@@ -34,13 +38,13 @@ class StringHasher(BaseClass):
|
||||
...
|
||||
|
||||
@overload
|
||||
def getID(self, txt: str, base64: bool = False) -> Any: ...
|
||||
def getID(self, txt: str, base64: bool = False, /) -> Any: ...
|
||||
|
||||
@overload
|
||||
def getID(self, id: int, base64: bool = False) -> Any: ...
|
||||
def getID(self, id: int, base64: bool = False, /) -> Any: ...
|
||||
|
||||
@constmethod
|
||||
def isSame(self, other: "StringHasher") -> bool:
|
||||
def isSame(self, other: "StringHasher", /) -> bool:
|
||||
"""
|
||||
Check if two hasher are the same
|
||||
"""
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export, constmethod, class_declarations
|
||||
from Base.BaseClass import BaseClass
|
||||
from typing import Any, Final, List
|
||||
@@ -21,7 +25,7 @@ class StringID(BaseClass):
|
||||
"""
|
||||
|
||||
@constmethod
|
||||
def isSame(self, other: "StringID") -> bool:
|
||||
def isSame(self, other: "StringID", /) -> bool:
|
||||
"""
|
||||
Check if two StringIDs are the same
|
||||
"""
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from DocumentObjectExtension import DocumentObjectExtension
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Metadata import export
|
||||
from PyObjectBase import PyObjectBase
|
||||
from Vector import Vector
|
||||
from Placement import Placement
|
||||
from Axis import Axis
|
||||
from typing import overload
|
||||
|
||||
@export(
|
||||
@@ -55,7 +56,7 @@ class Axis(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def move(self, vector: Vector) -> None:
|
||||
def move(self, vector: Vector, /) -> None:
|
||||
"""
|
||||
move(vector) -> None
|
||||
|
||||
@@ -66,7 +67,7 @@ class Axis(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def multiply(self, placement: Placement) -> Axis:
|
||||
def multiply(self, placement: Placement, /) -> Axis:
|
||||
"""
|
||||
multiply(placement) -> Base.Axis
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Metadata import constmethod
|
||||
from PyObjectBase import PyObjectBase
|
||||
@@ -19,7 +21,7 @@ class BaseClass(PyObjectBase):
|
||||
"""Module in which this class is defined"""
|
||||
|
||||
@constmethod
|
||||
def isDerivedFrom(self, typeName: str) -> bool:
|
||||
def isDerivedFrom(self, typeName: str, /) -> bool:
|
||||
"""
|
||||
Returns true if given type is a father
|
||||
"""
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Metadata import export, constmethod
|
||||
from PyObjectBase import PyObjectBase
|
||||
@@ -134,11 +136,14 @@ class BoundBox(PyObjectBase):
|
||||
...
|
||||
|
||||
@overload
|
||||
def add(self, minMax: Vector) -> None: ...
|
||||
def add(self, minMax: Vector, /) -> None: ...
|
||||
|
||||
@overload
|
||||
def add(self, minMax: Tuple[float, float, float]) -> None: ...
|
||||
def add(self, minMax: Tuple[float, float, float], /) -> None: ...
|
||||
|
||||
@overload
|
||||
def add(self, x: float, y: float, z: float) -> None: ...
|
||||
def add(self, x: float, y: float, z: float, /) -> None: ...
|
||||
|
||||
def add(self, *args: Any, **kwargs: Any) -> None:
|
||||
"""
|
||||
add(minMax) -> None
|
||||
@@ -160,7 +165,7 @@ class BoundBox(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def getPoint(self, index: int) -> Vector:
|
||||
def getPoint(self, index: int, /) -> Vector:
|
||||
"""
|
||||
getPoint(index) -> Base.Vector
|
||||
|
||||
@@ -172,7 +177,7 @@ class BoundBox(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def getEdge(self, index: int) -> Tuple[Vector, ...]:
|
||||
def getEdge(self, index: int, /) -> Tuple[Vector, ...]:
|
||||
"""
|
||||
getEdge(index) -> tuple of Base.Vector
|
||||
|
||||
@@ -184,9 +189,9 @@ class BoundBox(PyObjectBase):
|
||||
...
|
||||
|
||||
@overload
|
||||
def closestPoint(self, point: Vector) -> Vector: ...
|
||||
def closestPoint(self, point: Vector, /) -> Vector: ...
|
||||
@overload
|
||||
def closestPoint(self, x: float, y: float, z: float) -> Vector: ...
|
||||
def closestPoint(self, x: float, y: float, z: float, /) -> Vector: ...
|
||||
@constmethod
|
||||
def closestPoint(self, *args: Any, **kwargs: Any) -> Vector:
|
||||
"""
|
||||
@@ -207,13 +212,13 @@ class BoundBox(PyObjectBase):
|
||||
...
|
||||
|
||||
@overload
|
||||
def intersect(self, boundBox2: "BoundBox") -> bool: ...
|
||||
def intersect(self, boundBox2: "BoundBox", /) -> bool: ...
|
||||
@overload
|
||||
def intersect(
|
||||
self,
|
||||
base: Union[Vector, Tuple[float, float, float]],
|
||||
dir: Union[Vector, Tuple[float, float, float]],
|
||||
) -> bool: ...
|
||||
/,) -> bool: ...
|
||||
def intersect(self, *args: Any) -> bool:
|
||||
"""
|
||||
intersect(boundBox2) -> bool
|
||||
@@ -228,7 +233,7 @@ class BoundBox(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def intersected(self, boundBox2: "BoundBox") -> "BoundBox":
|
||||
def intersected(self, boundBox2: "BoundBox", /) -> "BoundBox":
|
||||
"""
|
||||
intersected(boundBox2) -> Base.BoundBox
|
||||
|
||||
@@ -238,7 +243,7 @@ class BoundBox(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def united(self, boundBox2: "BoundBox") -> "BoundBox":
|
||||
def united(self, boundBox2: "BoundBox", /) -> "BoundBox":
|
||||
"""
|
||||
united(boundBox2) -> Base.BoundBox
|
||||
|
||||
@@ -248,7 +253,7 @@ class BoundBox(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def enlarge(self, variation: float) -> None:
|
||||
def enlarge(self, variation: float, /) -> None:
|
||||
"""
|
||||
enlarge(variation) -> None
|
||||
|
||||
@@ -259,7 +264,7 @@ class BoundBox(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def getIntersectionPoint(self, base: Vector, dir: Vector, epsilon: float = 0.0001) -> Vector:
|
||||
def getIntersectionPoint(self, base: Vector, dir: Vector, epsilon: float = 0.0001, /) -> Vector:
|
||||
"""
|
||||
getIntersectionPoint(base, dir, epsilon=0.0001) -> Base.Vector
|
||||
|
||||
@@ -276,11 +281,11 @@ class BoundBox(PyObjectBase):
|
||||
...
|
||||
|
||||
@overload
|
||||
def move(self, displacement: Vector) -> None: ...
|
||||
def move(self, displacement: Vector, /) -> None: ...
|
||||
@overload
|
||||
def move(self, displacement: Tuple[float, float, float]) -> None: ...
|
||||
def move(self, displacement: Tuple[float, float, float], /) -> None: ...
|
||||
@overload
|
||||
def move(self, x: float, y: float, z: float) -> None: ...
|
||||
def move(self, x: float, y: float, z: float, /) -> None: ...
|
||||
def move(self, *args: Any, **kwargs: Any) -> None:
|
||||
"""
|
||||
move(displacement) -> None
|
||||
@@ -300,11 +305,11 @@ class BoundBox(PyObjectBase):
|
||||
...
|
||||
|
||||
@overload
|
||||
def scale(self, factor: Vector) -> None: ...
|
||||
def scale(self, factor: Vector, /) -> None: ...
|
||||
@overload
|
||||
def scale(self, factor: Tuple[float, float, float]) -> None: ...
|
||||
def scale(self, factor: Tuple[float, float, float], /) -> None: ...
|
||||
@overload
|
||||
def scale(self, x: float, y: float, z: float) -> None: ...
|
||||
def scale(self, x: float, y: float, z: float, /) -> None: ...
|
||||
def scale(self, *args: Any, **kwargs: Any) -> None:
|
||||
"""
|
||||
scale(factor) -> None
|
||||
@@ -323,7 +328,7 @@ class BoundBox(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def transformed(self, matrix: Matrix) -> "BoundBox":
|
||||
def transformed(self, matrix: Matrix, /) -> "BoundBox":
|
||||
"""
|
||||
transformed(matrix) -> Base.BoundBox
|
||||
|
||||
@@ -335,7 +340,7 @@ class BoundBox(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def isCutPlane(self, base: Vector, normal: Vector) -> bool:
|
||||
def isCutPlane(self, base: Vector, normal: Vector, /) -> bool:
|
||||
"""
|
||||
isCutPlane(base, normal) -> bool
|
||||
|
||||
@@ -348,11 +353,11 @@ class BoundBox(PyObjectBase):
|
||||
...
|
||||
|
||||
@overload
|
||||
def isInside(self, object: Vector) -> bool: ...
|
||||
def isInside(self, object: Vector, /) -> bool: ...
|
||||
@overload
|
||||
def isInside(self, object: "BoundBox") -> bool: ...
|
||||
def isInside(self, object: "BoundBox", /) -> bool: ...
|
||||
@overload
|
||||
def isInside(self, x: float, y: float, z: float) -> bool: ...
|
||||
def isInside(self, x: float, y: float, z: float, /) -> bool: ...
|
||||
def isInside(self, *args: Any) -> bool:
|
||||
"""
|
||||
isInside(object) -> bool
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Metadata import export, constmethod
|
||||
from PyObjectBase import PyObjectBase
|
||||
@@ -40,7 +42,7 @@ class CoordinateSystem(PyObjectBase):
|
||||
Position: Vector = None
|
||||
"""Set or get position."""
|
||||
|
||||
def setAxes(self, axis: Union[AxisPy, Vector], xDir: Vector) -> None:
|
||||
def setAxes(self, axis: Union[AxisPy, Vector], xDir: Vector, /) -> None:
|
||||
"""
|
||||
setAxes(axis, xDir) -> None
|
||||
|
||||
@@ -54,7 +56,7 @@ class CoordinateSystem(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def displacement(self, coordSystem2: "CoordinateSystem") -> Placement:
|
||||
def displacement(self, coordSystem2: "CoordinateSystem", /) -> Placement:
|
||||
"""
|
||||
displacement(coordSystem2) -> Base.Placement
|
||||
|
||||
@@ -64,7 +66,7 @@ class CoordinateSystem(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def transformTo(self, vector: Vector) -> Vector:
|
||||
def transformTo(self, vector: Vector, /) -> Vector:
|
||||
"""
|
||||
transformTo(vector) -> Base.Vector
|
||||
|
||||
@@ -74,7 +76,7 @@ class CoordinateSystem(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def transform(self, trans: Union[Rotation, Placement]) -> None:
|
||||
def transform(self, trans: Union[Rotation, Placement], /) -> None:
|
||||
"""
|
||||
transform(trans) -> None
|
||||
|
||||
@@ -84,7 +86,7 @@ class CoordinateSystem(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def setPlacement(self, placement: Placement) -> None:
|
||||
def setPlacement(self, placement: Placement, /) -> None:
|
||||
"""
|
||||
setPlacement(placement) -> None
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Vector import Vector
|
||||
from Metadata import export, constmethod, class_declarations, no_args
|
||||
@@ -105,9 +107,9 @@ class Matrix(PyObjectBase):
|
||||
"""The matrix elements."""
|
||||
|
||||
@overload
|
||||
def move(self, vector: Vector) -> None: ...
|
||||
def move(self, vector: Vector, /) -> None: ...
|
||||
@overload
|
||||
def move(self, x: float, y: float, z: float) -> None: ...
|
||||
def move(self, x: float, y: float, z: float, /) -> None: ...
|
||||
def move(self, *args) -> None:
|
||||
"""
|
||||
move(vector) -> None
|
||||
@@ -127,11 +129,11 @@ class Matrix(PyObjectBase):
|
||||
...
|
||||
|
||||
@overload
|
||||
def scale(self, vector: Vector) -> None: ...
|
||||
def scale(self, vector: Vector, /) -> None: ...
|
||||
@overload
|
||||
def scale(self, x: float, y: float, z: float) -> None: ...
|
||||
def scale(self, x: float, y: float, z: float, /) -> None: ...
|
||||
@overload
|
||||
def scale(self, factor: float) -> None: ...
|
||||
def scale(self, factor: float, /) -> None: ...
|
||||
def scale(self, *args) -> None:
|
||||
"""
|
||||
scale(vector) -> None
|
||||
@@ -153,7 +155,7 @@ class Matrix(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def hasScale(self, tol: float = 0) -> ScaleType:
|
||||
def hasScale(self, tol: float = 0, /) -> ScaleType:
|
||||
"""
|
||||
hasScale(tol=0) -> ScaleType
|
||||
|
||||
@@ -204,7 +206,7 @@ class Matrix(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def isUnity(self, tol: float = 0.0) -> bool:
|
||||
def isUnity(self, tol: float = 0.0, /) -> bool:
|
||||
"""
|
||||
isUnity([tol=0.0]) -> bool
|
||||
|
||||
@@ -212,7 +214,7 @@ class Matrix(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def transform(self, vector: Vector, matrix2: "Matrix") -> None:
|
||||
def transform(self, vector: Vector, matrix2: "Matrix", /) -> None:
|
||||
"""
|
||||
transform(vector, matrix2) -> None
|
||||
|
||||
@@ -228,7 +230,7 @@ class Matrix(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def col(self, index: int) -> Vector:
|
||||
def col(self, index: int, /) -> Vector:
|
||||
"""
|
||||
col(index) -> Base.Vector
|
||||
|
||||
@@ -240,7 +242,7 @@ class Matrix(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def setCol(self, index: int, vector: Vector) -> None:
|
||||
def setCol(self, index: int, vector: Vector, /) -> None:
|
||||
"""
|
||||
setCol(index, vector) -> None
|
||||
|
||||
@@ -254,7 +256,7 @@ class Matrix(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def row(self, index: int) -> Vector:
|
||||
def row(self, index: int, /) -> Vector:
|
||||
"""
|
||||
row(index) -> Base.Vector
|
||||
|
||||
@@ -266,7 +268,7 @@ class Matrix(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def setRow(self, index: int, vector: Vector) -> None:
|
||||
def setRow(self, index: int, vector: Vector, /) -> None:
|
||||
"""
|
||||
setRow(index, vector) -> None
|
||||
|
||||
@@ -289,7 +291,7 @@ class Matrix(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def setDiagonal(self, vector: Vector) -> None:
|
||||
def setDiagonal(self, vector: Vector, /) -> None:
|
||||
"""
|
||||
setDiagonal(vector) -> None
|
||||
|
||||
@@ -299,7 +301,7 @@ class Matrix(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def rotateX(self, angle: float) -> None:
|
||||
def rotateX(self, angle: float, /) -> None:
|
||||
"""
|
||||
rotateX(angle) -> None
|
||||
|
||||
@@ -310,7 +312,7 @@ class Matrix(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def rotateY(self, angle: float) -> None:
|
||||
def rotateY(self, angle: float, /) -> None:
|
||||
"""
|
||||
rotateY(angle) -> None
|
||||
|
||||
@@ -321,7 +323,7 @@ class Matrix(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def rotateZ(self, angle: float) -> None:
|
||||
def rotateZ(self, angle: float, /) -> None:
|
||||
"""
|
||||
rotateZ(angle) -> None
|
||||
|
||||
@@ -333,11 +335,11 @@ class Matrix(PyObjectBase):
|
||||
...
|
||||
|
||||
@overload
|
||||
def multiply(self, matrix: "Matrix") -> "Matrix": ...
|
||||
def multiply(self, matrix: "Matrix", /) -> "Matrix": ...
|
||||
@overload
|
||||
def multiply(self, vector: Vector) -> Vector: ...
|
||||
def multiply(self, vector: Vector, /) -> Vector: ...
|
||||
@constmethod
|
||||
def multiply(self, obj: Union["Matrix", Vector]) -> Union["Matrix", Vector]:
|
||||
def multiply(self, obj: Union["Matrix", Vector], /) -> Union["Matrix", Vector]:
|
||||
"""
|
||||
multiply(matrix) -> Base.Matrix
|
||||
multiply(vector) -> Base.Vector
|
||||
@@ -351,7 +353,7 @@ class Matrix(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def multVec(self, vector: Vector) -> Vector:
|
||||
def multVec(self, vector: Vector, /) -> Vector:
|
||||
"""
|
||||
multVec(vector) -> Base.Vector
|
||||
|
||||
@@ -410,7 +412,7 @@ class Matrix(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def isOrthogonal(self, tol: float = 1e-6) -> float:
|
||||
def isOrthogonal(self, tol: float = 1e-6, /) -> float:
|
||||
"""
|
||||
isOrthogonal(tol=1e-6) -> float
|
||||
|
||||
@@ -423,7 +425,7 @@ class Matrix(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def submatrix(self, dim: int) -> "Matrix":
|
||||
def submatrix(self, dim: int, /) -> "Matrix":
|
||||
"""
|
||||
submatrix(dim) -> Base.Matrix
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
"""
|
||||
This file keeps auxiliary metadata to be used by the Python API stubs.
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Metadata import constmethod
|
||||
from BaseClass import BaseClass
|
||||
@@ -21,7 +23,7 @@ class Persistence(BaseClass):
|
||||
"""Memory size of the object in bytes."""
|
||||
|
||||
@constmethod
|
||||
def dumpContent(self, *, Compression: int = 3) -> bytearray:
|
||||
def dumpContent(self, Compression: int = 3) -> bytearray:
|
||||
"""
|
||||
dumpContent(Compression=3) -> bytearray
|
||||
|
||||
@@ -33,7 +35,7 @@ class Persistence(BaseClass):
|
||||
"""
|
||||
...
|
||||
|
||||
def restoreContent(self, obj: object) -> None:
|
||||
def restoreContent(self, obj: object, /) -> None:
|
||||
# TODO: Starting with Python 3.12, collections.abc.Buffer can be used for type hinting
|
||||
"""
|
||||
restoreContent(obj) -> None
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Metadata import export, constmethod, class_declarations
|
||||
from PyObjectBase import PyObjectBase
|
||||
@@ -92,7 +94,7 @@ class Placement(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def move(self, vector: Vector) -> None:
|
||||
def move(self, vector: Vector, /) -> None:
|
||||
"""
|
||||
move(vector) -> None
|
||||
|
||||
@@ -103,7 +105,7 @@ class Placement(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def translate(self, vector: Vector) -> None:
|
||||
def translate(self, vector: Vector, /) -> None:
|
||||
"""
|
||||
translate(vector) -> None
|
||||
|
||||
@@ -139,7 +141,7 @@ class Placement(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def multiply(self, placement: "Placement") -> "Placement":
|
||||
def multiply(self, placement: "Placement", /) -> "Placement":
|
||||
"""
|
||||
multiply(placement) -> Base.Placement
|
||||
|
||||
@@ -152,7 +154,7 @@ class Placement(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def multVec(self, vector: Vector) -> Vector:
|
||||
def multVec(self, vector: Vector, /) -> Vector:
|
||||
"""
|
||||
multVec(vector) -> Base.Vector
|
||||
|
||||
@@ -182,7 +184,7 @@ class Placement(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def pow(self, t: float, shorten: bool = True) -> "Placement":
|
||||
def pow(self, t: float, shorten: bool = True, /) -> "Placement":
|
||||
"""
|
||||
pow(t, shorten=True) -> Base.Placement
|
||||
|
||||
@@ -198,7 +200,7 @@ class Placement(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def sclerp(self, placement2: "Placement", t: float, shorten: bool = True) -> "Placement":
|
||||
def sclerp(self, placement2: "Placement", t: float, shorten: bool = True, /) -> "Placement":
|
||||
"""
|
||||
sclerp(placement2, t, shorten=True) -> Base.Placement
|
||||
|
||||
@@ -219,7 +221,7 @@ class Placement(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def slerp(self, placement2: "Placement", t: float) -> "Placement":
|
||||
def slerp(self, placement2: "Placement", t: float, /) -> "Placement":
|
||||
"""
|
||||
slerp(placement2, t) -> Base.Placement
|
||||
|
||||
@@ -236,7 +238,7 @@ class Placement(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def isIdentity(self, tol: float = 0.0) -> bool:
|
||||
def isIdentity(self, tol: float = 0.0, /) -> bool:
|
||||
"""
|
||||
isIdentity([tol=0.0]) -> bool
|
||||
|
||||
@@ -249,7 +251,7 @@ class Placement(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def isSame(self, other: "Placement", tol: float = 0.0) -> bool:
|
||||
def isSame(self, other: "Placement", tol: float = 0.0, /) -> bool:
|
||||
"""
|
||||
isSame(Base.Placement, [tol=0.0]) -> bool
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from PyObjectBase import PyObjectBase
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
class PyObjectBase:
|
||||
"""
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Metadata import export, constmethod
|
||||
from PyObjectBase import PyObjectBase
|
||||
@@ -53,7 +55,7 @@ class Quantity(PyObjectBase):
|
||||
# fmt: on
|
||||
|
||||
@constmethod
|
||||
def toStr(self, decimals: int = ...) -> str:
|
||||
def toStr(self, decimals: int = ..., /) -> str:
|
||||
"""
|
||||
toStr([decimals])
|
||||
|
||||
@@ -63,9 +65,9 @@ class Quantity(PyObjectBase):
|
||||
...
|
||||
|
||||
@overload
|
||||
def toStr(self) -> str: ...
|
||||
def toStr(self, /) -> str: ...
|
||||
@overload
|
||||
def toStr(self, decimals: int) -> str: ...
|
||||
def toStr(self, decimals: int, /) -> str: ...
|
||||
@constmethod
|
||||
def getUserPreferred(self) -> Tuple["Quantity", str]:
|
||||
"""
|
||||
@@ -74,13 +76,13 @@ class Quantity(PyObjectBase):
|
||||
...
|
||||
|
||||
@overload
|
||||
def getValueAs(self, unit: str) -> float: ...
|
||||
def getValueAs(self, unit: str, /) -> float: ...
|
||||
@overload
|
||||
def getValueAs(self, translation: float, unit_signature: int) -> float: ...
|
||||
def getValueAs(self, translation: float, unit_signature: int, /) -> float: ...
|
||||
@overload
|
||||
def getValueAs(self, unit: UnitPy) -> float: ...
|
||||
def getValueAs(self, unit: UnitPy, /) -> float: ...
|
||||
@overload
|
||||
def getValueAs(self, quantity: "Quantity") -> float: ...
|
||||
def getValueAs(self, quantity: "Quantity", /) -> float: ...
|
||||
@constmethod
|
||||
def getValueAs(self, *args) -> float:
|
||||
"""
|
||||
@@ -96,7 +98,7 @@ class Quantity(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def __round__(self, ndigits: int = ...) -> Union[int, float]:
|
||||
def __round__(self, ndigits: int = ..., /) -> Union[int, float]:
|
||||
"""
|
||||
Returns the Integral closest to x, rounding half toward even.
|
||||
When an argument is passed, work like built-in round(x, ndigits).
|
||||
@@ -104,6 +106,6 @@ class Quantity(PyObjectBase):
|
||||
...
|
||||
|
||||
@overload
|
||||
def __round__(self) -> int: ...
|
||||
def __round__(self, /) -> int: ...
|
||||
@overload
|
||||
def __round__(self, ndigits: int) -> float: ...
|
||||
def __round__(self, ndigits: int, /) -> float: ...
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Metadata import export, constmethod, class_declarations
|
||||
from PyObjectBase import PyObjectBase
|
||||
@@ -144,7 +146,7 @@ class Rotation(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def isSame(self, rotation: "Rotation", tol: float = 0) -> bool:
|
||||
def isSame(self, rotation: "Rotation", tol: float = 0, /) -> bool:
|
||||
"""
|
||||
isSame(rotation, tol=0) -> bool
|
||||
|
||||
@@ -158,7 +160,7 @@ class Rotation(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def multiply(self, rotation: "Rotation") -> "Rotation":
|
||||
def multiply(self, rotation: "Rotation", /) -> "Rotation":
|
||||
"""
|
||||
multiply(rotation) -> Base.Rotation
|
||||
|
||||
@@ -170,7 +172,7 @@ class Rotation(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def multVec(self, vector: Vector) -> Vector:
|
||||
def multVec(self, vector: Vector, /) -> Vector:
|
||||
"""
|
||||
multVec(vector) -> Base.Vector
|
||||
|
||||
@@ -182,7 +184,7 @@ class Rotation(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def slerp(self, rotation2: "Rotation", t: float) -> "Rotation":
|
||||
def slerp(self, rotation2: "Rotation", t: float, /) -> "Rotation":
|
||||
"""
|
||||
slerp(rotation2, t) -> Base.Rotation
|
||||
|
||||
@@ -193,7 +195,7 @@ class Rotation(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def setYawPitchRoll(self, angle1: float, angle2: float, angle3: float) -> None:
|
||||
def setYawPitchRoll(self, angle1: float, angle2: float, angle3: float, /) -> None:
|
||||
"""
|
||||
setYawPitchRoll(angle1, angle2, angle3) -> None
|
||||
|
||||
@@ -218,7 +220,7 @@ class Rotation(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def setEulerAngles(self, seq: str, angle1: float, angle2: float, angle3: float) -> None:
|
||||
def setEulerAngles(self, seq: str, angle1: float, angle2: float, angle3: float, /) -> None:
|
||||
"""
|
||||
setEulerAngles(seq, angle1, angle2, angle3) -> None
|
||||
|
||||
@@ -234,7 +236,7 @@ class Rotation(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def toEulerAngles(self, seq: str = "") -> List[float]:
|
||||
def toEulerAngles(self, seq: str = "", /) -> List[float]:
|
||||
"""
|
||||
toEulerAngles(seq) -> list
|
||||
|
||||
@@ -265,7 +267,7 @@ class Rotation(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def isIdentity(self, tol: float = 0) -> bool:
|
||||
def isIdentity(self, tol: float = 0, /) -> bool:
|
||||
"""
|
||||
isIdentity(tol=0) -> bool
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Metadata import export, forward_declarations, constmethod
|
||||
from PyObjectBase import PyObjectBase
|
||||
@@ -35,7 +37,7 @@ class Type(PyObjectBase):
|
||||
"""Module in which this class is defined."""
|
||||
|
||||
@staticmethod
|
||||
def fromName(name: str) -> "Type":
|
||||
def fromName(name: str, /) -> "Type":
|
||||
"""
|
||||
fromName(name) -> Base.BaseType
|
||||
|
||||
@@ -46,7 +48,7 @@ class Type(PyObjectBase):
|
||||
...
|
||||
|
||||
@staticmethod
|
||||
def fromKey(key: int) -> "Type":
|
||||
def fromKey(key: int, /) -> "Type":
|
||||
"""
|
||||
fromKey(key) -> Base.BaseType
|
||||
|
||||
@@ -75,7 +77,7 @@ class Type(PyObjectBase):
|
||||
...
|
||||
|
||||
@staticmethod
|
||||
def getAllDerivedFrom(type: str) -> List[str]:
|
||||
def getAllDerivedFrom(type: str, /) -> List[str]:
|
||||
"""
|
||||
getAllDerivedFrom(type) -> list
|
||||
|
||||
@@ -104,7 +106,7 @@ class Type(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def isDerivedFrom(self, type: str) -> bool:
|
||||
def isDerivedFrom(self, type: str, /) -> bool:
|
||||
"""
|
||||
isDerivedFrom(type) -> bool
|
||||
|
||||
@@ -132,7 +134,7 @@ class Type(PyObjectBase):
|
||||
...
|
||||
|
||||
@staticmethod
|
||||
def createInstanceByName(name: str, load: bool = False) -> object:
|
||||
def createInstanceByName(name: str, load: bool = False, /) -> object:
|
||||
"""
|
||||
createInstanceByName(name, load=False) -> object
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Metadata import export
|
||||
from PyObjectBase import PyObjectBase
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Metadata import export, constmethod, sequence_protocol, class_declarations
|
||||
from PyObjectBase import PyObjectBase
|
||||
@@ -93,7 +95,7 @@ class Vector(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def add(self, vector2: "Vector") -> "Vector":
|
||||
def add(self, vector2: "Vector", /) -> "Vector":
|
||||
"""
|
||||
add(vector2) -> Base.Vector
|
||||
|
||||
@@ -104,7 +106,7 @@ class Vector(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def sub(self, vector2: "Vector") -> "Vector":
|
||||
def sub(self, vector2: "Vector", /) -> "Vector":
|
||||
"""
|
||||
sub(vector2) -> Base.Vector
|
||||
|
||||
@@ -123,7 +125,7 @@ class Vector(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def scale(self, x: float, y: float, z: float) -> "Vector":
|
||||
def scale(self, x: float, y: float, z: float, /) -> "Vector":
|
||||
"""
|
||||
scale(x, y, z) -> Base.Vector
|
||||
|
||||
@@ -138,7 +140,7 @@ class Vector(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def multiply(self, factor: float) -> "Vector":
|
||||
def multiply(self, factor: float, /) -> "Vector":
|
||||
"""
|
||||
multiply(factor) -> Base.Vector
|
||||
|
||||
@@ -150,7 +152,7 @@ class Vector(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def dot(self, vector2: "Vector") -> float:
|
||||
def dot(self, vector2: "Vector", /) -> float:
|
||||
"""
|
||||
dot(vector2) -> float
|
||||
|
||||
@@ -161,7 +163,7 @@ class Vector(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def cross(self, vector2: "Vector") -> "Vector":
|
||||
def cross(self, vector2: "Vector", /) -> "Vector":
|
||||
"""
|
||||
cross(vector2) -> Base.Vector
|
||||
|
||||
@@ -172,7 +174,7 @@ class Vector(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def isOnLineSegment(self, vector1: "Vector", vector2: "Vector") -> bool:
|
||||
def isOnLineSegment(self, vector1: "Vector", vector2: "Vector", /) -> bool:
|
||||
"""
|
||||
isOnLineSegment(vector1, vector2) -> bool
|
||||
|
||||
@@ -184,7 +186,7 @@ class Vector(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def getAngle(self, vector2: "Vector") -> float:
|
||||
def getAngle(self, vector2: "Vector", /) -> float:
|
||||
"""
|
||||
getAngle(vector2) -> float
|
||||
|
||||
@@ -203,7 +205,7 @@ class Vector(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def isEqual(self, vector2: "Vector", tol: float = 0) -> bool:
|
||||
def isEqual(self, vector2: "Vector", tol: float = 0, /) -> bool:
|
||||
"""
|
||||
isEqual(vector2, tol=0) -> bool
|
||||
|
||||
@@ -216,7 +218,7 @@ class Vector(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def isParallel(self, vector2: "Vector", tol: float = 0) -> bool:
|
||||
def isParallel(self, vector2: "Vector", tol: float = 0, /) -> bool:
|
||||
"""
|
||||
isParallel(vector2, tol=0) -> bool
|
||||
|
||||
@@ -229,7 +231,7 @@ class Vector(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def isNormal(self, vector2: "Vector", tol: float = 0) -> bool:
|
||||
def isNormal(self, vector2: "Vector", tol: float = 0, /) -> bool:
|
||||
"""
|
||||
isNormal(vector2, tol=0) -> bool
|
||||
|
||||
@@ -241,7 +243,7 @@ class Vector(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def projectToLine(self, point: "Vector", dir: "Vector") -> "Vector":
|
||||
def projectToLine(self, point: "Vector", dir: "Vector", /) -> "Vector":
|
||||
"""
|
||||
projectToLine(point, dir) -> Base.Vector
|
||||
|
||||
@@ -257,7 +259,7 @@ class Vector(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def projectToPlane(self, base: "Vector", normal: "Vector") -> "Vector":
|
||||
def projectToPlane(self, base: "Vector", normal: "Vector", /) -> "Vector":
|
||||
"""
|
||||
projectToPlane(base, normal) -> Base.Vector
|
||||
|
||||
@@ -270,7 +272,7 @@ class Vector(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def distanceToPoint(self, point2: "Vector") -> float:
|
||||
def distanceToPoint(self, point2: "Vector", /) -> float:
|
||||
"""
|
||||
distanceToPoint(point2) -> float
|
||||
|
||||
@@ -281,7 +283,7 @@ class Vector(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def distanceToLine(self, base: "Vector", dir: "Vector") -> float:
|
||||
def distanceToLine(self, base: "Vector", dir: "Vector", /) -> float:
|
||||
"""
|
||||
distanceToLine(base, dir) -> float
|
||||
|
||||
@@ -295,7 +297,7 @@ class Vector(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def distanceToLineSegment(self, point1: "Vector", point2: "Vector") -> "Vector":
|
||||
def distanceToLineSegment(self, point1: "Vector", point2: "Vector", /) -> "Vector":
|
||||
"""
|
||||
distanceToLineSegment(point1, point2) -> Base.Vector
|
||||
|
||||
@@ -309,7 +311,7 @@ class Vector(PyObjectBase):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def distanceToPlane(self, base: "Vector", normal: "Vector") -> float:
|
||||
def distanceToPlane(self, base: "Vector", normal: "Vector", /) -> float:
|
||||
"""
|
||||
distanceToPlane(base, normal) -> float
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export, constmethod
|
||||
from Base.BaseClass import BaseClass
|
||||
from typing import Any, Final, Tuple, Dict
|
||||
@@ -17,7 +21,7 @@ class AxisOrigin(BaseClass):
|
||||
"""
|
||||
|
||||
@constmethod
|
||||
def getElementPicked(self, pickedPoint: Any) -> str:
|
||||
def getElementPicked(self, pickedPoint: Any, /) -> str:
|
||||
"""
|
||||
getElementPicked(pickedPoint) -> str
|
||||
|
||||
@@ -28,7 +32,7 @@ class AxisOrigin(BaseClass):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def getDetailPath(self, subname: str, path: Any) -> Any:
|
||||
def getDetailPath(self, subname: str, path: Any, /) -> Any:
|
||||
"""
|
||||
getDetailPath(subname, path) -> coin.SoDetail or None
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import constmethod
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
from typing import Any, Dict, List, Optional
|
||||
@@ -11,7 +15,7 @@ class Command(PyObjectBase):
|
||||
"""
|
||||
|
||||
@staticmethod
|
||||
def get(name: str) -> Optional["Command"]:
|
||||
def get(name: str, /) -> Optional["Command"]:
|
||||
"""
|
||||
get(name) -> Gui.Command or None
|
||||
|
||||
@@ -41,7 +45,7 @@ class Command(PyObjectBase):
|
||||
...
|
||||
|
||||
@staticmethod
|
||||
def listByShortcut(string: str, useRegExp: bool = False) -> List[str]:
|
||||
def listByShortcut(string: str, useRegExp: bool = False, /) -> List[str]:
|
||||
"""
|
||||
listByShortcut(string, useRegExp=False) -> list of str
|
||||
|
||||
@@ -56,7 +60,7 @@ class Command(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def run(self, item: int = 0) -> None:
|
||||
def run(self, item: int = 0, /) -> None:
|
||||
"""
|
||||
run(item=0) -> None
|
||||
|
||||
@@ -84,7 +88,7 @@ class Command(PyObjectBase):
|
||||
"""
|
||||
...
|
||||
|
||||
def setShortcut(self, string: str) -> bool:
|
||||
def setShortcut(self, string: str, /) -> bool:
|
||||
"""
|
||||
setShortcut(string) -> bool
|
||||
|
||||
@@ -153,7 +157,7 @@ class Command(PyObjectBase):
|
||||
...
|
||||
|
||||
@staticmethod
|
||||
def removeCustomCommand(name: str) -> bool:
|
||||
def removeCustomCommand(name: str, /) -> bool:
|
||||
"""
|
||||
removeCustomCommand(name) -> bool
|
||||
|
||||
@@ -169,7 +173,7 @@ class Command(PyObjectBase):
|
||||
...
|
||||
|
||||
@staticmethod
|
||||
def findCustomCommand(name: str) -> Optional[str]:
|
||||
def findCustomCommand(name: str, /) -> Optional[str]:
|
||||
"""
|
||||
findCustomCommand(name) -> str or None
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import constmethod
|
||||
from Base.Persistence import Persistence
|
||||
from Base.Matrix import Matrix
|
||||
@@ -11,7 +15,7 @@ class Document(Persistence):
|
||||
Licence: LGPL
|
||||
"""
|
||||
|
||||
def show(self, objName: str) -> None:
|
||||
def show(self, objName: str, /) -> None:
|
||||
"""
|
||||
show(objName) -> None
|
||||
|
||||
@@ -22,7 +26,7 @@ class Document(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def hide(self, objName: str) -> None:
|
||||
def hide(self, objName: str, /) -> None:
|
||||
"""
|
||||
hide(objName) -> None
|
||||
|
||||
@@ -33,7 +37,7 @@ class Document(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def setPos(self, objName: str, matrix: Matrix) -> None:
|
||||
def setPos(self, objName: str, matrix: Matrix, /) -> None:
|
||||
"""
|
||||
setPos(objName, matrix) -> None
|
||||
|
||||
@@ -47,7 +51,7 @@ class Document(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def setEdit(self, obj: Any, mod: int = 0, subName: Optional[str] = None) -> bool:
|
||||
def setEdit(self, obj: Any, mod: int = 0, subName: Optional[str] = None, /) -> bool:
|
||||
"""
|
||||
setEdit(obj, mod=0, subName) -> bool
|
||||
|
||||
@@ -78,7 +82,7 @@ class Document(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def addAnnotation(self, annoName: str, fileName: str, modName: str) -> None:
|
||||
def addAnnotation(self, annoName: str, fileName: str, modName: str, /) -> None:
|
||||
"""
|
||||
addAnnotation(annoName, fileName, modName) -> None
|
||||
|
||||
@@ -101,7 +105,7 @@ class Document(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def getObject(self, objName: str) -> Optional[Any]:
|
||||
def getObject(self, objName: str, /) -> Optional[Any]:
|
||||
"""
|
||||
getObject(objName) -> object or None
|
||||
|
||||
@@ -128,7 +132,7 @@ class Document(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def createView(self, type: str) -> Optional[Any]:
|
||||
def createView(self, type: str, /) -> Optional[Any]:
|
||||
"""
|
||||
createView(type) -> object or None
|
||||
|
||||
@@ -140,7 +144,7 @@ class Document(Persistence):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def mdiViewsOfType(self, type: str) -> List[Any]:
|
||||
def mdiViewsOfType(self, type: str, /) -> List[Any]:
|
||||
"""
|
||||
mdiViewsOfType(type) -> list of MDIView
|
||||
|
||||
@@ -167,7 +171,7 @@ class Document(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def sendMsgToViews(self, msg: str) -> None:
|
||||
def sendMsgToViews(self, msg: str, /) -> None:
|
||||
"""
|
||||
sendMsgToViews(msg) -> None
|
||||
|
||||
@@ -177,7 +181,7 @@ class Document(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def mergeProject(self, fileName: str) -> None:
|
||||
def mergeProject(self, fileName: str, /) -> None:
|
||||
"""
|
||||
mergeProject(fileName) -> None
|
||||
|
||||
@@ -188,7 +192,8 @@ class Document(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def toggleTreeItem(self, obj: Any, mod: int = 0, subName: Optional[str] = None) -> None:
|
||||
def toggleTreeItem(
|
||||
self, obj: Any, mod: int = 0, subName: Optional[str] = None, /) -> None:
|
||||
"""
|
||||
toggleTreeItem(obj, mod=0, subName) -> None
|
||||
|
||||
@@ -203,7 +208,7 @@ class Document(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def scrollToTreeItem(self, obj: Any) -> None:
|
||||
def scrollToTreeItem(self, obj: Any, /) -> None:
|
||||
"""
|
||||
scrollToTreeItem(obj) -> None
|
||||
|
||||
@@ -213,7 +218,7 @@ class Document(Persistence):
|
||||
"""
|
||||
...
|
||||
|
||||
def toggleInSceneGraph(self, obj: Any) -> None:
|
||||
def toggleInSceneGraph(self, obj: Any, /) -> None:
|
||||
"""
|
||||
toggleInSceneGraph(obj) -> None
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export, constmethod
|
||||
from Base.BaseClass import BaseClass
|
||||
from typing import Any, Final, List, Dict, Tuple, overload
|
||||
@@ -21,7 +25,7 @@ class LinkView(BaseClass):
|
||||
"""
|
||||
...
|
||||
|
||||
def setMaterial(self, material: Any) -> None:
|
||||
def setMaterial(self, material: Any, /) -> None:
|
||||
"""
|
||||
setMaterial(Material): set the override material of the entire linked object
|
||||
|
||||
@@ -38,14 +42,18 @@ class LinkView(BaseClass):
|
||||
...
|
||||
|
||||
@overload
|
||||
def setMaterial(self, material: None) -> None: ...
|
||||
def setMaterial(self, material: None, /) -> None: ...
|
||||
|
||||
@overload
|
||||
def setMaterial(self, material: Any) -> None: ...
|
||||
def setMaterial(self, material: Any, /) -> None: ...
|
||||
|
||||
@overload
|
||||
def setMaterial(self, material: List[Any]) -> None: ...
|
||||
def setMaterial(self, material: List[Any], /) -> None: ...
|
||||
|
||||
@overload
|
||||
def setMaterial(self, material: Dict[int, Any]) -> None: ...
|
||||
def setType(self, type: int, sublink: bool = True) -> None:
|
||||
def setMaterial(self, material: Dict[int, Any], /) -> None: ...
|
||||
|
||||
def setType(self, type: int, sublink: bool = True, /) -> None:
|
||||
"""
|
||||
setType(type, sublink=True): set the link type.
|
||||
|
||||
@@ -61,10 +69,12 @@ class LinkView(BaseClass):
|
||||
...
|
||||
|
||||
@overload
|
||||
def setType(self, type: int) -> None: ...
|
||||
def setType(self, type: int, /) -> None: ...
|
||||
|
||||
@overload
|
||||
def setType(self, type: int, sublink: bool) -> None: ...
|
||||
def setTransform(self, matrix: Any) -> None:
|
||||
def setType(self, type: int, sublink: bool, /) -> None: ...
|
||||
|
||||
def setTransform(self, matrix: Any, /) -> None:
|
||||
"""
|
||||
setTransform(matrix): set transformation of the linked object
|
||||
|
||||
@@ -77,12 +87,16 @@ class LinkView(BaseClass):
|
||||
...
|
||||
|
||||
@overload
|
||||
def setTransform(self, matrix: Any) -> None: ...
|
||||
def setTransform(self, matrix: Any, /) -> None: ...
|
||||
|
||||
@overload
|
||||
def setTransform(self, matrix: List[Any]) -> None: ...
|
||||
def setTransform(self, matrix: List[Any], /) -> None: ...
|
||||
|
||||
@overload
|
||||
def setTransform(self, matrix: Dict[int, Any]) -> None: ...
|
||||
def setChildren(self, children: List[Any], vis: List[Any] = [], type: int = 0) -> None:
|
||||
def setTransform(self, matrix: Dict[int, Any], /) -> None: ...
|
||||
|
||||
def setChildren(
|
||||
self, children: List[Any], vis: List[Any] = [], type: int = 0, /) -> None:
|
||||
"""
|
||||
setChildren([obj...],vis=[],type=0)
|
||||
Group a list of children objects. Note, this mode of operation is incompatible
|
||||
@@ -98,7 +112,7 @@ class LinkView(BaseClass):
|
||||
"""
|
||||
...
|
||||
|
||||
def setLink(self, obj: Any, subname: Any = None) -> None:
|
||||
def setLink(self, obj: Any, subname: Any = None, /) -> None:
|
||||
"""
|
||||
setLink(object): Set the link
|
||||
|
||||
@@ -116,12 +130,15 @@ class LinkView(BaseClass):
|
||||
...
|
||||
|
||||
@overload
|
||||
def setLink(self, obj: Any) -> None: ...
|
||||
def setLink(self, obj: Any, /) -> None: ...
|
||||
|
||||
@overload
|
||||
def setLink(self, obj: Any, subname: str) -> None: ...
|
||||
def setLink(self, obj: Any, subname: str, /) -> None: ...
|
||||
|
||||
@overload
|
||||
def setLink(self, obj: Any, subname: List[str]) -> None: ...
|
||||
def getDetailPath(self, element: Any) -> Tuple[Any, Any]:
|
||||
def setLink(self, obj: Any, subname: List[str], /) -> None: ...
|
||||
|
||||
def getDetailPath(self, element: Any, /) -> Tuple[Any, Any]:
|
||||
"""
|
||||
getDetailPath(element): get the 3d path an detail of an element.
|
||||
|
||||
@@ -129,13 +146,13 @@ class LinkView(BaseClass):
|
||||
"""
|
||||
...
|
||||
|
||||
def getElementPicked(self, pickPoint: Any) -> Any:
|
||||
def getElementPicked(self, pickPoint: Any, /) -> Any:
|
||||
"""
|
||||
getElementPicked(pickPoint): get the element under a 3d pick point.
|
||||
"""
|
||||
...
|
||||
|
||||
def getBoundBox(self, vobj: Any = None) -> Any:
|
||||
def getBoundBox(self, vobj: Any = None, /) -> Any:
|
||||
"""
|
||||
getBoundBox(vobj=None): get the bounding box.
|
||||
"""
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export
|
||||
from Workbench import Workbench
|
||||
from warnings import deprecated
|
||||
|
||||
@@ -25,7 +25,7 @@ class SelectionObject(BaseClass):
|
||||
"""
|
||||
...
|
||||
|
||||
def isObjectTypeOf(self, type: Any) -> bool:
|
||||
def isObjectTypeOf(self, type: Any, /) -> bool:
|
||||
"""
|
||||
Test for a certain father class.
|
||||
isObjectTypeOf(type) -> Bool
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import constmethod
|
||||
from Base.BoundBox import BoundBox
|
||||
from App.ExtensionContainer import ExtensionContainer
|
||||
@@ -50,7 +54,7 @@ class ViewProvider(ExtensionContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def removeProperty(self, name: str) -> bool:
|
||||
def removeProperty(self, name: str, /) -> bool:
|
||||
"""
|
||||
removeProperty(name) -> bool
|
||||
|
||||
@@ -94,7 +98,7 @@ class ViewProvider(ExtensionContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def canDragObject(self, obj: Any = None) -> bool:
|
||||
def canDragObject(self, obj: Any = None, /) -> bool:
|
||||
"""
|
||||
canDragObject(obj=None) -> bool
|
||||
|
||||
@@ -106,7 +110,7 @@ class ViewProvider(ExtensionContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def dragObject(self, obj: Any) -> None:
|
||||
def dragObject(self, obj: Any, /) -> None:
|
||||
"""
|
||||
dragObject(obj) -> None
|
||||
|
||||
@@ -158,7 +162,7 @@ class ViewProvider(ExtensionContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def canDragAndDropObject(self, obj: Any) -> bool:
|
||||
def canDragAndDropObject(self, obj: Any, /) -> bool:
|
||||
"""
|
||||
canDragAndDropObject(obj) -> bool
|
||||
|
||||
@@ -170,7 +174,7 @@ class ViewProvider(ExtensionContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def replaceObject(self, oldObj: Any, newObj: Any) -> int:
|
||||
def replaceObject(self, oldObj: Any, newObj: Any, /) -> int:
|
||||
"""
|
||||
replaceObject(oldObj, newObj) -> int
|
||||
|
||||
@@ -192,7 +196,7 @@ class ViewProvider(ExtensionContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def addDisplayMode(self, obj: Any, mode: str) -> None:
|
||||
def addDisplayMode(self, obj: Any, mode: str, /) -> None:
|
||||
"""
|
||||
addDisplayMode(obj, mode) -> None
|
||||
|
||||
@@ -221,7 +225,7 @@ class ViewProvider(ExtensionContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def setTransformation(self, trans: Any) -> None:
|
||||
def setTransformation(self, trans: Any, /) -> None:
|
||||
"""
|
||||
setTransformation(trans) -> None
|
||||
|
||||
@@ -249,7 +253,7 @@ class ViewProvider(ExtensionContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def partialRender(self, sub: Any = None, clear: bool = False) -> int:
|
||||
def partialRender(self, sub: Any = None, clear: bool = False, /) -> int:
|
||||
"""
|
||||
partialRender(sub=None, clear=False) -> int
|
||||
|
||||
@@ -262,7 +266,7 @@ class ViewProvider(ExtensionContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def getElementColors(self, elementName: Optional[str] = None) -> dict:
|
||||
def getElementColors(self, elementName: Optional[str] = None, /) -> dict:
|
||||
"""
|
||||
getElementColors(elementName) -> dict
|
||||
|
||||
@@ -274,7 +278,7 @@ class ViewProvider(ExtensionContainer):
|
||||
"""
|
||||
...
|
||||
|
||||
def setElementColors(self, colors: dict) -> None:
|
||||
def setElementColors(self, colors: dict, /) -> None:
|
||||
"""
|
||||
setElementColors(colors) -> None
|
||||
|
||||
@@ -286,7 +290,7 @@ class ViewProvider(ExtensionContainer):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def getElementPicked(self, pickPoint: Any) -> str:
|
||||
def getElementPicked(self, pickPoint: Any, /) -> str:
|
||||
"""
|
||||
getElementPicked(pickPoint) -> str
|
||||
|
||||
@@ -297,7 +301,7 @@ class ViewProvider(ExtensionContainer):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def getDetailPath(self, subelement: str, path: Any, append: bool = True) -> Any:
|
||||
def getDetailPath(self, subelement: str, path: Any, append: bool = True, /) -> Any:
|
||||
"""
|
||||
getDetailPath(subelement, path, append=True) -> coin.SoDetail or None
|
||||
|
||||
@@ -323,8 +327,7 @@ class ViewProvider(ExtensionContainer):
|
||||
...
|
||||
|
||||
def getBoundingBox(
|
||||
self, subName: Optional[str] = None, transform: bool = True, view: Any = None
|
||||
) -> BoundBox:
|
||||
self, subName: Optional[str] = None, transform: bool = True, view: Any = None, /) -> BoundBox:
|
||||
"""
|
||||
getBoundingBox(subName, transform=True, view) -> Base.BoundBox
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from ViewProvider import ViewProvider
|
||||
from typing import Any, Final
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import constmethod
|
||||
from App.Extension import Extension
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import no_args
|
||||
from ViewProviderDocumentObject import ViewProviderDocumentObject
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from ViewProviderDocumentObject import ViewProviderDocumentObject
|
||||
from typing import Any, Final
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export
|
||||
from Base.BaseClass import BaseClass
|
||||
from typing import Any, List, Dict
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Final
|
||||
|
||||
from Base.Metadata import export
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Final
|
||||
|
||||
from Base.Metadata import constmethod, export
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export
|
||||
|
||||
from App.DocumentObjectGroup import DocumentObjectGroup
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export
|
||||
from Spreadsheet.Sheet import Sheet
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export
|
||||
|
||||
from App.DocumentObjectGroup import DocumentObjectGroup
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export
|
||||
|
||||
from App.DocumentObjectGroup import DocumentObjectGroup
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export
|
||||
|
||||
from App.DocumentObjectGroup import DocumentObjectGroup
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from Base.Metadata import export
|
||||
|
||||
@@ -24,11 +24,11 @@ class Command(Persistence):
|
||||
"""toGCode(): returns a GCode representation of the command"""
|
||||
...
|
||||
|
||||
def setFromGCode(self, gcode: str) -> None:
|
||||
def setFromGCode(self, gcode: str, /) -> None:
|
||||
"""setFromGCode(): sets the path from the contents of the given GCode string"""
|
||||
...
|
||||
|
||||
def transform(self, placement: Placement) -> "CommandPy":
|
||||
def transform(self, placement: Placement, /) -> "CommandPy":
|
||||
"""transform(Placement): returns a copy of this command transformed by the given placement"""
|
||||
...
|
||||
Name: str
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Final
|
||||
|
||||
from Base.BaseClass import BaseClass
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from Base.BaseClass import BaseClass
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Final
|
||||
|
||||
from Base.Metadata import constmethod, export
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from Base.Metadata import export
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from Base.Metadata import export
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from Base.Metadata import export
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from Base.Metadata import export
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Final
|
||||
|
||||
from Base.Metadata import export
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Final
|
||||
|
||||
from Base.Metadata import export
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from Base.Metadata import export
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from Base.Metadata import export
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from Base.Metadata import export
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export
|
||||
from Base.BaseClass import BaseClass
|
||||
from Base.Metadata import constmethod
|
||||
@@ -33,20 +37,20 @@ class Array2D(BaseClass):
|
||||
"""The number of columns in the array."""
|
||||
|
||||
@constmethod
|
||||
def getRow(self, value: Any) -> Any:
|
||||
def getRow(self, value: Any, /) -> Any:
|
||||
"""
|
||||
Get the row given the first column value
|
||||
"""
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def getValue(self, row: int, column: int) -> Any:
|
||||
def getValue(self, row: int, column: int, /) -> Any:
|
||||
"""
|
||||
Get the value at the given row and column
|
||||
"""
|
||||
...
|
||||
|
||||
def setValue(self, row: int, column: int, value: Any):
|
||||
def setValue(self, row: int, column: int, value: Any, /):
|
||||
"""
|
||||
Set the value at the given row and column
|
||||
"""
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export, constmethod
|
||||
from Base.BaseClass import BaseClass
|
||||
from typing import Any, Final, List
|
||||
@@ -52,19 +56,19 @@ class Array3D(BaseClass):
|
||||
"""
|
||||
...
|
||||
|
||||
def setDepthValue(self, value: Any):
|
||||
def setDepthValue(self, value: Any, /):
|
||||
"""
|
||||
Set the column value at the given depth
|
||||
"""
|
||||
...
|
||||
|
||||
def setValue(self, depth: int, row: int, column: int, value: Any):
|
||||
def setValue(self, depth: int, row: int, column: int, value: Any, /):
|
||||
"""
|
||||
Set the value at the given depth, row, and column
|
||||
"""
|
||||
...
|
||||
|
||||
def setRows(self, depth: int, value: int):
|
||||
def setRows(self, depth: int, value: int, /):
|
||||
"""
|
||||
Set the number of rows at the given depth
|
||||
"""
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export, no_args, sequence_protocol
|
||||
from Base.BaseClass import BaseClass
|
||||
from typing import Final, Dict
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export, constmethod
|
||||
from Base.BaseClass import BaseClass
|
||||
from typing import List
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export
|
||||
from Base.BaseClass import BaseClass
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export, constmethod
|
||||
from Base.BaseClass import BaseClass
|
||||
from typing import Final
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export, constmethod
|
||||
from Base.BaseClass import BaseClass
|
||||
from typing import Final, List, Dict, overload
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export
|
||||
from ModelProperty import ModelProperty
|
||||
from typing import Final
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export, constmethod
|
||||
from Base.BaseClass import BaseClass
|
||||
from typing import Final, List, Dict, overload
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export, constmethod
|
||||
from Base.BaseClass import BaseClass
|
||||
from typing import Final, List, Dict
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export, constmethod
|
||||
from Base.BaseClass import BaseClass
|
||||
from typing import Final
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export, constmethod
|
||||
from Base.BaseClass import BaseClass
|
||||
from typing import Final
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Metadata import export, constmethod, forward_declarations, class_declarations, sequence_protocol
|
||||
from Base.BaseClass import BaseClass
|
||||
from typing import Final, overload
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export
|
||||
|
||||
from App.DocumentObject import DocumentObject
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from Base.BaseClass import BaseClass
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Final
|
||||
|
||||
from Base.Metadata import export
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Final
|
||||
|
||||
from Base.Metadata import export
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Final
|
||||
|
||||
from Base.Metadata import constmethod, export
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from Base.Metadata import export
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Final
|
||||
|
||||
from Base.Metadata import export
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
from Gui.ViewProviderGeometryObject import ViewProviderGeometryObject
|
||||
from Base.Metadata import export
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export
|
||||
from TrimmedCurve import TrimmedCurve
|
||||
from Geometry import Geom_Circle, Geom_Ellipse
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export
|
||||
from ArcOfConic import ArcOfConic
|
||||
from typing import Final
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export
|
||||
from Base.Vector import Vector
|
||||
from TrimmedCurve import TrimmedCurve
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export
|
||||
from ArcOfConic import ArcOfConic
|
||||
from typing import Final
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export
|
||||
from Part.ArcOfConic import ArcOfConic
|
||||
from typing import Final
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export
|
||||
from ArcOfConic import ArcOfConic
|
||||
from typing import Final
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export, constmethod
|
||||
from Base.BaseClass import BaseClass
|
||||
from Base.Placement import Placement
|
||||
@@ -46,31 +50,31 @@ class AttachEngine(BaseClass):
|
||||
CompleteRefTypeList: Final[list] = []
|
||||
"""List of all reference shape types recognized by AttachEngine."""
|
||||
|
||||
def getModeInfo(self, mode: str) -> dict:
|
||||
def getModeInfo(self, mode: str, /) -> dict:
|
||||
"""
|
||||
getModeInfo(mode): returns supported reference combinations, user-friendly name, and so on.
|
||||
"""
|
||||
...
|
||||
|
||||
def getRefTypeOfShape(self, shape: str) -> str:
|
||||
def getRefTypeOfShape(self, shape: str, /) -> str:
|
||||
"""
|
||||
getRefTypeOfShape(shape): returns shape type as interpreted by AttachEngine. Returns a string.
|
||||
"""
|
||||
...
|
||||
|
||||
def isFittingRefType(self, type_shape: str, type_needed: str) -> bool:
|
||||
def isFittingRefType(self, type_shape: str, type_needed: str, /) -> bool:
|
||||
"""
|
||||
isFittingRefType(type_shape, type_needed): tests if shape type, specified by type_shape (string), fits a type required by attachment mode type_needed (string). e.g. 'Circle' fits a requirement of 'Edge', and 'Curve' doesn't fit if a 'Circle' is required.
|
||||
"""
|
||||
...
|
||||
|
||||
def downgradeRefType(self, type: str) -> str:
|
||||
def downgradeRefType(self, type: str, /) -> str:
|
||||
"""
|
||||
downgradeRefType(type): returns next more general type. E.g. downgradeType('Circle') yields 'Curve'.
|
||||
"""
|
||||
...
|
||||
|
||||
def getRefTypeInfo(self, type: str) -> dict:
|
||||
def getRefTypeInfo(self, type: str, /) -> dict:
|
||||
"""
|
||||
getRefTypeInfo(type): returns information (dict) on shape type. Keys:'UserFriendlyName', 'TypeIndex', 'Rank'. Rank is the number of times reftype can be downgraded, before it becomes 'Any'.
|
||||
"""
|
||||
@@ -84,7 +88,7 @@ class AttachEngine(BaseClass):
|
||||
...
|
||||
|
||||
@constmethod
|
||||
def calculateAttachedPlacement(self, orig_placement: Placement) -> Optional[Placement]:
|
||||
def calculateAttachedPlacement(self, orig_placement: Placement, /) -> Optional[Placement]:
|
||||
"""
|
||||
calculateAttachedPlacement(orig_placement): returns result of attachment, based
|
||||
on current Mode, References, etc. AttachmentOffset is included.
|
||||
@@ -130,13 +134,13 @@ class AttachEngine(BaseClass):
|
||||
"""
|
||||
...
|
||||
|
||||
def readParametersFromFeature(self, document_object: DocumentObject) -> None:
|
||||
def readParametersFromFeature(self, document_object: DocumentObject, /) -> None:
|
||||
"""
|
||||
readParametersFromFeature(document_object): sets AttachEngine parameters (References, Mode, etc.) by reading out properties of AttachableObject-derived feature.
|
||||
"""
|
||||
...
|
||||
|
||||
def writeParametersToFeature(self, document_object: DocumentObject) -> None:
|
||||
def writeParametersToFeature(self, document_object: DocumentObject, /) -> None:
|
||||
"""
|
||||
writeParametersToFeature(document_object): updates properties of
|
||||
AttachableObject-derived feature with current AttachEngine parameters
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export
|
||||
from App.DocumentObjectExtension import DocumentObjectExtension
|
||||
from typing import Any, Final
|
||||
@@ -29,7 +33,7 @@ class AttachExtension(DocumentObjectExtension):
|
||||
"""
|
||||
...
|
||||
|
||||
def changeAttacherType(self, typename: str) -> None:
|
||||
def changeAttacherType(self, typename: str, /) -> None:
|
||||
"""
|
||||
changeAttacherType(typename) -> None
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# SPDX-License: LGPL-2.1-or-later
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from Base.Metadata import export, constmethod
|
||||
from Base.PyObjectBase import PyObjectBase
|
||||
from typing import List
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user