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
9ee36bdf
Commit
9ee36bdf
authored
Sep 08, 2011
by
Travis Howse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed debug function
parent
8b494f9a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
79 deletions
+0
-79
plater.py
plater.py
+0
-79
No files found.
plater.py
View file @
9ee36bdf
...
@@ -81,87 +81,8 @@ class showstl(wx.Window):
...
@@ -81,87 +81,8 @@ class showstl(wx.Window):
stltool
.
emitstl
(
name
,
facets
,
"plater_export"
)
stltool
.
emitstl
(
name
,
facets
,
"plater_export"
)
print
"wrote "
,
name
print
"wrote "
,
name
def
testingloadfile
(
self
,
name
):
print
name
if
not
(
os
.
path
.
exists
(
name
)):
return
path
=
os
.
path
.
split
(
name
)[
0
]
self
.
basedir
=
path
t
=
time
.
time
()
#print name
if
name
.
lower
()
.
endswith
(
".stl"
):
newname
=
name
c
=
1
while
newname
in
self
.
models
:
newname
=
name
+
"(
%
d)"
%
c
c
+=
1
self
.
models
[
newname
]
=
stltool
.
stl
(
name
)
self
.
models
[
newname
]
.
offsets
=
[
0
,
0
,
0
]
self
.
models
[
newname
]
.
rot
=
0
minx
,
miny
,
minz
,
maxx
,
maxy
,
maxz
=
(
10000
,
10000
,
10000
,
0
,
0
,
0
)
for
i
in
self
.
models
[
newname
]
.
facets
:
for
j
in
i
[
1
]:
if
j
[
0
]
<
minx
:
minx
=
j
[
0
]
if
j
[
1
]
<
miny
:
miny
=
j
[
1
]
if
j
[
2
]
<
minz
:
minz
=
j
[
2
]
if
j
[
0
]
>
maxx
:
maxx
=
j
[
0
]
if
j
[
1
]
>
maxy
:
maxy
=
j
[
1
]
if
j
[
2
]
>
maxz
:
maxz
=
j
[
2
]
self
.
models
[
newname
]
.
dims
=
[
minx
,
maxx
,
miny
,
maxy
,
minz
,
maxz
]
#if minx<0:
# self.models[newname].offsets[0]=-minx
#if miny<0:
# self.models[newname].offsets[1]=-miny
self
.
models
[
newname
]
.
bitmap
=
wx
.
EmptyBitmap
(
800
,
800
,
32
)
dc
=
wx
.
MemoryDC
()
dc
.
SelectObject
(
self
.
models
[
newname
]
.
bitmap
)
dc
.
SetBackground
(
wx
.
Brush
((
0
,
0
,
0
,
0
)))
dc
.
SetBrush
(
wx
.
Brush
((
0
,
0
,
0
,
255
)))
#dc.DrawRectangle(-1,-1,10000,10000)
dc
.
SetBrush
(
wx
.
Brush
(
wx
.
Colour
(
128
,
255
,
128
)))
dc
.
SetPen
(
wx
.
Pen
(
wx
.
Colour
(
128
,
128
,
128
)))
m
=
self
.
models
[
newname
]
#m.offsets=[10,10,0]
print
m
.
offsets
,
m
.
dims
scale
=
2
for
i
in
m
.
facets
:
#random.sample(m.facets,min(100000,len(m.facets))):
dc
.
DrawPolygon
([
wx
.
Point
(
400
+
scale
*
p
[
0
],(
400
+
scale
*
p
[
1
]))
for
p
in
i
[
1
]])
#if(time.time()-t)>5:
# break
dc
.
SelectObject
(
wx
.
NullBitmap
)
m
.
bitmap
.
SetMask
(
wx
.
Mask
(
m
.
bitmap
,
wx
.
Colour
(
0
,
0
,
0
,
255
)))
#print time.time()-t
self
.
l
.
Append
([
stlwrap
(
self
.
models
[
newname
],
newname
)])
i
=
self
.
l
.
GetFirstSelected
()
if
i
!=
-
1
:
self
.
l
.
Select
(
i
,
0
)
self
.
l
.
Select
(
self
.
l
.
GetItemCount
()
-
1
)
self
.
Refresh
()
def
autoplate
(
self
,
event
):
def
autoplate
(
self
,
event
):
print
"Autoplating"
print
"Autoplating"
self
.
testingloadfile
(
'C:
\\
Users
\\
tjhowse
\\
reprap
\\
models
\\
big_gear.stl'
)
self
.
testingloadfile
(
'C:
\\
Users
\\
tjhowse
\\
reprap
\\
models
\\
big_gear.stl'
)
self
.
testingloadfile
(
'C:
\\
Users
\\
tjhowse
\\
reprap
\\
models
\\
big_gear.stl'
)
self
.
testingloadfile
(
'C:
\\
Users
\\
tjhowse
\\
reprap
\\
models
\\
big_gear.stl'
)
self
.
testingloadfile
(
'C:
\\
Users
\\
tjhowse
\\
reprap
\\
models
\\
prusabits
\\
stl
\\
x-end-idler.stl'
)
#self.testingloadfile('C:\\Users\\tjhowse\\reprap\\models\\prusabits\\stl\\x-end-idler.stl')
self
.
testingloadfile
(
'C:
\\
Users
\\
tjhowse
\\
reprap
\\
models
\\
prusabits
\\
stl
\\
x-end-idler.stl'
)
#self.testingloadfile('C:\\Users\\tjhowse\\reprap\\models\\prusabits\\stl\\x-end-idler.stl')
#self.testingloadfile('C:\\Users\\tjhowse\\reprap\\models\\prusabits\\stl\\pla-bushing.stl')
self
.
testingloadfile
(
'C:
\\
Users
\\
tjhowse
\\
reprap
\\
models
\\
prusabits
\\
stl
\\
pla-bushing.stl'
)
self
.
testingloadfile
(
'C:
\\
Users
\\
tjhowse
\\
reprap
\\
models
\\
top.stl'
)
self
.
testingloadfile
(
'C:
\\
Users
\\
tjhowse
\\
reprap
\\
models
\\
top.stl'
)
self
.
testingloadfile
(
'C:
\\
Users
\\
tjhowse
\\
reprap
\\
models
\\
top.stl'
)
separation
=
2
separation
=
2
bedsize
=
[
200
,
200
,
100
]
bedsize
=
[
200
,
200
,
100
]
cursor
=
[
0
,
0
,
0
]
cursor
=
[
0
,
0
,
0
]
...
...
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