honeybee_vtk.types module¶
An extension of VTK PolyData objects.
The purpose of creating these extensions is to add metadata to object itself. This will work fine for the purpose of exporting the geometries and finding the type for each object but it will not be useful for passing them to the exported VTK file itself.
For that purpose we should start to look into FieldData: https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/FieldData/
-
class
honeybee_vtk.types.
DataFieldInfo
(name: str = 'default', range: Tuple[float, float] = None, colorset: honeybee_vtk.legend_parameter.ColorSets = <ColorSets.ecotect: 'ecotect'>, per_face: bool = True, lower_threshold: float = None, upper_threshold: float = None)[source]¶ Bases:
object
Data info for metadata that is added to Polydata.
This object hosts information about the data that is added to polydata. This object consists name, min and max values in the data, and the color theme to be used in visualization of the data.
- Parameters
name – A string representing the name of for data.
range – A tuple of min, max values as either integers or floats. Defaults to None which will create a range of minimum and maximum values in the data.
colorset – A ColorSet object that defines colors for the legend. Defaults to Ecotect colorset.
per_face – A Boolean to indicate if the data is per face or per point. In most cases except for sensor points that are loaded as sensors the data are provided per face.
lower_threshold – Lower end of the threshold range beyond which the polydata will be filtered. If None, the lower threshold will be infinite. Defaults to None.
upper_threshold – Upper end of the threshold range beyond which the polydata will be filtered. If None, the upper threshold will be infinite. Defaults to None.
-
property
legend_parameter
¶ Legend associated with the DataFieldInfo object.
-
property
lower_threshold
¶ Lower threshold value.
-
property
range
¶ Range is a tuple of minimum and maximum values.
If these minimum and maximum values are not provided, they are calculated automatically. In such a case, the minimum and maximum values in the data are used.
-
property
upper_threshold
¶ Upper threshold value.
-
class
honeybee_vtk.types.
DataSetNames
(value)[source]¶ Bases:
enum.Enum
Valid ModelDataset names.
-
airboundary
= 'airboundary'¶
-
aperture
= 'aperture'¶
-
door
= 'door'¶
-
floor
= 'floor'¶
-
grid
= 'grid'¶
-
roofceiling
= 'roofceiling'¶
-
shade
= 'shade'¶
-
wall
= 'wall'¶
-
-
class
honeybee_vtk.types.
ImageTypes
(value)[source]¶ Bases:
enum.Enum
Supported image types.
-
bmp
= 'bmp'¶
-
jpg
= 'jpg'¶
-
png
= 'png'¶
-
pnm
= 'pnm'¶
-
ps
= 'ps'¶
-
tiff
= 'tiff'¶
-
-
class
honeybee_vtk.types.
JoinedPolyData
[source]¶ Bases:
vtkmodules.vtkFiltersCore.vtkAppendPolyData
A thin wrapper around vtk.vtkAppendPolyData.
-
class
DesiredOutputPrecision
¶ Bases:
int
-
bit_length
()¶ Number of bits necessary to represent self in binary.
>>> bin(37) '0b100101' >>> (37).bit_length() 6
-
conjugate
()¶ Returns self, the complex conjugate of any int.
-
from_bytes
(byteorder, *, signed=False)¶ Return the integer represented by the given array of bytes.
- bytes
Holds the array of bytes to convert. The argument must either support the buffer protocol or be an iterable object producing bytes. Bytes and bytearray are examples of built-in objects that support the buffer protocol.
- byteorder
The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.
- signed
Indicates whether two’s complement is used to represent the integer.
-
to_bytes
(length, byteorder, *, signed=False)¶ Return an array of bytes representing an integer.
- length
Length of bytes object to use. An OverflowError is raised if the integer is not representable with the given number of bytes.
- byteorder
The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.
- signed
Determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.
-
denominator
¶ the denominator of a rational number in lowest terms
-
imag
¶ the imaginary part of a complex number
-
numerator
¶ the numerator of a rational number in lowest terms
-
real
¶ the real part of a complex number
-
-
append
(polydata: honeybee_vtk.types.PolyData) → None[source]¶ Append a new polydata to current data.
-
extend
(polydata: List[honeybee_vtk.types.PolyData]) → None[source]¶ Extend a list of new polydata to current data.
-
classmethod
from_polydata
(polydata: List[honeybee_vtk.types.PolyData])[source]¶ Join several polygonal datasets.
This function merges several polygonal datasets into a single polygonal datasets. All geometry is extracted and appended, but point and cell attributes (i.e., scalars, vectors, normals) are extracted and appended only if all datasets have the point and/or cell attributes available. (For example, if one dataset has point scalars but another does not, point scalars will not be appended.)
-
to_folder
(target_folder='.')[source]¶ Write data to a folder with a JSON meta file.
This method generates a folder that includes a JSON meta file along with all the binary arrays written as standalone binary files.
The generated format can be used by vtk.js using the reader below https://kitware.github.io/vtk-js/examples/HttpDataSetReader.html
- Parameters
target_folder – Path to target folder. Default: .
-
to_vtk
(target_folder, name, writer)[source]¶ Write to a VTK file.
The file extension will be set to vtk for ASCII format and vtp for binary format.
-
AbortExecuteOff
¶ virtual void AbortExecuteOff()
- Type
C++
-
AbortExecuteOn
¶ virtual void AbortExecuteOn()
- Type
C++
-
AddInputConnection
(self, input: vtkAlgorithmOutput) → None¶ virtual void AddInputConnection(vtkAlgorithmOutput *input)
Add a connection to the given input port index. See SetInputConnection() for details on input connections. This method is the complement to RemoveInputConnection() in that it adds only the connection specified without affecting other connections. Typical usage is
filter2->AddInputConnection(0, filter1->GetOutputPort(0)).
- Type
C++
-
AddInputData
¶ void AddInputData(vtkPolyData *)
Add a dataset to the list of data to append. Should not be used when UserManagedInputs is true, use SetInputByNumber instead.
- Type
C++
-
AddInputDataObject
(self, data: vtkDataObject) → None¶ virtual void AddInputDataObject(vtkDataObject *data)
Add the data-object as an input to this given port. This will add a new input connection on the specified port without affecting any existing connections on the same input port.
- Type
C++
-
AddObserver
¶ - unsigned long AddObserver(const char* event,
vtkCommand* command, float priority=0.0f)
Add an event callback command(o:vtkObject, event:int) for an event type. Returns a handle that can be used with RemoveEvent(event:int).
- Type
C++
-
BreakOnError
¶ static void BreakOnError()
This method is called when vtkErrorMacro executes. It allows the debugger to break on error.
- Type
C++
-
CAN_HANDLE_PIECE_REQUEST
¶ static vtkInformationIntegerKey *CAN_HANDLE_PIECE_REQUEST()
Key that tells the pipeline that a particular algorithm can or cannot handle piece request. If a filter cannot handle piece requests and is asked for a piece, the executive will flag an error. If a structured data source cannot handle piece requests but can produce sub-extents (CAN_PRODUCE_SUB_EXTENT), the executive will use an extent translator to split the extent into pieces. Otherwise, if a source cannot handle piece requests, the executive will ask for the whole data for piece 0 and not execute the source for other pieces.ingroup InformationKeys
- Type
C++
-
CAN_PRODUCE_SUB_EXTENT
¶ static vtkInformationIntegerKey *CAN_PRODUCE_SUB_EXTENT()
This key tells the executive that a particular output port is capable of producing an arbitrary subextent of the whole extent. Many image sources and readers fall into this category but some such as the legacy structured data readers cannot support this feature.ingroup InformationKeys
- Type
C++
-
ConvertTotalInputToPortConnection
¶ - int,
conn:int) -> None
- C++: void ConvertTotalInputToPortConnection(int ind, int &port,
int &conn)
Convenience routine to convert from a linear ordering of input connections to a port/connection pair.
- Type
ConvertTotalInputToPortConnection(self, ind
- Type
int, port
-
DEFAULT_PRECISION
= 2¶
-
DOUBLE_PRECISION
= 1¶
-
DebugOff
¶ virtual void DebugOff()
Turn debugging output off.
- Type
C++
-
DebugOn
¶ virtual void DebugOn()
Turn debugging output on.
- Type
C++
-
FastDelete
¶ virtual void FastDelete()
Delete a reference to this object. This version will not invoke garbage collection and can potentially leak the object if it is part of a reference loop. Use this method only when it is known that the object has another reference and would not be collected if a full garbage collection check were done.
- Type
C++
-
GetAbortExecute
¶ virtual vtkTypeBool GetAbortExecute()
- Type
C++
-
GetAddressAsString
¶ Get address of C++ object in format ‘Addr=%p’ after casting to the specified type. This method is obsolete, you can get the same information from o.__this__.
-
GetDebug
¶ bool GetDebug()
Get the value of the debug flag.
- Type
C++
-
GetErrorCode
¶ virtual unsigned long GetErrorCode()
The error code contains a possible error that occurred while reading or writing the file.
- Type
C++
-
GetExecutive
¶ vtkExecutive *GetExecutive()
Get this algorithm’s executive. If it has none, a default executive will be created.
- Type
C++
-
GetGlobalWarningDisplay
¶ static int GetGlobalWarningDisplay()
- Type
C++
-
GetInformation
¶ virtual vtkInformation *GetInformation()
Set/Get the information object associated with this algorithm.
- Type
C++
-
GetInputAlgorithm
(self, port: int, index: int) → vtkAlgorithm¶ vtkAlgorithm *GetInputAlgorithm(int port, int index) GetInputAlgorithm(self) -> vtkAlgorithm C++: vtkAlgorithm *GetInputAlgorithm()
Returns the algorithm and the output port index of that algorithm connected to a port-index pair.
- Type
C++
-
GetInputArrayInformation
¶ vtkInformation *GetInputArrayInformation(int idx)
Get the info object for the specified input array to this algorithm
- Type
C++
-
GetInputConnection
¶ -> vtkAlgorithmOutput C++: vtkAlgorithmOutput *GetInputConnection(int port, int index)
Get the algorithm output port connected to an input port.
-
GetInputDataObject
¶ -> vtkDataObject C++: vtkDataObject *GetInputDataObject(int port, int connection)
Get the data object that will contain the algorithm input for the given port and given connection.
-
GetInputExecutive
(self) → vtkExecutive¶ vtkExecutive *GetInputExecutive()
Returns the executive associated with a particular input connection.
- Type
C++
-
GetInputInformation
(self) → vtkInformation¶ vtkInformation *GetInputInformation()
Return the information object that is associated with a particular input connection. This can be used to get meta-data coming from the REQUEST_INFORMATION pass and set requests for the REQUEST_UPDATE_EXTENT pass. NOTE: Do not use this in any of the pipeline passes. Use the information objects passed as arguments instead.
- Type
C++
-
GetInputPortInformation
¶ vtkInformation *GetInputPortInformation(int port)
Get the information object associated with an input port. There is one input port per kind of input to the algorithm. Each input port tells executives what kind of data and downstream requests this algorithm can handle for that input.
- Type
C++
-
GetIsInMemkind
¶ bool GetIsInMemkind()
A local state flag that remembers whether this object lives in the normal or extended memory space.
- Type
C++
-
GetMTime
¶ virtual vtkMTimeType GetMTime()
Return this object’s modified time.
- Type
C++
-
GetNumberOfGenerationsFromBase
¶ - vtkIdType GetNumberOfGenerationsFromBase(const char *type)
override;
Given the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). If the named class is not in this class’s inheritance tree, return a negative value. Valid responses will always be nonnegative. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
- Type
C++
-
GetNumberOfGenerationsFromBaseType
¶ - static vtkIdType GetNumberOfGenerationsFromBaseType(
const char *type)
Given a the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). If the named class is not in this class’s inheritance tree, return a negative value. Valid responses will always be nonnegative. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
- Type
C++
-
GetNumberOfInputConnections
¶ int GetNumberOfInputConnections(int port)
Get the number of inputs currently connected to a port.
- Type
C++
-
GetNumberOfInputPorts
¶ int GetNumberOfInputPorts()
Get the number of input ports used by the algorithm.
- Type
C++
-
GetNumberOfOutputPorts
¶ int GetNumberOfOutputPorts()
Get the number of output ports provided by the algorithm.
- Type
C++
-
GetOutput
(self, __a: int) → vtkPolyData¶ vtkPolyData *GetOutput(int)
Get the output data object for a port on this algorithm.
- Type
C++
-
GetOutputDataObject
¶ vtkDataObject *GetOutputDataObject(int port)
Get the data object that will contain the algorithm output for the given port.
- Type
C++
-
GetOutputInformation
¶ vtkInformation *GetOutputInformation(int port)
Return the information object that is associated with a particular output port. This can be used to set meta-data coming during the REQUEST_INFORMATION. NOTE: Do not use this in any of the pipeline passes. Use the information objects passed as arguments instead.
- Type
C++
-
GetOutputPointsPrecision
¶ virtual int GetOutputPointsPrecision()
- Type
C++
-
GetOutputPort
(self) → vtkAlgorithmOutput¶ vtkAlgorithmOutput *GetOutputPort()
Get a proxy object corresponding to the given output port of this algorithm. The proxy object can be passed to another algorithm’s SetInputConnection(), AddInputConnection(), and RemoveInputConnection() methods to modify pipeline connectivity.
- Type
C++
-
GetOutputPortInformation
¶ vtkInformation *GetOutputPortInformation(int port)
Get the information object associated with an output port. There is one output port per output from the algorithm. Each output port tells executives what kind of upstream requests this algorithm can handle for that output.
- Type
C++
-
GetParallelStreaming
¶ virtual vtkTypeBool GetParallelStreaming()
- Type
C++
-
GetProgress
¶ virtual double GetProgress()
Get the execution progress of a process object.
- Type
C++
-
GetProgressScale
¶ virtual double GetProgressScale()
- Type
C++
-
GetProgressShift
¶ virtual double GetProgressShift()
- Type
C++
-
GetReferenceCount
¶ int GetReferenceCount()
Return the current reference count of this object.
- Type
C++
-
GetReleaseDataFlag
¶ virtual int GetReleaseDataFlag()
- Type
C++
-
GetTotalNumberOfInputConnections
¶ int GetTotalNumberOfInputConnections()
Get the total number of inputs for this algorithm
- Type
C++
-
GetUpdateExtent
(self, port: int)¶ int *GetUpdateExtent(int port) GetUpdateExtent(self, x0:int, x1:int, y0:int, y1:int, z0:int,
z1:int) -> None
- C++: void GetUpdateExtent(int &x0, int &x1, int &y0, int &y1,
int &z0, int &z1)
- GetUpdateExtent(self, port:int, x0:int, x1:int, y0:int, y1:int,
z0:int, z1:int) -> None
- C++: void GetUpdateExtent(int port, int &x0, int &x1, int &y0,
int &y1, int &z0, int &z1)
- GetUpdateExtent(self, extent:[int, int, int, int, int, int])
-> None
C++: void GetUpdateExtent(int extent[6]) GetUpdateExtent(self, port:int, extent:[int, int, int, int, int,
int]) -> None
C++: void GetUpdateExtent(int port, int extent[6])
These functions return the update extent for output ports that use 3D extents. Where port is not specified, it is assumed to be 0.
- Type
C++
-
GetUpdateGhostLevel
(self, port: int) → int¶ int GetUpdateGhostLevel(int port)
- Type
C++
-
GetUpdateNumberOfPieces
(self, port: int) → int¶ int GetUpdateNumberOfPieces(int port)
- Type
C++
-
GetUpdatePiece
(self, port: int) → int¶ int GetUpdatePiece(int port)
These functions return the update extent for output ports that use piece extents. Where port is not specified, it is assumed to be 0.
- Type
C++
-
GetUserManagedInputs
¶ virtual vtkTypeBool GetUserManagedInputs()
- Type
C++
-
GetUsingMemkind
¶ static bool GetUsingMemkind()
A global state flag that controls whether vtkObjects are constructed in the usual way (the default) or within the extended memory space.
- Type
C++
-
GlobalWarningDisplayOff
¶ static void GlobalWarningDisplayOff()
- Type
C++
-
GlobalWarningDisplayOn
¶ static void GlobalWarningDisplayOn()
- Type
C++
-
HasExecutive
¶ int HasExecutive()
Check whether this algorithm has an assigned executive. This will NOT create a default executive.
- Type
C++
-
HasObserver
(self, event: str, __b: vtkCommand) → int¶ vtkTypeBool HasObserver(const char *event, vtkCommand *) HasObserver(self, event:int) -> int C++: vtkTypeBool HasObserver(unsigned long event) HasObserver(self, event:str) -> int C++: vtkTypeBool HasObserver(const char *event)
- Type
C++
-
INPUT_ARRAYS_TO_PROCESS
¶ - static vtkInformationInformationVectorKey *INPUT_ARRAYS_TO_PROCESS(
)
ingroup InformationKeys
- Type
C++
-
INPUT_CONNECTION
¶ static vtkInformationIntegerKey *INPUT_CONNECTION()
ingroup InformationKeys
- Type
C++
-
INPUT_IS_OPTIONAL
¶ static vtkInformationIntegerKey *INPUT_IS_OPTIONAL()
Keys used to specify input port requirements.ingroup InformationKeys
- Type
C++
-
INPUT_IS_REPEATABLE
¶ static vtkInformationIntegerKey *INPUT_IS_REPEATABLE()
ingroup InformationKeys
- Type
C++
-
INPUT_REQUIRED_DATA_TYPE
¶ - static vtkInformationStringVectorKey *INPUT_REQUIRED_DATA_TYPE(
)
ingroup InformationKeys
- Type
C++
-
INPUT_REQUIRED_FIELDS
¶ - static vtkInformationInformationVectorKey *INPUT_REQUIRED_FIELDS(
)
ingroup InformationKeys
- Type
C++
-
InitializeObjectBase
¶ void InitializeObjectBase()
- Type
C++
-
InvokeEvent
(self, event: str, callData: Any) → int¶ int InvokeEvent(const char* event, void* callData) InvokeEvent(self, event:int) -> int C++: int InvokeEvent(unsigned long event) InvokeEvent(self, event:str) -> int C++: int InvokeEvent(const char* event)
This method invokes an event and returns whether the event was aborted or not. If the event was aborted, the return value is 1, otherwise it is 0.
- Type
C++
-
IsA
¶ vtkTypeBool IsA(const char *type) override;
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
- Type
C++
-
IsTypeOf
¶ static vtkTypeBool IsTypeOf(const char *type)
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
- Type
C++
-
Modified
¶ virtual void Modified()
Update the modification time for this object. Many filters rely on the modification time to determine if they need to recompute their data. The modification time is a unique monotonically increasing unsigned long integer.
- Type
C++
-
ModifyRequest
¶ virtual int ModifyRequest(vtkInformation *request, int when)
This method gives the algorithm a chance to modify the contents of a request before or after (specified in the when argument) it is forwarded. The default implementation is empty. Returns 1 on success, 0 on failure. When can be either vtkExecutive::BeforeForward or vtkExecutive::AfterForward.
- Type
C++
-
ParallelStreamingOff
¶ virtual void ParallelStreamingOff()
- Type
C++
-
ParallelStreamingOn
¶ virtual void ParallelStreamingOn()
- Type
C++
-
ProcessRequest
¶ - vtkCollection,
outInfo:vtkInformationVector) -> int
- C++: vtkTypeBool ProcessRequest(vtkInformation *request,
Version of ProcessRequest() that is wrapped. This converts the collection to an array and calls the other version.
- Type
ProcessRequest(self, request
- Type
vtkInformation, inInfo
-
PropagateUpdateExtent
¶ virtual void PropagateUpdateExtent()
Propagate meta-data upstream.
- Type
C++
-
ReleaseDataFlagOff
¶ void ReleaseDataFlagOff()
- Type
C++
-
ReleaseDataFlagOn
¶ void ReleaseDataFlagOn()
- Type
C++
-
RemoveAllInputConnections
¶ virtual void RemoveAllInputConnections(int port)
Removes all input connections.
- Type
C++
-
RemoveAllInputs
¶ void RemoveAllInputs()
Remove all the input data.
- Type
C++
-
RemoveAllObservers
¶ void RemoveAllObservers()
- Type
C++
-
RemoveInputConnection
(self, port: int, idx: int) → None¶ virtual void RemoveInputConnection(int port, int idx)
Remove a connection from the given input port index. See SetInputConnection() for details on input connection. This method is the complement to AddInputConnection() in that it removes only the connection specified without affecting other connections. Typical usage is
filter2->RemoveInputConnection(0, filter1->GetOutputPort(0)).
- Type
C++
-
RemoveInputData
¶ void RemoveInputData(vtkPolyData *)
Remove a dataset from the list of data to append. Should not be used when UserManagedInputs is true, use SetInputByNumber (nullptr) instead.
- Type
C++
-
RemoveObserver
(self, tag: int) → None¶ void RemoveObserver(unsigned long tag)
- Type
C++
-
RemoveObservers
(self, event: str, __b: vtkCommand) → None¶ void RemoveObservers(const char *event, vtkCommand *) RemoveObservers(self, event:int) -> None C++: void RemoveObservers(unsigned long event) RemoveObservers(self, event:str) -> None C++: void RemoveObservers(const char *event)
- Type
C++
-
SINGLE_PRECISION
= 0¶
-
SetAbortExecute
¶ virtual void SetAbortExecute(vtkTypeBool _arg)
Set/Get the AbortExecute flag for the process object. Process objects may handle premature termination of execution in different ways.
- Type
C++
-
SetDebug
¶ void SetDebug(bool debugFlag)
Set the value of the debug flag. A true value turns debugging on.
- Type
C++
-
SetDefaultExecutivePrototype
¶ static void SetDefaultExecutivePrototype(vtkExecutive *proto)
If the DefaultExecutivePrototype is set, a copy of it is created in CreateDefaultExecutive() using NewInstance().
- Type
C++
-
SetExecutive
¶ virtual void SetExecutive(vtkExecutive *executive)
Set this algorithm’s executive. This algorithm is removed from any executive to which it has previously been assigned and then assigned to the given executive.
- Type
C++
-
SetGlobalWarningDisplay
¶ static void SetGlobalWarningDisplay(int val)
This is a global flag that controls whether any debug, warning or error messages are displayed.
- Type
C++
-
SetInputArrayToProcess
¶ - virtual void SetInputArrayToProcess(int idx,
vtkInformation *info)
- SetInputArrayToProcess(self, idx:int, port:int, connection:int,
fieldAssociation:str, attributeTypeorName:str) -> None
- C++: virtual void SetInputArrayToProcess(int idx, int port,
int connection, const char *fieldAssociation, const char *attributeTypeorName)
Set the input data arrays that this algorithm will process. Specifically the idx array that this algorithm will process (starting from 0) is the array on port, connection with the specified association and name or attribute type (such as SCALARS). The fieldAssociation refers to which field in the data object the array is stored. See vtkDataObject::FieldAssociations for detail.
- Type
C++
-
SetInputConnection
(self, input: vtkAlgorithmOutput) → None¶ virtual void SetInputConnection(vtkAlgorithmOutput *input)
Set the connection for the given input port index. Each input port of a filter has a specific purpose. A port may have zero or more connections and the required number is specified by each filter. Setting the connection with this method removes all other connections from the port. To add more than one connection use AddInputConnection().
The input for the connection is the output port of another
filter, which is obtained with GetOutputPort(). Typical usage is
filter2->SetInputConnection(0, filter1->GetOutputPort(0)).
- Type
C++
-
SetInputConnectionByNumber
¶ - int,
input:vtkAlgorithmOutput) -> None
- C++: void SetInputConnectionByNumber(int num,
vtkAlgorithmOutput *input)
- Type
SetInputConnectionByNumber(self, num
-
SetInputData
(self, __a: int, __b: vtkDataObject) → None¶ void SetInputData(int, vtkDataObject *)
Assign a data object as input. Note that this method does not establish a pipeline connection. Use SetInputConnection() to setup a pipeline connection.
- Type
C++
-
SetInputDataObject
(self, data: vtkDataObject) → None¶ virtual void SetInputDataObject(vtkDataObject *data)
Sets the data-object as an input on the given port index. Setting the input with this method removes all other connections from the port. Internally, this method creates a vtkTrivialProducer instance and sets that as the input-connection for the given port. It is safe to call this method repeatedly with the same input data object. The MTime of the vtkAlgorithm will not change unless the data object changed.
- Type
C++
-
SetMemkindDirectory
¶ static void SetMemkindDirectory(const char *directoryname)
The name of a directory, ideally mounted -o dax, to memory map an extended memory space within. This must be called before any objects are constructed in the extended space. It can not be changed once setup.
- Type
C++
-
SetNumberOfInputs
¶ void SetNumberOfInputs(int num)
Directly set(allocate) number of inputs, should only be used when UserManagedInputs is true.
- Type
C++
-
SetOutputPointsPrecision
¶ virtual void SetOutputPointsPrecision(int _arg)
Set/get the desired precision for the output types. See the documentation for the vtkAlgorithm::DesiredOutputPrecision enum for an explanation of the available precision settings.
- Type
C++
-
SetParallelStreaming
¶ virtual void SetParallelStreaming(vtkTypeBool _arg)
ParallelStreaming is for a particular application. It causes this filter to ask for a different piece from each of its inputs. If all the inputs are the same, then the output of this append filter is the whole dataset pieced back together. Duplicate points are create along the seams. The purpose of this feature is to get data parallelism at a course scale. Each of the inputs can be generated in a different process at the same time.
- Type
C++
-
SetProgress
¶ void SetProgress(double)
SetProgress is deprecated. Subclasses should use UpdateProgress to report progress updates.
- Type
C++
-
SetProgressObserver
¶ void SetProgressObserver(vtkProgressObserver *)
If an ProgressObserver is set, the algorithm will report progress through it rather than directly. This means that it will call UpdateProgress() on the ProgressObserver rather than itself report it and set progress. This is most useful in situations where multiple threads are executing an algorithm at the same time and want to handle progress locally.
- Type
C++
-
SetProgressShiftScale
¶ void SetProgressShiftScale(double shift, double scale)
Specify the shift and scale values to use to apply to the progress amount when UpdateProgress is called. By default shift is set to 0, and scale is set to 1.0. This is useful when the vtkAlgorithm instance is used as an internal algorithm to solve only a part of a whole problem.
If calling on a internal vtkAlgorithm, make sure you take into consideration that values set of the outer vtkAlgorithm as well since the outer vtkAlgorithm itself may be nested in another algorithm.
ote SetProgressShiftScale does not modify the MTime of the algorithm.
- Type
C++
-
SetProgressText
¶ void SetProgressText(const char *ptext)
Set the current text message associated with the progress state. This may be used by a calling process/GUI. Note: Because SetProgressText() is called from inside RequestData() it does not modify the algorithm object. Algorithms are not allowed to modify themselves from inside RequestData().
- Type
C++
-
SetReferenceCount
¶ void SetReferenceCount(int)
Sets the reference count. (This is very dangerous, use with care.)
- Type
C++
-
SetReleaseDataFlag
¶ virtual void SetReleaseDataFlag(int)
Turn release data flag on or off for all output ports.
- Type
C++
-
SetUserManagedInputs
¶ virtual void SetUserManagedInputs(vtkTypeBool _arg)
UserManagedInputs allows the user to set inputs by number instead of using the AddInput/RemoveInput functions. Calls to SetNumberOfInputs/SetInputConnectionByNumber should not be mixed with calls to AddInput/RemoveInput. By default, UserManagedInputs is false.
- Type
C++
-
UnRegister
¶ virtual void UnRegister(vtkObjectBase* o)
Decrease the reference count (release by another object). This has the same effect as invoking Delete() (i.e., it reduces the reference count by 1).
- Type
C++
-
Update
(self) → None¶ virtual void Update() Update(self, port:int, requests:vtkInformationVector) -> int C++: virtual vtkTypeBool Update(int port,
vtkInformationVector *requests)
Update(self, requests:vtkInformation) -> int C++: virtual vtkTypeBool Update(vtkInformation *requests)
Bring this algorithm’s outputs up-to-date.
- Type
C++
-
UpdateDataObject
¶ virtual void UpdateDataObject()
Create output object(s).
- Type
C++
-
UpdateExtent
¶ virtual int UpdateExtent(const int extents[6])
Convenience method to update an algorithm after passing requests to its first output port. Supports extent request.
- Type
C++
-
UpdateExtentIsEmpty
¶ -> int C++: int UpdateExtentIsEmpty(vtkInformation *pinfo,
int extentType)
This detects when the UpdateExtent will generate no data This condition is satisfied when the UpdateExtent has zero volume (0,-1,…) or the UpdateNumberOfPieces is 0. The source uses this call to determine whether to call Execute.
-
UpdateInformation
¶ virtual void UpdateInformation()
Bring the algorithm’s information up-to-date.
- Type
C++
-
UpdatePiece
¶ - int, ghostLevels:int,
extents:(int, int, int, int, int, int)=…) -> int
- C++: virtual int UpdatePiece(int piece, int numPieces,
int ghostLevels, const int extents[6]=nullptr)
Convenience method to update an algorithm after passing requests to its first output port. See documentation for Update(int port, vtkInformationVector* requests) for details. Supports piece and extent (optional) requests.
- Type
UpdatePiece(self, piece
- Type
int, numPieces
-
UpdateProgress
¶ void UpdateProgress(double amount)
Update the progress of the process object. If a ProgressMethod exists, executes it. Then set the Progress ivar to amount. The parameter amount should range between (0,1).
- Type
C++
-
UpdateTimeStep
¶ - int=-1, numPieces:int=1,
- ghostLevels:int=0, extents:(int, int, int, int, int, int)=…)
-> int
- C++: virtual int UpdateTimeStep(double time, int piece=-1,
int numPieces=1, int ghostLevels=0, const int extents[6]=nullptr)
Convenience method to update an algorithm after passing requests to its first output port. See documentation for Update(int port, vtkInformationVector* requests) for details. Supports time, piece (optional) and extent (optional) requests.
- Type
UpdateTimeStep(self, time
- Type
float, piece
-
UpdateWholeExtent
¶ virtual void UpdateWholeExtent()
Bring this algorithm’s outputs up-to-date.
- Type
C++
-
UserManagedInputsOff
¶ virtual void UserManagedInputsOff()
- Type
C++
-
UserManagedInputsOn
¶ virtual void UserManagedInputsOn()
- Type
C++
-
class
-
class
honeybee_vtk.types.
ModelDataSet
(name, data: List[honeybee_vtk.types.PolyData] = None, color: ladybug.color.Color = None, display_mode: honeybee_vtk.vtkjs.schema.DisplayMode = <DisplayMode.Shaded: 2>)[source]¶ Bases:
object
A dataset object in honeybee VTK model.
This data set holds the PolyData objects as well as representation information for those PolyData. All the objects in ModelDataSet will have the same representation.
-
add_data_fields
(data: List[List], name: str, per_face: bool = True, colors=None, data_range=None, lower_threshold: float = None, upper_threshold: float = None)[source]¶ Add data fields to PolyData objects in this dataset.
Use this method to add data like temperature or illuminance values to PolyData objects. The length of the input data should match the length of the data in DataSet.
- Parameters
data – A list of list of values. There should be a list per data in DataSet. The order of data should match the order of data in DataSet. You can use data.identifier to match the orders before assigning them to DataSet.
name – Name of data (e.g. Useful Daylight Autonomy.)
per_face – A Boolean to indicate if the data is per face or per point. In most cases except for sensor points that are loaded as sensors the data are provided per face.
colors – A Colors object that defines colors for the legend.
data_range – A list with two values for minimum and maximum values for legend parameters.
lower_threshold – Lower end of the threshold range for the data. Data beyond this threshold will be filtered. If not specified, the lower threshold will be infinite. Defaults to None.
upper_threshold – Upper end of the threshold range for the data. Data beyond this threshold will be filtered. If not specified, the upper threshold will be infinite. Defaults to None.
-
as_data_set
(url=None) → honeybee_vtk.vtkjs.schema.DataSet[source]¶ Convert to a vtkjs DataSet object.
- Parameters
url – Relative path to where PolyData information should be sourced from. By default url will be set to ModelDataSet name assuming data is dumped to a folder with the same name.
-
to_folder
(folder, sub_folder=None) → str[source]¶ Write data information to a folder.
- Parameters
folder – Target folder to write the dataset.
sub_folder – Subfolder name for this dataset. By default it will be set to the name of the dataset.
-
property
active_field_info
¶ Get information for active field info.
It will be the field info for the field that is set in color_by. If color_by is not set the first field will be used. If no field is available a default field will be generated.
-
property
color
¶ Diffuse color.
By default the dataset will be colored by this color unless color_by property is set to a dataset value.
-
property
color_by
¶ Set the field that the DataSet should colored-by when exported to vtkjs.
By default the dataset will be colored by surface color and not data fields.
-
property
display_mode
¶ Display model (AKA Representation) mode in VTK Glance viewer.
- Valid values are:
Surface / Shaded
SurfaceWithEdges
Wireframe
Points
Default is 0 for Surface mode.
-
property
edge_visibility
¶ Edge visibility.
The edges will be visible in Wireframe or SurfaceWithEdges modes.
-
property
fields_info
¶
-
property
is_empty
¶
-
property
opacity
¶ Visualization opacity.
-
-
class
honeybee_vtk.types.
PolyData
[source]¶ Bases:
vtkmodules.vtkCommonDataModel.vtkPolyData
A thin wrapper around vtk.vtkPolyData.
PolyData has additional fields for metadata information.
-
class
AttributeTypes
¶ Bases:
int
-
bit_length
()¶ Number of bits necessary to represent self in binary.
>>> bin(37) '0b100101' >>> (37).bit_length() 6
-
conjugate
()¶ Returns self, the complex conjugate of any int.
-
from_bytes
(byteorder, *, signed=False)¶ Return the integer represented by the given array of bytes.
- bytes
Holds the array of bytes to convert. The argument must either support the buffer protocol or be an iterable object producing bytes. Bytes and bytearray are examples of built-in objects that support the buffer protocol.
- byteorder
The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.
- signed
Indicates whether two’s complement is used to represent the integer.
-
to_bytes
(length, byteorder, *, signed=False)¶ Return an array of bytes representing an integer.
- length
Length of bytes object to use. An OverflowError is raised if the integer is not representable with the given number of bytes.
- byteorder
The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.
- signed
Determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.
-
denominator
¶ the denominator of a rational number in lowest terms
-
imag
¶ the imaginary part of a complex number
-
numerator
¶ the numerator of a rational number in lowest terms
-
real
¶ the real part of a complex number
-
-
class
FieldAssociations
¶ Bases:
int
-
bit_length
()¶ Number of bits necessary to represent self in binary.
>>> bin(37) '0b100101' >>> (37).bit_length() 6
-
conjugate
()¶ Returns self, the complex conjugate of any int.
-
from_bytes
(byteorder, *, signed=False)¶ Return the integer represented by the given array of bytes.
- bytes
Holds the array of bytes to convert. The argument must either support the buffer protocol or be an iterable object producing bytes. Bytes and bytearray are examples of built-in objects that support the buffer protocol.
- byteorder
The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.
- signed
Indicates whether two’s complement is used to represent the integer.
-
to_bytes
(length, byteorder, *, signed=False)¶ Return an array of bytes representing an integer.
- length
Length of bytes object to use. An OverflowError is raised if the integer is not representable with the given number of bytes.
- byteorder
The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.
- signed
Determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.
-
denominator
¶ the denominator of a rational number in lowest terms
-
imag
¶ the imaginary part of a complex number
-
numerator
¶ the numerator of a rational number in lowest terms
-
real
¶ the real part of a complex number
-
-
class
FieldDataType
¶ Bases:
int
-
bit_length
()¶ Number of bits necessary to represent self in binary.
>>> bin(37) '0b100101' >>> (37).bit_length() 6
-
conjugate
()¶ Returns self, the complex conjugate of any int.
-
from_bytes
(byteorder, *, signed=False)¶ Return the integer represented by the given array of bytes.
- bytes
Holds the array of bytes to convert. The argument must either support the buffer protocol or be an iterable object producing bytes. Bytes and bytearray are examples of built-in objects that support the buffer protocol.
- byteorder
The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.
- signed
Indicates whether two’s complement is used to represent the integer.
-
to_bytes
(length, byteorder, *, signed=False)¶ Return an array of bytes representing an integer.
- length
Length of bytes object to use. An OverflowError is raised if the integer is not representable with the given number of bytes.
- byteorder
The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.
- signed
Determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.
-
denominator
¶ the denominator of a rational number in lowest terms
-
imag
¶ the imaginary part of a complex number
-
numerator
¶ the numerator of a rational number in lowest terms
-
real
¶ the real part of a complex number
-
-
class
FieldOperations
¶ Bases:
int
-
bit_length
()¶ Number of bits necessary to represent self in binary.
>>> bin(37) '0b100101' >>> (37).bit_length() 6
-
conjugate
()¶ Returns self, the complex conjugate of any int.
-
from_bytes
(byteorder, *, signed=False)¶ Return the integer represented by the given array of bytes.
- bytes
Holds the array of bytes to convert. The argument must either support the buffer protocol or be an iterable object producing bytes. Bytes and bytearray are examples of built-in objects that support the buffer protocol.
- byteorder
The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.
- signed
Indicates whether two’s complement is used to represent the integer.
-
to_bytes
(length, byteorder, *, signed=False)¶ Return an array of bytes representing an integer.
- length
Length of bytes object to use. An OverflowError is raised if the integer is not representable with the given number of bytes.
- byteorder
The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.
- signed
Determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.
-
denominator
¶ the denominator of a rational number in lowest terms
-
imag
¶ the imaginary part of a complex number
-
numerator
¶ the numerator of a rational number in lowest terms
-
real
¶ the real part of a complex number
-
-
add_data
(data: List, name, *, cell=True, colors=None, data_range=None, lower_threshold: float = None, upper_threshold: float = None) → None[source]¶ Add a list of data to a vtkPolyData.
Data can be added to cells or points. By default the data will be added to cells.
- Parameters
data – A list of values. The length of the data should match the length of DataCells or DataPoints in Polydata.
name – Name of data (e.g. Useful Daylight Autonomy.)
cell – A Boolean to indicate if the data is per cell or per point. In most cases except for sensor points that are loaded as sensors the data are provided per cell.
colors – A Colors object that defines colors for the legend.
data_range – A list with two values for minimum and maximum values for legend parameters.
lower_threshold – Lower end of the threshold range for the data. Data beyond this threshold will be filtered. If not specified, the lower threshold will be infinite. Defaults to None.
upper_threshold – Upper end of the threshold range for the data. Data beyond this threshold will be filtered. If not specified, the upper threshold will be infinite. Defaults to None.
-
color_by
(name: str, cell=True) → None[source]¶ Set the name for active data that should be used to color PolyData.
-
to_folder
(target_folder='.')[source]¶ Write data to a folder with a JSON meta file.
This method generates a folder that includes a JSON meta file along with all the binary arrays written as standalone binary files.
The generated format can be used by vtk.js using the reader below https://kitware.github.io/vtk-js/examples/HttpDataSetReader.html
- Parameters
target_folder – Path to target folder. Default: .
-
to_vtk
(target_folder, name, writer)[source]¶ Write to a VTK file.
The file extension will be set to vtk for ASCII format and vtp for binary format.
-
AddCellReference
¶ void AddCellReference(vtkIdType cellId)
Add references to cell in cell structure. This means the links from the cell’s points to the cell are modified. Memory is not extended. Use the method ResizeCellList() to resize the link list from a point to its using cells. (This operator assumes BuildLinks() has been called.) Use this method only when the dataset is set as Editable.
- Type
C++
-
AddObserver
¶ - unsigned long AddObserver(const char* event,
vtkCommand* command, float priority=0.0f)
Add an event callback command(o:vtkObject, event:int) for an event type. Returns a handle that can be used with RemoveEvent(event:int).
- Type
C++
-
AddReferenceToCell
¶ void AddReferenceToCell(vtkIdType ptId, vtkIdType cellId)
Add a reference to a cell in a particular point’s link list. (You may also consider using AddCellReference() to add the references from all the cell’s points to the cell.) This operator does not realloc memory; use the operator ResizeCellList() to do this if necessary. Use this method only when the dataset is set as Editable.
- Type
C++
-
Allocate
¶ void Allocate(vtkIdType numCells=1000, int extSize=1000) Allocate(self, inPolyData:vtkPolyData, numCells:int=1000,
extSize:int=1000) -> None
- C++: void Allocate(vtkPolyData *inPolyData,
vtkIdType numCells=1000, int extSize=1000)
Method allocates initial storage for vertex, line, polygon, and triangle strip arrays. Use this method before the method PolyData::InsertNextCell(). (Or, provide vertex, line, polygon, and triangle strip cell arrays). extSize is no longer used.
- Type
C++
-
AllocateCellGhostArray
¶ vtkUnsignedCharArray *AllocateCellGhostArray()
Allocate ghost array for cells.
- Type
C++
-
AllocateCopy
¶ bool AllocateCopy(vtkPolyData *pd)
Preallocate memory for the internal cell arrays such that they are the same size as those in pd.
Existing data is not preserved and the number of cells is set to zero.
@return True if allocation succeeds.
- Type
C++
-
AllocateEstimate
¶ - bool AllocateEstimate(vtkIdType numCells,
vtkIdType maxCellSize)
- AllocateEstimate(self, numVerts:int, maxVertSize:int,
numLines:int, maxLineSize:int, numPolys:int, maxPolySize:int, numStrips:int, maxStripSize:int) -> bool
- C++: bool AllocateEstimate(vtkIdType numVerts,
vtkIdType maxVertSize, vtkIdType numLines, vtkIdType maxLineSize, vtkIdType numPolys, vtkIdType maxPolySize, vtkIdType numStrips, vtkIdType maxStripSize)
Preallocate memory for the internal cell arrays. Each of the internal cell arrays (verts, lines, polys, and strips) will be resized to holdnumCells cells of size maxCellSize.
Existing data is not preserved and the number of cells is set to zero.
@return True if allocation succeeds.
- Type
C++
-
AllocateExact
¶ - bool AllocateExact(vtkIdType numCells,
vtkIdType connectivitySize)
- AllocateExact(self, numVerts:int, vertConnSize:int, numLines:int,
lineConnSize:int, numPolys:int, polyConnSize:int, numStrips:int, stripConnSize:int) -> bool
- C++: bool AllocateExact(vtkIdType numVerts,
vtkIdType vertConnSize, vtkIdType numLines, vtkIdType lineConnSize, vtkIdType numPolys, vtkIdType polyConnSize, vtkIdType numStrips, vtkIdType stripConnSize)
Preallocate memory for the internal cell arrays. Each of the internal cell arrays (verts, lines, polys, and strips) will be resized to holdnumCells cells and connectivitySize pointIds.
Existing data is not preserved and the number of cells is set to zero.
@return True if allocation succeeds.
- Type
C++
-
AllocatePointGhostArray
¶ vtkUnsignedCharArray *AllocatePointGhostArray()
Allocate ghost array for points.
- Type
C++
-
AllocateProportional
¶ bool AllocateProportional(vtkPolyData *pd, double ratio)
Preallocate memory for the internal cell arrays such that they are proportional to those in pd by a factor of ratio (for instance,ratio = 2 allocates twice as many cells).
Existing data is not preserved and the number of cells is set to zero.
@return True if allocation succeeds.
- Type
C++
-
BreakOnError
¶ static void BreakOnError()
This method is called when vtkErrorMacro executes. It allows the debugger to break on error.
- Type
C++
-
BuildCellLocator
¶ void BuildCellLocator()
Build the cell locator. In a multi-threaded environment, call this method in a single thread before using FindCell().
- Type
C++
-
BuildCells
¶ void BuildCells()
Create data structure that allows random access of cells. BuildCells is expensive but necessary to make use of the faster non-virtual implementations of GetCell/GetCellPoints. One may check if cells need to be built via NeedToBuilds before invoking. Cells always need to be built/re-built after low level direct modifications to verts, lines, polys or strips cell arrays.
- Type
C++
-
BuildLinks
¶ void BuildLinks(int initialSize=0)
Create upward links from points to cells that use each point. Enables topologically complex queries. Normally the links array is allocated based on the number of points in the vtkPolyData. The optional initialSize parameter can be used to allocate a larger size initially.
- Type
C++
-
BuildLocator
¶ void BuildLocator()
- Type
C++
-
BuildPointLocator
¶ void BuildPointLocator()
Build the internal point locator . In a multi-threaded environment, call this method in a single thread before using FindCell() or FindPoint().
- Type
C++
-
CELL
= 1¶
-
CELL_DATA_FIELD
= 2¶
-
CheckAttributes
¶ int CheckAttributes()
This method checks to see if the cell and point attributes match the geometry. Many filters will crash if the number of tuples in an array is less than the number of points/cells. This method returns 1 if there is a mismatch, and 0 if everything is ok. It prints an error if an array is too short, and a warning if an array is too long.
- Type
C++
-
ComputeBounds
¶ void ComputeBounds() override;
Compute the (X, Y, Z) bounds of the data.
- Type
C++
-
ComputeCellsBounds
¶ void ComputeCellsBounds()
Compute the (X, Y, Z) bounds of the data. Note that the method only considers points that are used by cells. This is done for usability and historical reasons.
IMPORTANT
Until vtk 9.0.1, vtkPolyData::ComputeBounds() used to ignore points that do not belong to any cell. That was not consistent with other vtkPointSet subclasses and thus was error prone. See this ParaView issue https://gitlab.kitware.com/paraview/paraview/-/issues/20354 Now it defers to vtkPointSet::ComputeBounds() so vtkPolyData::GetBounds() may not return the same bounds as before. This behavior is probably the one you want when using bounds.
The previous behavior is still availble through vtkPolyData::ComputeCellsBounds() and vtkPolyData::GetCellsBounds(). This is mainly used for rendering purpose.
- Type
C++
-
CopyAttributes
¶ virtual void CopyAttributes(vtkDataSet *ds)
Copy the attributes associated with the specified dataset to this instance of vtkDataSet. THIS METHOD IS NOT THREAD SAFE.
- Type
C++
-
CopyCells
¶ - vtkIdList,
locator:vtkIncrementalPointLocator=…) -> None
- C++: void CopyCells(vtkPolyData *pd, vtkIdList *idList,
vtkIncrementalPointLocator *locator=nullptr)
Copy cells listed in idList from pd, including points, point data, and cell data. This method assumes that point and cell data have been allocated. If you pass in a point locator, then the points won’t be duplicated in the output. This requires the use of an incremental point locator.
- Type
CopyCells(self, pd
- Type
vtkPolyData, idList
-
CopyInformationFromPipeline
¶ - virtual void CopyInformationFromPipeline(
vtkInformation *info)
Copy from the pipeline information to the data object’s own information. Called right before the main execution pass.
- Type
C++
-
CopyInformationToPipeline
¶ virtual void CopyInformationToPipeline(vtkInformation *info)
Copy information from this data object to the pipeline information. This is used by the vtkTrivialProducer that is created when someone calls SetInputData() to connect a data object to a pipeline.
- Type
C++
-
CopyStructure
¶ void CopyStructure(vtkDataSet *ds) override;
Copy the geometric and topological structure of an input poly data object.
- Type
C++
-
Crop
¶ virtual void Crop(const int *updateExtent)
This method crops the data object (if necessary) so that the extent matches the update extent.
- Type
C++
-
DATA_NUMBER_OF_GHOST_LEVELS
¶ static vtkInformationIntegerKey *DATA_NUMBER_OF_GHOST_LEVELS( )
- Type
C++
-
DATA_OBJECT_FIELD
= 0¶
-
DataHasBeenGenerated
¶ void DataHasBeenGenerated()
This method is called by the source when it executes to generate data. It is sort of the opposite of ReleaseData. It sets the DataReleased flag to 0, and sets a new UpdateTime.
- Type
C++
-
DebugOff
¶ virtual void DebugOff()
Turn debugging output off.
- Type
C++
-
DebugOn
¶ virtual void DebugOn()
Turn debugging output on.
- Type
C++
-
DeleteCell
¶ void DeleteCell(vtkIdType cellId)
- Type
C++
-
DeleteCells
¶ void DeleteCells()
Release data structure that allows random access of the cells. This must be done before a 2nd call to BuildLinks(). DeleteCells implicitly deletes the links as well since they are no longer valid.
- Type
C++
-
DeleteLinks
¶ void DeleteLinks()
Release the upward links from point to cells that use each point.
- Type
C++
-
DeletePoint
¶ void DeletePoint(vtkIdType ptId)
Mark a point/cell as deleted from this vtkPolyData. Use this method only when the dataset is set as Editable.
- Type
C++
-
EDGE
= 5¶
-
ERR_INCORRECT_FIELD
= -3¶
-
ERR_NON_MANIFOLD_STAR
= -2¶
-
ERR_NO_SUCH_FIELD
= -4¶
-
EditableOff
¶ virtual void EditableOff()
- Type
C++
-
EditableOn
¶ virtual void EditableOn()
- Type
C++
-
FIELD
= 2¶
-
FIELD_ASSOCIATION_CELLS
= 1¶
-
FIELD_ASSOCIATION_EDGES
= 5¶
-
FIELD_ASSOCIATION_NONE
= 2¶
-
FIELD_ASSOCIATION_POINTS
= 0¶
-
FIELD_ASSOCIATION_POINTS_THEN_CELLS
= 3¶
-
FIELD_ASSOCIATION_ROWS
= 6¶
-
FIELD_ASSOCIATION_VERTICES
= 4¶
-
FIELD_OPERATION_MODIFIED
= 2¶
-
FIELD_OPERATION_PRESERVED
= 0¶
-
FIELD_OPERATION_REINTERPOLATED
= 1¶
-
FIELD_OPERATION_REMOVED
= 3¶
-
FastDelete
¶ virtual void FastDelete()
Delete a reference to this object. This version will not invoke garbage collection and can potentially leak the object if it is part of a reference loop. Use this method only when it is known that the object has another reference and would not be collected if a full garbage collection check were done.
- Type
C++
-
FindAndGetCell
¶ - vtkCell,
cellId:int, tol2:float, subId:int, pcoords:[float, float, float], weights:[float, …]) -> vtkCell
- C++: virtual vtkCell *FindAndGetCell(double x[3], vtkCell *cell,
vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights)
Locate the cell that contains a point and return the cell. Also returns the subcell id, parametric coordinates and weights for subsequent interpolation. This method combines the derived class methods int FindCell and vtkCell *GetCell. Derived classes may provide a more efficient implementation. See for example vtkStructuredPoints. THIS METHOD IS NOT THREAD SAFE.
- Type
FindAndGetCell(self, x
- Type
[float, float, float], cell
-
FindCell
¶ - vtkCell, cellId:int,
tol2:float, subId:int, pcoords:[float, float, float], weights:[float, …]) -> int
- C++: vtkIdType FindCell(double x[3], vtkCell *cell,
vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights) override;
- FindCell(self, x:[float, float, float], cell:vtkCell,
gencell:vtkGenericCell, cellId:int, tol2:float, subId:int, pcoords:[float, float, float], weights:[float, …]) -> int
- C++: vtkIdType FindCell(double x[3], vtkCell *cell,
vtkGenericCell *gencell, vtkIdType cellId, double tol2, int &subId, double pcoords[3], double *weights) override;
Locate cell based on global coordinate x and tolerance squared. If cell and cellId is non-nullptr, then search starts from this cell and looks at immediate neighbors. Returns cellId >= 0 if inside, < 0 otherwise. The parametric coordinates are provided in pcoords[3]. The interpolation weights are returned in weights[]. (The number of weights is equal to the number of points in the found cell). Tolerance is used to control how close the point is to be considered “in” the cell. THIS METHOD IS NOT THREAD SAFE.
- Type
FindCell(self, x
- Type
[float, float, float], cell
-
FindPoint
(self, x: float, y: float, z: float) → int¶ vtkIdType FindPoint(double x, double y, double z)
- Type
C++
-
GenerateGhostArray
¶ -> None C++: virtual void GenerateGhostArray(int zeroExt[6]) GenerateGhostArray(self, zeroExt:[int, int, int, int, int, int],
cellOnly:bool) -> None
- C++: virtual void GenerateGhostArray(int zeroExt[6],
bool cellOnly)
Normally called by pipeline executives or algorithms only. This method computes the ghost arrays for a given dataset. The zeroExt argument specifies the extent of the region which ghost type = 0.
-
GetActiveFieldInformation
¶ - vtkInformation,
fieldAssociation:int, attributeType:int) -> vtkInformation
- C++: static vtkInformation *GetActiveFieldInformation(
vtkInformation *info, int fieldAssociation, int attributeType)
Return the information object within the input information object’s field data corresponding to the specified association (FIELD_ASSOCIATION_POINTS or FIELD_ASSOCIATION_CELLS) and attribute (SCALARS, VECTORS, NORMALS, TCOORDS, or TENSORS)
- Type
GetActiveFieldInformation(info
-
GetActualMemorySize
¶ unsigned long GetActualMemorySize() override;
Return the actual size of the data in kibibytes (1024 bytes). This number is valid only after the pipeline has updated. The memory size returned is guaranteed to be greater than or equal to the memory required to represent the data (e.g., extra space in arrays, etc. are not included in the return value). THIS METHOD IS THREAD SAFE.
- Type
C++
-
GetAddressAsString
¶ Get address of C++ object in format ‘Addr=%p’ after casting to the specified type. This method is obsolete, you can get the same information from o.__this__.
-
GetAssociationTypeAsString
¶ - static const char *GetAssociationTypeAsString(
int associationType)
Given an integer association type, this static method returns a string type for the attribute (i.e. associationType = 0: returns “Points”).
- Type
C++
-
GetAssociationTypeFromString
¶ - static int GetAssociationTypeFromString(
const char *associationName)
Given a string association name, this static method returns an integer association type for the attribute (i.e. associationName = “Points”: returns 0).
- Type
C++
-
GetAttributeTypeForArray
¶ virtual int GetAttributeTypeForArray(vtkAbstractArray *arr)
Retrieves the attribute type that an array came from. This is useful for obtaining which attribute type a input array to an algorithm came from (retrieved from GetInputAbstractArrayToProcesss).
- Type
C++
-
GetAttributes
¶ virtual vtkDataSetAttributes *GetAttributes(int type)
Returns the attributes of the data object of the specified attribute type. The type may be: POINT - Defined in vtkDataSet subclasses. CELL - Defined in vtkDataSet subclasses. VERTEX - Defined in vtkGraph subclasses. EDGE - Defined in vtkGraph subclasses. ROW - Defined in vtkTable. The other attribute type, FIELD, will return nullptr since field data is stored as a vtkFieldData instance, not a vtkDataSetAttributes instance. To retrieve field data, use GetAttributesAsFieldData.
@warning This method NEEDS to be overriden in subclasses to work as documented. If not, it returns nullptr for any type but FIELD.
- Type
C++
-
GetAttributesAsFieldData
¶ vtkFieldData *GetAttributesAsFieldData(int type) override;
Returns the attributes of the data object as a vtkFieldData. This returns non-null values in all the same cases as GetAttributes, in addition to the case of FIELD, which will return the field data for any vtkDataObject subclass.
- Type
C++
-
GetBounds
(self, bounds: [float, float, float, float, float, float])¶ -> None C++: void GetBounds(double bounds[6])
Return a pointer to the geometry bounding box in the form (xmin,xmax, ymin,ymax, zmin,zmax). THIS METHOD IS NOT THREAD SAFE.
-
GetCell
(self, cellId: int, cell: vtkGenericCell) → None¶ - void GetCell(vtkIdType cellId, vtkGenericCell *cell)
override;
GetCell(self, cellId:int, pts:(int, …)) -> int C++: unsigned char GetCell(vtkIdType cellId,
const vtkIdType *&pts)
GetCell(self, i:int, j:int, k:int) -> vtkCell C++: virtual vtkCell *GetCell(int i, int j, int k)
This method always return a vtkEmptyCell, as there is no cell in a vtkPointSet.
- Type
C++
-
GetCellBounds
¶ - [float, float, float,
float, float, float]) -> None
- C++: void GetCellBounds(vtkIdType cellId, double bounds[6])
override;
Get the bounds of the cell with cellId such that: 0 <= cellId < NumberOfCells. A subclass may be able to determine the bounds of cell without using an expensive GetCell() method. A default implementation is provided that actually uses a GetCell() call. This is to ensure the method is available to all datasets. Subclasses should override this method to provide an efficient implementation. THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED
- Type
GetCellBounds(self, cellId
- Type
int, bounds
-
GetCellData
¶ vtkCellData *GetCellData()
Return a pointer to this dataset’s cell data. THIS METHOD IS THREAD SAFE
- Type
C++
-
GetCellEdgeNeighbors
¶ - int, p2:int,
cellIds:vtkIdList) -> None
- C++: void GetCellEdgeNeighbors(vtkIdType cellId, vtkIdType p1,
vtkIdType p2, vtkIdList *cellIds)
Get the neighbors at an edge. More efficient than the general GetCellNeighbors(). Assumes links have been built (with BuildLinks()), and looks specifically for edge neighbors.
- Type
GetCellEdgeNeighbors(self, cellId
- Type
int, p1
-
GetCellGhostArray
¶ vtkUnsignedCharArray *GetCellGhostArray()
Get the array that defines the ghost type of each cell. We cache the pointer to the array to save a lookup involving string comparisons
- Type
C++
-
GetCellIdRelativeToCellArray
¶ vtkIdType GetCellIdRelativeToCellArray(vtkIdType cellId)
Maps the cell at position cellId inside the vtkPolyData to its location in the corresponding cell array. For instance, if cell cellId is a line, then this method returns the position of this cell in the Lines cell array.
- Type
C++
-
GetCellNeighbors
¶ - vtkIdList,
cellIds:vtkIdList) -> None
- C++: void GetCellNeighbors(vtkIdType cellId, vtkIdList *ptIds,
vtkIdList *cellIds) override;
Topological inquiry to get all cells using list of points exclusive of cell specified (e.g., cellId). Note that the list consists of only cells that use ALL the points provided. THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED
- Type
GetCellNeighbors(self, cellId
- Type
int, ptIds
-
GetCellPoints
(self, cellId: int, npts: int, pts: int, …) → int¶ - unsigned char GetCellPoints(vtkIdType cellId,
vtkIdType &npts, vtkIdType const *&pts)
Copy a cells point ids into list provided. (Less efficient.)
- Type
C++
-
GetCellType
¶ int GetCellType(vtkIdType cellId) override;
This method always returns VTK_EMPTY_CELL, as there is no cell in a vtkPointSet.
- Type
C++
-
GetCellTypes
¶ virtual void GetCellTypes(vtkCellTypes *types)
Get a list of types of cells in a dataset. The list consists of an array of types (not necessarily in any order), with a single entry per type. For example a dataset 5 triangles, 3 lines, and 100 hexahedra would result a list of three entries, corresponding to the types VTK_TRIANGLE, VTK_LINE, and VTK_HEXAHEDRON. THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED
- Type
C++
-
GetCellsBounds
¶ - [float, float, float, float, float,
float]) -> None
C++: void GetCellsBounds(double bounds[6])
Get the cells bounds. Internally calls ComputeCellsBounds(). @sa ComputeCellsBounds()
- Type
GetCellsBounds(self, bounds
-
GetCenter
(self, center: [float, float, float]) → None¶ void GetCenter(double center[3])
Get the center of the bounding box. THIS METHOD IS NOT THREAD SAFE.
- Type
C++
-
GetData
(v: vtkInformationVector, i: int = 0) → vtkPolyData¶ static vtkPolyData *GetData(vtkInformationVector *v, int i=0)
Retrieve an instance of this class from an information object.
- Type
C++
-
GetDataObjectType
¶ int GetDataObjectType() override;
Return what type of dataset this is.
- Type
C++
-
GetDataReleased
¶ virtual int GetDataReleased()
Get the flag indicating the data has been released.
- Type
C++
-
GetDebug
¶ bool GetDebug()
Get the value of the debug flag.
- Type
C++
-
GetEditable
¶ virtual bool GetEditable()
- Type
C++
-
GetExtentType
¶ virtual int GetExtentType()
The ExtentType will be left as VTK_PIECES_EXTENT for data objects such as vtkPolyData and vtkUnstructuredGrid. The ExtentType will be changed to VTK_3D_EXTENT for data objects with 3D structure such as vtkImageData (and its subclass vtkStructuredPoints), vtkRectilinearGrid, and vtkStructuredGrid. The default is the have an extent in pieces, with only one piece (no streaming possible).
- Type
C++
-
GetGhostArray
¶ virtual vtkDataArray *GetGhostArray(int type)
Returns the ghost arrays of the data object of the specified atribute type. The type may be: POINT - Defined in vtkDataSet subclasses CELL - Defined in vtkDataSet subclasses. The other attribute types, will return nullptr since ghosts arrays are not defined for now outside of point or cell.
- Type
C++
-
GetGhostLevel
¶ virtual int GetGhostLevel()
Get the ghost level.
- Type
C++
-
GetGlobalReleaseDataFlag
¶ static int GetGlobalReleaseDataFlag()
- Type
C++
-
GetGlobalWarningDisplay
¶ static int GetGlobalWarningDisplay()
- Type
C++
-
GetInformation
¶ virtual vtkInformation *GetInformation()
Set/Get the information object associated with this data object.
- Type
C++
-
GetIsInMemkind
¶ bool GetIsInMemkind()
A local state flag that remembers whether this object lives in the normal or extended memory space.
- Type
C++
-
GetLength
¶ double GetLength()
Return the length of the diagonal of the bounding box. THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED
- Type
C++
-
GetLines
¶ vtkCellArray *GetLines()
Get the cell array defining lines. If there are no lines, an empty array will be returned (convenience to simplify traversal).
- Type
C++
-
GetMTime
¶ vtkMTimeType GetMTime() override;
Get MTime which also considers its cell array MTime.
- Type
C++
-
GetMaxCellSize
¶ int GetMaxCellSize() override;
Return the maximum cell size in this poly data.
- Type
C++
-
GetMeshMTime
¶ virtual vtkMTimeType GetMeshMTime()
Return the mesh (geometry/topology) modification time. This time is different from the usual MTime which also takes into account the modification of data arrays. This function can be used to track the changes on the mesh separately from the data arrays (eg. static mesh over time with transient data).
- Type
C++
-
GetNamedFieldInformation
¶ - vtkInformation,
fieldAssociation:int, name:str) -> vtkInformation
- C++: static vtkInformation *GetNamedFieldInformation(
vtkInformation *info, int fieldAssociation, const char *name)
Return the information object within the input information object’s field data corresponding to the specified association (FIELD_ASSOCIATION_POINTS or FIELD_ASSOCIATION_CELLS) and name.
- Type
GetNamedFieldInformation(info
-
GetNumberOfCells
¶ vtkIdType GetNumberOfCells() override;
Standard vtkDataSet interface.
- Type
C++
-
GetNumberOfElements
¶ vtkIdType GetNumberOfElements(int type) override;
Get the number of elements for a specific attribute type (POINT, CELL, etc.).
- Type
C++
-
GetNumberOfGenerationsFromBase
¶ - vtkIdType GetNumberOfGenerationsFromBase(const char *type)
override;
Given the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). If the named class is not in this class’s inheritance tree, return a negative value. Valid responses will always be nonnegative. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
- Type
C++
-
GetNumberOfGenerationsFromBaseType
¶ - static vtkIdType GetNumberOfGenerationsFromBaseType(
const char *type)
Given a the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). If the named class is not in this class’s inheritance tree, return a negative value. Valid responses will always be nonnegative. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
- Type
C++
-
GetNumberOfLines
¶ vtkIdType GetNumberOfLines()
- Type
C++
-
GetNumberOfPieces
¶ virtual int GetNumberOfPieces()
- Type
C++
-
GetNumberOfPoints
¶ vtkIdType GetNumberOfPoints() override;
See vtkDataSet for additional information.
- Type
C++
-
GetNumberOfPolys
¶ vtkIdType GetNumberOfPolys()
- Type
C++
-
GetNumberOfStrips
¶ vtkIdType GetNumberOfStrips()
- Type
C++
-
GetNumberOfVerts
¶ vtkIdType GetNumberOfVerts()
Return the number of primitives of a particular type held.
- Type
C++
-
GetPiece
¶ virtual int GetPiece()
Get the piece and the number of pieces. Similar to extent in 3D.
- Type
C++
-
GetPoint
(self, ptId: int)¶ double *GetPoint(vtkIdType ptId) override;
Copy point coordinates into user provided array x[3] for specified point id. THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED
- Type
C++
-
GetPointCells
(self, ptId: int, ncells: int, cells: [int, …])¶ -> None C++: void GetPointCells(vtkIdType ptId, vtkIdType &ncells,
vtkIdType *&cells)
- GetPointCells(self, ptId:int, ncells:int, cells:[int, …])
-> None
- C++: void GetPointCells(vtkIdType ptId, unsigned short &ncells,
vtkIdType *&cells)
Efficient method to obtain cells using a particular point. Make sure that routine BuildLinks() has been called.
-
GetPointData
¶ vtkPointData *GetPointData()
Return a pointer to this dataset’s point data. THIS METHOD IS THREAD SAFE
- Type
C++
-
GetPointGhostArray
¶ vtkUnsignedCharArray *GetPointGhostArray()
Gets the array that defines the ghost type of each point. We cache the pointer to the array to save a lookup involving string comparisons
- Type
C++
-
GetPolys
¶ vtkCellArray *GetPolys()
Get the cell array defining polygons. If there are no polygons, an empty array will be returned (convenience to simplify traversal).
- Type
C++
-
GetReferenceCount
¶ int GetReferenceCount()
Return the current reference count of this object.
- Type
C++
-
GetScalarFieldCriticalIndex
(self, pointId: int, fieldName: str)¶ -> int C++: int GetScalarFieldCriticalIndex(vtkIdType pointId,
const char *fieldName)
-
GetScalarRange
(self)¶ double *GetScalarRange()
Convenience method to get the range of the first component (and only the first component) of any scalars in the data set. If the data has both point data and cell data, it returns the (min/max) range of combined point and cell data. If there are no point or cell scalars the method will return (0,1). Note: It might be necessary to call Update to create or refresh the scalars before calling this method. THIS METHOD IS THREAD SAFE IF FIRST CALLED FROM A SINGLE THREAD AND THE DATASET IS NOT MODIFIED
- Type
C++
-
GetStrips
¶ vtkCellArray *GetStrips()
Get the cell array defining triangle strips. If there are no triangle strips, an empty array will be returned (convenience to simplify traversal).
- Type
C++
-
GetUpdateTime
¶ vtkMTimeType GetUpdateTime()
Used by Threaded ports to determine if they should initiate an asynchronous update (still in development).
- Type
C++
-
GetUsingMemkind
¶ static bool GetUsingMemkind()
A global state flag that controls whether vtkObjects are constructed in the usual way (the default) or within the extended memory space.
- Type
C++
-
GetVerts
¶ vtkCellArray *GetVerts()
Get the cell array defining vertices. If there are no vertices, an empty array will be returned (convenience to simplify traversal).
- Type
C++
-
GlobalReleaseDataFlagOff
¶ void GlobalReleaseDataFlagOff()
- Type
C++
-
GlobalReleaseDataFlagOn
¶ void GlobalReleaseDataFlagOn()
- Type
C++
-
GlobalWarningDisplayOff
¶ static void GlobalWarningDisplayOff()
- Type
C++
-
GlobalWarningDisplayOn
¶ static void GlobalWarningDisplayOn()
- Type
C++
-
HasAnyBlankCells
¶ virtual bool HasAnyBlankCells()
Returns 1 if there are any blanking cells 0 otherwise. Blanking is supported only for vtkStructuredGrid and vtkUniformGrid
- Type
C++
-
HasAnyBlankPoints
¶ virtual bool HasAnyBlankPoints()
Returns 1 if there are any blanking points 0 otherwise. Blanking is supported only for vtkStructuredGrid and vtkUniformGrid
- Type
C++
-
HasAnyGhostCells
¶ bool HasAnyGhostCells()
Returns 1 if there are any ghost cells 0 otherwise.
- Type
C++
-
HasAnyGhostPoints
¶ bool HasAnyGhostPoints()
Returns 1 if there are any ghost points 0 otherwise.
- Type
C++
-
HasObserver
(self, event: str, __b: vtkCommand) → int¶ vtkTypeBool HasObserver(const char *event, vtkCommand *) HasObserver(self, event:int) -> int C++: vtkTypeBool HasObserver(unsigned long event) HasObserver(self, event:str) -> int C++: vtkTypeBool HasObserver(const char *event)
- Type
C++
-
Initialize
¶ void Initialize() override;
Restore object to initial state. Release memory back to system.
- Type
C++
-
InitializeObjectBase
¶ void InitializeObjectBase()
- Type
C++
-
InsertNextCell
(self, type: int, pts: vtkIdList) → int¶ vtkIdType InsertNextCell(int type, vtkIdList *pts)
Insert a cell of type VTK_VERTEX, VTK_POLY_VERTEX, VTK_LINE, VTK_POLY_LINE, VTK_TRIANGLE, VTK_QUAD, VTK_POLYGON, or VTK_TRIANGLE_STRIP. Make sure that the PolyData::Allocate() function has been called first or that vertex, line, polygon, and triangle strip arrays have been supplied. Note: will also insert VTK_PIXEL, but converts it to VTK_QUAD.
- Type
C++
-
InsertNextLinkedCell
¶ -> int C++: vtkIdType InsertNextLinkedCell(int type, int npts,
const vtkIdType pts[])
Add a new cell to the cell data structure (after cell pointers have been built). This method adds the cell and then updates the links from the points to the cells. (Memory is allocated as necessary.) Use this method only when the dataset is set as Editable.
-
InsertNextLinkedPoint
(self, x: [float, float, float], numLinks: int)¶ -> int C++: vtkIdType InsertNextLinkedPoint(double x[3], int numLinks)
Add a point to the cell data structure (after cell pointers have been built). This method adds the point and then allocates memory for the links to the cells. (To use this method, make sure points are available and BuildLinks() has been invoked.) Of the two methods below, one inserts a point coordinate and the other just makes room for cell links. Use this method only when the dataset is set as Editable.
-
InvokeEvent
(self, event: str, callData: Any) → int¶ int InvokeEvent(const char* event, void* callData) InvokeEvent(self, event:int) -> int C++: int InvokeEvent(unsigned long event) InvokeEvent(self, event:str) -> int C++: int InvokeEvent(const char* event)
This method invokes an event and returns whether the event was aborted or not. If the event was aborted, the return value is 1, otherwise it is 0.
- Type
C++
-
IsA
¶ vtkTypeBool IsA(const char *type) override;
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
- Type
C++
-
IsEdge
¶ int IsEdge(vtkIdType p1, vtkIdType p2)
Determine whether two points form an edge. If they do, return non-zero. By definition PolyVertex and PolyLine have no edges since 1-dimensional edges are only found on cells 2D and higher. Edges are defined as 1-D boundary entities to cells. Make sure BuildLinks() has been called first.
- Type
C++
-
IsPointUsedByCell
¶ int IsPointUsedByCell(vtkIdType ptId, vtkIdType cellId)
Determine whether a point is used by a particular cell. If it is, return non-zero. Make sure BuildCells() has been called first.
- Type
C++
-
IsTriangle
¶ int IsTriangle(int v1, int v2, int v3)
Given three vertices, determine whether it’s a triangle. Make sure BuildLinks() has been called first.
- Type
C++
-
IsTypeOf
¶ static vtkTypeBool IsTypeOf(const char *type)
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
- Type
C++
-
MAXIMUM
= 2¶
-
MINIMUM
= 0¶
-
Modified
¶ virtual void Modified()
Update the modification time for this object. Many filters rely on the modification time to determine if they need to recompute their data. The modification time is a unique monotonically increasing unsigned long integer.
- Type
C++
-
NUMBER_OF_ASSOCIATIONS
= 7¶
-
NUMBER_OF_ATTRIBUTE_TYPES
= 7¶
-
NeedToBuildCells
¶ bool NeedToBuildCells()
Check if BuildCells is needed.
- Type
C++
-
NewCellIterator
¶ vtkCellIterator *NewCellIterator() override;
Return an iterator that traverses the cells in this data set.
- Type
C++
-
POINT
= 0¶
-
POINT_DATA_FIELD
= 1¶
-
POINT_THEN_CELL
= 3¶
-
PrepareForNewData
¶ virtual void PrepareForNewData()
make the output data ready for new data to be inserted. For most objects we just call Initialize. But for vtkImageData we leave the old data in case the memory can be reused.
- Type
C++
-
REGULAR_POINT
= -1¶
-
ROW
= 6¶
-
ReleaseData
¶ void ReleaseData()
Release data back to system to conserve memory resource. Used during visualization network execution. Releasing this data does not make down-stream data invalid.
- Type
C++
-
RemoveAllObservers
¶ void RemoveAllObservers()
- Type
C++
-
RemoveCellReference
¶ void RemoveCellReference(vtkIdType cellId)
Remove all references to cell in cell structure. This means the links from the cell’s points to the cell are deleted. Memory is not reclaimed. Use the method ResizeCellList() to resize the link list from a point to its using cells. (This operator assumes BuildLinks() has been called.) Use this method only when the dataset is set as Editable.
- Type
C++
-
RemoveDeletedCells
¶ void RemoveDeletedCells()
The cells marked by calls to DeleteCell are stored in the Cell Array VTK_EMPTY_CELL, but they still exist in the cell arrays. Calling RemoveDeletedCells will traverse the cell arrays and remove/compact the cell arrays as well as any cell data thus truly removing the cells from the polydata object. Use this method only when the dataset is set as Editable.
- Type
C++
-
RemoveGhostCells
¶ void RemoveGhostCells()
This method will remove any cell that is marked as ghost (has the vtkDataSetAttributes::DUPLICATECELL or the vtkDataSetAttributes::HIDDENCELL bit set). It does not remove unused points.
- Type
C++
-
RemoveNamedFieldInformation
¶ - vtkInformation,
fieldAssociation:int, name:str) -> None
- C++: static void RemoveNamedFieldInformation(vtkInformation *info,
int fieldAssociation, const char *name)
Remove the info associated with an array
- Type
RemoveNamedFieldInformation(info
-
RemoveObserver
(self, tag: int) → None¶ void RemoveObserver(unsigned long tag)
- Type
C++
-
RemoveObservers
(self, event: str, __b: vtkCommand) → None¶ void RemoveObservers(const char *event, vtkCommand *) RemoveObservers(self, event:int) -> None C++: void RemoveObservers(unsigned long event) RemoveObservers(self, event:str) -> None C++: void RemoveObservers(const char *event)
- Type
C++
-
RemoveReferenceToCell
¶ void RemoveReferenceToCell(vtkIdType ptId, vtkIdType cellId)
Remove a reference to a cell in a particular point’s link list. You may also consider using RemoveCellReference() to remove the references from all the cell’s points to the cell. This operator does not reallocate memory; use the operator ResizeCellList() to do this if necessary. Use this method only when the dataset is set as Editable.
- Type
C++
-
ReplaceCell
(self, cellId: int, npts: int, pts: int, …) → None¶ void ReplaceCell(vtkIdType cellId, int npts, const vtkIdType pts[])
- Type
C++
-
ReplaceCellPoint
¶ -> None C++: void ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId,
vtkIdType newPtId)
Replace a point in the cell connectivity list with a different point. Use this method only when the dataset is set as Editable.
-
ReplaceLinkedCell
¶ -> None C++: void ReplaceLinkedCell(vtkIdType cellId, int npts,
const vtkIdType pts[])
Replace one cell with another in cell structure. This operator updates the connectivity list and the point’s link list. It does not delete references to the old cell in the point’s link list. Use the operator RemoveCellReference() to delete all references from points to (old) cell. You may also want to consider using the operator ResizeCellList() if the link list is changing size. Use this method only when the dataset is set as Editable.
-
Reset
¶ void Reset()
Begin inserting data all over again. Memory is not freed but otherwise objects are returned to their initial state.
- Type
C++
-
ResizeCellList
¶ void ResizeCellList(vtkIdType ptId, int size)
Resize the list of cells using a particular point. (This operator assumes that BuildLinks() has been called.) Use this method only when the dataset is set as Editable.
- Type
C++
-
ReverseCell
¶ void ReverseCell(vtkIdType cellId)
Reverse the order of point ids defining the cell. Use this method only when the dataset is set as Editable.
- Type
C++
-
SADDLE
= 1¶
-
SetActiveAttribute
¶ - int,
attributeName:str, attributeType:int) -> vtkInformation
- C++: static vtkInformation *SetActiveAttribute(
vtkInformation *info, int fieldAssociation, const char *attributeName, int attributeType)
Set the named array to be the active field for the specified type (SCALARS, VECTORS, NORMALS, TCOORDS, or TENSORS) and association (FIELD_ASSOCIATION_POINTS or FIELD_ASSOCIATION_CELLS). Returns the active field information object and creates on entry if one not found.
- Type
SetActiveAttribute(info
- Type
vtkInformation, fieldAssociation
-
SetActiveAttributeInfo
¶ - int,
- attributeType:int, name:str, arrayType:int, numComponents:int,
numTuples:int) -> None
- C++: static void SetActiveAttributeInfo(vtkInformation *info,
int fieldAssociation, int attributeType, const char *name, int arrayType, int numComponents, int numTuples)
Set the name, array type, number of components, and number of tuples within the passed information object for the active attribute of type attributeType (in specified association, FIELD_ASSOCIATION_POINTS or FIELD_ASSOCIATION_CELLS). If there is not an active attribute of the specified type, an entry in the information object is created. If arrayType, numComponents, or numTuples equal to -1, or name=nullptr the value is not changed.
- Type
SetActiveAttributeInfo(info
- Type
vtkInformation, fieldAssociation
-
SetCellLocator
¶ virtual void SetCellLocator(vtkAbstractCellLocator *)
Set / get an instance of vtkAbstractCellLocator which may be used when a vtkCellLocatorStrategy is used during a FindCelloperation.
- Type
C++
-
SetCellOrderAndRationalWeights
¶ - int,
cell:vtkGenericCell) -> None
- C++: void SetCellOrderAndRationalWeights(vtkIdType cellId,
vtkGenericCell *cell)
- Type
SetCellOrderAndRationalWeights(self, cellId
-
SetDebug
¶ void SetDebug(bool debugFlag)
Set the value of the debug flag. A true value turns debugging on.
- Type
C++
-
SetEditable
¶ virtual void SetEditable(bool _arg)
Specify whether this dataset is editable after creation. Meaning, once the points and cells are defined, can the dataset be incrementally modified. By default, this dataset is non-editable (i.e., “static”) after construction. The reason for this is performance: cell links and locators can be built (and destroyed) much faster is it is known that the data is static (see vtkStaticCellLinks, vtkStaticPointLocator, vtkStaticCellLocator).
- Type
C++
-
SetFieldData
¶ virtual void SetFieldData(vtkFieldData *)
Assign or retrieve a general field data to this data object.
- Type
C++
-
SetGlobalReleaseDataFlag
¶ static void SetGlobalReleaseDataFlag(int val)
Turn on/off flag to control whether every object releases its data after being used by a filter.
- Type
C++
-
SetGlobalWarningDisplay
¶ static void SetGlobalWarningDisplay(int val)
This is a global flag that controls whether any debug, warning or error messages are displayed.
- Type
C++
-
SetMemkindDirectory
¶ static void SetMemkindDirectory(const char *directoryname)
The name of a directory, ideally mounted -o dax, to memory map an extended memory space within. This must be called before any objects are constructed in the extended space. It can not be changed once setup.
- Type
C++
-
SetPointDataActiveScalarInfo
¶ - int,
numComponents:int) -> None
- C++: static void SetPointDataActiveScalarInfo(
vtkInformation *info, int arrayType, int numComponents)
Convenience version of previous method for use (primarily) by the Imaging filters. If arrayType or numComponents == -1, the value is not changed.
- Type
SetPointDataActiveScalarInfo(info
- Type
vtkInformation, arrayType
-
SetPointLocator
¶ virtual void SetPointLocator(vtkAbstractPointLocator *)
Set / get an instance of vtkAbstractPointLocator which is used to support the FindPoint() and FindCell() methods. By default a vtkStaticPointLocator is used, unless the class is set as Editable, in which case a vtkPointLocator is used.
- Type
C++
-
SetPoints
¶ virtual void SetPoints(vtkPoints *)
Specify point array to define point coordinates.
- Type
C++
-
SetReferenceCount
¶ void SetReferenceCount(int)
Sets the reference count. (This is very dangerous, use with care.)
- Type
C++
-
Squeeze
¶ void Squeeze() override;
Recover extra allocated memory when creating data whose initial size is unknown. Examples include using the InsertNextCell() method, or when using the CellArray::EstimateSize() method to create vertices, lines, polygons, or triangle strips.
- Type
C++
-
UnRegister
¶ virtual void UnRegister(vtkObjectBase* o)
Decrease the reference count (release by another object). This has the same effect as invoking Delete() (i.e., it reduces the reference count by 1).
- Type
C++
-
UpdateCellGhostArrayCache
¶ void UpdateCellGhostArrayCache()
Updates the pointer to the cell ghost array.
- Type
C++
-
UpdatePointGhostArrayCache
¶ void UpdatePointGhostArrayCache()
Updates the pointer to the point ghost array.
- Type
C++
-
VERTEX
= 4¶
-
property
data_fields
¶ Get data fields for this Polydata.
-
class
-
class
honeybee_vtk.types.
RadialSensor
(angle: int = 45, radius: float = None)[source]¶ Bases:
object
Object to customize the triangle to be created at each sensor of the grid.
This method is only used when radial-grid is selected from grid options.
- Parameters
angle – A value in degrees to define the internal angle of the triangle. Defaults to 45 degrees.
radius – Radial height of the triangle. If not provided, the magnitude of direction vector of the sensor will be used. Defaults to None.
-
property
angle
¶
-
property
radius
¶