femto.writer module#
- class Writer(filename, n_glass=1.5, n_environment=1.33, export_dir='', samplesize=(100, 50), laser='PHAROS', home=False, new_origin=(0.0, 0.0), warp_flag=False, rotation_angle=0.0, aerotech_angle=0.0, long_pause=0.5, short_pause=0.05, output_digits=6, speed_pos=5.0, flip_x=False, flip_y=False, _total_dwell_time=0.0, _shutter_on=False, _mode_abs=True)#
Bases:
PGMCompiler,ABCAbstract class representing a G-Code Writer.
- abstract append(obj)#
- abstract extend(obj)#
- abstract plot2d(fig=None, show_shutter_close=True, style=None)#
- Return type
go.Figure
- abstract plot3d(fig=None, show_shutter_close=True, style=None)#
- Return type
go.Figure
- abstract pgm(verbose=True)#
- standard_2d_figure_update(fig)#
- Return type
Figure
- static standard_3d_figure_update(fig)#
- Return type
Figure
- filename: str#
- class TrenchWriter(tc_list, dirname='TRENCH', **param)#
Bases:
Writer- append(obj)#
- extend(obj)#
- plot2d(fig=None, show_shutter_close=True, style=None)#
- Return type
go.Figure
- plot3d(fig=None, show_shutter_close=True, style=None)#
- Return type
go.Figure
- pgm(verbose=True)#
Helper function for the compilation of trench columns. For each trench in the column, the function first compile a PGM file for border (or wall) and for the floor inside a directory given by the user (base_folder). Secondly, the function produce a FARCALL.pgm program to fabricate all the trenches in the column.
- Returns
None
- Return type
None
- export_array2d(filename, x, y, speed)#
Helper function that produces a PGM file for a 3D matrix of points at a given traslation speed, without shuttering operations. The function parse the points input matrix, applies the rotation and homothety transformations and parse all the LINEAR instructions.
- Parameters
filename (pathilib.Path) – Filename of the file in which the G-Code instructions will be written.
x (np.ndarray) – x coordinates array.
y (np.ndarray) – y coordinates array.
speed (float) – Traslation speed value.
- Returns
None
- Return type
None
- filename: str#
- class WaveguideWriter(wg_list, **param)#
Bases:
Writer- append(obj)#
- extend(obj)#
- plot2d(fig=None, show_shutter_close=True, style=None)#
- Return type
go.Figure
- plot3d(fig=None, show_shutter_close=True, style=None)#
- Return type
go.Figure
- pgm(verbose=True)#
- filename: str#