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
0711c27a
Commit
0711c27a
authored
Sep 08, 2011
by
Travis Howse
Browse files
Options
Browse Files
Download
Plain Diff
:Merge branch 'master' into debug
Conflicts: plater.py
parents
fb86e290
e11f7edb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
plater.py
plater.py
+11
-9
No files found.
plater.py
View file @
0711c27a
...
@@ -81,6 +81,7 @@ class showstl(wx.Window):
...
@@ -81,6 +81,7 @@ class showstl(wx.Window):
stltool
.
emitstl
(
name
,
facets
,
"plater_export"
)
stltool
.
emitstl
(
name
,
facets
,
"plater_export"
)
print
"wrote "
,
name
print
"wrote "
,
name
<<<<<<<
HEAD
def
testingloadfile
(
self
,
name
):
def
testingloadfile
(
self
,
name
):
print
name
print
name
if
not
(
os
.
path
.
exists
(
name
)):
if
not
(
os
.
path
.
exists
(
name
)):
...
@@ -170,26 +171,27 @@ class showstl(wx.Window):
...
@@ -170,26 +171,27 @@ class showstl(wx.Window):
centreoffset
=
[
self
.
models
[
i
]
.
dims
[
0
]
+
centre
[
0
],
self
.
models
[
i
]
.
dims
[
2
]
+
centre
[
1
]]
centreoffset
=
[
self
.
models
[
i
]
.
dims
[
0
]
+
centre
[
0
],
self
.
models
[
i
]
.
dims
[
2
]
+
centre
[
1
]]
if
(
newrow
==
0
)
or
(
newrow
<
y
):
if
(
newrow
==
0
)
or
(
newrow
<
y
):
newrow
=
y
newrow
=
y
if
(
cursor
[
0
]
+
x
+
separation
)
>=
bedsize
[
0
]:
cursor
[
0
]
=
0
cursor
[
1
]
+=
newrow
+
separation
newrow
=
0
#To the person who works out why the offsets are applied differently here:
#To the person who works out why the offsets are applied differently here:
# Good job, it confused the hell out of me.
# Good job, it confused the hell out of me.
self
.
models
[
i
]
.
offsets
[
0
]
=
cursor
[
0
]
+
centre
[
0
]
-
centreoffset
[
0
]
self
.
models
[
i
]
.
offsets
[
0
]
=
cursor
[
0
]
+
centre
[
0
]
-
centreoffset
[
0
]
self
.
models
[
i
]
.
offsets
[
1
]
=
cursor
[
1
]
+
centre
[
1
]
+
centreoffset
[
1
]
self
.
models
[
i
]
.
offsets
[
1
]
=
cursor
[
1
]
+
centre
[
1
]
+
centreoffset
[
1
]
cursor
[
0
]
+=
x
+
separation
cursor
[
0
]
+=
x
+
separation
if
cursor
[
0
]
>=
bedsize
[
0
]:
cursor
[
0
]
=
0
cursor
[
1
]
+=
newrow
+
separation
newrow
=
0
self
.
models
[
i
]
.
offsets
[
0
]
=
cursor
[
0
]
+
centre
[
0
]
-
centreoffset
[
0
]
self
.
models
[
i
]
.
offsets
[
1
]
=
cursor
[
1
]
+
centre
[
1
]
+
centreoffset
[
1
]
cursor
[
0
]
+=
x
+
separation
if
(
cursor
[
1
]
+
y
)
>=
bedsize
[
1
]:
if
(
cursor
[
1
]
+
y
)
>=
bedsize
[
1
]:
print
"Bed full, sorry sir :("
print
"Bed full, sorry sir :("
self
.
Refresh
()
self
.
Refresh
()
return
return
centreoffset
=
[
bedsize
[
0
]
-
cursor
[
0
],
bedsize
[
1
]
-
cursor
[
1
]]
for
i
in
self
.
models
:
self
.
models
[
i
]
.
offsets
[
0
]
+=
centreoffset
[
0
]
self
.
models
[
i
]
.
offsets
[
1
]
+=
centreoffset
[
1
]
self
.
Refresh
()
self
.
Refresh
()
def
right
(
self
,
event
):
def
right
(
self
,
event
):
dlg
=
wx
.
FileDialog
(
self
,
"Open file to print"
,
self
.
basedir
,
style
=
wx
.
FD_OPEN
|
wx
.
FD_FILE_MUST_EXIST
)
dlg
=
wx
.
FileDialog
(
self
,
"Open file to print"
,
self
.
basedir
,
style
=
wx
.
FD_OPEN
|
wx
.
FD_FILE_MUST_EXIST
)
dlg
.
SetWildcard
(
"STL files (;*.stl;)"
)
dlg
.
SetWildcard
(
"STL files (;*.stl;)"
)
...
...
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