CadQuery / CadQuery/cadquery

Import STEP file and save as Shape object for STL conversion

Open
#1,390 1 comment 0 reactions 0 assignees View on GitHub
question
Dominant language
Python
Stars
5.8k
Forks
541
Avg merge
3d 2h
Merged PRs (30d)
5

Description

Hello,

I am attempting to import and convert a STEP file to an STL file.

Currently, my code is the following for STEP to STL

```Python
import cadquery as cq
afile = cq.importers.importStep(fileNameFrom) # File in directory
cq.exporters.export(afile,fileNameOut) # Place the converted file in the same directory, ends with ".stl"
```
The issue is that this does not allow for tolerance modification, resulting in extremely large file sizes when going from STEP to STL (often 22 MB to 386 MB).

Instead, I would like to import the STEP file and save it to the Shape object to use the exportSTL method: https://cadquery.readthedocs.io/en/latest/importexport.html#exporting-stl

However, I can't find any documentation on this principle. How do I go about completing thing conversion?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.