Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
workshop.metahoguet
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
osp
workshop.metahoguet
Commits
e157024b
Commit
e157024b
authored
Nov 11, 2016
by
gijs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make a copy of the SVG when plotting
parent
1dade87d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
api.py
plotter/api.py
+5
-1
svg
plotter/svg
+1
-0
No files found.
plotter/api.py
View file @
e157024b
...
...
@@ -10,6 +10,7 @@ from plottertools.textbox import Textbox
from
chiplotle.geometry.core.coordinate
import
Coordinate
from
settings
import
db
import
os.path
import
shutil
from
flask
import
Flask
,
Response
,
app
,
request
,
render_template
marginleft
=
30
# margin left in mm
...
...
@@ -33,8 +34,11 @@ app = Flask(__name__)
@
app
.
route
(
"/api/ploteps/"
)
def
ploteps
():
epsfile
=
request
.
args
.
get
(
'epsfile'
)
svgfile
=
'./svg/{}.svg'
.
format
(
os
.
path
.
splitext
(
os
.
path
.
basename
(
epsfile
))[
0
])
hpglfile
=
'./{}.hpgl'
.
format
(
os
.
path
.
splitext
(
epsfile
)[
0
])
shutil
.
copy
(
svgfile
,
'./svg/{}.svg'
.
format
(
int
(
time
.
time
()))
# converting eps to hpgl
subprocess
.
call
([
'pstoedit'
,
...
...
@@ -59,7 +63,7 @@ def ploteps():
sourcepen
=
int
(
chunk
[
2
])
if
not
sourcepen
in
penmap
:
pen
+=
1
if
pen
>
pencount
:
pen
=
1
...
...
plotter/svg
0 → 120000
View file @
e157024b
../pad/svg/
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment