3.6 KiB
3.6 KiB
Node & Socket Reference
Node Sockets
| Socket ID | Type | Underlying Data Structure | Purpose |
|---|---|---|---|
SLICESOCK_Object |
bpy.types.Object |
Blender RNA Object | Reference to a Blender Object |
SLICESOCK_Float |
float |
Python float | Numeric value |
SLICESOCK_Int |
int |
Python int | Integer value |
SLICESOCK_String |
str |
Python string | Text/Path value |
SLICESOCK_Mesh |
SlicingObject |
NumPy NDArray (Triangles) | Internal mesh data (Transformed/Scaled) |
SLICESOCK_Slices |
list[np.ndarray] |
List of closed paths (N, 3) | Closed manifold contours (Inside/Outside defined) |
SLICESOCK_Paths |
list[np.ndarray] |
List of paths (N, 3) | Generic toolpaths (No defined interior) |
SLICESOCK_Gcode |
str |
Multi-line string | Generated G-code text |
Detailed Data Types
SlicingObject (SLICESOCK_Mesh)
The SlicingObject class wraps a high-performance NumPy representation of a Blender mesh.
.mesh: A NumPyndarrayof typefloat64with shape(N, 4, 3).N: Number of triangles.[i, 0:3, :]: The three vertices of the $i$-th triangle.[i, 3, :]: The face normal of the $i$-th triangle.
- Coordinates: Transformed to world space and scaled by the Blender scene unit scale (multiplied by 1000 for mm-standard G-code).
Slices (SLICESOCK_Slices)
A list[np.ndarray] (each (N, 3)) containing the results of the slicing operation.
- Content: Guaranteed to be closed loops forming a valid manifold boundary.
- Z-Awareness: Coordinates are stored as 3D
(X, Y, Z)to maintain the correct layer height. - Topology: Generated and cleaned using
pyclipper.
Paths (SLICESOCK_Paths)
A list[np.ndarray] (each (N, 3)) containing generic toolpaths.
- Content: Can be open or closed segments.
- Z-Awareness: Coordinates are stored as 3D
(X, Y, Z). - Source: Typically generated from
Slicesboundaries via theSlices to Pathsnode.
Gcode (SLICESOCK_Gcode)
A standard Python string containing formatted G-code.
- Format:
G0for travels,G1for extrusions. - Extrusion: Calculated as absolute
Evalues based on Euclidean distance and a configurableEXTRUSION_RATE.
Nodes
Input Nodes
SLICENODE_InputFloat: Single float input.SLICENODE_InputInt: Single integer input.SLICENODE_InputString: Single string/path input.SLICENODE_InputObject: Blender object picker.SLICENODE_GcodeBlock: Manual text area for entering raw G-code.
Processing Nodes
SLICENODE_GetMesh: Converts a Blender Object into internalSlicingObjectformat.SLICENODE_SliceShells: Slices aSlicingObjectinto 2DSlicesat a given layer height.SLICENODE_BufferShells: Offsets/buffers 2DSlicesusing a "Distance" parameter. Buffers each Z-layer independently to maintain 3D structure and uses winding rules to correctly handle nested holes.SLICENODE_SlicesToPaths: Extracts the boundaries ofSlicesto createPaths.SLICENODE_PathsToGcode: ConvertsPathsinto G-code blocks.
Joiner Nodes (Variable Inputs)
SLICENODE_JoinMesh: Merges multipleSlicingObjectinstances into one.SLICENODE_JoinPaths: Merges multiple paths.SLICENODE_JoinGcode: Concatenates multiple G-code strings with newline separators.
Action Nodes (Executable)
SLICENODE_GcodeToFile: Writes G-code string to a file on disk.SLICENODE_GcodeToMesh: Decodes G-code and creates a Blender mesh (Edges) for visualization/debugging.SLICENODE_LoadGcode: Reads a G-code file from disk into a string.SLICENODE_Test: Triggers evaluation for debugging purposes.