I/O
ImageJ Reader
- class vSCAD.io.imagej_reader.ImageJReader[source]
Bases:
object- get_diam()[source]
Returns the diameters of the vessel as a list of diameters
- Parameters:
csv_path (str) – The path to the CSV file containing the vessel data.
- Returns:
A 1D numpy array containing the diameters of the vessel.
- Return type:
np.ndarray
- get_path()[source]
Returns the path of the vessel as a list of points
- Parameters:
csv_path (str) – The path to the CSV file containing the vessel data.
- Returns:
A 2D numpy array where each row represents a point in the vessel path. The first two columns are the X and Y coordinates, and the third column is filled with zeros.
- Return type:
np.ndarray
New vSCAD Project
SCAD Writer
- class vSCAD.io.write_scad.OpenSCADFunctions(path)[source]
Bases:
object- function_loft_path(vessel)[source]
Create a loft path function in OpenSCAD for a given vessel.
- Parameters:
vessel (Vessel) – Vessel object containing name, path, diameters, and euler_angles.
- import_circle_at()[source]
Import the circle_at module into the SCAD file.
The circle_at function creates a cylinder with a given diameter and angle. OpenSCAD cannot loft (hold()) circles (or other 2D objects), so we create a cylinder with a small height (0.01) to represent the lofted circle.
- set_fragments(fragments)[source]
Set the number of fragments for OpenSCAD to draw circles.
- Parameters:
fragments (int) – Number of fragments for circle rendering.