topologicpy.Core module
- class topologicpy.Core.Core
Bases:
objectThin facade over the active topology kernel backend.
The default backend is
TopologicCoreBackend. UseCore.SetBackendto replace it with another backend object that exposes the same namespace shape.Methods
Backend()Returns the active backend.
Call(namespace, attribute, *args, **kwargs)Dynamically calls a method or callable attribute on a backend namespace.
HasAttribute(namespace, attribute)Returns True if the active backend namespace exposes the requested attribute.
HasNamespace(name)Returns True if the active backend exposes the requested namespace.
InstanceAttribute(obj, attributeName)Returns an instance attribute from a backend-native object.
InstanceCall(obj, methodName, *args, **kwargs)Calls an instance method on a backend-native object.
Namespace(name)Returns a backend namespace by name.
Returns the public namespace names exposed by the active backend.
Returns the raw module of the active backend if available.
Resets the active backend to a new
TopologicCoreBackendinstance.SetBackend(backend)Sets the active Core backend.
Aperture
Cell
CellComplex
CellComplexUtility
CellUtility
Cluster
ClusterUtility
Context
Dictionary
DoubleAttribute
Edge
EdgeUtility
Face
FaceUtility
Graph
GraphUtility
IntAttribute
ListAttribute
Shell
ShellUtility
StringAttribute
Topology
TopologyUtility
Vertex
VertexUtility
Wire
WireUtility
- Aperture = <Core namespace proxy: Aperture>
- static Backend() Any
Returns the active backend. If none has been set, creates the default
TopologicCoreBackend.
- static Call(namespace: str, attribute: str, *args, **kwargs) Any
Dynamically calls a method or callable attribute on a backend namespace.
- Cell = <Core namespace proxy: Cell>
- CellComplex = <Core namespace proxy: CellComplex>
- CellComplexUtility = <Core namespace proxy: CellComplexUtility>
- CellUtility = <Core namespace proxy: CellUtility>
- Cluster = <Core namespace proxy: Cluster>
- ClusterUtility = <Core namespace proxy: ClusterUtility>
- Context = <Core namespace proxy: Context>
- Dictionary = <Core namespace proxy: Dictionary>
- DoubleAttribute = <Core namespace proxy: DoubleAttribute>
- Edge = <Core namespace proxy: Edge>
- EdgeUtility = <Core namespace proxy: EdgeUtility>
- Face = <Core namespace proxy: Face>
- FaceUtility = <Core namespace proxy: FaceUtility>
- Graph = <Core namespace proxy: Graph>
- GraphUtility = <Core namespace proxy: GraphUtility>
- static HasAttribute(namespace: str, attribute: str) bool
Returns True if the active backend namespace exposes the requested attribute.
- static HasNamespace(name: str) bool
Returns True if the active backend exposes the requested namespace.
- static InstanceAttribute(obj, attributeName: str)
Returns an instance attribute from a backend-native object.
- static InstanceCall(obj, methodName: str, *args, **kwargs)
Calls an instance method on a backend-native object.
- IntAttribute = <Core namespace proxy: IntAttribute>
- ListAttribute = <Core namespace proxy: ListAttribute>
- static Namespace(name: str) Any
Returns a backend namespace by name.
- static Namespaces() List[str]
Returns the public namespace names exposed by the active backend.
- static RawModule() Any
Returns the raw module of the active backend if available.
- static ResetBackend() Any
Resets the active backend to a new
TopologicCoreBackendinstance.
- static SetBackend(backend: Any) Any
Sets the active Core backend.
- Parameters
- backendobject
A backend object exposing topologic_core-like namespaces such as
Vertex,Edge,Wire,Face,TopologyUtility, etc.
- Returns
- object
The backend that was set.
- Shell = <Core namespace proxy: Shell>
- ShellUtility = <Core namespace proxy: ShellUtility>
- StringAttribute = <Core namespace proxy: StringAttribute>
- Topology = <Core namespace proxy: Topology>
- TopologyUtility = <Core namespace proxy: TopologyUtility>
- Vertex = <Core namespace proxy: Vertex>
- VertexUtility = <Core namespace proxy: VertexUtility>
- Wire = <Core namespace proxy: Wire>
- WireUtility = <Core namespace proxy: WireUtility>
- class topologicpy.Core.TopologicCoreBackend
Bases:
objectDefault backend that exposes the
topologic_corenamespaces directly.This class deliberately mirrors
topologic_coreas closely as possible. Any missing namespaces are set toNoneso that Core can fail gracefully with a clear message when accessed.Methods
Returns the public namespace names exposed by this backend.
Returns the raw imported
topologic_coremodule.- Namespaces() List[str]
Returns the public namespace names exposed by this backend.
- RawModule() Any
Returns the raw imported
topologic_coremodule.