CadQuery / CadQuery/cadquery

Problem scaling an object

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

I want to scale a wire so I can do a `loft()` to a shrunken copy of itself (like OpenSCAD's `linear_extrude` with `scale` != 1). So the first step should be to shrink a (2d) object … right?

```python
f = 0.5
m = cq.Matrix([[f,0,0,0],[0,f,0,0],[0,0,f,0]])
ws = cq.Workplane("XY").rect(5,5) # simple example
s = ws.objects[0].transformShape(m)
```

Unfortunately this attempt results in
```
File "/opt/CQ-Editor/lib/python3.11/site-packages/cadquery/occ_impl/shapes.py", line 967, intransformShape
BRepBuilderAPI_Transform(self.wrapped, tMatrix.wrapped.Trsf()).Shape()
^^^^^^^^^^^^^^^^^^^^^^
OCP.Standard.Standard_ConstructionError: gp_GTrsf::Trsf() - non-orthogonal GTrsf
```
I have no idea why this matrix is considered to be non-orthogonal, nor how to fix this.

NB, the same thing happens when I try to scale a 3D shape.

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.