gdshelpers.export package

Submodules

gdshelpers.export.blender_export module

class gdshelpers.export.blender_export.Shapely3d(poly, extrude_val_min, extrude_val_max, rgb=(255, 255, 255))

Bases: object

This class saves the values which will be given to blender and it also provides a method for output these values

to_temp(scale, index)
gdshelpers.export.blender_export.render_image(shapely_3d_list, filename, scale=0.1, resolution_x=1980, resolution_y=1080, resolution_percentage=100, render_engine='CYCLES', camera_position_y='above', camera_position_x='right')

writes the ‘filename.png’ file

Parameters:
  • shapely_3d_list – a list of the meshes to export
  • filename – the name of the .png and .tmp file
  • scale – size factor
  • resolution_x – set x resolution for a later render process
  • resolution_y – set y resolution for a later render process
  • resolution_percentage – set resolution percentage
  • render_engine – set the render engine
  • camera_position_y – decides if the camera is placed ‘above’ or ‘under’ the device
  • camera_position_x – decides if the camera is places ‘right’ or ‘left’ of the device
Returns:

nothing

gdshelpers.export.blender_export.render_image_and_save_as_blend(shapely_3d_list, filename, scale=0.1, resolution_x=1980, resolution_y=1080, resolution_percentage=100, render_engine='CYCLES', camera_position_y='above', camera_position_x='right')

writes the ‘filename.png’ and ‘filename.blend’ file

Parameters:
  • shapely_3d_list – a list of the meshes to export
  • filename – the name of the .png, .blend and .tmp file
  • scale – size factor
  • resolution_x – set x resolution for a later render process
  • resolution_y – set y resolution for a later render process
  • resolution_percentage – set resolution percentage
  • render_engine – set the render engine
  • camera_position_y – decides if the camera is placed ‘above’ or ‘under’ the device
  • camera_position_x – decides if the camera is places ‘right’ or ‘left’ of the device
Returns:

nothing

gdshelpers.export.blender_export.save_as_blend(shapely_3d_list, filename, scale=0.1, resolution_x=1980, resolution_y=1080, resolution_percentage=100, render_engine='CYCLES', camera_position_y='above', camera_position_x='right')

writes the ‘filename.blend’ file

Parameters:
  • shapely_3d_list – a list of the meshes to export
  • filename – the name of the .blend and .tmp file
  • scale – size factor
  • resolution_x – set x resolution for a later render process
  • resolution_y – set y resolution for a later render process
  • resolution_percentage – set resolution percentage
  • render_engine – set the render engine
  • camera_position_y – decides if the camera is placed ‘above’ or ‘under’ the device
  • camera_position_x – decides if the camera is places ‘right’ or ‘left’ of the device
Returns:

nothing

gdshelpers.export.dxf_export module

gdshelpers.export.gdsii_export module

For documentation of GDSII see: http://bitsavers.informatik.uni-stuttgart.de/pdf/calma/GDS_II_Stream_Format_Manual_6.0_Feb87.pdf

gdshelpers.export.gdsii_export.write_cell_to_gdsii_file(outfile, cell, unit=1e-06, grid_steps_per_unit=1000, max_points=4000, max_line_points=4000, timestamp=None, parallel=False, max_workers=None)

Module contents