You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: doc/cqgi.rst
+5-13
Original file line number
Diff line number
Diff line change
@@ -145,7 +145,7 @@ Automating export to STL
145
145
-------------------------
146
146
A common use-case for the CQGI is the automation of processing cad-query code into geometary, doing so via the CQGI rather than an export line in the script-itself lead to a much tidier enviroment; you may need to do this as part of an automated-workflow, batch-conversion, exporting to another software for assembly, or running stress simulations on resulting bodies.
147
147
148
-
The below python script demonstrates how to open, process, and export and STL file from any valid cadquery script.
148
+
The below python script demonstrates how to open, process, and export and STL file from any valid cadquery script::
149
149
150
150
# Load CQGI
151
151
import cadquery.cqgi as cqgi
@@ -159,19 +159,11 @@ The below python script demonstrates how to open, process, and export and STL fi
159
159
160
160
# test to ensure the process worked.
161
161
if build_result.success:
162
-
count = 0;
163
-
# loop through all the shapes returned
164
-
for result in build_result.results:
165
-
# open the output file (count variable is used here such that the output would be:
166
-
# example_output0.stl, example_output1.stl, etc for each returned shape
167
-
with open('example_output'+ str(count) + '.stl', 'w') as f:
0 commit comments