Export SVG of .STEP file not center
- Dominant language
- Python
- Stars
- 5.8k
- Forks
- 541
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 5
Description
Heya folks, quick disclaimer: I'm a noob to cq, but not a noob to 3D geometry operations and modelling, etc.
I'm using CQ as a part of my project to quickly render out parts for quick viewing. Our objects are created in our own cad engine and then converted to a .STEP file. I am 100% sure it's still center in both files, I've checked. However, when I use CQ to export it was an SVG, the object comes out uncentered. I would attach an example, but the upload fails for some reason.
Here is the code I use for export:
```Python
result = cq.importers.importStep("/path/to/step/part_235.step")
result.export("./outputs/part_235.svg",
opt={
"width": 800,
"height": 800,
"showAxes": True,
"showHidden": True,
"projectionDir": (0, 0, 1),
"strokeColor": (0, 255, 0),
}
)
```
I have tried `result = result.translate()` which doesn't seem to do anything to move the object.
I have also tried `result = result.center()` but this results in an error: `OCP.Standard.Standard_ConstructionError: Bnd_Box is void`
Not quite sure where to go from here, the image is off-center and documentation hasn't revealed anything to me yet.
Thank you for any info.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.