Implement SquareCustom end-caps and gds output

This commit is contained in:
Jan Petykiewicz 2019-05-15 00:14:17 -07:00
commit bc43be48bc
2 changed files with 66 additions and 21 deletions

View file

@ -35,7 +35,7 @@ path_cap_map = {
0: Path.Cap.Flush,
1: Path.Cap.Circle,
2: Path.Cap.Square,
#3: custom?
4: Path.Cap.SquareCustom,
}
@ -291,6 +291,13 @@ def read(stream: io.BufferedIOBase,
'cap': cap,
}
if cap == Path.Cap.SquareCustom:
args['cap_extensions'] = numpy.zeros(2)
if element.bgn_extn is not None:
args['cap_extensions'][0] = element.bgn_extn
if element.end_extn is not None:
args['cap_extensions'][1] = element.end_extn
if use_dtype_as_dose:
args['dose'] = element.data_type
args['layer'] = element.layer