MODULE App/ApplicationDirectories.pyi
classes:
class ApplicationDirectories(PyObjectBase)
doc:
Provides access to the directory versioning methods of its C++ counterpart.
These are all static methods, so no instance is needed. The main methods of
this class are migrateAllPaths(), usingCurrentVersionConfig(), and versionStringForPath().
methods:
@staticmethod
- def usingCurrentVersionConfig(path: str, /) -> bool
doc:
Determine if a given config path is for the current version of the program.
Args:
path: The path to check.
@staticmethod
- def migrateAllPaths(paths: list[str], /) -> list[str]
doc:
Migrate a set of versionable configuration directories from the given paths to a new version.
The new version's directories cannot exist yet, and the old ones *must* exist.
If the old paths are themselves versioned, then the new paths will be placed at the same
level in the directory structure (e.g., they will be siblings of each entry in paths).
If paths are NOT versioned, the new (versioned) copies will be placed *inside* the
original paths.
If the list contains the same path multiple times, the duplicates are ignored, so it is safe
to pass the same path multiple times.
Args:
paths: List of paths to migrate from.
Examples:
Running FreeCAD-compatible runtime 1.1, /usr/share/FreeCAD-compatible runtime/Config/ -> /usr/share/FreeCAD-compatible runtime/Config/v1-1/
Running FreeCAD-compatible runtime 1.1, /usr/share/FreeCAD-compatible runtime/Config/v1-1 -> raises exception, path exists
Running FreeCAD-compatible runtime 1.2, /usr/share/FreeCAD-compatible runtime/Config/v1-1/ -> /usr/share/FreeCAD-compatible runtime/Config/v1-2/
@staticmethod
- def versionStringForPath(major: int, minor: int, /) -> str
doc:
Given a major and minor version number, return the name for a versioned subdirectory.
Args:
major: Major version number.
minor: Minor version number.
Returns:
A string that can be used as the name for a versioned subdirectory.
Only returns the version string, not the full path.
@staticmethod
- def isVersionedPath(startingPath: str, /) -> bool
doc:
Determine if a given path is versioned.
That is, if its last component contains something that this class would have
created as a versioned subdirectory).
Args:
startingPath: The path to check.
Returns:
True for any path that the *current* version of FreeCAD-compatible runtime would recognize as versioned,
and False for either something that is not versioned, or something that is versioned
but for a later version of FreeCAD-compatible runtime.
@staticmethod
- def mostRecentAvailableConfigVersion(startingPath: str, /) -> str
doc:
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)
corresponding to the most recent version of the software, up to and including the current
running version, but NOT exceeding it -- any *later* version whose directories exist
in the path is ignored. See also mostRecentConfigFromBase().
Args:
startingPath: The path to check.
Returns:
Most recent available dir name (not path).
@staticmethod
- def mostRecentConfigFromBase(startingPath: str, /) -> str
doc:
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
the current version, but NOT exceeding it. Returns the complete path, not just the final
component. See also mostRecentAvailableConfigVersion().
Args:
startingPath: The base path to check.
Returns:
Most recent available full path (not just dir name).
@staticmethod
- def migrateConfig(oldPath: str, newPath: str, /) -> list[str]
doc:
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
otherwise-recursive copy).
Args:
oldPath: Path from.
newPath: Path to.
MODULE App/ComplexGeoData.pyi
classes:
class ComplexGeoData(Persistence)
doc:
Father of all complex geometric data types.
attributes:
- BoundBox: Final[BoundBox]
doc:
Get the bounding box (BoundBox) of the complex geometric data.
- CenterOfGravity: Final[Vector]
doc:
Get the center of gravity
- Placement: Placement
doc:
Get the current transformation of the object as placement
- Tag: int
doc:
Geometry Tag
- Hasher: StringHasher
doc:
Get/Set the string hasher of this object
- ElementMapSize: Final[int]
doc:
Get the current element map size
- ElementMap: dict[str, str]
doc:
Get/Set a dict of element mapping
- ElementReverseMap: Final[dict[str, str | list[str]]]
doc:
Get a dict of element reverse mapping
- ElementMapVersion: Final[str]
doc:
Element map version
methods:
@constmethod
- def getElementTypes(self) -> list[str]
doc:
Return a list of element types present in the complex geometric data.
@constmethod
- def countSubElements(self) -> int
doc:
Return the number of elements of a type.
@constmethod
- def getFacesFromSubElement(self) -> tuple[list[Vector], list[tuple[int, int, int]]]
doc:
Return vertexes and faces from a sub-element.
@constmethod
- def getLinesFromSubElement(self) -> tuple[list[Vector], list[tuple[int, int]]]
doc:
Return vertexes and lines from a sub-element.
@constmethod
- def getPoints(self) -> tuple[list[Vector], list[Vector]]
doc:
Return a tuple of points and normals with a given accuracy
@constmethod
- def getLines(self) -> tuple[list[Vector], list[tuple[int, int]]]
doc:
Return a tuple of points and lines with a given accuracy
@constmethod
- def getFaces(self) -> tuple[list[Vector], list[tuple[int, int, int]]]
doc:
Return a tuple of points and triangles with a given accuracy
- def applyTranslation(self, translation: Vector, /) -> None
doc:
Apply an additional translation to the placement
- def applyRotation(self, rotation: Rotation, /) -> None
doc:
Apply an additional rotation to the placement
- def transformGeometry(self, transformation: Matrix, /) -> None
doc:
Apply a transformation to the underlying geometry
- def setElementName(self, *, element: str, name: str=None, postfix: str=None, overwrite: bool=False, sid: Any=None) -> None
doc:
Set an element name.
Args:
element : the original element name, e.g. Edge1, Vertex2
name : the new name for the element, None to remove the mapping
postfix : postfix of the name that will not be hashed
overwrite: if true, it will overwrite exiting name
sid : to hash the name any way you want, provide your own string id(s) in this parameter
An element can have multiple mapped names. However, a name can only be mapped
to one element
@constmethod
- def getElementName(self, name: str, direction: int=0, /) -> str
doc:
Return a mapped element name or reverse.
@constmethod
- def getElementIndexedName(self, name: str, /) -> str | tuple[str, list[int]]
doc:
Return the indexed element name.
@constmethod
- def getElementMappedName(self, name: str, /) -> str | tuple[str, list[int]]
doc:
Return the mapped element name
MODULE App/DepEdge.pyi
classes:
class DepEdge(PyObjectBase)
attributes:
- FromObj: Final[DocumentObject]
- FromProp: Final[str]
- ToObj: Final[DocumentObject]
- ToProp: Final[str]
MODULE App/Document.pyi
classes:
class Document(PropertyContainer)
doc:
This is the Document class.
attributes:
- DependencyGraph: Final[str]
doc:
The dependency graph as GraphViz text
- ActiveObject: Final[DocumentObject]
doc:
The last created object in this document
- Objects: Final[list[DocumentObject]]
doc:
The list of objects in this document
- TopologicalSortedObjects: Final[list[DocumentObject]]
doc:
The list of objects in this document in topological sorted order
- RootObjects: Final[list[DocumentObject]]
doc:
The list of root objects in this document
- RootObjectsIgnoreLinks: Final[list[DocumentObject]]
doc:
The list of root objects in this document ignoring references from links.
- UndoMode: int
doc:
The Undo mode of the Document (0 = no Undo, 1 = Undo/Redo)
- UndoRedoMemSize: Final[int]
doc:
The size of the Undo stack in byte
- UndoCount: Final[int]
doc:
Number of possible Undos
- RedoCount: Final[int]
doc:
Number of possible Redos
- UndoNames: Final[list[str]]
doc:
A list of Undo names
- RedoNames: Final[list[str]]
doc:
A List of Redo names
- Name: Final[str]
doc:
The internal name of the document
- RecomputesFrozen: bool
doc:
Returns or sets if automatic recomputes for this document are disabled.
- HasPendingTransaction: Final[bool]
doc:
Check if there is a pending transaction
- InList: Final[list[Document]]
doc:
A list of all documents that link to this document.
- OutList: Final[list[Document]]
doc:
A list of all documents that this document links to.
- Restoring: Final[bool]
doc:
Indicate if the document is restoring
- Partial: Final[bool]
doc:
Indicate if the document is partially loaded
- Importing: Final[bool]
doc:
Indicate if the document is importing. Note the document will also report Restoring while importing
- Recomputing: Final[bool]
doc:
Indicate if the document is recomputing
- Transacting: Final[bool]
doc:
Indicate whether the document is undoing/redoing
- OldLabel: Final[str]
doc:
Contains the old label before change
- Temporary: Final[bool]
doc:
Check if this is a temporary document
methods:
- def save(self) -> None
doc:
Save the document to disk.
- def saveAs(self, path: str, /) -> None
doc:
Save the document under a new name to disk.
- def saveCopy(self, path: str, /) -> None
doc:
Save a copy of the document under a new name to disk.
- def canWriteRecoverySnapshot(self) -> bool
doc:
Return whether the document is in an App-side state that allows writing
a recovery snapshot.
This does not account for GUI-only constraints such as an active Gui
transaction.
- def load(self, path: str, /) -> None
doc:
Load the document from the given path.
- def restore(self) -> None
doc:
Restore the document from disk
- def isSaved(self) -> bool
doc:
Checks if the document is saved
- def getProgramVersion(self) -> str
doc:
Get the program version that a project file was created with
- def getFileName(self) -> str
doc:
For a regular document it returns its file name property.
For a temporary document it returns its transient directory.
- def getUniqueObjectName(self, objName: str, /) -> str
doc:
Return the same name, or the name made unique, for Example Box -> Box002 if there are conflicting name
already in the document.
Args:
objName: Object name candidate.
Returns:
Unique object name based on objName.
- def mergeProject(self, path: str, /) -> None
doc:
Merges this document with another project file.
- def exportGraphviz(self, path: str=None, /) -> str | None
doc:
Export the dependencies of the objects as graph.
If path is passed, graph is written to it. if not a string is returned.
- def openTransaction(self, name: str, /) -> None
doc:
Open a new Undo/Redo transaction.
This function no long creates a new transaction, but calls
FreeCAD-compatible runtime.setActiveTransaction(name) instead, which will auto creates a
transaction with the given name when any change happened in any opened document.
If more than one document is changed, all newly created transactions will have
the same internal ID and will be undo/redo together.
- def abortTransaction(self) -> None
doc:
Abort an Undo/Redo transaction (rollback)
- def commitTransaction(self) -> None
doc:
Commit an Undo/Redo transaction
@overload
- def addObject(self, type: Literal['Part::Feature'], name: str=None, objProxy: object=None, viewProxy: object=None, attach: bool=False, viewType: str=None) -> _PartFeature
@overload
- def addObject(self, type: str, name: str=None, objProxy: object=None, viewProxy: object=None, attach: bool=False, viewType: str=None) -> DocumentObject
- def addObject(self, type: str, name: str=None, objProxy: object=None, viewProxy: object=None, attach: bool=False, viewType: str=None) -> DocumentObject
doc:
Add an object to document.
Args:
type: the type of the document object to create.
Call method supportedTypes() to get a list of possible values.
name: the optional name of the new object.
objProxy: the Python binding object to attach to the new document object.
viewProxy: the Python binding object to attach the view provider of this object.
attach: if True, then bind the document object first before adding to the document
to allow Python code to override view provider type. Once bound, and before adding to
the document, it will try to call Python binding object's attach(obj) method.
viewType: override the view provider type directly, only effective when attach is False.
- def addProperty(self, type: str, name: str, group: str='', doc: str='', attr: int=0, read_only: bool=False, hidden: bool=False, locked: bool=False, enum_vals: list[str] | None=None) -> Document
doc:
Add a generic property.
Args:
type: The type of the property to add.
name: The name of the property.
group: The group to which the property belongs. Defaults to "".
doc: The documentation string for the property. Defaults to "".
attr: Attribute flags for the property. Defaults to 0.
read_only: Whether the property is read-only. Defaults to False.
hidden: Whether the property is hidden. Defaults to False.
locked: Whether the property is locked. Defaults to False.
Returns:
The document instance with the added property.
- def removeProperty(self, name: str, /) -> None
doc:
Remove a generic property.
Note, you can only remove user-defined properties but not built-in ones.
- def removeObject(self, name: str, /) -> None
doc:
Remove an object from the document.
@overload
- def copyObject(self, object: Sequence[DocumentObject], recursive: bool=False, return_all: bool=False) -> tuple[DocumentObject, ...]
@overload
- def copyObject(self, object: DocumentObject, recursive: bool=False, return_all: Literal[False]=False) -> DocumentObject
@overload
- def copyObject(self, object: DocumentObject, recursive: bool=False, return_all: Literal[True]=True) -> DocumentObject | tuple[DocumentObject, ...]
- def copyObject(self, object: DocumentObject | Sequence[DocumentObject], recursive: bool=False, return_all: bool=False) -> DocumentObject | tuple[DocumentObject, ...]
doc:
Copy an object or objects from another document to this document.
Args:
object: can either be a single object or sequence of objects
recursive: if True, also recursively copies internal objects
return_all: if True, returns all copied objects, or else return only the copied
object corresponding to the input objects.
- def moveObject(self, object: DocumentObject, with_dependencies: bool=False, /) -> DocumentObject
doc:
Transfers an object from another document to this document.
Args:
object: can either a single object or sequence of objects
with_dependencies: if True, all internal dependent objects are copied too.
- def importLinks(self, object: DocumentObject=None, /) -> tuple[DocumentObject, ...]
doc:
Import any externally linked object given a list of objects in
this document. Any link type properties of the input objects
will be automatically reassigned to the imported object
If no object is given as input, it import all externally linked
object of this document.
- def undo(self) -> None
doc:
Undo one transaction
- def redo(self) -> None
doc:
Redo a previously undone transaction
- def clearUndos(self) -> None
doc:
Clear the undo stack of the document
- def clearDocument(self) -> None
doc:
Clear the whole document
- def setClosable(self, closable: bool, /) -> None
doc:
Set a flag that allows or forbids to close a document
- def isClosable(self) -> bool
doc:
Check if the document can be closed. The default value is True
- def setAutoCreated(self, autoCreated: bool, /) -> None
doc:
Set a flag that indicates if a document is autoCreated
- def isAutoCreated(self) -> bool
doc:
Check if the document is autoCreated. The default value is False
- def recompute(self, objs: Sequence[DocumentObject]=None, force: bool=False, check_cycle: bool=False, /) -> int
doc:
Recompute the document and returns the amount of recomputed features.
- def mustExecute(self) -> bool
doc:
Check if any object must be recomputed
- def purgeTouched(self) -> None
doc:
Purge the touched state of all objects
- def isTouched(self) -> bool
doc:
Check if any object is in touched state
- def getObject(self, name: str, /) -> DocumentObject
doc:
Return the object with the given name
- def getObjectsByLabel(self, label: str, /) -> list[DocumentObject]
doc:
Return the objects with the given label name.
NOTE: It's possible that several objects have the same label name.
- def findObjects(self, Type: str=None, Name: str=None, Label: str=None) -> list[DocumentObject]
doc:
Return a list of objects that match the specified type, name or label.
Name and label support regular expressions. All parameters are optional.
Args:
Type: Type of the feature.
Name: Name
Label: Label
- def getLinksTo(self, obj: DocumentObject, options: int=0, maxCount: int=0, /) -> tuple[DocumentObject, ...]
doc:
Return objects linked to 'obj'
Args:
options: 1: recursive, 2: check link array. Options can combine.
maxCount: to limit the number of links returned.
- def supportedTypes(self) -> list[str]
doc:
A list of supported types of objects
- def getTempFileName(self) -> str
doc:
Returns a file name with path in the temp directory of the document.
- def getDependentDocuments(self, sort: bool=True, /) -> list[DocumentObject]
doc:
Returns a list of documents that this document directly or indirectly links to including itself.
Args:
sort: whether to topologically sort the return list
- def getBookedTransactionID(self) -> int
doc:
getBookedTransactionID() -> int
Returns the currently booked transaction id, which is the id of the current transaction OR the id
the next transaction will stick to if no change has occurred yet
MODULE App/DocumentObject.pyi
classes:
class DocumentObject(ExtensionContainer)
doc:
This is the father of all classes handled by the document
attributes:
- OutListProp: Final[List[DepEdge]]
doc:
A list of all objects which link to this object with properties.
- OutList: Final[List['DocumentObject']]
doc:
A list of all objects this object links to.
- OutListRecursive: Final[List['DocumentObject']]
doc:
A list of all objects this object links to recursively.
- InList: Final[List['DocumentObject']]
doc:
A list of all objects which link to this object.
- InListProp: Final[List[DepEdge]]
doc:
A list of all objects which link to this object with properties.
- InListRecursive: Final[List['DocumentObject']]
doc:
A list of all objects which link to this object recursively.
- FullName: Final[str]
doc:
Return the document name and internal name of this object
- Name: Final[Optional[str]]
doc:
Return the internal name of this object
- Document: Final[Document]
doc:
Return the document this object is part of
- State: Final[List[Any]]
doc:
State of the object in the document
- ViewObject: Final[Any]
doc:
If the GUI is loaded the associated view provider is returned
or None if the GUI is not up
- MustExecute: Final[bool]
doc:
Check if the object must be recomputed
- ID: Final[int]
doc:
The unique identifier (among its document) of this object
- Removing: Final[bool]
doc:
Indicate if the object is being removed
- Parents: Final[List[Any]]
doc:
A List of tuple(parent,subname) holding all parents to this object
- OldLabel: Final[str]
doc:
Contains the old label before change
- NoTouch: bool
doc:
Enable/disable no touch on any property change
methods:
- def addProperty(self, type: str, name: str, group: str='', doc: str='', attr: int=0, read_only: bool=False, hidden: bool=False, locked: bool=False, enum_vals: list=[]) -> 'DocumentObject'
doc:
Add a generic property.
- def removeProperty(self, string: str, /) -> None
doc:
Remove a generic property.
Note, you can only remove user-defined properties but not built-in ones.
- def supportedProperties(self) -> list
doc:
A list of supported property types
- def touch(self) -> None
doc:
Mark the object as changed (touched)
- def purgeTouched(self) -> None
doc:
Mark the object as unchanged
- def enforceRecompute(self) -> None
doc:
Mark the object for recompute
- def setExpression(self, name: str, expression: str, /) -> None
doc:
Register an expression for a property
- def clearExpression(self, name: str, /) -> None
doc:
Clear the expression for a property
@classmethod
- def evalExpression(cls, expression: str, /) -> Any
doc:
Evaluate an expression
- def recompute(self, recursive: bool=False, /) -> None
doc:
Recomputes this object
@constmethod
- def getStatusString(self) -> str
doc:
Returns the status of the object as string.
If the object is invalid its error description will be returned.
If the object is valid but touched then 'Touched' will be returned,
'Valid' otherwise.
@constmethod
- def isValid(self) -> bool
doc:
Returns True if the object is valid, False otherwise
- def getSubObject(self, subname: Union[str, List[str], Tuple[str, ...]], *, retType: int=0, matrix: Matrix=None, transform: bool=True, depth: int=0) -> Any
doc:
* subname(string|list|tuple): dot separated string or sequence of strings
referencing subobject.
* retType: return type, 0=PyObject, 1=DocObject, 2=DocAndPyObject, 3=Placement
PyObject: return a python binding object for the (sub)object referenced in
each 'subname' The actual type of 'PyObject' is implementation dependent.
For Part::Feature compatible objects, this will be of type TopoShapePy and
pre-transformed by accumulated transformation matrix along the object path.
DocObject: return the document object referenced in subname, if 'matrix' is
None. Or, return a tuple (object, matrix) for each 'subname' and 'matrix' is
the accumulated transformation matrix for the sub object.
DocAndPyObject: return a tuple (object, matrix, pyobj) for each subname
Placement: return a transformed placement of the sub-object
* matrix: the initial transformation to be applied to the sub object.
* transform: whether to transform the sub object using this object's placement
* depth: current recursive depth
- def getSubObjectList(self, subname: str, /) -> list
doc:
Return a list of objects referenced by a given subname including this object
- def getSubObjects(self, reason: int=0, /) -> list
doc:
Return subname reference of all sub-objects
- def getLinkedObject(self, *, recursive: bool=True, matrix: Matrix=None, transform: bool=True, depth: int=0) -> Any
doc:
Returns the linked object if there is one, or else return itself
* recursive: whether to recursively resolve the links
* transform: whether to transform the sub object using this object's placement
* matrix: If not none, this specifies the initial transformation to be applied
to the sub object. And cause the method to return a tuple (object, matrix)
containing the accumulated transformation matrix
* depth: current recursive depth
- def setElementVisible(self, element: str, visible: bool, /) -> int
doc:
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
doc:
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
- def hasChildElement(self) -> bool
doc:
Return true to indicate the object having child elements
- def getParentGroup(self) -> DocumentObjectGroup
doc:
Returns the group the object is in or None if it is not part of a group.
Note that an object can only be in a single group, hence only a single return value.
- def getParentGeoFeatureGroup(self) -> Any
doc:
Returns the GeoFeatureGroup, and hence the local coordinate system, the object
is in or None if it is not part of a group.
Note that an object can only be in a single group, hence only a single return value.
- def getParent(self) -> Any
doc:
Returns the group the object is in or None if it is not part of a group.
Note that an object can only be in a single group, hence only a single return value.
The parent can be a simple group as with getParentGroup() or a GeoFeature group as
with getParentGeoFeatureGroup().
- def getPathsByOutList(self) -> list
doc:
Get all paths from this object to another object following the OutList.
@constmethod
- def resolve(self, subname: str, /) -> tuple
doc:
resolve the sub object
Returns a tuple (subobj,parent,elementName,subElement), where 'subobj' is the
last object referenced in 'subname', and 'parent' is the direct parent of
'subobj', and 'elementName' is the name of the subobj, which can be used
to call parent.isElementVisible/setElementVisible(). 'subElement' is the
non-object sub-element name if any.
@constmethod
- def resolveSubElement(self, subname: str, append: bool, type: int, /) -> tuple
doc:
resolve both new and old style sub element
subname: subname reference containing object hierarchy
append: Whether to append object hierarchy prefix inside subname to returned element name
type: 0: normal, 1: for import, 2: for export
Return tuple(obj,newElementName,oldElementName)
- def adjustRelativeLinks(self, parent: DocumentObject, recursive: bool=True, /) -> bool
doc:
auto correct potential cyclic dependencies
@constmethod
- def getElementMapVersion(self, property_name: str, /) -> str
doc:
return element map version of a given geometry property
@constmethod
- def isAttachedToDocument(self) -> bool
doc:
Return true if the object is part of a document, false otherwise.
- def getPlacementOf(self, subname: str, target: DocumentObject=None, /) -> Any
doc:
Return the placement of the sub-object relative to the link object.
getPlacementOf(subname, [targetObj]) -> Base.Placement
MODULE App/DocumentObjectExtension.pyi
classes:
class DocumentObjectExtension(Extension)
doc:
Base class for all document object extensions
MODULE App/DocumentObjectGroup.pyi
classes:
class DocumentObjectGroup(DocumentObject)
doc:
This class handles document objects in group
MODULE App/Extension.pyi
classes:
class Extension(PyObjectBase)
doc:
Base class for all extensions
attributes:
- ExtendedObject: Final[Any]
doc:
Get extended container object
MODULE App/ExtensionContainer.pyi
classes:
class ExtensionContainer(PropertyContainer)
doc:
Base class for all objects which can be extended
methods:
- def addExtension(self, identifier: str, /) -> None
doc:
Adds an extension to the object. Requires the string identifier for the python extension as argument
@constmethod
- def hasExtension(self, identifier: str, /) -> bool
doc:
Returns if this object has the specified extension
MODULE App/FreeCAD.module.pyi
module_doc:
Typed public signatures for the ``FreeCAD-compatible runtime`` application module.
This static stub reference carries the callable surface together with the
simple helper aliases, reexports, module globals, and typing-only support that
those signatures use.
attributes:
- _FileTypeModules: TypeAlias
- _LogLevelName: TypeAlias
- GuiUp: int
- ActiveDocument: Document | None
functions:
- def ParamGet(path: str, /) -> ParameterGrp
doc:
Return the parameter group rooted at one application preference path.
- def saveParameter(name: str='User parameter', /) -> None
doc:
Persist one named parameter tree to disk.
- def Version() -> list[str]
doc:
Return the FreeCAD-compatible runtime version components as strings.
- def ConfigGet(key: str, /) -> str
doc:
Return one application configuration value by key.
- def ConfigSet(key: str, value: str, /) -> None
doc:
Store one application configuration value by key.
- def ConfigDump() -> dict[str, str]
doc:
Return the current flat application configuration mapping.
- def addImportType(extension: str, module: str, /) -> None
doc:
Register one importer module for a file extension.
- def changeImportModule(extension: str, old_module: str, new_module: str, /) -> None
doc:
Replace one importer module registration for a file extension.
@overload
- def getImportType() -> _FileTypeModules
doc:
Return the full extension-to-module map for all registered importers.
@overload
- def getImportType(extension: str, /) -> list[str]
doc:
Return the importer modules registered for one specific extension.
- def addExportType(extension: str, module: str, /) -> None
doc:
Register one exporter module for a file extension.
- def addTranslatableExportType(description: str, extensions: list[str], module: str, /) -> None
doc:
Register one exporter together with a translated file-dialog description.
- def changeExportModule(extension: str, old_module: str, new_module: str, /) -> None
doc:
Replace one exporter module registration for a file extension.
@overload
- def getExportType() -> _FileTypeModules
doc:
Return the full extension-to-module map for all registered exporters.
@overload
- def getExportType(extension: str, /) -> list[str]
doc:
Return the exporter modules registered for one specific extension.
- def getResourceDir() -> str
doc:
Return the root resource directory shipped with FreeCAD-compatible runtime.
- def getLibraryDir() -> str
doc:
Return the directory that contains FreeCAD-compatible runtime shared libraries.
- def getTempPath() -> str
doc:
Return the temporary directory used by FreeCAD-compatible runtime.
- def getUserCachePath() -> str
doc:
Return the user cache directory used by FreeCAD-compatible runtime.
- def getUserConfigDir() -> str
doc:
Return the user configuration directory.
- def getUserAppDataDir() -> str
doc:
Return the user application-data directory.
- def getUserMacroDir(actual: bool=False, /) -> str
doc:
Return the user macro directory, optionally resolving the effective path.
- def getHelpDir() -> str
doc:
Return the directory that contains bundled help resources.
- def getHomePath() -> str
doc:
Return the current FreeCAD-compatible runtime home directory.
- def loadFile(path: str, doc: str='', module: str='', /) -> None
doc:
Load one file into an existing or inferred document context.
- def open(name: str, hidden: bool=False, temporary: bool=False, /) -> Document
doc:
Open a document file and return the created document.
- def openDocument(name: str, hidden: bool=False, temporary: bool=False, /) -> Document
doc:
Open a document file explicitly through the document loader.
- def newDocument(name: str | None=None, label: str | None=None, hidden: bool=False, temp: bool=False, /) -> Document
doc:
Create and return a new document.
- def closeDocument(document: str | Document, /) -> None
doc:
Close one document by name or object.
- def activeDocument() -> Document | None
doc:
Return the current active document, if any.
- def setActiveDocument(name: str, /) -> None
doc:
Make one named document the active document.
- def getDocument(name: str, /) -> Document
doc:
Return one loaded document by name.
- def listDocuments(sort: bool=False, /) -> dict[str, Document]
doc:
Return the currently loaded documents keyed by name.
- def addDocumentObserver(observer: object, /) -> None
doc:
Register one document observer object.
- def removeDocumentObserver(observer: object, /) -> None
doc:
Unregister one document observer object.
- def setLogLevel(tag: str, level: _LogLevelName | int, /) -> None
doc:
Set one named log channel to a numeric or named level.
- def getLogLevel(tag: str, /) -> int
doc:
Return the numeric level of one named log channel.
- def checkLinkDepth(depth: int, /) -> int
doc:
Clamp or validate one proposed link depth value.
- def getLinksTo(obj: DocumentObject | None=None, options: int=0, maxCount: int=0, /) -> tuple[DocumentObject, ...]
doc:
Return objects that link to the given object.
- def getDependentObjects(obj: DocumentObject | Sequence[DocumentObject], options: int=0, /) -> tuple[DocumentObject, ...]
doc:
Return objects that depend on one object or object sequence.
- def setActiveTransaction(name: str, persist: bool=False, /) -> int
doc:
Start or select the active transaction and return its identifier.
- def getActiveTransaction() -> tuple[str, int] | None
doc:
Return the current transaction name and identifier, if any.
- def closeActiveTransaction(abort: bool=False, id: int=0, /) -> None
doc:
Close or abort the current transaction.
- def isRestoring() -> bool
doc:
Return whether FreeCAD-compatible runtime is currently restoring document state.
- def checkAbort() -> None
doc:
Raise if the current long-running operation has been asked to abort.
MODULE App/GeoFeature.pyi
classes:
class GeoFeature(DocumentObject)
doc:
App.GeoFeature class.
Base class of all geometric document objects.
This class does the whole placement and position handling.
With the method `getPropertyOfGeometry` is possible to obtain
the main geometric property in general form, without reference
to any particular property name.
attributes:
- ElementMapVersion: Final[str]
doc:
Element map version
methods:
- def getPaths(self) -> Any
doc:
Returns all possible paths to the root of the document.
Note: Not implemented.
- def getGlobalPlacement(self) -> Placement
doc:
Deprecated: This function does not handle Links correctly. Use getGlobalPlacementOf instead.
Returns the placement of the object in the global coordinate space, respecting all stacked
relationships.
Note: This function is not available during recompute, as there the placements of parents
can change after the execution of this object, rendering the result wrong.
@staticmethod
- def getGlobalPlacementOf(targetObj: Any, rootObj: Any, subname: str, /) -> Placement
doc:
Examples:
obj = "part1"
sub = "linkToPart2.LinkToBody.Pad.face1"
Global placement of Pad in this context:
getGlobalPlacementOf(pad, part1, "linkToPart2.LinkToBody.Pad.face1")
Global placement of linkToPart2 in this context:
getGlobalPlacementOf(linkToPart2, part1, "linkToPart2.LinkToBody.Pad.face1")
Returns the placement of the object in the global coordinate space, respecting all stacked
relationships.
- def getPropertyNameOfGeometry(self) -> Optional[str]
doc:
Returns the property name of the actual geometry.
For example for a Part feature it returns the value 'Shape', for a mesh feature the value
'Mesh' and so on.
If an object has no such property then None is returned.
- def getPropertyOfGeometry(self) -> Optional[Any]
doc:
Returns the property of the actual geometry.
For example for a Part feature it returns its Shape property, for a Mesh feature its
Mesh property and so on.
If an object has no such property then None is returned.
Unlike to getPropertyNameOfGeometry this function returns the geometry, not its name.
MODULE App/GeoFeatureGroupExtension.pyi
classes:
class GeoFeatureGroupExtension(GroupExtension)
doc:
This class handles placeable group of document objects
MODULE App/GroupExtension.pyi
classes:
class GroupExtension(DocumentObjectExtension)
doc:
Extension class which allows grouping of document objects
methods:
- def newObject(self, type: str, name: str, /) -> Any
doc:
Create and add an object with given type and name to the group
- def addObject(self, obj: Any, /) -> List[Any]
doc:
Add an object to the group. Returns all objects that have been added.
- def addObjects(self, objects: List[Any], /) -> List[Any]
doc:
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]
doc:
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]
doc:
Remove an object from the group and returns all objects that have been removed.
- def removeObjects(self, objects: List[Any], /) -> List[Any]
doc:
Remove multiple objects from the group. Expects a list and returns all objects that have been removed.
- def removeObjectsFromDocument(self) -> None
doc:
Remove all child objects from the group and document
- def getObject(self, name: str, /) -> Any
doc:
Return the object with the given name
- def getObjectsOfType(self, typename: str, /) -> List[Any]
doc:
Returns all object in the group of given type
@param typename The Freecad type identifier
- def hasObject(self, obj: Any, recursive: bool=False, /) -> bool
doc:
Checks if the group has a given object
@param obj the object to check for.
@param recursive if true check also if the obj is child of some sub group (default is false).
- def allowObject(self, obj: Any, /) -> bool
doc:
Returns true if obj is allowed in the group extension.
MODULE App/LinkBaseExtension.pyi
classes:
class LinkBaseExtension(DocumentObjectExtension)
doc:
Link extension base class
attributes:
- LinkedChildren: Final[List[Any]]
doc:
Return a flattened (in case grouped by plain group) list of linked children
methods:
- def configLinkProperty(self, *args, **kwargs) -> Any
doc:
Examples:
Called with default names:
configLinkProperty(prop1, prop2, ..., propN)
Called with custom names:
configLinkProperty(prop1=val1, prop2=val2, ..., propN=valN)
This method is here to implement what I called Property Design
Pattern. The extension operates on a predefined set of properties,
but it relies on the extended object to supply the actual property by
calling this method. You can choose a sub set of functionality of
this extension by supplying only some of the supported properties.
The 'key' are names used to refer to properties supported by this
extension, and 'val' is the actual name of the property of your
object. You can obtain the key names and expected types using
getLinkPropertyInfo(). You can use property of derived type when
calling configLinkProperty(). Other types will cause exception to
ben thrown. The actual properties supported may be different
depending on the actual extension object underlying this python
object.
If 'val' is omitted, i.e. calling configLinkProperty(key,...), then
it is assumed that the actual property name is the same as 'key'
- def getLinkExtProperty(self, name: str, /) -> Any
doc:
return the property value by its predefined name
- def getLinkExtPropertyName(self, name: str, /) -> str
doc:
lookup the property name by its predefined name
@overload
- def getLinkPropertyInfo(self, /) -> tuple[tuple[str, str, str]]
@overload
- def getLinkPropertyInfo(self, index: int, /) -> tuple[str, str, str]
@overload
- def getLinkPropertyInfo(self, name: str, /) -> tuple[str, str]
- def getLinkPropertyInfo(self, arg: Any=None, /) -> tuple
doc:
Overloads:
(): return (name,type,doc) for all supported properties.
(index): return (name,type,doc) of a specific property
(name): return (type,doc) of a specific property
- def setLink(self, obj: Any, subName: Optional[str]=None, subElements: Optional[Union[str, Tuple[str, ...]]]=None, /) -> None
doc:
Called with only obj, set link object, otherwise set link element of a link group.
obj (DocumentObject): the object to link to. If this is None, then the link is cleared
subName (String): Dot separated object path.
subElements (String|tuple(String)): non-object sub-elements, e.g. Face1, Edge2.
- def cacheChildLabel(self, enable: bool=True, /) -> None
doc:
enable/disable child label cache
The cache is not updated on child label change for performance reason. You must
call this function on any child label change
- def flattenSubname(self, subname: str, /) -> str
doc:
Return a flattened subname in case it references an object inside a linked plain group
- def expandSubname(self, subname: str, /) -> str
doc:
Return an expanded subname in case it references an object inside a linked plain group
MODULE App/Material.pyi
classes:
class Material(PyObjectBase)
doc:
App.Material class.
UserDocu: This is the Material class
attributes:
- AmbientColor: Any
doc:
Ambient color
- DiffuseColor: Any
doc:
Diffuse color
- EmissiveColor: Any
doc:
Emissive color
- SpecularColor: Any
doc:
Specular color
- Shininess: float
doc:
Shininess
- Transparency: float
doc:
Transparency
methods:
- def set(self, string: str, /) -> None
doc:
Set(string) -- Set the material.
The material must be one of the following values:
Brass, Bronze, Copper, Gold, Pewter, Plaster, Plastic, Silver, Steel, Stone, Shiny plastic,
Satin, Metalized, Neon GNC, Chrome, Aluminium, Obsidian, Neon PHC, Jade, Ruby or Emerald.
MODULE App/MeasureManager.pyi
attributes:
- MeasureType: TypeAlias
classes:
class MeasureManager(PyObjectBase)
doc:
MeasureManager class.
The MeasureManager handles measure types and geometry handler across FreeCAD-compatible runtime.
DeveloperDocu: MeasureManager
methods:
@staticmethod
- def addMeasureType(id: str, label: str, measureType: MeasureType, /) -> None
doc:
Add a new measure type.
id : str
Unique identifier of the measure type.
label : str
Name of the module.
measureType : Measure.MeasureBasePython
The actual measure type.
@staticmethod
@no_args
- def getMeasureTypes() -> List[Tuple[str, str, MeasureType]]
doc:
Returns a list of all registered measure types.
MODULE App/Metadata.pyi
classes:
class Metadata(PyObjectBase)
doc:
App.Metadata class.
A Metadata object reads an XML-formatted package metadata file and provides
read and write access to its contents.
The following constructors are supported:
Metadata()
Empty constructor.
Metadata(metadata)
Copy constructor.
metadata : App.Metadata
Metadata(file)
Reads the XML file and provides access to the metadata it specifies.
file : str
XML file name.
Metadata(bytes)
Treats the bytes as UTF-8-encoded XML data and provides access to the metadata it specifies.
bytes : bytes
Python bytes-like object.
DeveloperDocu: Metadata
attributes:
- Name: str
doc:
String representing the name of this item.
- Version: str
doc:
String representing the version of this item in semantic triplet format.
- Date: str
doc:
String representing the date of this item in YYYY-MM-DD format (format not currently programmatically enforced)
- Type: str
doc:
String representing the type of this item (text only, no markup allowed).
- Description: str
doc:
String representing the description of this item (text only, no markup allowed).
- Maintainer: List[Any]
doc:
List of maintainer objects with 'name' and 'email' string attributes.
- License: List[Any]
doc:
List of applicable licenses as objects with 'name' and 'file' string attributes.
- Urls: List[Any]
doc:
List of URLs as objects with 'location' and 'type' string attributes, where type
is one of:
* website
* repository
* bugtracker
* readme
* documentation
- Author: List[Any]
doc:
List of author objects, each with a 'name' and a (potentially empty) 'email'
string attribute.
- Depend: List[Any]
doc:
List of dependencies, as objects with the following attributes:
* package
Required. Must exactly match the contents of the 'name' element in the
referenced package's package.xml file.
* version_lt
Optional. The dependency to the package is restricted to versions less than
the stated version number.
* version_lte
Optional. The dependency to the package is restricted to versions less or
equal than the stated version number.
* version_eq
Optional. The dependency to the package is restricted to a version equal
than the stated version number.
* version_gte
Optional. The dependency to the package is restricted to versions greater
or equal than the stated version number.
* version_gt
Optional. The dependency to the package is restricted to versions greater
than the stated version number.
* condition
Optional. Conditional expression as documented in REP149.
- Conflict: List[Any]
doc:
List of conflicts, format identical to dependencies.
- Replace: List[Any]
doc:
List of things this item is considered by its author to replace. The format is
identical to dependencies.
- Tag: List[str]
doc:
List of strings.
- Icon: str
doc:
Relative path to an icon file.
- Classname: str
doc:
String representing the name of the main Python class this item
creates/represents.
- Subdirectory: str
doc:
String representing the name of the subdirectory this content item is located in.
If empty, the item is in a directory named the same as the content item.
- File: List[Any]
doc:
List of files associated with this item.
The meaning of each file is implementation-defined.
- Content: Dict[str, List['Metadata']]
doc:
Dictionary of lists of content items: defined recursively, each item is itself
a Metadata object.
See package.xml file format documentation for details.
- FreeCADMin: str
doc:
String representing the minimum version of FreeCAD-compatible runtime needed for this item.
If unset it will be 0.0.0.
- FreeCADMax: str
doc:
String representing the maximum version of FreeCAD-compatible runtime needed for this item.
If unset it will be 0.0.0.
- PythonMin: str
doc:
String representing the minimum version of Python needed for this item.
If unset it will be 0.0.0.
methods:
@overload
- def __init__(self) -> None
@overload
- def __init__(self, metadata: 'Metadata') -> None
@overload
- def __init__(self, file: str) -> None
@overload
- def __init__(self, bytes: bytes) -> None
- def getLastSupportedFreeCADVersion(self) -> Optional[str]
doc:
Search through all content package items, and determine if a maximum supported
version of FreeCAD-compatible runtime is set.
Returns None if no maximum version is set, or if *any* content item fails to
provide a maximum version (implying that that content item will work with all
known versions).
- def getFirstSupportedFreeCADVersion(self) -> Optional[str]
doc:
Search through all content package items, and determine if a minimum supported
version of FreeCAD-compatible runtime is set.
Returns 0.0 if no minimum version is set, or if *any* content item fails to
provide a minimum version (implying that that content item will work with all
known versions. Technically limited to 0.20 as the lowest known version since
the metadata standard was added then).
- def supportsCurrentFreeCAD(self) -> bool
doc:
Returns False if this metadata object directly indicates that it does not
support the current version of FreeCAD-compatible runtime, or True if it makes no indication, or
specifically indicates that it does support the current version. Does not
recurse into Content items.
- def getGenericMetadata(self, name: str, /) -> List[Any]
doc:
Get the list of GenericMetadata objects with key 'name'.
Generic metadata objects are Python objects with a string 'contents' and a
dictionary of strings, 'attributes'. They represent unrecognized simple XML tags
in the metadata file.
- def addContentItem(self, content_type: str, metadata: 'Metadata', /) -> None
doc:
Add a new content item of type 'content_type' with metadata 'metadata'.
- def removeContentItem(self, content_type: str, name: str, /) -> None
doc:
Remove the content item of type 'content_type' with name 'name'.
- def addMaintainer(self, name: str, email: str, /) -> None
doc:
Add a new Maintainer.
- def removeMaintainer(self, name: str, email: str, /) -> None
doc:
Remove the Maintainer.
- def addLicense(self, short_code: str, path: str, /) -> None
doc:
Add a new License.
- def removeLicense(self, short_code: str, /) -> None
doc:
Remove the License.
- def addUrl(self, url_type: str, url: str, branch: str, /) -> None
doc:
Add a new Url or type 'url_type' (which should be one of 'repository', 'readme',
'bugtracker', 'documentation', or 'webpage') If type is 'repository' you
must also specify the 'branch' parameter.
- def removeUrl(self, url_type: str, url: str, /) -> None
doc:
Remove the Url.
- def addAuthor(self, name: str, email: str, /) -> None
doc:
Add a new Author with name 'name', and optionally email 'email'.
- def removeAuthor(self, name: str, email: str, /) -> None
doc:
Remove the Author.
- def addDepend(self, name: str, kind: str, optional: bool, /) -> None
doc:
Add a new Dependency on package 'name' of kind 'kind' (optional, one of 'auto' (the default),
'internal', 'addon', or 'python').
- def removeDepend(self, name: str, kind: str, /) -> None
doc:
Remove the Dependency on package 'name' of kind 'kind' (optional - if unspecified any
matching name is removed).
- def addConflict(self, name: str, kind: str, /) -> None
doc:
Add a new Conflict. See documentation for addDepend().
- def removeConflict(self, name: str, kind: str, /) -> None
doc:
Remove the Conflict. See documentation for removeDepend().
- def addReplace(self, name: str, /) -> None
doc:
Add a new Replace.
- def removeReplace(self, name: str, /) -> None
doc:
Remove the Replace.
- def addTag(self, tag: str, /) -> None
doc:
Add a new Tag.
- def removeTag(self, tag: str, /) -> None
doc:
Remove the Tag.
- def addFile(self, filename: str, /) -> None
doc:
Add a new File.
- def removeFile(self, filename: str, /) -> None
doc:
Remove the File.
- def write(self, filename: str, /) -> None
doc:
Write the metadata to the given file as XML data.
MODULE App/OriginGroupExtension.pyi
classes:
class OriginGroupExtension(GeoFeatureGroupExtension)
doc:
This class handles placable group of document objects with an Origin
MODULE App/Part.pyi
classes:
class Part(GeoFeature)
doc:
This class handles document objects in Part
MODULE App/PropertyContainer.pyi
classes:
class PropertyContainer(Persistence)
doc:
App.PropertyContainer class.
attributes:
- PropertiesList: Final[list]
doc:
A list of all property names.
methods:
- def getPropertyByName(self, name: str, checkOwner: int=0, /) -> Any
doc:
Returns the value of a named property. Note that the returned property may not
always belong to this container (e.g. from a linked object).
name : str
Name of the property.
checkOwner : int
0: just return the property.
1: raise exception if not found or the property does not belong to this container.
2: return a tuple (owner, propertyValue).
- def getPropertyTouchList(self, name: str, /) -> tuple
doc:
Returns a list of index of touched values for list type properties.
name : str
Property name.
- def getTypeOfProperty(self, name: str, /) -> list
doc:
Returns the type of a named property. This can be a list conformed by elements in
(Hidden, NoRecompute, NoPersist, Output, ReadOnly, Transient, Input).
name : str
Property name.
- def getTypeIdOfProperty(self, name: str, /) -> str
doc:
Returns the C++ class name of a named property.
name : str
Property name.
- def setEditorMode(self, name: str, type: Union[int, List[str]], /) -> None
doc:
Set the behaviour of the property in the property editor.
name : str
Property name.
type : int, sequence of str
Property type.
0: default behaviour. 1: item is ready-only. 2: item is hidden. 3: item is hidden and read-only.
If sequence, the available items are 'ReadOnly' and 'Hidden'.
- def getEditorMode(self, name: str, /) -> list
doc:
Get the behaviour of the property in the property editor.
It returns a list of strings with the current mode. If the list is empty there are no
special restrictions.
If the list contains 'ReadOnly' then the item appears in the property editor but is
disabled.
If the list contains 'Hidden' then the item even doesn't appear in the property editor.
name : str
Property name.
- def getGroupOfProperty(self, name: str, /) -> str
doc:
Returns the name of the group which the property belongs to in this class.
The properties are sorted in different named groups for convenience.
name : str
Property name.
- def setGroupOfProperty(self, name: str, group: str, /) -> None
doc:
Set the name of the group of a dynamic property.
name : str
Property name.
group : str
Group name.
- def setPropertyStatus(self, name: str, val: Union[int, str, List[Union[str, int]]], /) -> None
doc:
Set property status.
name : str
Property name.
val : int, str, sequence of str or int
Call getPropertyStatus() to get a list of supported text value.
If the text start with '-' or the integer value is negative, then the status is cleared.
- def getPropertyStatus(self, name: str='', /) -> list
doc:
Get property status.
name : str
Property name. If empty, returns a list of supported text names of the status.
- def getDocumentationOfProperty(self, name: str, /) -> str
doc:
Returns the documentation string of the property of this class.
name : str
Property name.
- def setDocumentationOfProperty(self, name: str, docstring: str, /) -> None
doc:
Set the documentation string of a dynamic property of this class.
name : str
Property name.
docstring : str
Documentation string.
- def getEnumerationsOfProperty(self, name: str, /) -> Optional[list]
doc:
Return all enumeration strings of the property of this class or None if not a
PropertyEnumeration.
name : str
Property name.
@constmethod
- def dumpPropertyContent(self, Property: str, *, Compression: int=3) -> bytearray
doc:
Dumps the content of the property, both the XML representation and the additional
data files required, into a byte representation.
Property : str
Property Name.
Compression : int
Set the data compression level in the range [0, 9]. Set to 0 for no compression.
- def restorePropertyContent(self, name: str, obj: object, /) -> None
doc:
Restore the content of the object from a byte representation as stored by `dumpPropertyContent`.
It could be restored from any Python object implementing the buffer protocol.
name : str
Property name.
obj : buffer
Object with buffer protocol support.
@constmethod
- def renameProperty(self, oldName: str, newName: str, /) -> None
doc:
Rename a property.
oldName : str
Old property name.
newName : str
New property name.
MODULE App/StringHasher.pyi
classes:
class StringHasher(BaseClass)
doc:
This is the StringHasher class
attributes:
- Count: Final[int]
doc:
Return count of used hashes
- Size: Final[int]
doc:
Return the size of the hashes
- SaveAll: bool
doc:
Whether to save all string hashes regardless of its use count
- Threshold: int
doc:
Data length exceed this threshold will be hashed before storing
- Table: Final[Dict[int, str]]
doc:
Return the entire string table as Int->String dictionary
methods:
@overload
- def getID(self, txt: str, base64: bool=False, /) -> Any
@overload
- def getID(self, id: int, base64: bool=False, /) -> Any
- def getID(self, arg: Any, base64: bool=False, /) -> Any
doc:
If the input is text, return a StringID object that is unique within this hasher. This
StringID object is reference counted. The hasher may only save hash ID's that are used.
If the input is an integer, then the hasher will try to find the StringID object stored
with the same integer value.
base64: indicate if the input 'txt' is base64 encoded binary data
@constmethod
- def isSame(self, other: 'StringHasher', /) -> bool
doc:
Check if two hasher are the same
MODULE App/StringID.pyi
classes:
class StringID(BaseClass)
doc:
This is the StringID class
attributes:
- Value: Final[int]
doc:
Return the integer value of this ID
- Related: Final[List[Any]]
doc:
Return the related string IDs
- Data: Final[str]
doc:
Return the data associated with this ID
- IsBinary: Final[bool]
doc:
Check if the data is binary,
- IsHashed: Final[bool]
doc:
Check if the data is hash, if so 'Data' returns a base64 encoded string of the raw hash
- Index: int
doc:
Geometry index. Only meaningful for geometry element name
methods:
@constmethod
- def isSame(self, other: 'StringID', /) -> bool
doc:
Check if two StringIDs are the same
MODULE App/SuppressibleExtension.pyi
classes:
class SuppressibleExtension(DocumentObjectExtension)
doc:
Extension class which allows suppressing of document objects
MODULE Base/Axis.pyi
classes:
class Axis(PyObjectBase)
doc:
Base.Axis class.
An Axis defines a direction and a position (base) in 3D space.
The following constructors are supported:
Axis()
Empty constructor.
Axis(axis)
Copy constructor.
axis : Base.Axis
Axis(base, direction)
Define from a position and a direction.
base : Base.Vector
direction : Base.Vector
attributes:
- Base: Vector
doc:
Base position vector of the Axis.
- Direction: Vector
doc:
Direction vector of the Axis.
methods:
@overload
- def __init__(self) -> None
@overload
- def __init__(self, axis: Axis) -> None
@overload
- def __init__(self, base: Vector, direction: Vector) -> None
- def copy(self) -> Axis
doc:
Returns a copy of this Axis.
- def move(self, vector: Vector, /) -> None
doc:
Move the axis base along the given vector.
vector : Base.Vector
Vector by which to move the axis.
- def multiply(self, placement: Placement, /) -> Axis
doc:
Multiply this axis by a placement.
placement : Base.Placement
Placement by which to multiply the axis.
- def reversed(self) -> Axis
doc:
Compute the reversed axis. This returns a new Base.Axis with
the original direction reversed.
MODULE Base/BaseClass.pyi
classes:
class BaseClass(PyObjectBase)
doc:
This is the base class
attributes:
- TypeId: Final[str]
doc:
Is the type of the FreeCAD-compatible runtime object with module domain
- Module: Final[str]
doc:
Module in which this class is defined
methods:
@constmethod
- def isDerivedFrom(self, typeName: str, /) -> bool
doc:
Returns true if given type is a father
@constmethod
- def getAllDerivedFrom(self) -> List[object]
doc:
Returns all descendants
MODULE Base/BoundBox.pyi
classes:
class BoundBox(PyObjectBase)
doc:
Base.BoundBox class.
This class represents a bounding box.
A bounding box is a rectangular cuboid which is a way to describe outer
boundaries and is obtained from a lot of 3D types.
It is often used to check if a 3D entity lies in the range of another object.
Checking for bounding interference first can save a lot of computing time!
An invalid BoundBox is represented by inconsistent values at each direction:
The maximum float value of the system at the minimum coordinates, and the
opposite value at the maximum coordinates.
The following constructors are supported:
BoundBox()
Empty constructor. Returns an invalid BoundBox.
BoundBox(boundBox)
Copy constructor.
boundBox : Base.BoundBox
BoundBox(xMin, yMin=0, zMin=0, xMax=0, yMax=0, zMax=0)
Define from the minimum and maximum values at each direction.
xMin : float
Minimum value at x-coordinate.
yMin : float
Minimum value at y-coordinate.
zMin : float
Minimum value at z-coordinate.
xMax : float
Maximum value at x-coordinate.
yMax : float
Maximum value at y-coordinate.
zMax : float
Maximum value at z-coordinate.
App.BoundBox(min, max)
Define from two containers representing the minimum and maximum values of the
coordinates in each direction.
min : Base.Vector, tuple
Minimum values of the coordinates.
max : Base.Vector, tuple
Maximum values of the coordinates.
attributes:
- Center: Final[Any]
doc:
Center point of the bounding box.
- XMax: float
doc:
The maximum x boundary position.
- YMax: float
doc:
The maximum y boundary position.
- ZMax: float
doc:
The maximum z boundary position.
- XMin: float
doc:
The minimum x boundary position.
- YMin: float
doc:
The minimum y boundary position.
- ZMin: float
doc:
The minimum z boundary position.
- XLength: Final[float]
doc:
Length of the bounding box in x direction.
- YLength: Final[float]
doc:
Length of the bounding box in y direction.
- ZLength: Final[float]
doc:
Length of the bounding box in z direction.
- DiagonalLength: Final[float]
doc:
Diagonal length of the bounding box.
methods:
@overload
- def __init__(self) -> None
@overload
- def __init__(self, boundBox: 'BoundBox') -> None
@overload
- def __init__(self, xMin: float, yMin: float=0, zMin: float=0, xMax: float=0, yMax: float=0, zMax: float=0) -> None
@overload
- def __init__(self, min: Union[Vector, Tuple[float, float, float]], max: Union[Vector, Tuple[float, float, float]]) -> None
- def setVoid(self) -> None
doc:
Invalidate the bounding box.
@constmethod
- def isValid(self) -> bool
doc:
Checks if the bounding box is valid.
@overload
- def add(self, minMax: Vector, /) -> None
@overload
- def add(self, minMax: Tuple[float, float, float], /) -> None
@overload
- def add(self, x: float, y: float, z: float, /) -> None
- def add(self, *args: Any, **kwargs: Any) -> None
doc:
Increase the maximum values or decrease the minimum values of this BoundBox by
replacing the current values with the given values, so the bounding box can grow
but not shrink.
minMax : Base.Vector, tuple
Values to enlarge at each direction.
x : float
Value to enlarge at x-direction.
y : float
Value to enlarge at y-direction.
z : float
Value to enlarge at z-direction.
@constmethod
- def getPoint(self, index: int, /) -> Vector
doc:
Get the point of the given index.
The index must be in the range of [0, 7].
index : int
@constmethod
- def getEdge(self, index: int, /) -> Tuple[Vector, ...]
doc:
Get the edge points of the given index.
The index must be in the range of [0, 11].
index : int
@overload
- def closestPoint(self, point: Vector, /) -> Vector
@overload
- def closestPoint(self, x: float, y: float, z: float, /) -> Vector
@constmethod
- def closestPoint(self, *args: Any, **kwargs: Any) -> Vector
doc:
Get the closest point of the bounding box to the given point.
point : Base.Vector, tuple
Coordinates of the given point.
x : float
X-coordinate of the given point.
y : float
Y-coordinate of the given point.
z : float
Z-coordinate of the given point.
@overload
- 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
- def intersect(self, *args: Any) -> bool
doc:
Checks if the given object intersects with this bounding box. That can be
another bounding box or a line specified by base and direction.
boundBox2 : Base.BoundBox
base : Base.Vector, tuple
dir : Base.Vector, tuple
- def intersected(self, boundBox2: 'BoundBox', /) -> 'BoundBox'
doc:
Returns the intersection of this and the given bounding box.
boundBox2 : Base.BoundBox
- def united(self, boundBox2: 'BoundBox', /) -> 'BoundBox'
doc:
Returns the union of this and the given bounding box.
boundBox2 : Base.BoundBox
- def enlarge(self, variation: float, /) -> None
doc:
Decrease the minimum values and increase the maximum values by the given value.
A negative value shrinks the bounding box.
variation : float
- def getIntersectionPoint(self, base: Vector, dir: Vector, epsilon: float=0.0001, /) -> Vector
doc:
Calculate the intersection point of a line with the bounding box.
The base point must lie inside the bounding box, if not an exception is thrown.
base : Base.Vector
Base point of the line.
dir : Base.Vector
Direction of the line.
epsilon : float
Bounding box size tolerance.
@overload
- def move(self, displacement: Vector, /) -> None
@overload
- def move(self, displacement: Tuple[float, float, float], /) -> None
@overload
- def move(self, x: float, y: float, z: float, /) -> None
- def move(self, *args: Any, **kwargs: Any) -> None
doc:
Move the bounding box by the given values.
displacement : Base.Vector, tuple
Displacement at each direction.
x : float
Displacement at x-direction.
y : float
Displacement at y-direction.
z : float
Displacement at z-direction.
@overload
- def scale(self, factor: Vector, /) -> None
@overload
- def scale(self, factor: Tuple[float, float, float], /) -> None
@overload
- def scale(self, x: float, y: float, z: float, /) -> None
- def scale(self, *args: Any, **kwargs: Any) -> None
doc:
Scale the bounding box by the given values.
factor : Base.Vector, tuple
Factor scale at each direction.
x : float
Scale at x-direction.
y : float
Scale at y-direction.
z : float
Scale at z-direction.
- def transformed(self, matrix: Matrix, /) -> 'BoundBox'
doc:
Returns a new BoundBox containing the transformed rectangular cuboid
represented by this BoundBox.
matrix : Base.Matrix
Transformation matrix.
- def isCutPlane(self, base: Vector, normal: Vector, /) -> bool
doc:
Check if the plane specified by base and normal intersects (cuts) this bounding
box.
base : Base.Vector
normal : Base.Vector
@overload
- def isInside(self, object: Vector, /) -> bool
@overload
- def isInside(self, object: 'BoundBox', /) -> bool
@overload
- def isInside(self, x: float, y: float, z: float, /) -> bool
- def isInside(self, *args: Any) -> bool
doc:
Check if a point or a bounding box is inside this bounding box.
object : Base.Vector, Base.BoundBox
Object to check if it is inside this bounding box.
x : float
X-coordinate of the point to check.
y : float
Y-coordinate of the point to check.
z : float
Z-coordinate of the point to check.
MODULE Base/CoordinateSystem.pyi
classes:
class CoordinateSystem(PyObjectBase)
doc:
Base.CoordinateSystem class.
An orthonormal right-handed coordinate system in 3D space.
CoordinateSystem()
Empty constructor.
attributes:
- Axis: AxisPy
doc:
Set or get axis.
- XDirection: Vector
doc:
Set or get X-direction.
- YDirection: Vector
doc:
Set or get Y-direction.
- ZDirection: Vector
doc:
Set or get Z-direction.
- Position: Vector
doc:
Set or get position.
methods:
- def setAxes(self, axis: Union[AxisPy, Vector], xDir: Vector, /) -> None
doc:
Set axis or Z-direction, and X-direction.
The X-direction is determined from the orthonormal compononent of `xDir`
with respect to `axis` direction.
axis : Base.Axis, Base.Vector
xDir : Base.Vector
@constmethod
- def displacement(self, coordSystem2: 'CoordinateSystem', /) -> Placement
doc:
Computes the placement from this to the passed coordinate system `coordSystem2`.
coordSystem2 : Base.CoordinateSystem
- def transformTo(self, vector: Vector, /) -> Vector
doc:
Computes the coordinates of the point in coordinates of this coordinate system.
vector : Base.Vector
- def transform(self, trans: Union[Rotation, Placement], /) -> None
doc:
Applies a transformation on this coordinate system.
trans : Base.Rotation, Base.Placement
- def setPlacement(self, placement: Placement, /) -> None
doc:
Set placement to the coordinate system.
placement : Base.Placement
MODULE Base/FreeCAD.Console.module.pyi
module_doc:
Typed public signatures for the ``FreeCAD-compatible runtime.Console`` helper module.
These functions accept either a single message object or an explicit
``(notifier, message)`` pair. The runtime converts both arguments through
``str()`` when needed, so the public stub keeps them intentionally broad.
attributes:
- _MessageType: TypeAlias
functions:
@overload
- def PrintMessage(message: object, /) -> None
doc:
Print a plain message using the default empty notifier.
@overload
- def PrintMessage(notifier: object, message: object, /) -> None
doc:
Print a plain message with an explicit notifier prefix.
@overload
- def PrintLog(message: object, /) -> None
doc:
Print a log message using the default empty notifier.
@overload
- def PrintLog(notifier: object, message: object, /) -> None
doc:
Print a log message with an explicit notifier prefix.
@overload
- def PrintError(message: object, /) -> None
doc:
Print an error using the default empty notifier.
@overload
- def PrintError(notifier: object, message: object, /) -> None
doc:
Print an error with an explicit notifier prefix.
@overload
- def PrintDeveloperError(message: object, /) -> None
doc:
Print a developer-only error using the default empty notifier.
@overload
- def PrintDeveloperError(notifier: object, message: object, /) -> None
doc:
Print a developer-only error with an explicit notifier prefix.
@overload
- def PrintUserError(message: object, /) -> None
doc:
Print a user-facing error using the default empty notifier.
@overload
- def PrintUserError(notifier: object, message: object, /) -> None
doc:
Print a user-facing error with an explicit notifier prefix.
@overload
- def PrintTranslatedUserError(message: object, /) -> None
doc:
Print a translated user-facing error using the default empty notifier.
@overload
- def PrintTranslatedUserError(notifier: object, message: object, /) -> None
doc:
Print a translated user-facing error with an explicit notifier prefix.
@overload
- def PrintWarning(message: object, /) -> None
doc:
Print a warning using the default empty notifier.
@overload
- def PrintWarning(notifier: object, message: object, /) -> None
doc:
Print a warning with an explicit notifier prefix.
@overload
- def PrintDeveloperWarning(message: object, /) -> None
doc:
Print a developer-only warning using the default empty notifier.
@overload
- def PrintDeveloperWarning(notifier: object, message: object, /) -> None
doc:
Print a developer-only warning with an explicit notifier prefix.
@overload
- def PrintUserWarning(message: object, /) -> None
doc:
Print a user-facing warning using the default empty notifier.
@overload
- def PrintUserWarning(notifier: object, message: object, /) -> None
doc:
Print a user-facing warning with an explicit notifier prefix.
@overload
- def PrintTranslatedUserWarning(message: object, /) -> None
doc:
Print a translated user-facing warning using the default empty notifier.
@overload
- def PrintTranslatedUserWarning(notifier: object, message: object, /) -> None
doc:
Print a translated user-facing warning with an explicit notifier prefix.
@overload
- def PrintCritical(message: object, /) -> None
doc:
Print a critical message using the default empty notifier.
@overload
- def PrintCritical(notifier: object, message: object, /) -> None
doc:
Print a critical message with an explicit notifier prefix.
@overload
- def PrintNotification(message: object, /) -> None
doc:
Print a notification using the default empty notifier.
@overload
- def PrintNotification(notifier: object, message: object, /) -> None
doc:
Print a notification with an explicit notifier prefix.
@overload
- def PrintTranslatedNotification(message: object, /) -> None
doc:
Print a translated notification using the default empty notifier.
@overload
- def PrintTranslatedNotification(notifier: object, message: object, /) -> None
doc:
Print a translated notification with an explicit notifier prefix.
- def SetStatus(observer: str, type: _MessageType, status: bool, /) -> None
doc:
Enable or disable one message category for a registered console observer.
- def GetStatus(observer: str, type: _MessageType, /) -> bool | None
doc:
Return one message-category state, or None if the observer is unknown.
- def GetObservers() -> list[str]
doc:
Return the observer names registered with the console singleton.
MODULE Base/FreeCAD.ParameterGrp.pyi
module_doc:
Typed public method signatures for the ``FreeCAD-compatible runtime.ParameterGrp`` PyCXX type.
attributes:
- _ParameterValue: TypeAlias
- _ParameterContentTag: TypeAlias
- _ParameterContent: TypeAlias
classes:
class _ParameterObserver(Protocol)
doc:
Observer protocol for parameter changes inside one parameter group.
methods:
- def onChange(self, group: ParameterGrp, param_type: str, name: str, value: str, /) -> object
doc:
Handle one parameter change notification.
class _ParameterManagerObserver(Protocol)
doc:
Observer protocol for manager-level parameter change notifications.
methods:
- def slotParamChanged(self, group: ParameterGrp, param_type: str, name: str, value: str, /) -> object
doc:
Handle one manager-level parameter change notification.
class ParameterGrp
doc:
Hierarchical parameter-group wrapper used for FreeCAD-compatible runtime preferences.
methods:
- def GetGroup(self, name: str, /) -> ParameterGrp
doc:
Return one child parameter group by name.
- def GetGroupName(self) -> str
doc:
Return this group's local name.
- def GetGroups(self) -> list[str]
doc:
Return the child group names.
- def RemGroup(self, name: str, /) -> None
doc:
Remove one child parameter group.
- def HasGroup(self, name: str, /) -> bool
doc:
Return whether one child group exists.
- def RenameGroup(self, old_name: str, new_name: str, /) -> bool
doc:
Rename one child parameter group.
- def CopyTo(self, group: ParameterGrp, /) -> None
doc:
Copy this group's contents into another parameter group.
- def Manager(self) -> ParameterGrp | None
doc:
Return the manager group for this parameter group, if any.
- def Parent(self) -> ParameterGrp | None
doc:
Return the parent group, if any.
- def IsEmpty(self) -> bool
doc:
Return whether the group has no stored values or child groups.
- def Clear(self) -> None
doc:
Remove all stored values and child groups.
- def Attach(self, observer: _ParameterObserver, /) -> None
doc:
Register one direct parameter observer.
- def AttachManager(self, observer: _ParameterManagerObserver, /) -> None
doc:
Register one manager-level parameter observer.
- def Detach(self, observer: _ParameterObserver | _ParameterManagerObserver, /) -> None
doc:
Unregister one direct or manager-level observer.
- def Notify(self, name: str, /) -> None
doc:
Notify observers that one named entry changed.
- def NotifyAll(self) -> None
doc:
Notify observers that the whole group changed.
- def SetBool(self, name: str, value: bool | int, /) -> None
doc:
Store one boolean parameter value.
- def GetBool(self, name: str, default: bool | int=False, /) -> bool
doc:
Return one boolean parameter value.
- def GetBools(self, filter: str='', /) -> list[str]
doc:
Return the names of boolean parameters, optionally filtered.
- def RemBool(self, name: str, /) -> None
doc:
Remove one boolean parameter value.
- def SetInt(self, name: str, value: int, /) -> None
doc:
Store one integer parameter value.
- def GetInt(self, name: str, default: int=0, /) -> int
doc:
Return one integer parameter value.
- def GetInts(self, filter: str='', /) -> list[str]
doc:
Return the names of integer parameters, optionally filtered.
- def RemInt(self, name: str, /) -> None
doc:
Remove one integer parameter value.
- def SetUnsigned(self, name: str, value: int, /) -> None
doc:
Store one unsigned integer parameter value.
- def GetUnsigned(self, name: str, default: int=0, /) -> int
doc:
Return one unsigned integer parameter value.
- def GetUnsigneds(self, filter: str='', /) -> list[str]
doc:
Return the names of unsigned integer parameters, optionally filtered.
- def RemUnsigned(self, name: str, /) -> None
doc:
Remove one unsigned integer parameter value.
- def SetFloat(self, name: str, value: float, /) -> None
doc:
Store one floating-point parameter value.
- def GetFloat(self, name: str, default: float=0.0, /) -> float
doc:
Return one floating-point parameter value.
- def GetFloats(self, filter: str='', /) -> list[str]
doc:
Return the names of floating-point parameters, optionally filtered.
- def RemFloat(self, name: str, /) -> None
doc:
Remove one floating-point parameter value.
- def SetString(self, name: str, value: str, /) -> None
doc:
Store one string parameter value.
- def GetString(self, name: str, default: str='', /) -> str
doc:
Return one string parameter value.
- def GetStrings(self, filter: str='', /) -> list[str]
doc:
Return the names of string parameters, optionally filtered.
- def RemString(self, name: str, /) -> None
doc:
Remove one string parameter value.
- def Import(self, path: str, /) -> None
doc:
Import parameter values from one external file.
- def Insert(self, path: str, /) -> None
doc:
Insert parameter values from one external file.
- def Export(self, path: str, /) -> None
doc:
Export parameter values to one external file.
- def GetContents(self) -> list[_ParameterContent] | None
doc:
Return the stored parameter entries as tagged name-value tuples.
MODULE Base/FreeCAD.Qt.module.pyi
module_doc:
Typed public signatures for the ``FreeCAD-compatible runtime.Qt`` translation helpers.
These helpers are surfaced as a small Python module. The noop variants return
their source text unchanged while still marking strings for translation tools.
attributes:
- _T
functions:
- def translate(context: str, sourcetext: str, disambiguation: str | None=None, n: int=-1, /) -> str
doc:
Translate one source string in a Qt translation context.
- def QT_TRANSLATE_NOOP(context: str, sourcetext: _T, /) -> _T
doc:
Return one string unchanged while marking it for contextual translation.
- def QT_TRANSLATE_NOOP3(context: str, sourcetext: _T, disambiguation: str, /) -> _T
doc:
Return one string unchanged while marking it with disambiguation metadata.
- def QT_TRANSLATE_NOOP_UTF8(context: str, sourcetext: _T, /) -> _T
doc:
Return one UTF-8 string unchanged while marking it for contextual translation.
- def QT_TR_NOOP(sourcetext: _T, /) -> _T
doc:
Return one string unchanged while marking it for default-context translation.
- def QT_TR_NOOP_UTF8(sourcetext: _T, /) -> _T
doc:
Return one UTF-8 string unchanged while marking it for default-context translation.
- def installTranslator(filename: str, /) -> bool
doc:
Load and install one translator file.
- def removeTranslators() -> bool
doc:
Remove all translators that FreeCAD-compatible runtime installed through this helper.
MODULE Base/FreeCAD.Units.module.pyi
module_doc:
Typed public signatures for the ``FreeCAD-compatible runtime.Units`` helper module.
This static stub reference carries the callable surface together with the
small helper aliases and module data members those signatures need.
attributes:
- _NumberFormat: TypeAlias
- Radian: Quantity
functions:
@overload
- def listSchemas() -> tuple[str, ...]
doc:
Return the full ordered schema list.
@overload
- def listSchemas(index: int, /) -> str
doc:
Return one schema name by numeric index.
@overload
- def toNumber(value: Quantity, format: _NumberFormat=..., decimals: int=..., /) -> str
doc:
Format an existing Quantity value using the current unit schema.
@overload
- def toNumber(value: float, format: _NumberFormat=..., decimals: int=..., /) -> str
doc:
Format a plain numeric value using the current unit schema.
- def parseQuantity(expression: str, /) -> Quantity
doc:
Parse one unit expression into a Quantity.
- def getSchema() -> int
doc:
Return the active unit-schema index.
- def setSchema(index: int, /) -> None
doc:
Set the active unit-schema index.
- def schemaTranslate(quantity: Quantity, schema: int, /) -> tuple[str, float, str]
doc:
Translate one quantity into the textual pieces used by another schema.
MODULE Base/Matrix.pyi
classes:
class ScaleType(IntEnum)
attributes:
- Other
- NoScaling
- NonUniformRight
- NonUniformLeft
- Uniform
class Matrix(PyObjectBase)
doc:
Base.Matrix class.
A 4x4 Matrix.
In particular, this matrix can represent an affine transformation, that is,
given a 3D vector `x`, apply the transformation y = M*x + b, where the matrix
`M` is a linear map and the vector `b` is a translation.
`y` can be obtained using a linear transformation represented by the 4x4 matrix
`A` conformed by the augmented 3x4 matrix (M|b), augmented by row with
(0,0,0,1), therefore: (y, 1) = A*(x, 1).
The following constructors are supported:
Matrix()
Empty constructor.
Matrix(matrix)
Copy constructor.
matrix : Base.Matrix.
Matrix(*coef)
Define from 16 coefficients of the 4x4 matrix.
coef : sequence of float
The sequence can have up to 16 elements which complete the matrix by rows.
Matrix(vector1, vector2, vector3, vector4)
Define from four 3D vectors which represent the columns of the 3x4 submatrix,
useful to represent an affine transformation. The fourth row is made up by
(0,0,0,1).
vector1 : Base.Vector
vector2 : Base.Vector
vector3 : Base.Vector
vector4 : Base.Vector
Default to (0,0,0). Optional.
attributes:
- A11: float
doc:
The (1,1) matrix element.
- A12: float
doc:
The (1,2) matrix element.
- A13: float
doc:
The (1,3) matrix element.
- A14: float
doc:
The (1,4) matrix element.
- A21: float
doc:
The (2,1) matrix element.
- A22: float
doc:
The (2,2) matrix element.
- A23: float
doc:
The (2,3) matrix element.
- A24: float
doc:
The (2,4) matrix element.
- A31: float
doc:
The (3,1) matrix element.
- A32: float
doc:
The (3,2) matrix element.
- A33: float
doc:
The (3,3) matrix element.
- A34: float
doc:
The (3,4) matrix element.
- A41: float
doc:
The (4,1) matrix element.
- A42: float
doc:
The (4,2) matrix element.
- A43: float
doc:
The (4,3) matrix element.
- A44: float
doc:
The (4,4) matrix element.
- A: Sequence[float]
doc:
The matrix elements.
methods:
@overload
- def move(self, vector: Vector, /) -> None
@overload
- def move(self, x: float, y: float, z: float, /) -> None
- def move(self, *args) -> None
doc:
Move the matrix along a vector, equivalent to left multiply the matrix
by a pure translation transformation.
vector : Base.Vector, tuple
x : float
`x` translation.
y : float
`y` translation.
z : float
`z` translation.
@overload
- def scale(self, vector: Vector, /) -> None
@overload
- def scale(self, x: float, y: float, z: float, /) -> None
@overload
- def scale(self, factor: float, /) -> None
- def scale(self, *args) -> None
doc:
Scale the first three rows of the matrix.
vector : Base.Vector
x : float
First row factor scale.
y : float
Second row factor scale.
z : float
Third row factor scale.
factor : float
global factor scale.
@constmethod
- def hasScale(self, tol: float=0, /) -> ScaleType
doc:
Return an enum value of ScaleType. Possible values are:
Uniform, NonUniformLeft, NonUniformRight, NoScaling or Other
if it's not a scale matrix.
tol : float
@constmethod
- def decompose(self) -> Tuple['Matrix', 'Matrix', 'Matrix', 'Matrix']
doc:
Return a tuple of matrices representing shear, scale, rotation and move.
So that matrix = move * rotation * scale * shear.
@no_args
- def nullify(self) -> None
doc:
Make this the null matrix.
@no_args
@constmethod
- def isNull(self) -> bool
doc:
Check if this is the null matrix.
@no_args
- def unity(self) -> None
doc:
Make this matrix to unity (4D identity matrix).
@constmethod
- def isUnity(self, tol: float=0.0, /) -> bool
doc:
Check if this is the unit matrix (4D identity matrix).
- def transform(self, vector: Vector, matrix2: 'Matrix', /) -> None
doc:
Transform the matrix around a given point.
Equivalent to left multiply the matrix by T*M*T_inv, where M is `matrix2`, T the
translation generated by `vector` and T_inv the inverse translation.
For example, if `matrix2` is a rotation, the result is the transformation generated
by the current matrix followed by a rotation around the point represented by `vector`.
vector : Base.Vector
matrix2 : Base.Matrix
@constmethod
- def col(self, index: int, /) -> Vector
doc:
Return the vector of a column, that is, the vector generated by the three
first elements of the specified column.
index : int
Required column index.
- def setCol(self, index: int, vector: Vector, /) -> None
doc:
Set the vector of a column, that is, the three first elements of the specified
column by index.
index : int
Required column index.
vector : Base.Vector
@constmethod
- def row(self, index: int, /) -> Vector
doc:
Return the vector of a row, that is, the vector generated by the three
first elements of the specified row.
index : int
Required row index.
- def setRow(self, index: int, vector: Vector, /) -> None
doc:
Set the vector of a row, that is, the three first elements of the specified
row by index.
index : int
Required row index.
vector : Base.Vector
@no_args
@constmethod
- def diagonal(self) -> Vector
doc:
Return the diagonal of the 3x3 leading principal submatrix as vector.
- def setDiagonal(self, vector: Vector, /) -> None
doc:
Set the diagonal of the 3x3 leading principal submatrix.
vector : Base.Vector
- def rotateX(self, angle: float, /) -> None
doc:
Rotate around X axis.
angle : float
Angle in radians.
- def rotateY(self, angle: float, /) -> None
doc:
Rotate around Y axis.
angle : float
Angle in radians.
- def rotateZ(self, angle: float, /) -> None
doc:
Rotate around Z axis.
angle : float
Angle in radians.
@overload
- def multiply(self, matrix: 'Matrix', /) -> 'Matrix'
@overload
- def multiply(self, vector: Vector, /) -> Vector
@constmethod
- def multiply(self, obj: Union['Matrix', Vector], /) -> Union['Matrix', Vector]
doc:
Right multiply the matrix by the given object.
If the argument is a vector, this is augmented to the 4D vector (`vector`, 1).
matrix : Base.Matrix
vector : Base.Vector
@constmethod
- def multVec(self, vector: Vector, /) -> Vector
doc:
Compute the transformed vector using the matrix.
vector : Base.Vector
@no_args
- def invert(self) -> None
doc:
Compute the inverse matrix in-place, if possible.
@no_args
@constmethod
- def inverse(self) -> 'Matrix'
doc:
Compute the inverse matrix, if possible.
@no_args
- def transpose(self) -> None
doc:
Transpose the matrix in-place.
@no_args
@constmethod
- def transposed(self) -> 'Matrix'
doc:
Returns a transposed copy of this matrix.
@no_args
@constmethod
- def determinant(self) -> float
doc:
Compute the determinant of the matrix.
@constmethod
- def isOrthogonal(self, tol: float=1e-06, /) -> float
doc:
Checks if the matrix is orthogonal, i.e. M * M^T = k*I and returns
the multiple of the identity matrix. If it's not orthogonal 0 is returned.
tol : float
Tolerance used to check orthogonality.
@constmethod
- def submatrix(self, dim: int, /) -> 'Matrix'
doc:
Get the leading principal submatrix of the given dimension.
The (4 - `dim`) remaining dimensions are completed with the
corresponding identity matrix.
dim : int
Dimension parameter must be in the range [1,4].
@no_args
@constmethod
- def analyze(self) -> str
doc:
Analyzes the type of transformation.
MODULE Base/Metadata.pyi
attributes:
- _ClassT
- _FuncT
functions:
- def export(**kwargs: Any) -> Callable[[_ClassT], _ClassT]
doc:
A decorator to attach metadata to a class.
- def module(**kwargs: Any) -> None
doc:
Attach metadata to a generated Python extension module surface.
- def constmethod(method: _FuncT, /) -> _FuncT
- def no_args(method: _FuncT, /) -> _FuncT
- def forward_declarations(source_code: str, /) -> Callable[[_ClassT], _ClassT]
doc:
A decorator to attach forward declarations to a class.
- def class_declarations(source_code: str, /) -> Callable[[_ClassT], _ClassT]
doc:
A decorator to attach forward declarations to a class.
- def typing_only(method: _FuncT, /) -> _FuncT
doc:
Mark a method as typing-only so it is ignored by binding code generation.
Use class-body if TYPE_CHECKING blocks for typing-only attributes.
- def sequence_protocol(**kwargs: Any) -> Callable[[_ClassT], _ClassT]
doc:
A decorator to attach sequence protocol metadata to a class.
MODULE Base/Persistence.pyi
classes:
class Persistence(BaseClass)
doc:
Base.Persistence class.
Class to dump and restore the content of an object.
attributes:
- Content: Final[str]
doc:
Content of the object in XML representation.
- MemSize: Final[int]
doc:
Memory size of the object in bytes.
methods:
@constmethod
- def dumpContent(self, Compression: int=3) -> bytearray
doc:
Dumps the content of the object, both the XML representation and the additional
data files required, into a byte representation.
Compression : int
Set the data compression level in the range [0,9]. Set to 0 for no compression.
- def restoreContent(self, obj: object, /) -> None
doc:
Restore the content of the object from a byte representation as stored by `dumpContent`.
It could be restored from any Python object implementing the buffer protocol.
obj : buffer
Object with buffer protocol support.
MODULE Base/Placement.pyi
classes:
class Placement(PyObjectBase)
doc:
Base.Placement class.
A Placement defines an orientation (rotation) and a position (base) in 3D space.
It is used when no scaling or other distortion is needed.
The following constructors are supported:
Placement()
Empty constructor.
Placement(placement)
Copy constructor.
placement : Base.Placement
Placement(matrix)
Define from a 4D matrix consisting of rotation and translation.
matrix : Base.Matrix
Placement(base, rotation)
Define from position and rotation.
base : Base.Vector
rotation : Base.Rotation
Placement(base, rotation, center)
Define from position and rotation with center.
base : Base.Vector
rotation : Base.Rotation
center : Base.Vector
Placement(base, axis, angle)
define position and rotation.
base : Base.Vector
axis : Base.Vector
angle : float
attributes:
- Base: Vector
doc:
Vector to the Base Position of the Placement.
- Rotation: RotationPy
doc:
Orientation of the placement expressed as rotation.
- Matrix: MatrixPy
doc:
Set/get matrix representation of the placement.
methods:
@overload
- def __init__(self) -> None
@overload
- def __init__(self, placement: 'Placement') -> None
@overload
- def __init__(self, matrix: MatrixPy) -> None
@overload
- def __init__(self, base: Vector, rotation: RotationPy) -> None
@overload
- def __init__(self, base: Vector, rotation: RotationPy, center: Vector) -> None
@overload
- def __init__(self, base: Vector, axis: Vector, angle: float) -> None
@typing_only
@overload
- def __mul__(self, vector: Vector, /) -> Vector
@typing_only
@overload
- def __mul__(self, rotation: RotationPy, /) -> 'Placement'
@typing_only
@overload
- def __mul__(self, matrix: MatrixPy, /) -> MatrixPy
@typing_only
@overload
- def __mul__(self, placement: 'Placement', /) -> 'Placement'
@constmethod
- def copy(self) -> 'Placement'
doc:
Returns a copy of this placement.
- def move(self, vector: Vector, /) -> None
doc:
Move the placement along a vector.
vector : Base.Vector
Vector by which to move the placement.
- def translate(self, vector: Vector, /) -> None
doc:
Alias to move(), to be compatible with TopoShape.translate().
vector : Base.Vector
Vector by which to move the placement.
@overload
- def rotate(self, center: Sequence[float], axis: Sequence[float], angle: float, *, comp: bool=False) -> None
@overload
- def rotate(self, center: Vector, axis: Vector, angle: float, *, comp: bool=False) -> None
doc:
Rotate the current placement around center and axis with the given angle.
This method is compatible with TopoShape.rotate() if the (optional) keyword
argument comp is True (default=False).
center : Base.Vector, sequence of float
Rotation center.
axis : Base.Vector, sequence of float
Rotation axis.
angle : float
Rotation angle in degrees.
comp : bool
optional keyword only argument, if True (default=False),
behave like TopoShape.rotate() (i.e. the resulting placements are interchangeable).
- def rotate(self, *args, **kwargs) -> None
@constmethod
- def multiply(self, placement: 'Placement', /) -> 'Placement'
doc:
Right multiply this placement with another placement.
Also available as `*` operator.
placement : Base.Placement
Placement by which to multiply this placement.
@constmethod
- def multVec(self, vector: Vector, /) -> Vector
doc:
Compute the transformed vector using the placement.
vector : Base.Vector
Vector to be transformed.
@constmethod
- def toMatrix(self) -> Matrix
doc:
Compute the matrix representation of the placement.
@constmethod
- def inverse(self) -> 'Placement'
doc:
Compute the inverse placement.
@constmethod
- def pow(self, t: float, shorten: bool=True, /) -> 'Placement'
doc:
Raise this placement to real power using ScLERP interpolation.
Also available as `**` operator.
t : float
Real power.
shorten : bool
If True, ensures rotation quaternion is net positive to make
the path shorter.
@constmethod
- def sclerp(self, placement2: 'Placement', t: float, shorten: bool=True, /) -> 'Placement'
doc:
Screw Linear Interpolation (ScLERP) between this placement and `placement2`.
Interpolation is a continuous motion along a helical path parametrized by `t`
made of equal transforms if discretized.
If quaternions of rotations of the two placements differ in sign, the interpolation
will take a long path.
placement2 : Base.Placement
t : float
Parameter of helical path. t=0 returns this placement, t=1 returns
`placement2`. t can also be outside of [0, 1] range for extrapolation.
shorten : bool
If True, the signs are harmonized before interpolation and the interpolation
takes the shorter path.
@constmethod
- def slerp(self, placement2: 'Placement', t: float, /) -> 'Placement'
doc:
Spherical Linear Interpolation (SLERP) between this placement and `placement2`.
This function performs independent interpolation of rotation and movement.
Result of such interpolation might be not what application expects, thus this tool
might be considered for simple cases or for interpolating between small intervals.
For more complex cases you better use the advanced sclerp() function.
placement2 : Base.Placement
t : float
Parameter of the path. t=0 returns this placement, t=1 returns `placement2`.
@constmethod
- def isIdentity(self, tol: float=0.0, /) -> bool
doc:
Returns True if the placement has no displacement and no rotation.
Matrix representation is the 4D identity matrix.
tol : float
Tolerance used to check for identity.
If tol is negative or zero, no tolerance is used.
@constmethod
- def isSame(self, other: 'Placement', tol: float=0.0, /) -> bool
doc:
Checks whether this and the given placement are the same.
The default tolerance is set to 0.0
MODULE Base/Precision.pyi
classes:
class Precision(PyObjectBase)
doc:
This is the Precision class
methods:
@staticmethod
- def angular() -> float
doc:
Returns the recommended precision value when checking the equality of two angles (given in radians)
@staticmethod
- def confusion() -> float
doc:
Returns the recommended precision value when checking coincidence of two points in real space
@staticmethod
- def squareConfusion() -> float
doc:
Returns square of confusion
@staticmethod
- def intersection() -> float
doc:
Returns the precision value in real space, frequently used by intersection algorithms
@staticmethod
- def approximation() -> float
doc:
Returns the precision value in real space, frequently used by approximation algorithms
@staticmethod
- def parametric() -> float
doc:
Convert a real space precision to a parametric space precision
@staticmethod
- def isInfinite() -> bool
doc:
Returns True if R may be considered as an infinite number
@staticmethod
- def isPositiveInfinite() -> bool
doc:
Returns True if R may be considered as a positive infinite number
@staticmethod
- def isNegativeInfinite() -> bool
doc:
Returns True if R may be considered as a negative infinite number
@staticmethod
- def infinite() -> float
doc:
Returns a big number that can be considered as infinite
MODULE Base/PyObjectBase.pyi
classes:
class PyObjectBase
doc:
The most base class for Python bindings.
MODULE Base/Quantity.pyi
classes:
class Quantity(PyObjectBase)
doc:
Quantity
defined by a value and a unit.
The following constructors are supported:
Quantity() -- empty constructor
Quantity(Value) -- empty constructor
Quantity(Value,Unit) -- empty constructor
Quantity(Quantity) -- copy constructor
Quantity(string) -- arbitrary mixture of numbers and chars defining a Quantity
attributes:
- Value: float
doc:
Numeric Value of the Quantity (in internal system mm,kg,s)
- Unit: UnitPy
doc:
Unit of the Quantity
- UserString: Final[str]
doc:
Unit of the Quantity
- Format: dict
doc:
Format of the Quantity
methods:
@overload
- def __init__(self) -> None
@overload
- def __init__(self, value: float) -> None
@overload
- def __init__(self, value: float, unit: UnitPy) -> None
@overload
- def __init__(self, quantity: 'Quantity') -> None
@overload
- def __init__(self, string: str) -> None
@overload
- def toStr(self, /) -> str
@overload
- def toStr(self, decimals: int, /) -> str
@constmethod
- def toStr(self, decimals: int=..., /) -> str
doc:
Returns a string representation rounded to number of decimals. If no decimals are specified then
the internal precision is used
@constmethod
- def getUserPreferred(self) -> Tuple['Quantity', str]
doc:
Returns a quantity with the translation factor and a string with the prevered unit
@overload
- def getValueAs(self, unit: str, /) -> float
@overload
- def getValueAs(self, translation: float, unit_signature: int, /) -> float
@overload
- def getValueAs(self, unit: UnitPy, /) -> float
@overload
- def getValueAs(self, quantity: 'Quantity', /) -> float
@constmethod
- def getValueAs(self, *args) -> float
doc:
Returns a floating point value as the provided unit
Following parameters are allowed:
getValueAs('m/s') # unit string to parse
getValueAs(2.45,1) # translation value and unit signature
getValueAs(FreeCAD-compatible runtime.Units.Pascal) # predefined standard units
getValueAs(Qantity('N/m^2')) # a quantity
getValueAs(Unit(0,1,0,0,0,0,0,0)) # a unit
@overload
- def __round__(self, /) -> int
@overload
- def __round__(self, ndigits: int, /) -> float
@constmethod
- def __round__(self, ndigits: int=..., /) -> Union[int, float]
doc:
Returns the Integral closest to x, rounding half toward even.
When an argument is passed, work like built-in round(x, ndigits).
MODULE Base/Rotation.pyi
classes:
class Rotation(PyObjectBase)
doc:
Base.Rotation class.
A Rotation using a quaternion.
The following constructors are supported:
Rotation()
Empty constructor.
Rotation(rotation)
Copy constructor.
Rotation(Axis, Radian)
Rotation(Axis, Degree)
Define from an axis and an angle (in radians or degrees according to the keyword).
Axis : Base.Vector
Radian : float
Degree : float
Rotation(vector_start, vector_end)
Define from two vectors (rotation from/to vector).
vector_start : Base.Vector
vector_end : Base.Vector
Rotation(angle1, angle2, angle3)
Define from three floats (Euler angles) as yaw-pitch-roll in XY'Z'' convention.
angle1 : float
angle2 : float
angle3 : float
Rotation(seq, angle1, angle2, angle3)
Define from one string and three floats (Euler angles) as Euler rotation
of a given type. Call toEulerAngles() for supported sequence types.
seq : str
angle1 : float
angle2 : float
angle3 : float
Rotation(x, y, z, w)
Define from four floats (quaternion) where the quaternion is specified as:
q = xi+yj+zk+w, i.e. the last parameter is the real part.
x : float
y : float
z : float
w : float
Rotation(dir1, dir2, dir3, seq)
Define from three vectors that define rotated axes directions plus an optional
3-characher string of capital letters 'X', 'Y', 'Z' that sets the order of
importance of the axes (e.g., 'ZXY' means z direction is followed strictly,
x is used but corrected if necessary, y is ignored).
dir1 : Base.Vector
dir2 : Base.Vector
dir3 : Base.Vector
seq : str
Rotation(matrix)
Define from a matrix rotation in the 4D representation.
matrix : Base.Matrix
Rotation(*coef)
Define from 16 or 9 elements which represent the rotation in the 4D matrix
representation or in the 3D matrix representation, respectively.
coef : sequence of float
attributes:
- Q: Tuple[float, ...]
doc:
The rotation elements (as quaternion).
- Axis: object
doc:
The rotation axis of the quaternion.
- RawAxis: Final[object]
doc:
The rotation axis without normalization.
- Angle: float
doc:
The rotation angle of the quaternion.
methods:
@overload
- def __init__(self) -> None
@overload
- def __init__(self, rotation: 'Rotation') -> None
@overload
- def __init__(self, axis: Vector, angle: float) -> None
@overload
- def __init__(self, vector_start: Vector, vector_end: Vector) -> None
@overload
- def __init__(self, angle1: float, angle2: float, angle3: float) -> None
@overload
- def __init__(self, seq: str, angle1: float, angle2: float, angle3: float) -> None
@overload
- def __init__(self, x: float, y: float, z: float, w: float) -> None
@overload
- def __init__(self, dir1: Vector, dir2: Vector, dir3: Vector, seq: str) -> None
@overload
- def __init__(self, matrix: Matrix) -> None
@overload
- def __init__(self, *coef: float) -> None
- def invert(self) -> None
doc:
Sets the rotation to its inverse.
@constmethod
- def inverted(self) -> 'Rotation'
doc:
Returns the inverse of the rotation.
@constmethod
- def isSame(self, rotation: 'Rotation', tol: float=0, /) -> bool
doc:
Checks if `rotation` perform the same transformation as this rotation.
rotation : Base.Rotation
tol : float
Tolerance used to compare both rotations.
If tol is negative or zero, no tolerance is used.
@constmethod
- def multiply(self, rotation: 'Rotation', /) -> 'Rotation'
doc:
Right multiply this rotation with another rotation.
rotation : Base.Rotation
Rotation by which to multiply this rotation.
@overload
- def __mul__(self, vector: Vector, /) -> Vector
@overload
- def __mul__(self, matrix: Matrix, /) -> Matrix
@overload
- def __mul__(self, placement: Placement, /) -> Placement
@overload
- def __mul__(self, rotation: Rotation, /) -> Rotation
@constmethod
- def multVec(self, vector: Vector, /) -> Vector
doc:
Compute the transformed vector using the rotation.
vector : Base.Vector
Vector to be transformed.
@constmethod
- def slerp(self, rotation2: 'Rotation', t: float, /) -> 'Rotation'
doc:
Spherical Linear Interpolation (SLERP) of this rotation and `rotation2`.
t : float
Parameter of the path. t=0 returns this rotation, t=1 returns `rotation2`.
- def setYawPitchRoll(self, angle1: float, angle2: float, angle3: float, /) -> None
doc:
Set the Euler angles of this rotation as yaw-pitch-roll in XY'Z'' convention.
angle1 : float
Angle around yaw axis in degrees.
angle2 : float
Angle around pitch axis in degrees.
angle3 : float
Angle around roll axis in degrees.
@constmethod
- def getYawPitchRoll(self) -> Tuple[float, float, float]
doc:
Get the Euler angles of this rotation as yaw-pitch-roll in XY'Z'' convention.
The angles are given in degrees.
- def setEulerAngles(self, seq: str, angle1: float, angle2: float, angle3: float, /) -> None
doc:
Set the Euler angles in a given sequence for this rotation.
The angles must be given in degrees.
seq : str
Euler sequence name. All possible values given by toEulerAngles().
angle1 : float
angle2 : float
angle3 : float
@constmethod
- def toEulerAngles(self, seq: str='', /) -> List[float]
doc:
Get the Euler angles in a given sequence for this rotation.
seq : str
Euler sequence name. If not given, the function returns
all possible values of `seq`. Optional.
@constmethod
- def toMatrix(self) -> Matrix
doc:
Convert the rotation to a 4D matrix representation.
@constmethod
- def isNull(self) -> bool
doc:
Returns True if all values in the quaternion representation are zero.
@constmethod
- def isIdentity(self, tol: float=0, /) -> bool
doc:
Returns True if the rotation equals the 4D identity matrix.
tol : float
Tolerance used to check for identity.
If tol is negative or zero, no tolerance is used.
MODULE Base/Type.pyi
classes:
class Type(PyObjectBase)
doc:
BaseTypePy class.
This class provides functionality related to type management in the Base module. It's not intended for direct instantiation but for accessing type information and creating instances of various types. Instantiation is possible for classes that inherit from the Base::BaseClass class and are not abstract.
attributes:
- Name: Final[str]
doc:
The name of the type id.
- Key: Final[int]
doc:
The key of the type id.
- Module: Final[str]
doc:
Module in which this class is defined.
methods:
@staticmethod
- def fromName(name: str, /) -> 'Type'
doc:
Returns a type object by name.
name : str
@staticmethod
- def fromKey(key: int, /) -> 'Type'
doc:
Returns a type id object by key.
key : int
@staticmethod
- def getNumTypes() -> int
doc:
Returns the number of type ids created so far.
@staticmethod
- def getBadType() -> 'Type'
doc:
Returns an invalid type id.
@staticmethod
- def getAllDerivedFrom(type: str, /) -> List[str]
doc:
Returns all descendants from the given type id.
type : str, Base.BaseType
@constmethod
- def getParent(self) -> 'Type'
doc:
Returns the parent type id.
@constmethod
- def isBad(self) -> bool
doc:
Checks if the type id is invalid.
@constmethod
- def isDerivedFrom(self, type: str, /) -> bool
doc:
Returns true if given type id is a father of this type id.
type : str, Base.BaseType
@constmethod
- def getAllDerived(self) -> List[object]
doc:
Returns all descendants from this type id.
- def createInstance(self) -> object
doc:
Creates an instance of this type id.
@staticmethod
- def createInstanceByName(name: str, load: bool=False, /) -> object
doc:
Creates an instance of the named type id.
name : str
load : bool
Load named type id module.
MODULE Base/Unit.pyi
classes:
class Unit(PyObjectBase)
doc:
Unit
defines a unit type, calculate and compare.
The following constructors are supported:
Unit() -- empty constructor
Unit(i1,i2,i3,i4,i5,i6,i7,i8) -- unit signature
Unit(Quantity) -- copy unit from Quantity
Unit(Unit) -- copy constructor
Unit(string) -- parse the string for units
attributes:
- Type: Final[str]
doc:
holds the unit type as a string, e.g. 'Area'.
- Signature: Final[Tuple]
doc:
Returns the signature.
methods:
@overload
- def __init__(self) -> None
@overload
- def __init__(self, i1: float, i2: float, i3: float, i4: float, i5: float, i6: float, i7: float, i8: float) -> None
@overload
- def __init__(self, quantity: Quantity) -> None
@overload
- def __init__(self, unit: Unit) -> None
@overload
- def __init__(self, string: str) -> None
MODULE Base/Vector.pyi
classes:
class Vector(PyObjectBase)
doc:
Base.Vector class.
This class represents a 3D float vector.
Useful to represent points in the 3D space.
The following constructors are supported:
Vector(x=0, y=0, z=0)
x : float
y : float
z : float
Vector(vector)
Copy constructor.
vector : Base.Vector
Vector(seq)
Define from a sequence of float.
seq : sequence of float.
attributes:
- Length: float
doc:
Gets or sets the length of this vector.
- x: float
doc:
Gets or sets the X component of this vector.
- y: float
doc:
Gets or sets the Y component of this vector.
- z: float
doc:
Gets or sets the Z component of this vector.
methods:
@overload
- def __init__(self, x: float=0, y: float=0, z: float=0) -> None
@overload
- def __init__(self, vector: 'Vector') -> None
@overload
- def __init__(self, seq: Sequence[float]) -> None
@typing_only
- def __add__(self, vector2: 'Vector', /) -> 'Vector'
@typing_only
- def __sub__(self, vector2: 'Vector', /) -> 'Vector'
@typing_only
@overload
- def __mul__(self, factor: float, /) -> 'Vector'
@typing_only
@overload
- def __mul__(self, vector2: 'Vector', /) -> float
@typing_only
- def __rmul__(self, factor: float, /) -> 'Vector'
@typing_only
- def __truediv__(self, factor: float, /) -> 'Vector'
@constmethod
- def __reduce__(self) -> tuple
doc:
Serialization of Vector objects.
@constmethod
- def add(self, vector2: 'Vector', /) -> 'Vector'
doc:
Returns the sum of this vector and `vector2`.
vector2 : Base.Vector
@constmethod
- def sub(self, vector2: 'Vector', /) -> 'Vector'
doc:
Returns the difference of this vector and `vector2`.
vector2 : Base.Vector
@constmethod
- def negative(self) -> 'Vector'
doc:
Returns the negative (opposite) of this vector.
- def scale(self, x: float, y: float, z: float, /) -> 'Vector'
doc:
Scales in-place this vector by the given factor in each component.
x : float
x-component factor scale.
y : float
y-component factor scale.
z : float
z-component factor scale.
- def multiply(self, factor: float, /) -> 'Vector'
doc:
Multiplies in-place each component of this vector by a single factor.
Equivalent to scale(factor, factor, factor).
factor : float
@constmethod
- def dot(self, vector2: 'Vector', /) -> float
doc:
Returns the scalar product (dot product) between this vector and `vector2`.
vector2 : Base.Vector
@constmethod
- def cross(self, vector2: 'Vector', /) -> 'Vector'
doc:
Returns the vector product (cross product) between this vector and `vector2`.
vector2 : Base.Vector
@constmethod
- def isOnLineSegment(self, vector1: 'Vector', vector2: 'Vector', /) -> bool
doc:
Checks if this vector is on the line segment generated by `vector1` and `vector2`.
vector1 : Base.Vector
vector2 : Base.Vector
@constmethod
- def getAngle(self, vector2: 'Vector', /) -> float
doc:
Returns the angle in radians between this vector and `vector2`.
vector2 : Base.Vector
- def normalize(self) -> 'Vector'
doc:
Normalizes in-place this vector to the length of 1.0.
@constmethod
- def isEqual(self, vector2: 'Vector', tol: float=0, /) -> bool
doc:
Checks if the distance between the points represented by this vector
and `vector2` is less or equal to the given tolerance.
vector2 : Base.Vector
tol : float
@constmethod
- def isParallel(self, vector2: 'Vector', tol: float=0, /) -> bool
doc:
Checks if this vector and `vector2` are
parallel less or equal to the given tolerance.
vector2 : Base.Vector
tol : float
@constmethod
- def isNormal(self, vector2: 'Vector', tol: float=0, /) -> bool
doc:
Checks if this vector and `vector2` are
normal less or equal to the given tolerance.
vector2 : Base.Vector
tol : float
- def projectToLine(self, point: 'Vector', dir: 'Vector', /) -> 'Vector'
doc:
Projects `point` on a line that goes through the origin with the direction `dir`.
The result is the vector from `point` to the projected point.
The operation is equivalent to dir_n.cross(dir_n.cross(point)), where `dir_n` is
the vector `dir` normalized.
The method modifies this vector instance according to result and does not
depend on the vector itself.
point : Base.Vector
dir : Base.Vector
- def projectToPlane(self, base: 'Vector', normal: 'Vector', /) -> 'Vector'
doc:
Projects in-place this vector on a plane defined by a base point
represented by `base` and a normal defined by `normal`.
base : Base.Vector
normal : Base.Vector
@constmethod
- def distanceToPoint(self, point2: 'Vector', /) -> float
doc:
Returns the distance to another point represented by `point2`.
.
point : Base.Vector
@constmethod
- def distanceToLine(self, base: 'Vector', dir: 'Vector', /) -> float
doc:
Returns the distance between the point represented by this vector
and a line defined by a base point represented by `base` and a
direction `dir`.
base : Base.Vector
dir : Base.Vector
@constmethod
- def distanceToLineSegment(self, point1: 'Vector', point2: 'Vector', /) -> 'Vector'
doc:
Returns the vector between the point represented by this vector and the point
on the line segment with the shortest distance. The line segment is defined by
`point1` and `point2`.
point1 : Base.Vector
point2 : Base.Vector
@constmethod
- def distanceToPlane(self, base: 'Vector', normal: 'Vector', /) -> float
doc:
Returns the distance between this vector and a plane defined by a
base point represented by `base` and a normal defined by `normal`.
base : Base.Vector
normal : Base.Vector
MODULE Gui/AxisOrigin.pyi
classes:
class AxisOrigin(BaseClass)
doc:
Gui.AxisOrigin class.
Class for creating a Coin3D representation of a coordinate system.
attributes:
- AxisLength: float
doc:
Get/set the axis length.
- LineWidth: float
doc:
Get/set the axis line width for rendering.
- PointSize: float
doc:
Get/set the origin point size for rendering.
- Scale: float
doc:
Get/set auto scaling factor, 0 to disable.
- Plane: Tuple[Any, ...]
doc:
Get/set axis plane size and distance to axis line.
- Labels: Dict[str, str]
doc:
Get/set axis component names as a dictionary.
Available keys are:
'O': origin
'X': x axis
'Y': y axis
'Z': z axis
'XY': xy plane
'XZ': xz plane
'YZ': yz plane
- Node: Final[Any]
doc:
Get the Coin3D node.
methods:
@constmethod
- def getElementPicked(self, pickedPoint: Any, /) -> str
doc:
Returns the picked element name.
pickedPoint : coin.SoPickedPoint
@constmethod
- def getDetailPath(self, subname: str, path: Any, /) -> Any
doc:
Returns Coin detail of a subelement.
Note: Not fully implemented. Currently only returns None.
subname : str
String reference to the subelement.
path: coin.SoPath
Output Coin path leading to the returned element detail.
MODULE Gui/Command.pyi
classes:
class Command(PyObjectBase)
doc:
FreeCAD-compatible runtime Python wrapper of Command functions
methods:
@staticmethod
- def get(name: str, /) -> Optional['Command']
doc:
Get a given command by name or None if it doesn't exist.
name : str
Command name.
@staticmethod
- def update() -> None
doc:
Update active status of all commands.
@staticmethod
- def listAll() -> List[str]
doc:
Returns the name of all commands.
@staticmethod
- def listByShortcut(string: str, useRegExp: bool=False, /) -> List[str]
doc:
Returns a list of all commands, filtered by shortcut.
Shortcuts are converted to uppercase and spaces removed
prior to comparison.
string : str
Shortcut to be searched.
useRegExp : bool
Filter using regular expression.
- def run(self, item: int=0, /) -> None
doc:
Runs the given command.
item : int
Item to be run.
@constmethod
- def isActive(self) -> bool
doc:
Returns True if the command is active, False otherwise.
- def getShortcut(self) -> str
doc:
Returns string representing shortcut key accelerator for command.
- def setShortcut(self, string: str, /) -> bool
doc:
Sets shortcut for given command, returns True for success.
string : str
Shortcut to be set.
- def resetShortcut(self) -> bool
doc:
Resets shortcut for given command back to the default, returns True for success.
- def getInfo(self) -> Dict[Any, Any]
doc:
Return information about this command.
- def getAction(self) -> List[Any]
doc:
Return the associated QAction object.
@staticmethod
- def createCustomCommand(*, macroFile: str, menuText: str, toolTip: str, whatsThis: str, statusTip: str, pixmap: str, shortcut: str) -> str
doc:
Create a custom command for a macro. Returns name of the created command.
macroFile : str
Macro file.
menuText : str
Menu text. Optional.
toolTip : str
Tool tip text. Optional.
whatsThis : str
`What's this?` text. Optional.
statusTip : str
Status tip text. Optional.
pixmap : str
Pixmap name. Optional.
shortcut : str
Shortcut key sequence. Optional.
@staticmethod
- def removeCustomCommand(name: str, /) -> bool
doc:
Remove the custom command if it exists.
Given the name of a custom command, this removes that command.
It is not an error to remove a non-existent command, the function
simply does nothing in that case.
Returns True if something was removed, or False if not.
name : str
Command name.
@staticmethod
- def findCustomCommand(name: str, /) -> Optional[str]
doc:
Given the name of a macro, return the name of the custom command for that macro
or None if there is no command matching that macro script name.
name : str
Macro name.
MODULE Gui/Document.pyi
classes:
class Document(Persistence)
doc:
This is a Document class
attributes:
- ActiveObject: Any
doc:
The active object of the document.
- ActiveView: Any
doc:
The active view of the document.
- EditingTransform: Any
doc:
The editing transformation matrix.
- InEditInfo: Any
doc:
A tuple(obj,subname,subElement,editMode) of editing object reference, or None if no object is in edit.
- EditMode: Final[int]
doc:
Current edit mode. Only meaningful when there is a current object in edit.
- Document: Final[Any]
doc:
The related App document to this Gui document.
- Transacting: Final[bool]
doc:
Indicate whether the document is undoing/redoing.
- Modified: bool
doc:
Returns True if the document is marked as modified, and False otherwise.
- TreeRootObjects: Final[List[Any]]
doc:
The list of tree root objects.
methods:
- def show(self, objName: str, /) -> None
doc:
Show an object.
objName : str
Name of the `Gui.ViewProvider` to show.
- def hide(self, objName: str, /) -> None
doc:
Hide an object.
objName : str
Name of the `Gui.ViewProvider` to hide.
- def setPos(self, objName: str, matrix: Matrix, /) -> None
doc:
Set the position of an object.
objName : str
Name of the `Gui.ViewProvider`.
matrix : Base.Matrix
Transformation to apply on the object.
- def setEdit(self, obj: Any, mod: int=0, subName: Optional[str]=None, /) -> bool
doc:
Set an object in edit mode.
obj : str, App.DocumentObject, Gui.ViewPrivider
Object to set in edit mode.
mod : int
Edit mode.
subName : str
Subelement name. Optional.
- def getInEdit(self) -> Optional[Any]
doc:
Returns the current object in edit mode or None if there is no such object.
- def resetEdit(self) -> None
doc:
End the current editing.
- def addAnnotation(self, annoName: str, fileName: str, modName: str, /) -> None
doc:
Add an Inventor object from a file.
annoName : str
Annotation name.
fileName : str
File name.
modName : str
Display mode name. Optional.
- def update(self) -> None
doc:
Update the view representations of all objects.
- def getObject(self, objName: str, /) -> Optional[Any]
doc:
Return the object with the given name. If no one exists, return None.
ObjName : str
Object name.
- def activeObject(self) -> Optional[Any]
doc:
The active object of the document. Deprecated, use ActiveObject.
- def activeView(self) -> Optional[Any]
doc:
The active view of the document. Deprecated, use ActiveView.
- def createView(self, type: str, /) -> Optional[Any]
doc:
Return a newly created view of a given type.
type : str
Type name.
@constmethod
- def mdiViewsOfType(self, type: str, /) -> List[Any]
doc:
Return a list of mdi views of a given type.
type : str
Type name.
- def save(self) -> bool
doc:
Attempts to save the document
- def saveAs(self) -> bool
doc:
Attempts to save the document under a new name
- def sendMsgToViews(self, msg: str, /) -> None
doc:
Send a message to all views of the document.
msg : str
- def mergeProject(self, fileName: str, /) -> None
doc:
Merges this document with another project file.
fileName : str
File name.
- def toggleTreeItem(self, obj: Any, mod: int=0, subName: Optional[str]=None, /) -> None
doc:
Change TreeItem of a document object.
obj : App.DocumentObject
mod : int
Item mode.
0: Toggle, 1: Collapse, 2: Expand, 3: Expand path.
subName : str
Subelement name. Optional.
- def scrollToTreeItem(self, obj: Any, /) -> None
doc:
Scroll the tree view to the item of a view object.
obj : Gui.ViewProviderDocumentObject
- def toggleInSceneGraph(self, obj: Any, /) -> None
doc:
Add or remove view object from scene graph of all views depending
on its canAddToSceneGraph().
obj : Gui.ViewProvider
- def openCommand(self, name: str) -> int
doc:
openCommand(name) -> int
Opens a named transaction for the document and returns it's
id or 0 on failure
- def commitCommand(self) -> None
doc:
commitCommand() -> None
Commits the current transaction of the document
- def abortCommand(self) -> None
doc:
abortCommand() -> None
Aborts the current transaction of the document
MODULE Gui/EditableDatumLabel.pyi
classes:
class EditableDatumLabel(PyObjectBase)
doc:
Python wrapper for editable 3D datum labels.
This helper exposes the Gui-side editable datum label used by interactive
dimension and positioning workflows.
methods:
@overload
- def __init__(self, viewer: Any, placement: Placement, color: Optional[Tuple[float, float, float]]=None, autoDistance: bool=False, avoidMouseCursor: bool=False) -> None
doc:
Create an editable datum label attached to a 3D view.
viewer : Any
A `Gui::View3DInventor` or `Gui::View3DInventorViewer` Python object.
placement : Placement
Working placement used to position the label geometry.
color : tuple[float, float, float] | None
Label RGB color. If `None`, the default datum label color is used.
autoDistance : bool
If `True`, keep the label distance automatically adjusted relative to
the current camera.
avoidMouseCursor : bool
If `True`, bias automatic placement away from the mouse cursor.
- def activate(self) -> None
doc:
Insert the label into the active 3D scene and start tracking camera changes.
- def deactivate(self) -> None
doc:
Remove the label from the active 3D scene and stop any active editing session.
- def startEdit(self, value: float, eventFilter: Optional[Any]=None, visibleToMouse: bool=False) -> None
doc:
Start in-place numeric editing for the current label.
value : float
Initial numeric value shown by the editor.
eventFilter : Any | None
Optional `QObject` used as an extra event filter for the embedded editor.
visibleToMouse : bool
If `False`, the editor ignores mouse events and behaves as a keyboard-only
overlay.
- def stopEdit(self) -> None
doc:
Stop the current edit session and keep the current displayed value.
- def isActive(self) -> bool
doc:
Return whether the label is currently attached to a viewer.
- def isInEdit(self) -> bool
doc:
Return whether the embedded spinbox editor is currently active.
- def getValue(self) -> float
doc:
Return the current numeric value tracked by the label.
- def setSpinboxValue(self, value: float, /) -> None
doc:
Update the current numeric value and refresh the label text/editor state.
- def setPlacement(self, placement: Placement, /) -> None
doc:
Update the label placement used for 3D positioning.
- def setColor(self, color: Optional[Tuple[float, float, float]], /) -> None
doc:
Update the label color.
- def setPoints(self, p1: Vector, p2: Vector, /) -> None
doc:
Set the label endpoints in the current placement coordinate system.
- def setFocus(self) -> None
doc:
Request focus for the embedded editor widget when editing is active.
- def setFocusToSpinbox(self) -> None
doc:
Explicitly move keyboard focus to the spinbox editor.
- def clearSelection(self) -> None
doc:
Clear any text selection inside the embedded spinbox editor.
- def setLabelType(self, label_type: str, function: str='positioning', /) -> None
doc:
Set the datum label type and its placement behavior.
label_type : str
One of `angle`, `distance`, `distancex`, `distancey`, `radius`,
`diameter`, `symmetric`, or `arclength`.
function : str
One of `positioning`, `dimensioning`, or `forced`.
- def setLabelDistance(self, distance: float, /) -> None
doc:
Set the label offset distance from its measured geometry.
- def setLabelStartAngle(self, angle: float, /) -> None
doc:
Set the datum label start angle parameter.
- def setLabelRange(self, range: float, /) -> None
doc:
Set the datum label angular/range parameter.
- def setLabelRecommendedDistance(self) -> None
doc:
Recompute a camera-aware recommended label distance.
- def setLabelAutoDistanceReverse(self, enabled: bool, /) -> None
doc:
Reverse the automatic label-distance direction when auto-distance is used.
- def setSpinboxVisibleToMouse(self, enabled: bool, /) -> None
doc:
Control whether the embedded editor accepts mouse interaction.
- def setLockedAppearance(self, locked: bool, /) -> None
doc:
Toggle the visual "accepted/locked" appearance of the label.
- def resetLockedState(self) -> None
doc:
Clear any accepted/locked editing state and restore normal appearance.
- def updateGeometry(self) -> None
doc:
Recompute the label geometry and editor placement.
- def getFunction(self) -> str
doc:
Return the current label function as `positioning`, `dimensioning`, or `forced`.
- def setValueChangedCallback(self, callback: Optional[Callable[[float], object]], /) -> None
doc:
Set a callback invoked whenever the current numeric value changes.
- def setEditingFinishedCallback(self, callback: Optional[Callable[[float], object]], /) -> None
doc:
Set a callback invoked when editing is accepted with Enter.
- def setEditingCanceledCallback(self, callback: Optional[Callable[[float], object]], /) -> None
doc:
Set a callback invoked when editing is canceled with Escape.
- def setParameterUnsetCallback(self, callback: Optional[Callable[[], object]], /) -> None
doc:
Set a callback invoked when the current editor input becomes unset/invalid.
- def setFinishEditingCallback(self, callback: Optional[Callable[[], object]], /) -> None
doc:
Set a callback invoked for the "finish editing on all visible overlays" action.
MODULE Gui/FreeCADGui.Selection.module.pyi
module_doc:
Typed public signatures for the ``FreeCAD-compatible GUI runtime.Selection`` module.
This file keeps both the function surface and the lightweight helper types
close to the GUI selection implementation.
attributes:
- _Point3
- _RGBColor
functions:
@overload
- def addSelection(doc_name: str, obj_name: str, sub_name: str='', x: float=0.0, y: float=0.0, z: float=0.0, clear: bool=True, /) -> None
doc:
Add a selection by document name, object name, and optional picked point.
@overload
- def addSelection(obj: DocumentObject, sub_name: str='', x: float=0.0, y: float=0.0, z: float=0.0, clear: bool=True, /) -> None
doc:
Add a selection from an object reference plus one optional subname.
@overload
- def addSelection(obj: DocumentObject, sub_names: Sequence[str], clear: bool=True, /) -> None
doc:
Add one object with a batch of subnames in a single call.
- def updateSelection(show: bool, obj: DocumentObject, sub_name: str='', /) -> None
doc:
Update one object's selected state explicitly.
@overload
- def removeSelection(doc_name: str, obj_name: str, sub_name: str='', /) -> None
doc:
Remove a selection by document and object names.
@overload
- def removeSelection(obj: DocumentObject, sub_name: str='', /) -> None
doc:
Remove a selection by object reference.
@overload
- def clearSelection(clear_preselect: bool=True, /) -> None
doc:
Clear the active selection globally.
@overload
- def clearSelection(doc_name: str | None, clear_preselect: bool=True, /) -> None
doc:
Clear the active selection only for one document name.
- def isSelected(obj: DocumentObject, sub_name: str='', resolve: ResolveMode | int=1, /) -> bool
doc:
Return whether one object or subelement is currently selected.
- def setPreselection(obj: DocumentObject, subname: str='', x: float=0.0, y: float=0.0, z: float=0.0, tp: int=1) -> None
doc:
Set the current preselection target and optional picked point.
- def getPreselection() -> SelectionObject
doc:
Return the current preselection object.
- def clearPreselection() -> None
doc:
Clear the current preselection target.
- def applyCoinHighlight(path: object, detail: object | None=None, color: _RGBColor | None=None) -> None
doc:
Apply a low-level Coin highlight to one scene-graph path.
``detail`` may target one specific Coin sub-element detail. When omitted,
the whole path is highlighted. ``color`` overrides the current View
preference highlight color for this action only.
- def clearCoinHighlight(path: object) -> None
doc:
Clear a low-level Coin highlight from one scene-graph path.
- def applyCoinSelection(path: object, detail: object | None=None, mode: SelectionActionMode | Literal['append', 'remove', 'all'] | None=SelectionActionMode.Append, color: _RGBColor | None=None) -> None
doc:
Apply a low-level Coin selection action to one scene-graph path.
``detail`` may target one specific Coin sub-element detail. When omitted,
the whole path is targeted. ``color`` overrides the current View preference
selection color for this action only.
- def clearCoinSelection(path: object) -> None
doc:
Clear low-level Coin selection state from one scene-graph path.
- def countObjectsOfType(type_name: str, doc_name: str | None=None, resolve: ResolveMode | int=1, /) -> int
doc:
Count selected objects of one type, optionally in one document.
- def getSelection(doc_name: str | None=None, resolve: ResolveMode | int=1, single: bool=False, /) -> list[DocumentObject]
doc:
Return the current object selection.
- def getPickedList(doc_name: str | None=None, /) -> list[SelectionObject]
doc:
Return the picked selection entries for one document or globally.
- def enablePickedList(enable: bool=True, /) -> None
doc:
Enable or disable picked-list collection.
- def getCompleteSelection(resolve: ResolveMode | int=1, /) -> list[SelectionObject]
doc:
Return the complete resolved selection object list.
- def getSelectionEx(doc_name: str | None=None, resolve: ResolveMode | int=1, single: bool=False, /) -> list[SelectionObject]
doc:
Return the extended selection objects with subelement details.
- def getSelectionObject(doc_name: str, obj_name: str, sub_name: str, point: _Point3=..., /) -> SelectionObject
doc:
Build one SelectionObject wrapper from explicit selection components.
- def hasSelection(doc_name: str | None=None, resolve: ResolveMode | int=0, /) -> bool
doc:
Return whether any selection exists.
- def hasSubSelection(doc_name: str | None=None, sub_element: bool=False, /) -> bool
doc:
Return whether any subelement selection exists.
- def setSelectionStyle(selection_style: SelectionStyle | int, /) -> None
doc:
Set the active selection interaction style.
- def addObserver(observer: object, resolve: ResolveMode | int=1, /) -> None
doc:
Register one selection observer.
- def removeObserver(observer: object, /) -> None
doc:
Unregister one selection observer.
- def addSelectionGate(filter: str | Filter | _SelectionGate, resolve: ResolveMode | int=1, /) -> None
doc:
Install one selection gate or filter object.
- def removeSelectionGate(doc_name: str='', /) -> None
doc:
Remove the active selection gate, optionally for one document.
- def setVisible(visible: bool | None=None, /) -> None
doc:
Set or toggle selection visibility helpers.
- def pushSelStack(clear_forward: bool=True, overwrite: bool=False, /) -> None
doc:
Push the current selection onto the history stack.
- def getSelectionFromStack(doc_name: str | None=None, resolve: ResolveMode | int=1, index: int=0, /) -> list[SelectionObject]
doc:
Return one stored selection state from the history stack.
classes:
class ResolveMode(IntEnum)
doc:
How selection queries should resolve linked or mapped elements.
attributes:
- NoResolve
- OldStyleElement
- NewStyleElement
- FollowLink
class SelectionStyle(IntEnum)
doc:
High-level selection behavior modes exposed by the GUI.
attributes:
- NormalSelection
- GreedySelection
class SelectionActionMode(str, Enum)
doc:
Low-level Coin selection action accepted by :func:`applyCoinSelection`.
attributes:
- Append
- Remove
- All
class _SelectionGate(Protocol)
doc:
Protocol for custom selection-gate objects.
methods:
- def allow(self, doc: object, obj: DocumentObject, sub: str, /) -> bool
doc:
Return whether one candidate selection should be accepted.
class Filter
doc:
Selection filter helper that wraps the GUI filter expression language.
methods:
- def __init__(self, filter: str, /) -> None
doc:
Create one selection filter from its expression string.
- def match(self) -> bool
doc:
Return whether the current filter matches the current selection state.
- def test(self, obj: DocumentObject, sub_name: str='', /) -> bool
doc:
Return whether one object and optional subname matches the filter.
- def result(self) -> list[tuple[SelectionObject, ...]]
doc:
Return the current filter match result set.
- def setFilter(self, filter: str, /) -> None
doc:
Replace the filter expression string.
- def getFilter(self) -> str
doc:
Return the current filter expression string.
MODULE Gui/FreeCADGui.TaskPlacement.pyi
module_doc:
Typed public method signatures for the ``FreeCAD-compatible GUI runtime.TaskPlacement`` PyCXX type.
classes:
class TaskPlacement
doc:
Task-panel dialog used to edit object placement interactively.
methods:
- def setPropertyName(self, name: str, /) -> None
doc:
Set the placement property name that the dialog edits.
- def setPlacement(self, placement: Placement, /) -> None
doc:
Set the placement currently shown by the dialog.
- def setSelection(self, selection: Sequence[DocumentObject], /) -> None
doc:
Set the document-object selection used by the dialog.
- def bindObject(self) -> None
doc:
Bind the current placement to the selected object.
- def setPlacementAndBindObject(self, document_object: DocumentObject, property_name: str, /) -> None
doc:
Bind the dialog directly to one object and placement property.
- def setIgnoreTransactions(self, ignore: bool, /) -> None
doc:
Enable or disable transaction handling for placement edits.
- def showDefaultButtons(self, show: bool, /) -> None
doc:
Show or hide the default task-panel buttons.
- def accept(self) -> bool
doc:
Accept the current placement edits.
- def reject(self) -> bool
doc:
Reject the current placement edits.
- def clicked(self, button: int, /) -> None
doc:
Handle one clicked task-panel button.
- def open(self) -> None
doc:
Open or initialize the task dialog.
- def isAllowedAlterDocument(self) -> bool
doc:
Return whether the dialog may alter the active document.
- def isAllowedAlterView(self) -> bool
doc:
Return whether the dialog may alter the active view.
- def isAllowedAlterSelection(self) -> bool
doc:
Return whether the dialog may alter the active selection.
- def getStandardButtons(self) -> int
doc:
Return the standard button mask exposed by the dialog.
MODULE Gui/FreeCADGui.UiLoader.pyi
module_doc:
Typed public method signatures for the ``FreeCAD-compatible GUI runtime.UiLoader`` PyCXX type.
classes:
class UiLoader
doc:
Qt Designer UI loader used by the FreeCAD-compatible runtime GUI wrappers.
methods:
- def load(self, source: str | PathLike[str] | object, parent: object | None=None, /) -> object | None
doc:
Load one `.ui` source and return the created widget tree.
- def createWidget(self, class_name: str, parent: object | None=None, name: str='', /) -> object | None
doc:
Create one widget by Qt class name.
- def availableWidgets(self) -> list[str]
doc:
Return the widget classes the loader can create.
- def clearPluginPaths(self) -> None
doc:
Remove all custom plugin search paths.
- def pluginPaths(self) -> list[str]
doc:
Return the current custom plugin search paths.
- def addPluginPath(self, path: str | PathLike[str], /) -> None
doc:
Add one custom plugin search path.
- def errorString(self) -> str
doc:
Return the most recent loader error string.
- def isLanguageChangeEnabled(self) -> bool
doc:
Return whether live language-change handling is enabled.
- def setLanguageChangeEnabled(self, enabled: bool, /) -> None
doc:
Enable or disable live language-change handling.
- def setWorkingDirectory(self, path: str | PathLike[str], /) -> None
doc:
Set the working directory used for relative UI resources.
- def workingDirectory(self) -> str
doc:
Return the current working directory used for UI resources.
MODULE Gui/FreeCADGui._AbstractSplitView.pyi
module_doc:
Typed public method signatures for the ``FreeCAD-compatible GUI runtime._AbstractSplitView`` PyCXX type.
classes:
class _AbstractSplitView
doc:
Split-view container that manages multiple 3D viewers.
methods:
- def fitAll(self, factor: float=1.0, /) -> None
doc:
Fit all visible content into the active split view.
- def viewBottom(self) -> None
doc:
Orient the active split view to the bottom direction.
- def viewFront(self) -> None
doc:
Orient the active split view to the front direction.
- def viewLeft(self) -> None
doc:
Orient the active split view to the left direction.
- def viewRear(self) -> None
doc:
Orient the active split view to the rear direction.
- def viewRight(self) -> None
doc:
Orient the active split view to the right direction.
- def viewTop(self) -> None
doc:
Orient the active split view to the top direction.
- def viewAxometric(self) -> None
doc:
Orient the active split view axometrically.
- def viewIsometric(self) -> None
doc:
Orient the active split view isometrically.
- def getViewer(self, index: int, /) -> _View3DInventorViewer
doc:
Return one contained viewer by index.
- def close(self) -> None
doc:
Close the split-view container.
- def cast_to_base(self) -> _MDIView
doc:
Return the base MDI view wrapper for this split view.
MODULE Gui/FreeCADGui._Control.pyi
module_doc:
Typed public method signatures for the ``FreeCAD-compatible GUI runtime._Control`` PyCXX type.
classes:
class _Control
doc:
Global task-panel control surface for the FreeCAD-compatible runtime GUI.
methods:
- def showDialog(self, dialog: object, document: Document | None=None, /) -> _TaskDialog
doc:
Show one task dialog, optionally for a specific document.
- def activeDialog(self, document: Document | None=None, /) -> bool
doc:
Return whether a task dialog is active.
- def activeTaskDialog(self, document: Document | None=None, /) -> _TaskDialog | None
doc:
Return the active task dialog, if any.
- def closeDialog(self, document: Document | None=None, /) -> None
doc:
Close the active task dialog.
- def addTaskWatcher(self, watchers: object, /) -> None
doc:
Register one task watcher object.
- def clearTaskWatcher(self) -> None
doc:
Clear the registered task watchers.
- def isAllowedAlterDocument(self, document: Document | None=None, /) -> bool
doc:
Return whether the active task dialog may alter the document.
- def isAllowedAlterView(self, document: Document | None=None, /) -> bool
doc:
Return whether the active task dialog may alter the view.
- def isAllowedAlterSelection(self, document: Document | None=None, /) -> bool
doc:
Return whether the active task dialog may alter the selection.
- def showTaskView(self) -> None
doc:
Show the task view pane.
- def showModelView(self) -> None
doc:
Show the model view pane.
MODULE Gui/FreeCADGui._MDIView.pyi
module_doc:
Typed public method signatures for the ``FreeCAD-compatible GUI runtime._MDIView`` PyCXX type.
classes:
class _MDIView
doc:
Base MDI view wrapper for FreeCAD-compatible runtime GUI view types.
methods:
- def printView(self) -> None
doc:
Print the current view.
- def printPdf(self) -> None
doc:
Export the current view to PDF.
- def printPreview(self) -> None
doc:
Open a print preview for the current view.
- def undoActions(self) -> list[str]
doc:
Return the undo actions exposed by the view.
- def redoActions(self) -> list[str]
doc:
Return the redo actions exposed by the view.
- def message(self, message: str, /) -> bool
doc:
Handle one generic message in the view.
- def sendMessage(self, message: str, /) -> bool
doc:
Send one generic message to the view.
- def supportMessage(self, message: str, /) -> bool
doc:
Return whether the view supports one generic message.
- def fitAll(self) -> None
doc:
Fit the full visible content in the view.
- def setActiveObject(self, name: str, document_object: DocumentObject | None=None, subname: str | None=None, /) -> None
doc:
Set one active object slot for the view.
@overload
- def getActiveObject(self, name: str, resolve: Literal[True]=True, /) -> DocumentObject | None
doc:
Return the resolved active object for one slot name.
@overload
- def getActiveObject(self, name: str, resolve: Literal[False], /) -> tuple[DocumentObject | None, DocumentObject | None, str]
- def cast_to_base(self) -> _MDIView
doc:
Return this view as the base MDI view wrapper.
MODULE Gui/FreeCADGui._MainWindow.pyi
module_doc:
Typed public method signatures for the ``FreeCAD-compatible GUI runtime._MainWindow`` PyCXX type.
classes:
class _MainWindow
doc:
Wrapper around the FreeCAD-compatible runtime main application window.
methods:
- def getWindows(self) -> list[_MDIView]
doc:
Return the currently open MDI views.
- def getWindowsOfType(self, type_id: object, /) -> list[_MDIView]
doc:
Return the open MDI views of one runtime type.
- def setActiveWindow(self, view: _MDIView, /) -> None
doc:
Make one MDI view the active window.
- def getActiveWindow(self) -> _MDIView | None
doc:
Return the active MDI view, if any.
- def addWindow(self, window: object, /) -> _MDIView | None
doc:
Add one window object to the MDI area.
- def removeWindow(self, view: _MDIView, /) -> None
doc:
Remove one MDI view from the main window.
- def showHint(self, *hints: InputHint) -> None
doc:
Show one or more input hints in the main window.
- def hideHint(self) -> None
doc:
Hide the currently visible input hints.
MODULE Gui/FreeCADGui._PyResource.pyi
module_doc:
Typed public method signatures for the ``FreeCAD-compatible GUI runtime._PyResource`` PyCXX type.
attributes:
- _PyResourceValue: TypeAlias
classes:
class _PyResource
doc:
Wrapper around a loaded Qt resource object tree.
methods:
- def value(self, object_name: str, property_name: str, /) -> _PyResourceValue | None
doc:
Return one property value from a named child object.
- def setValue(self, object_name: str, property_name: str, value: _PyResourceValue, /) -> None
doc:
Set one property value on a named child object.
- def show(self) -> None
doc:
Show the root resource widget.
- def connect(self, sender: str, signal: str, callback: Callable[..., object], /) -> None
doc:
Connect one named child signal to a Python callback.
MODULE Gui/FreeCADGui._TaskDialog.pyi
module_doc:
Typed public method signatures for the ``FreeCAD-compatible GUI runtime._TaskDialog`` PyCXX type.
classes:
class _TaskDialog
doc:
Base wrapper for task-panel dialogs.
methods:
- def getDialogContent(self) -> list[object]
doc:
Return the content widgets hosted by the dialog.
- def getStandardButtons(self) -> int
doc:
Return the standard button mask for the dialog.
- def setEscapeButtonEnabled(self, enabled: bool, /) -> None
doc:
Enable or disable the escape button behavior.
- def isEscapeButtonEnabled(self) -> bool
doc:
Return whether the escape button is enabled.
- def setAutoCloseOnTransactionChange(self, enabled: bool, /) -> None
doc:
Set whether transaction changes auto-close the dialog.
- def isAutoCloseOnTransactionChange(self) -> bool
doc:
Return whether transaction changes auto-close the dialog.
- def setAutoCloseOnDeletedDocument(self, enabled: bool, /) -> None
doc:
Set whether document deletion auto-closes the dialog.
- def isAutoCloseOnDeletedDocument(self) -> bool
doc:
Return whether document deletion auto-closes the dialog.
- def getDocumentName(self) -> str
doc:
Return the document name associated with the dialog.
- def setDocumentName(self, name: str, /) -> None
doc:
Associate the dialog with one document name.
- def isAllowedAlterDocument(self) -> bool
doc:
Return whether the dialog may alter the document.
- def isAllowedAlterView(self) -> bool
doc:
Return whether the dialog may alter the view.
- def isAllowedAlterSelection(self) -> bool
doc:
Return whether the dialog may alter the selection.
- def needsFullSpace(self) -> bool
doc:
Return whether the dialog prefers the full task-panel space.
- def accept(self) -> None
doc:
Accept the dialog.
- def reject(self) -> None
doc:
Reject the dialog.
MODULE Gui/FreeCADGui._View3DInventor.pyi
module_doc:
Typed public method signatures for the ``FreeCAD-compatible GUI runtime._View3DInventor`` PyCXX type.
classes:
class _View3DInventor
doc:
Primary 3D Inventor view wrapper used by the FreeCAD-compatible runtime GUI.
methods:
- def fitAll(self, factor: float=1.0, /) -> None
doc:
Fit the full scene into view.
- def boxZoom(self, XMin: int, YMin: int, XMax: int, YMax: int) -> None
doc:
Zoom to one screen-space rectangle.
- def viewBottom(self) -> None
doc:
Orient the camera to the bottom view.
- def viewFront(self) -> None
doc:
Orient the camera to the front view.
- def viewLeft(self) -> None
doc:
Orient the camera to the left view.
- def viewRear(self) -> None
doc:
Orient the camera to the rear view.
- def viewRight(self) -> None
doc:
Orient the camera to the right view.
- def viewTop(self) -> None
doc:
Orient the camera to the top view.
- def viewAxometric(self) -> None
doc:
Orient the camera axometrically.
- def viewAxonometric(self) -> None
doc:
Orient the camera axonometrically.
- def viewIsometric(self) -> None
doc:
Orient the camera isometrically.
- def viewDimetric(self) -> None
doc:
Orient the camera dimetrically.
- def viewTrimetric(self) -> None
doc:
Orient the camera trimetrically.
- def viewDefaultOrientation(self, view: str | None=None, scale: float=-1.0, /) -> None
doc:
Restore the default camera orientation.
- def viewRotateLeft(self) -> None
doc:
Rotate the view left.
- def viewRotateRight(self) -> None
doc:
Rotate the view right.
- def zoomIn(self) -> None
doc:
Zoom the camera in.
- def zoomOut(self) -> None
doc:
Zoom the camera out.
- def viewPosition(self, placement: Placement | None=None, steps: int=0, duration: int=-1, /) -> Placement | None
doc:
Return or animate the current view placement.
- def startAnimating(self, x: float, y: float, z: float, velocity: float, /) -> None
doc:
Start continuous camera animation.
- def stopAnimating(self) -> None
doc:
Stop continuous camera animation.
- def setAnimationEnabled(self, enabled: bool, /) -> None
doc:
Enable or disable camera animation support.
- def isAnimationEnabled(self) -> bool
doc:
Return whether camera animation support is enabled.
- def setPopupMenuEnabled(self, enabled: bool, /) -> None
doc:
Enable or disable the view popup menu.
- def isPopupMenuEnabled(self) -> bool
doc:
Return whether the view popup menu is enabled.
- def dump(self, filename: str, only_visible: bool=False, /) -> None
doc:
Dump the scene graph to one file.
- def dumpNode(self, node: object, /) -> str
doc:
Return a textual dump of one scene-graph node.
- def saveImage(self, filename: str, width: int=-1, height: int=-1, color: str='Current', comment: str='$MIBA', samples: int=0, /) -> None
doc:
Save the current view as a raster image.
- def saveVectorGraphic(self, filename: str, page_size: int=4, background: str='white', /) -> None
doc:
Save the current view as a vector graphic.
- def getCamera(self) -> str
doc:
Return the current camera description.
- def getCameraNode(self) -> Any
doc:
Return the underlying camera node.
- def getViewDirection(self) -> Vector
doc:
Return the current camera view direction.
- def getUpDirection(self) -> Vector
doc:
Return the current camera up direction.
- def setViewDirection(self, direction: Vector | tuple[float, float, float], /) -> None
doc:
Set the camera view direction.
- def setCamera(self, camera: str, /) -> None
doc:
Set the camera from one serialized description.
- def setCameraOrientation(self, rotation: Rotation | tuple[float, float, float, float], move_to_rotation_center: bool=False, /) -> None
doc:
Set the camera orientation.
- def getCameraOrientation(self) -> Rotation
doc:
Return the current camera orientation.
- def getCameraType(self) -> str
doc:
Return the current camera type name.
- def setCameraType(self, camera_type: int | str, /) -> None
doc:
Set the camera type.
- def listCameraTypes(self) -> list[str]
doc:
Return the supported camera type names.
- def getCursorPos(self) -> tuple[int, int]
doc:
Return the current cursor position in view coordinates.
- def getObjectInfo(self, point: object, radius: float=0.0, /) -> dict[str, Any] | None
doc:
Return hit-test information for one point.
- def getObjectsInfo(self, point: object, radius: float=0.0, /) -> list[dict[str, Any]] | None
doc:
Return hit-test information for all objects near one point.
- def getSize(self) -> tuple[int, int]
doc:
Return the current view size in pixels.
@overload
- def getObjectInfoRay(self, start: Vector, direction: Vector, /) -> dict[str, Any] | None
doc:
Return hit-test information for one world-space ray.
@overload
- def getObjectInfoRay(self, start_x: float, start_y: float, start_z: float, direction_x: float, direction_y: float, direction_z: float, /) -> dict[str, Any] | None
- def getPoint(self, x: int, y: int, /) -> Vector
doc:
Project one screen-space point into world coordinates.
- def getPointOnFocalPlane(self, x: int, y: int, /) -> Vector
doc:
Project one screen-space point onto the focal plane.
- def getPointOnScreen(self, point: Vector | tuple[float, float, float], /) -> tuple[int, int]
doc:
Project one world-space point onto the screen.
- def getPointOnViewport(self, point: Vector | tuple[float, float, float], /) -> tuple[int, int]
doc:
Project one world-space point into viewport coordinates.
- def projectPointToLine(self, x: int, y: int, /) -> tuple[Vector, Vector]
doc:
Project one screen-space point to a world-space line.
- def addEventCallback(self, event_type: str, callback: object, /) -> object
doc:
Register one event callback.
- def removeEventCallback(self, event_type: str, callback: object, /) -> None
doc:
Remove one event callback.
- def setAnnotation(self, name: str, buffer: str, /) -> None
doc:
Set one named annotation buffer.
- def removeAnnotation(self, name: str, /) -> None
doc:
Remove one named annotation buffer.
- def getSceneGraph(self) -> Any
doc:
Return the root scene graph.
- def getViewer(self) -> _View3DInventorViewer
doc:
Return the low-level viewer wrapper.
- def addEventCallbackPivy(self, event_type: object, callback: object, extended: int=1, /) -> object
doc:
Register one Pivy event callback.
- def removeEventCallbackPivy(self, event_type: object, callback: object, extended: int=1, /) -> object
doc:
Remove one Pivy event callback.
- def addEventCallbackSWIG(self, event_type: object, callback: object, extended: int=1, /) -> object
doc:
Register one SWIG event callback.
- def removeEventCallbackSWIG(self, event_type: object, callback: object, extended: int=1, /) -> object
doc:
Remove one SWIG event callback.
- def listNavigationTypes(self) -> list[str]
doc:
Return the supported navigation-style names.
- def getNavigationType(self) -> str
doc:
Return the current navigation-style name.
- def setNavigationType(self, navigation_type: str, /) -> None
doc:
Set the navigation style by name.
- def setAxisCross(self, enabled: bool, /) -> None
doc:
Enable or disable the axis cross.
- def hasAxisCross(self) -> bool
doc:
Return whether the axis cross is enabled.
- def addDraggerCallback(self, dragger: object, callback_type: str, callback: object, /) -> object
doc:
Register one dragger callback.
- def removeDraggerCallback(self, dragger: object, callback_type: str, callback: object, /) -> object
doc:
Remove one dragger callback.
- def getViewProvidersOfType(self, type_name: str, /) -> list[object]
doc:
Return the view providers of one type name.
- def redraw(self) -> None
doc:
Request a redraw of the view.
- def setName(self, name: str, /) -> None
doc:
Set the internal view name.
- def toggleClippingPlane(self, toggle: int=-1, beforeEditing: bool=False, noManip: bool=True, pla: object | None=None) -> None
doc:
Toggle or configure the clipping plane.
- def hasClippingPlane(self) -> bool
doc:
Return whether a clipping plane is active.
- def graphicsView(self) -> Any
doc:
Return the underlying graphics-view object.
- def setCornerCrossVisible(self, visible: bool, /) -> None
doc:
Show or hide the corner cross.
- def isCornerCrossVisible(self) -> bool
doc:
Return whether the corner cross is visible.
- def setCornerCrossSize(self, size: int, /) -> None
doc:
Set the corner-cross size.
- def getCornerCrossSize(self) -> int
doc:
Return the corner-cross size.
- def cast_to_base(self) -> _MDIView
doc:
Return this view as the base MDI view wrapper.
MODULE Gui/FreeCADGui._View3DInventorViewer.pyi
module_doc:
Typed public method signatures for the ``FreeCAD-compatible GUI runtime._View3DInventorViewer`` PyCXX type.
classes:
class _View3DInventorViewer
doc:
Low-level Coin viewer wrapper behind the 3D view.
methods:
- def getSoRenderManager(self) -> Any
doc:
Return the underlying Coin render manager.
- def getSoEventManager(self) -> Any
doc:
Return the underlying Coin event manager.
- def getSceneGraph(self) -> Any
doc:
Return the current root scene graph.
- def setSceneGraph(self, node: object, /) -> None
doc:
Replace the root scene graph.
- def seekToPoint(self, point: tuple[int, int] | tuple[float, float, float], /) -> None
doc:
Center the viewer on one screen or world point.
- def setFocalDistance(self, distance: float, /) -> None
doc:
Set the camera focal distance.
- def getFocalDistance(self) -> float
doc:
Return the camera focal distance.
@overload
- def getPoint(self, x: int, y: int, /) -> Vector
doc:
Project one screen-space point into world coordinates.
@overload
- def getPoint(self, point: tuple[int, int], /) -> Vector
@overload
- def getPointOnFocalPlane(self, x: int, y: int, /) -> Vector
doc:
Project one screen-space point onto the focal plane.
@overload
- def getPointOnFocalPlane(self, point: tuple[int, int], /) -> Vector
- def getPickRadius(self) -> float
doc:
Return the current pick radius.
- def setPickRadius(self, radius: float, /) -> None
doc:
Set the pick radius used for hit-testing.
- def setupEditingRoot(self, node: object | None=None, matrix: Matrix | None=None, /) -> None
doc:
Install one temporary editing root node.
- def resetEditingRoot(self, update_links: bool=True, /) -> None
doc:
Remove the temporary editing root node.
- def setBackgroundColor(self, red: float, green: float, blue: float, /) -> None
doc:
Set a solid background color.
- def setGradientBackground(self, background: str, /) -> None
doc:
Set the predefined gradient background mode.
- def setGradientBackgroundColor(self, from_color: tuple[float, float, float], to_color: tuple[float, float, float], mid_color: tuple[float, float, float] | None=None, /) -> None
doc:
Set explicit gradient background colors.
- def setRedirectToSceneGraph(self, redirect: bool, /) -> None
doc:
Enable or disable redirection to the scene graph.
- def isRedirectedToSceneGraph(self) -> bool
doc:
Return whether rendering is redirected to the scene graph.
- def grabFramebuffer(self) -> Any
doc:
Capture the current framebuffer.
- def setOverrideMode(self, mode: str, /) -> None
doc:
Set the viewer override rendering mode.
- def setEnabledNaviCube(self, enabled: bool, /) -> None
doc:
Enable or disable the navigation cube.
- def isEnabledNaviCube(self) -> bool
doc:
Return whether the navigation cube is enabled.
- def setNaviCubeCorner(self, corner: int, /) -> None
doc:
Set the navigation-cube corner.
- def getNavigationStyle(self) -> object | None
doc:
Return the current navigation-style object, if any.
MODULE Gui/FreeCADGui.module.pyi
module_doc:
Typed public signatures for the ``FreeCAD-compatible GUI runtime`` root module.
This static stub reference keeps the callable GUI module surface together
with the helper aliases, workbench support classes, and module globals those
signatures use.
attributes:
- _Pathish: TypeAlias
- _IconContent: TypeAlias
- _WorkbenchMenu: TypeAlias
- _WorkbenchCommands: TypeAlias
- _InputSequence: TypeAlias
- HintManager: _HintManager
- ActiveDocument: Document | None
functions:
- def subgraphFromObject(obj: DocumentObject, /) -> object | None
doc:
Return the Coin scene subgraph that represents one document object.
- def exportSubgraph(node: object, output: object, format: str='VRML', /) -> None
doc:
Serialize one Coin scene subgraph to an output target.
- def getSoDBVersion() -> str
doc:
Return the linked Coin SoDB version string.
- def activateWorkbench(name: str, /) -> bool
doc:
Activate one registered workbench by name.
- def addWorkbench(workbench: Workbench | type[Workbench], /) -> None
doc:
Register one Python workbench implementation.
- def removeWorkbench(name: str, /) -> None
doc:
Unregister one workbench by name.
- def getWorkbench(name: str, /) -> Workbench
doc:
Return one registered workbench by name.
- def listWorkbenches() -> dict[str, Workbench]
doc:
Return all registered workbenches keyed by name.
- def activeWorkbench() -> Workbench
doc:
Return the currently active workbench.
- def addResourcePath(path: _Pathish, /) -> None
doc:
Register an additional GUI resource search path.
- def addLanguagePath(path: _Pathish, /) -> None
doc:
Register an additional translation search path.
- def addIconPath(path: _Pathish, /) -> None
doc:
Register an additional icon search path.
- def addIcon(name: str, content: _IconContent, format: str='XPM', /) -> None
doc:
Register one icon payload under a symbolic name.
- def getIcon(name: str, /) -> object | None
doc:
Return the cached icon object for one symbolic name.
- def isIconCached(name: str, /) -> bool
doc:
Return whether one icon name is already cached.
- def updateGui() -> None
doc:
Process pending GUI updates.
- def updateLocale() -> None
doc:
Reload GUI translation state after locale changes.
- def getLocale() -> str
doc:
Return the current GUI locale name.
- def setLocale(name: str, /) -> None
doc:
Set the GUI locale name.
- def supportedLocales() -> dict[str, str]
doc:
Return the locale names supported by the GUI.
- def createDialog(path: str, /) -> _PyResource
doc:
Load one Qt Designer UI resource and return its wrapper.
@overload
- def addPreferencePage(path: str, group: str, /) -> None
doc:
Register a preference page from a `.ui` file path.
@overload
- def addPreferencePage(dialog: type[object], group: str, /) -> None
doc:
Register a preference page from a Python dialog class.
- def addCommand(name: str, cmd: object, activation: str='', /) -> None
doc:
Register one GUI command object under a command name.
- def runCommand(name: str, index: int=0, /) -> None
doc:
Run one registered GUI command.
- def listCommands() -> list[str]
doc:
Return the registered GUI command names.
- def isCommandActive(name: str, /) -> bool
doc:
Return whether one command is active in the current GUI context.
- def SendMsgToActiveView(name: str, suppress: bool=False, /) -> None
doc:
Send one named message to the active view.
- def sendMsgToFocusView(name: str, suppress: bool=False, /) -> None
doc:
Send one named message to the focused view.
- def doCommand(cmd: str, /) -> None
doc:
Execute one command string in the Python console context.
- def doCommandGui(cmd: str, /) -> None
doc:
Execute one GUI-scoped command string.
- def doCommandEval(cmd: str, /) -> Any
doc:
Evaluate one command string and return its result.
- def doCommandSkip(cmd: str, /) -> None
doc:
Execute one command string without recording it in the console.
- def addModule(mod: str, /) -> None
doc:
Import one module into the GUI command environment.
- def showDownloads() -> None
doc:
Open the downloads or addon presentation.
- def showPreferences(grp: str='', index: int=0, /) -> None
doc:
Open the preferences dialog to one group and page index.
- def showPreferencesByName(grp: str, pagename: str='', /) -> None
doc:
Open the preferences dialog to one group and page name.
- def hide(name: str, /) -> None
doc:
Hide one named object in the active GUI document.
- def show(name: str, /) -> None
doc:
Show one named object in the active GUI document.
- def hideObject(obj: DocumentObject, /) -> None
doc:
Hide one document object in the GUI.
- def showObject(obj: DocumentObject, /) -> None
doc:
Show one document object in the GUI.
- def open(fileName: _Pathish, /) -> None
doc:
Open one document file through the GUI layer.
- def insert(fileName: _Pathish, docName: str='', /) -> None
doc:
Insert one file into an existing GUI document.
- def export(objs: Sequence[DocumentObject], fileName: _Pathish, /) -> None
doc:
Export GUI document objects to one file.
- def activeDocument() -> Document | None
doc:
Return the active GUI document, if any.
- def setActiveDocument(doc: str | App.Document, /) -> None
doc:
Make one GUI document active.
- def editDocument() -> Document | None
doc:
Return the document currently being edited in the GUI.
- def getDocument(doc: str | App.Document, /) -> Document
doc:
Return one GUI document by name or application document.
- def reload(name: str, /) -> App.Document | None
doc:
Reload one document by name through the GUI layer.
- def loadFile(fileName: str, module: str='', /) -> None
doc:
Load one file through the GUI import pipeline.
- def getMainWindow() -> _MainWindow
doc:
Return the main application window wrapper.
@overload
- def activeView() -> object | None
doc:
Return the current active view, creating the default 3D view when needed.
@overload
- def activeView(typeName: str, /) -> object | None
doc:
Return the active view constrained to a specific FreeCAD-compatible runtime view type name.
- def activateView(typeName: str, create: bool, /) -> None
doc:
Activate one view type, optionally creating it first.
@overload
- def createViewer() -> _View3DInventor
doc:
Create the default single 3D viewer.
@overload
- def createViewer(views: Literal[1], name: str=..., /) -> _View3DInventor
doc:
Create one named 3D viewer explicitly.
@overload
- def createViewer(views: int, name: str=..., /) -> _View3DInventor | _AbstractSplitView
doc:
Create a split-view layout when more than one view is requested.
- def getMarkerIndex(marker: str, size: int=9, /) -> int
doc:
Return the Coin marker index for one named marker and size.
- def addDocumentObserver(obj: object, /) -> None
doc:
Register one GUI document observer.
- def removeDocumentObserver(obj: object, /) -> None
doc:
Unregister one GUI document observer.
- def addWorkbenchManipulator(obj: object, /) -> None
doc:
Register one workbench manipulator helper.
- def removeWorkbenchManipulator(obj: object, /) -> None
doc:
Unregister one workbench manipulator helper.
- def listUserEditModes() -> list[str]
doc:
Return the available user edit-mode names.
- def getUserEditMode() -> str
doc:
Return the current user edit-mode name.
- def setUserEditMode(mode: str, /) -> bool
doc:
Set the current user edit-mode by name.
- def coinRemoveAllChildren(node: object, /) -> None
doc:
Remove all Coin child nodes from one parent node.
- def suspendWaitCursor() -> None
doc:
Temporarily suspend the global wait cursor.
- def resumeWaitCursor() -> None
doc:
Resume the global wait cursor after suspension.
- def showMainWindow(inThread: bool=False, /) -> None
doc:
Show the main application window.
- def exec_loop() -> None
doc:
Enter the GUI event loop.
- def setupWithoutGUI() -> None
doc:
Initialize GUI services without showing the main window.
- def embedToWindow(pointer: str, /) -> None
doc:
Embed the GUI into an existing native window handle.
classes:
class UserInput(IntEnum)
doc:
Enum of keyboard, mouse, and modifier tokens used by GUI input hints.
attributes:
- ModifierShift
- ModifierCtrl
- ModifierAlt
- ModifierMeta
- KeySpace
- KeyExclam
- KeyQuoteDbl
- KeyNumberSign
- KeyDollar
- KeyPercent
- KeyAmpersand
- KeyApostrophe
- KeyParenLeft
- KeyParenRight
- KeyAsterisk
- KeyPlus
- KeyComma
- KeyMinus
- KeyPeriod
- KeySlash
- Key0
- Key1
- Key2
- Key3
- Key4
- Key5
- Key6
- Key7
- Key8
- Key9
- KeyColon
- KeySemicolon
- KeyLess
- KeyEqual
- KeyGreater
- KeyQuestion
- KeyAt
- KeyA
- KeyB
- KeyC
- KeyD
- KeyE
- KeyF
- KeyG
- KeyH
- KeyI
- KeyJ
- KeyK
- KeyL
- KeyM
- KeyN
- KeyO
- KeyP
- KeyQ
- KeyR
- KeyS
- KeyT
- KeyU
- KeyV
- KeyW
- KeyX
- KeyY
- KeyZ
- KeyBracketLeft
- KeyBackslash
- KeyBracketRight
- KeyAsciiCircum
- KeyUnderscore
- KeyQuoteLeft
- KeyBraceLeft
- KeyBar
- KeyBraceRight
- KeyAsciiTilde
- KeyEscape
- KeyTab
- KeyBacktab
- KeyBackspace
- KeyReturn
- KeyEnter
- KeyInsert
- KeyDelete
- KeyPause
- KeyPrintScr
- KeySysReq
- KeyClear
- KeyHome
- KeyEnd
- KeyLeft
- KeyUp
- KeyRight
- KeyDown
- KeyPageUp
- KeyPageDown
- KeyShift
- KeyControl
- KeyMeta
- KeyAlt
- KeyCapsLock
- KeyNumLock
- KeyScrollLock
- KeyF1
- KeyF2
- KeyF3
- KeyF4
- KeyF5
- KeyF6
- KeyF7
- KeyF8
- KeyF9
- KeyF10
- KeyF11
- KeyF12
- KeyF13
- KeyF14
- KeyF15
- KeyF16
- KeyF17
- KeyF18
- KeyF19
- KeyF20
- KeyF21
- KeyF22
- KeyF23
- KeyF24
- KeyF25
- KeyF26
- KeyF27
- KeyF28
- KeyF29
- KeyF30
- KeyF31
- KeyF32
- KeyF33
- KeyF34
- KeyF35
- MouseMove
- MouseLeft
- MouseRight
- MouseMiddle
- MouseScroll
- MouseScrollUp
- MouseScrollDown
class _WorkbenchBackend(Protocol)
doc:
Protocol for the mutable backend object behind one GUI workbench.
methods:
- def appendToolbar(self, name: str, cmds: Sequence[str], /) -> None
doc:
Add one toolbar definition to the workbench.
- def removeToolbar(self, name: str, /) -> None
doc:
Remove one toolbar definition from the workbench.
- def listToolbars(self) -> list[str]
doc:
Return the toolbar names registered on the workbench.
- def getToolbarItems(self) -> dict[str, list[str]]
doc:
Return toolbar contents keyed by toolbar name.
- def appendCommandbar(self, name: str, cmds: Sequence[str], /) -> None
doc:
Add one command bar definition to the workbench.
- def removeCommandbar(self, name: str, /) -> None
doc:
Remove one command bar definition from the workbench.
- def listCommandbars(self) -> list[str]
doc:
Return the command bar names registered on the workbench.
- def appendMenu(self, name: _WorkbenchMenu, cmds: _WorkbenchCommands, /) -> None
doc:
Add one menu definition to the workbench.
- def removeMenu(self, name: _WorkbenchMenu, /) -> None
doc:
Remove one menu definition from the workbench.
- def listMenus(self) -> list[str]
doc:
Return the menu labels registered on the workbench.
- def appendContextMenu(self, name: str, cmds: _WorkbenchCommands, /) -> None
doc:
Add one context-menu definition to the workbench.
- def removeContextMenu(self, name: str, /) -> None
doc:
Remove one context-menu definition from the workbench.
- def reloadActive(self) -> None
doc:
Reload the active workbench presentation.
- def name(self) -> str
doc:
Return the internal backend name of the workbench.
class Workbench
doc:
Base class for Python-defined GUI workbenches.
attributes:
- MenuText: ClassVar[str]
- ToolTip: ClassVar[str]
- Icon: ClassVar[object | None]
methods:
- def Initialize(self) -> None
doc:
Initialize the workbench after registration.
- def ContextMenu(self, recipient: object, /) -> None
doc:
Populate the context menu for one recipient object.
- def appendToolbar(self, name: str, cmds: Sequence[str], /) -> None
doc:
Add one toolbar definition to the workbench.
- def removeToolbar(self, name: str, /) -> None
doc:
Remove one toolbar definition from the workbench.
- def listToolbars(self) -> list[str]
doc:
Return the toolbar names registered on the workbench.
- def getToolbarItems(self) -> dict[str, list[str]]
doc:
Return toolbar contents keyed by toolbar name.
- def appendCommandbar(self, name: str, cmds: Sequence[str], /) -> None
doc:
Add one command bar definition to the workbench.
- def removeCommandbar(self, name: str, /) -> None
doc:
Remove one command bar definition from the workbench.
- def listCommandbars(self) -> list[str]
doc:
Return the command bar names registered on the workbench.
- def appendMenu(self, name: _WorkbenchMenu, cmds: _WorkbenchCommands, /) -> None
doc:
Add one menu definition to the workbench.
- def removeMenu(self, name: _WorkbenchMenu, /) -> None
doc:
Remove one menu definition from the workbench.
- def listMenus(self) -> list[str]
doc:
Return the menu labels registered on the workbench.
- def appendContextMenu(self, name: str, cmds: _WorkbenchCommands, /) -> None
doc:
Add one context-menu definition to the workbench.
- def removeContextMenu(self, name: str, /) -> None
doc:
Remove one context-menu definition from the workbench.
- def reloadActive(self) -> None
doc:
Reload the active workbench presentation.
- def name(self) -> str
doc:
Return the exposed name of the workbench.
- def GetClassName(self) -> str
doc:
Return the wrapped runtime class name.
class InputHint
doc:
One user-facing message together with the input sequence that triggers it.
attributes:
- InputSequence: ClassVar[object]
- message: str
- sequences: list[_InputSequence]
methods:
- def __init__(self, message: str, *sequences: _InputSequence) -> None
doc:
Create one input hint with one or more accepted input sequences.
class _HintManager
doc:
Controller for transient GUI input-hint overlays.
methods:
- def show(self, *hints: InputHint) -> None
doc:
Display one or more input hints.
- def hide(self) -> None
doc:
Hide the currently displayed input hints.
MODULE Gui/LinkView.pyi
classes:
class LinkView(BaseClass)
doc:
Helper class to link to a view object
attributes:
- LinkedView: Final[Any]
doc:
The linked view object
- SubNames: Final[Any]
doc:
The sub-object reference of the link
- RootNode: Final[Any]
doc:
A pivy node holding the cloned representation of the linked view object
- Owner: Any
doc:
The owner view object of this link handle
- Visibilities: Any
doc:
Get/set the child element visibility
- Count: int
doc:
Set the element size to create an array of linked object
methods:
- def reset(self) -> None
doc:
Reset the link view and clear the links
@overload
- def setMaterial(self, material: None, /) -> None
@overload
- def setMaterial(self, material: Any, /) -> None
@overload
- def setMaterial(self, material: List[Any], /) -> None
@overload
- def setMaterial(self, material: Dict[int, Any], /) -> None
- def setMaterial(self, material: Any, /) -> None
doc:
setMaterial(Material): set the override material of the entire linked object
setMaterial([Material,...]): set the materials for the elements of the link
array/group.
setMaterial({Int:Material,...}): set the material for the elements of the
link array/group by index.
If material is None, then the material is unset. If the material of an element
is unset, it defaults to the override material of the linked object, if there
is one
@overload
- def setType(self, type: int, /) -> None
@overload
- def setType(self, type: int, sublink: bool, /) -> None
- def setType(self, type: int, sublink: bool=True, /) -> None
doc:
set the link type.
type=0: override transformation and visibility
type=1: override visibility
type=2: no override
type=-1: sub-object link with override visibility
type=-2: sub-object link with override transformation and visibility
sublink: auto delegate to the sub-object references in the link, if there is
one and only one.
@overload
- def setTransform(self, matrix: Any, /) -> None
@overload
- def setTransform(self, matrix: List[Any], /) -> None
@overload
- def setTransform(self, matrix: Dict[int, Any], /) -> None
- def setTransform(self, matrix: Any, /) -> None
doc:
set transformation of the linked object
set transformation for the elements of the link
array/group
set transformation for elements of the link
array/group by index
- def setChildren(self, children: List[Any], vis: List[Any]=[], type: int=0, /) -> None
doc:
Group a list of children objects. Note, this mode of operation is incompatible
with link array. Calling this function will deactivate link array. And calling
setSize() will reset all linked children.
vis: initial visibility status of the children
type: children linking type,
0: override transformation and visibility,
1: override visibility,
2: override none.
@overload
- def setLink(self, obj: Any, /) -> None
@overload
- def setLink(self, obj: Any, subname: str, /) -> None
@overload
- def setLink(self, obj: Any, subname: List[str], /) -> None
- def setLink(self, obj: Any, subname: Any=None, /) -> None
doc:
Set the link
Set the link with a sub-object reference
Set the link with a list of sub object references
object: The linked document object or its view object
subname: a string or tuple/list of strings sub-name references to sub object
or sub elements (e.g. Face1, Edge2) belonging to the linked object.
The sub-name must end with a '.' if it is referencing an sub-object,
or else it is considered a sub-element reference.
- def getDetailPath(self, element: Any, /) -> Tuple[Any, Any]
doc:
get the 3d path an detail of an element.
Return a tuple(path,detail) for the coin3D SoPath and SoDetail of the element
- def getElementPicked(self, pickPoint: Any, /) -> Any
doc:
get the element under a 3d pick point.
- def getBoundBox(self, vobj: Any=None, /) -> Any
doc:
get the bounding box.
@constmethod
- def getChildren(self) -> Any
doc:
Get children view objects
MODULE Gui/Navigation/NavigationStyle.pyi
classes:
class NavigationStyle(BaseClass)
doc:
This is the base class for navigation styles
methods:
- def isRotationEnabled(self) -> bool
- def setRotationEnabled(self, enabled: bool, /) -> None
- def isOrientationLocked(self) -> bool
- def setOrientationLocked(self, enabled: bool, /) -> None
MODULE Gui/PythonWorkbench.pyi
classes:
class PythonWorkbench(Workbench)
doc:
This is the class for Python workbenches
methods:
- def appendMenu(self) -> None
doc:
Append a new menu
- def removeMenu(self) -> None
doc:
Remove a menu
- def appendContextMenu(self) -> None
doc:
Append a new context menu item
- def removeContextMenu(self) -> None
doc:
Remove a context menu item
- def appendToolbar(self) -> None
doc:
Append a new toolbar
- def removeToolbar(self) -> None
doc:
Remove a toolbar
- def appendCommandbar(self) -> None
doc:
Append a new command bar
- def removeCommandbar(self) -> None
doc:
Remove a command bar
@deprecated
- def AppendMenu(self) -> None
doc:
deprecated -- use appendMenu
@deprecated
- def RemoveMenu(self) -> None
doc:
deprecated -- use removeMenu
@deprecated
- def ListMenus(self) -> None
doc:
deprecated -- use listMenus
@deprecated
- def AppendContextMenu(self) -> None
doc:
deprecated -- use appendContextMenu
@deprecated
- def RemoveContextMenu(self) -> None
doc:
deprecated -- use removeContextMenu
@deprecated
- def AppendToolbar(self) -> None
doc:
deprecated -- use appendToolbar
@deprecated
- def RemoveToolbar(self) -> None
doc:
deprecated -- use removeToolbar
@deprecated
- def ListToolbars(self) -> None
doc:
deprecated -- use listToolbars
@deprecated
- def AppendCommandbar(self) -> None
doc:
deprecated -- use appendCommandBar
@deprecated
- def RemoveCommandbar(self) -> None
doc:
deprecated -- use removeCommandBar
@deprecated
- def ListCommandbars(self) -> None
doc:
deprecated -- use listCommandBars
MODULE Gui/Selection/SelectionObject.pyi
classes:
class SelectionObject(BaseClass)
doc:
This class represents selections made by the user. It holds information about the object, document and sub-element of the selection.
attributes:
- ObjectName: Final[str]
doc:
Name of the selected object
- SubElementNames: Final[Tuple[str, ...]]
doc:
Name of the selected sub-element if any
- FullName: Final[str]
doc:
Name of the selected object
- TypeName: Final[str]
doc:
Type name of the selected object
- DocumentName: Final[str]
doc:
Name of the document of the selected object
- Document: Final[Any]
doc:
Document of the selected object
- Object: Final[Any]
doc:
Selected object
- SubObjects: Final[Tuple[Any, ...]]
doc:
Selected sub-element, if any
- PickedPoints: Final[Tuple[Any, ...]]
doc:
Picked points for selection
- HasSubObjects: Final[bool]
doc:
Selected sub-element, if any
methods:
- def remove(self) -> None
doc:
Remove this selection item from the selection.
--
This object becomes invalid.
- def isObjectTypeOf(self, type: Any, /) -> bool
doc:
Test for a certain father class.
MODULE Gui/ViewProvider.pyi
classes:
class ViewProvider(ExtensionContainer)
doc:
This is the ViewProvider base class
attributes:
- Annotation: Any
doc:
A pivy Separator to add a custom scenegraph to this ViewProvider.
- Icon: Final[Any]
doc:
The icon of this ViewProvider.
- RootNode: Any
doc:
A pivy Separator with the root of this ViewProvider.
- SwitchNode: Any
doc:
A pivy SoSwitch for the display mode switch of this ViewProvider.
- DefaultMode: int
doc:
Get/Set the default display mode in turns of coin node index.
- IV: Final[str]
doc:
Represents the whole ViewProvider as an Inventor string.
- CanRemoveChildrenFromRoot: Final[bool]
doc:
Tells the tree view whether to remove the children item from root or not.
- LinkVisibility: bool
doc:
Get/set visibilities of all links to this view object.
- DropPrefix: Final[str]
doc:
Subname referencing the sub-object for holding dropped object.
- ToggleVisibility: ToggleVisibilityMode
doc:
Get/set whether the viewprovider can toggle the visibility of
the object.
methods:
- def addProperty(self, type: str, name: str, group: str, doc: str, attr: int=0, read_only: bool=False, hidden: bool=False, locked: bool=False) -> 'ViewProvider'
doc:
Add a generic property.
type : str
Property type.
name : str
Property name. Optional.
group : str
Property group. Optional.
attr : int
Property attributes.
read_only : bool
Read only property.
hidden : bool
Hidden property.
locked : bool
Locked property.
- def removeProperty(self, name: str, /) -> bool
doc:
Remove a generic property.
Only user-defined properties can be removed, not built-in ones.
name : str
Property name.
- def supportedProperties(self) -> list
doc:
A list of supported property types.
- def show(self) -> None
doc:
Show the object.
- def hide(self) -> None
doc:
Hide the object.
- def isVisible(self) -> bool
doc:
Check if the object is visible.
- def canDragObject(self, obj: Any=None, /) -> bool
doc:
Check whether the child object can be removed by dragging.
If 'obj' is not given, check without filter by any particular object.
obj : App.DocumentObject
Object to be dragged.
- def dragObject(self, obj: Any, /) -> None
doc:
Remove a child object by dropping.
obj : App.DocumentObject
Object to be dragged.
- def canDropObject(self, obj: Any=None, *, owner: Any=None, subname: str, elem: Optional[List[str]]=None) -> bool
doc:
Check whether the child object can be added by dropping.
If 'obj' is not given, check without filter by any particular object.
obj : App.DocumentObject
Object to be dropped.
owner : App.DocumentObject
Parent object of the dropping object.
subname : str
Subname reference to the dropping object. Optional.
elem : sequence of str
Non-objects subelements selected when the object is
being dropped.
- def dropObject(self, obj: Any, *, owner: Any=None, subname: str, elem: Optional[List[str]]=None) -> str
doc:
Add a child object by dropping.
obj : App.DocumentObject
Object to be dropped.
owner : App.DocumentObject
Parent object of the dropping object.
subname : str
Subname reference to the dropping object. Optional.
elem : sequence of str
Non-objects subelements selected when the object is
being dropped.
- def canDragAndDropObject(self, obj: Any, /) -> bool
doc:
Check whether the child object can be removed from
other parent and added here by drag and drop.
obj : App.DocumentObject
Object to be dragged and dropped.
- def replaceObject(self, oldObj: Any, newObj: Any, /) -> int
doc:
Replace a child object.
Returns 1 if succeeded, 0 if not found, -1 if not supported.
oldObj : App.DocumentObject
Old object.
newObj : App.DocumentObject
New object.
- def doubleClicked(self) -> bool
doc:
Trigger double clicking the corresponding tree item of this view object.
- def addDisplayMode(self, obj: Any, mode: str, /) -> None
doc:
Add a new display mode to the view provider.
obj : coin.SoNode
Display mode.
mode : str
Name of the display mode.
- def listDisplayModes(self) -> list
doc:
Show a list of all display modes.
- def toString(self) -> str
doc:
Return a string representation of the Inventor node.
- def setTransformation(self, trans: Any, /) -> None
doc:
Set a transformation on the Inventor node.
trans : Base.Placement, Base.Matrix
@constmethod
- def claimChildren(self) -> list
doc:
Returns list of objects that are to be grouped in tree under this object.
@constmethod
- def claimChildrenRecursive(self) -> list
doc:
Returns list of objects that are to be grouped in tree under this object recursively.
- def partialRender(self, sub: Any=None, clear: bool=False, /) -> int
doc:
Render only part of the object.
sub: None, str, sequence of str
Refer to the subelement. If it is None then reset the partial rendering.
clear: bool
True to add, or False to remove the subelement(s) for rendering.
- def getElementColors(self, elementName: Optional[str]=None, /) -> dict
doc:
Get a dictionary of the form {elementName : (r,g,b,a)}.
If no element name is given a dictionary with all the elements is returned.
elementName : str
Name of the element. Optional.
- def setElementColors(self, colors: dict, /) -> None
doc:
Set element colors.
colors: dict
Color dictionary of the form {elementName:(r,g,b,a)}.
@constmethod
- def getElementPicked(self, pickPoint: Any, /) -> str
doc:
Return the picked subelement.
pickPoint : coin.SoPickedPoint
@constmethod
- def getDetailPath(self, subelement: str, path: Any, append: bool=True, /) -> Any
doc:
Return Coin detail and path of an subelement.
subname: str
Dot separated string reference to the sub element.
pPath: coin.SoPath
Output coin path leading to the returned element detail.
append: bool
If True, path will be first appended with the root node and the mode
switch node of this view provider.
@constmethod
- def signalChangeIcon(self) -> None
doc:
Trigger icon changed signal.
- def getBoundingBox(self, subName: Optional[str]=None, transform: bool=True, view: Any=None, /) -> BoundBox
doc:
Obtain the bounding box of this view object.
subName : str
Name referring a sub-object. Optional.
transform: bool
Whether to apply the transformation matrix of this view provider.
view: View3DInventorPy
Default to active view. Optional.
MODULE Gui/ViewProviderDocumentObject.pyi
classes:
class ViewProviderDocumentObject(ViewProvider)
doc:
This is the ViewProvider base class
attributes:
- Object: Any
doc:
Set/Get the associated data object
- ForceUpdate: bool
doc:
Reference count to force update visual
- Document: Final[Any]
doc:
Return the document the view provider is part of
methods:
- def update(self) -> None
doc:
Update the view representation of the object
MODULE Gui/ViewProviderExtension.pyi
classes:
class ViewProviderExtension(Extension)
doc:
Base class for all view provider extensions
methods:
- def setIgnoreOverlayIcon(self) -> None
doc:
Ignore the overlay icon of an extension
@constmethod
- def ignoreOverlayIcon(self) -> None
doc:
Ignore the overlay icon of an extension
MODULE Gui/ViewProviderGeometryObject.pyi
classes:
class ViewProviderGeometryObject(ViewProviderDocumentObject)
doc:
This is the ViewProvider geometry class
methods:
@staticmethod
@no_args
- def getUserDefinedMaterial() -> object
doc:
Get a material object with the user-defined colors.
MODULE Gui/ViewProviderLink.pyi
classes:
class ViewProviderLink(ViewProviderDocumentObject)
doc:
This is the ViewProviderLink class
attributes:
- DraggingPlacement: Any
doc:
Get/set dragger placement during dragging
- LinkView: Final[Any]
doc:
Get the associated LinkView object
MODULE Gui/Workbench.pyi
classes:
class Workbench(BaseClass)
doc:
This is the base class for workbenches
methods:
- def name(self) -> str
doc:
Return the workbench name
- def activate(self) -> None
doc:
Activate this workbench
- def listToolbars(self) -> List[Any]
doc:
Show a list of all toolbars
- def getToolbarItems(self) -> Dict[Any, Any]
doc:
Show a dict of all toolbars and their commands
- def listCommandbars(self) -> List[Any]
doc:
Show a list of all command bars
- def listMenus(self) -> List[Any]
doc:
Show a list of all menus
@staticmethod
- def reloadActive() -> None
doc:
Reload the active workbench after changing menus or toolbars