-
Notifications
You must be signed in to change notification settings - Fork 0
3.2 export_config.py
Charles Lenk edited this page Jan 3, 2026
·
3 revisions
The export configuration supports additional parameters to configure defaults to use for all exports, or to configure how the export itself runs like setting the number of threads to use.
To set these options create an instance of the ExportConfig and pass the desired arguments like in the image export example. Make sure to pass the modified export config to the export function as a argument, also demonstrated in the example.
from scad_export import ExportConfig
| Field Name | Type | Default | Description |
|---|---|---|---|
| output_naming_format | NamingFormat | NamingFormat.TITLE_CASE |
The naming format to use for exported files and folders. |
| default_model_format | ModelFormat | ModelFormat._3MF |
The default file type for exported models. If you want to override the model type for a single file, use the model level setting. |
| default_image_color_scheme | ColorScheme | ColorScheme.CORNFIELD |
The default color scheme to use for exported images. Supports all OpenSCAD color schemes. To override the color scheme for a single image, use the image level setting. |
| default_image_size | ImageSize | ImageSize(1600, 900) |
The default image resolution to use for exported images. To override the resolution for a single image, use the image level setting. |
| parallelism | integer |
System CPU count. | The number of models to render in parallel. If you want to reduce the performance impact of rendering while accepting longer run times, set this value to a number below the number of CPU cores. Setting this value to 1 will cause only one model to render at a time. |
| debug | boolean |
False |
Whether the export should output debug statements to the console. |
The format to use when generating the names of output files and folders. When formatting the name, the following will also be appended:
- The file format (e.g.
.stl). - The count if the quantity of the exportable is greater than
1. - Any additional user-defined args given in the exportable definition. For example, in the export example script, the first cube would have '(x-5) (y-5) (z-5)' appended to the file name.
from scad_export import NamingFormat
| Name | Description |
|---|---|
| NONE | Use the folder and file name as written. If using this option, the file format and quantity will still be appended to the file name, but additional args will not. |
| TITLE_CASE | Capitalize each word and use space as a separator. |
| SNAKE_CASE | Lower-case each word and use underscore as a separator. |