CadQuery / CadQuery/cadquery

Bug: Offset2D does not work for a single line

Open
#508 4 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
5.8k
Forks
541
Avg merge
3d 2h
Merged PRs (30d)
5

Description

I would like to create a capsule shape by offsetting from a line by a fixed radius, but I get an error "Null TopDS_Shape object"

I have found a workaround where I create an arc with a very large radius to approximate a straight line and that works. Am I doing something wrong or is this a bug?

```
import cadquery as cq

lineLen = 1
arcHack = False
r = cq.Workplane("XY")
if arcHack:
r = r.sagittaArc((0, lineLen), 0.01)
else:
r = r.line(0,lineLen)
r= r.offset2D(0.1)
r =r.extrude(0.2)
```

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.