Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
Printrun
Project
Project
Details
Activity
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
Printrun
Commits
ca84c816
Commit
ca84c816
authored
Dec 31, 2011
by
kliment
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #144 from AxTheB/export
load_scad line parsing rewrite
parents
1a90feb2
7f880dc3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
plater.py
plater.py
+12
-9
No files found.
plater.py
View file @
ca84c816
...
@@ -7,11 +7,8 @@ try:
...
@@ -7,11 +7,8 @@ try:
except
:
except
:
glview
=
False
glview
=
False
def
translate
(
l
):
return
l
def
evalme
(
s
):
return
eval
(
s
[
s
.
find
(
"("
)
+
1
:
s
.
find
(
")"
)])
def
rotate
(
l
):
return
l
def
import_stl
(
s
):
return
s
class
stlwrap
:
class
stlwrap
:
def
__init__
(
self
,
obj
,
name
=
None
):
def
__init__
(
self
,
obj
,
name
=
None
):
...
@@ -321,14 +318,20 @@ class stlwin(wx.Frame):
...
@@ -321,14 +318,20 @@ class stlwin(wx.Frame):
def
load_scad
(
self
,
event
,
name
):
def
load_scad
(
self
,
event
,
name
):
lf
=
open
(
name
)
lf
=
open
(
name
)
s
=
[
i
.
replace
(
"
\n
"
,
""
)
.
replace
(
"
\r
"
,
""
)
.
replace
(
";"
,
""
)
for
i
in
lf
]
s
=
[
i
.
replace
(
"
\n
"
,
""
)
.
replace
(
"
\r
"
,
""
)
.
replace
(
";"
,
""
)
for
i
in
lf
if
"stl"
in
i
]
lf
.
close
()
lf
.
close
()
for
i
in
s
:
for
i
in
s
:
parts
=
i
.
split
()
parts
=
i
.
split
()
translate_list
=
eval
(
parts
[
0
])
for
part
in
parts
:
rotate_list
=
eval
(
parts
[
1
])
if
'translate'
in
part
:
stl_file
=
eval
(
parts
[
2
])
translate_list
=
evalme
(
part
)
for
part
in
parts
:
if
'rotate'
in
part
:
rotate_list
=
evalme
(
part
)
for
part
in
parts
:
if
'import'
in
part
:
stl_file
=
evalme
(
part
)
newname
=
os
.
path
.
split
(
stl_file
.
lower
())[
1
]
newname
=
os
.
path
.
split
(
stl_file
.
lower
())[
1
]
c
=
1
c
=
1
...
...
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