npxpy.nodes.space.Array
Bases: _GatekeeperSpace
Class representing an array node with additional attributes.
Attributes:
Name | Type | Description |
---|---|---|
position |
List[float]
|
Position of the array [x, y, z]. |
rotation |
List[float]
|
Rotation of the array [psi, theta, phi]. |
count |
List[int]
|
Number of grid points in [x, y] direction. |
spacing |
List[float]
|
Spacing of the grid in [width, height]. |
order |
str
|
Order of the array ('Lexical' or 'Meander'). |
shape |
str
|
Shape of the array ('Rectangular' or 'Round'). |
Source code in npxpy/nodes/space.py
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 |
|
__init__(name='Array', position=[0, 0, 0], rotation=[0.0, 0.0, 0.0], count=[5, 5], spacing=[100.0, 100.0], order='Lexical', shape='Rectangular')
Initialize an Array node.
Source code in npxpy/nodes/space.py
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
|
set_grid(count=count, spacing=spacing)
Set the count and spacing of the array grid.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
count
|
List[int]
|
The new grid point count. |
count
|
spacing
|
List[float]
|
The new grid spacing. |
spacing
|
Returns:
Name | Type | Description |
---|---|---|
Array |
The updated Array object. |
Source code in npxpy/nodes/space.py
327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 |
|
to_dict()
Convert the Array object into a dictionary.
Source code in npxpy/nodes/space.py
344 345 346 347 348 349 350 351 352 353 354 355 |
|