mirror of https://github.com/CGAL/cgal
convert lsp to plg format
Example use: cat tl2less.cin | python3.4 ~/code/geom/Segment_Delaunay_graph_Linf_2/developer_scripts/lsp2plg.py > tl2less.plg Signed-off-by: Panagiotis Cheilaris <philaris@cs.ntua.gr>
This commit is contained in:
parent
180fb36491
commit
d0fa197b70
|
|
@ -0,0 +1,17 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
|
for line in sys.stdin:
|
||||||
|
linesplit = line.strip().split()
|
||||||
|
if len(linesplit) == 3:
|
||||||
|
assert(linesplit[0] == 'p')
|
||||||
|
print('1')
|
||||||
|
print(linesplit[1] + ' ' + linesplit[2])
|
||||||
|
elif len(linesplit) == 5:
|
||||||
|
assert(linesplit[0] == 's')
|
||||||
|
print('2')
|
||||||
|
print(linesplit[1] + ' ' + linesplit[2])
|
||||||
|
print(linesplit[3] + ' ' + linesplit[4])
|
||||||
|
elif len(linesplit) == 0:
|
||||||
|
print
|
||||||
Loading…
Reference in New Issue