Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CyanLight
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fxk8y
CyanLight
Commits
715f0557
Commit
715f0557
authored
3 years ago
by
fxk8y
Browse files
Options
Downloads
Patches
Plain Diff
Moar OpenSCAD wrapper development
parent
27d18e05
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pcb/SolidSilkScreenStylerScript/OpenSCAD.py
+25
-3
25 additions, 3 deletions
pcb/SolidSilkScreenStylerScript/OpenSCAD.py
with
25 additions
and
3 deletions
pcb/SolidSilkScreenStylerScript/OpenSCAD.py
+
25
−
3
View file @
715f0557
import
shutil
import
subprocess
...
...
@@ -33,11 +34,32 @@ class SCADFile:
class
OpenSCAD
:
ProcessBinary
=
[
'
/usr/bin/env
'
,
'
openscad
'
]
def
__init__
(
self
):
pass
self
.
__openscad
=
shutil
.
which
(
'
openscad
'
)
def
__call__
(
self
,
*
args
,
outfile
=
None
,
csglimit
=
None
,
**
kwargs
):
'''
args are added at the end, kwargs are used to od variable overrides
'''
cmd
=
[
self
.
__openscad
]
# Can we do better instead of replicating this all over the place???
if
csglimit
is
not
None
:
cmd
+=
[
f
'
--csglimit=
{
csglimit
}
'
]
for
k
,
v
in
kwargs
.
items
():
cmd
+=
[
'
-D
'
,
f
'
{
k
}
=
{
v
}
'
]
if
outfile
is
not
None
:
cmd
+=
[
'
-o
'
,
outfile
]
cmd
+=
args
print
(
f
'
Running OpenSCAD:
{
cmd
}
'
)
# TODO: remove after debugging?!
return
subprocess
.
Popen
(
cmd
).
communicate
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment