CadQuery / CadQuery/cadquery

The model exported ( as .STEP file ) has some broken surface

Open
#1,416 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

My code use a complex surface to cut&split a box

**step-1**: use **param_surface()** to define a complex&irregular surface
```python
param_surface = cq.Workplane().parametricSurface(Bsurface, N=400, start=-0.1, stop=100+0.1, tol=1e-4,\
minDeg=1, maxDeg=1, smoothing=None)
```

**step-2**:use this surface to cut&split a simple box
```python
shape = cq.Workplane().center(50, 50).box(100,100,30).split(param_surface).solids('>Z')
```

**step-3**:export shape as a .step file & a .stl file
```python
shape.val().exportStep(step_name_xxx, write_pcurves=False, precision_mode=0)
cq.exporters.export(shape, stl_name_xxx, tolerance=1e-3, angularTolerance=1e-2)
```

The problem is because param_surface is very complex,my .step file is very large ( ~12MB ).
It's so so so **slow** when i want to open it as solid with SolidWorks 2022.
And SolidWorks diagnosis show my model have some **broken surface** (and report surface error), but .stl file seems OK.

I dont understand why these broken surface exist ? Does cadquery have API to check&fix such broken surface?

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.