Skip to content

[BUG] linear_sweep cannot produce geometry with exactly N + 1/2 rotations #1999

Description

@bracketttc

Describe the bug

linear_sweep cannot produce geometry with exactly N + 1/2 rotations.

Code To Reproduce Bug

region = regular_ngon( 6, 8 );
linear_sweep( region, height=100, twist=180);
ERROR: Assertion '(norm(v) >= _EPSILON)' failed: "
Cannot normalize a zero vector." in file /usr/share/openscad/libraries/BOSL2/vectors.scad, line 227
TRACE: called by 'unit' infile /usr/share/openscad/libraries/BOSL2/skin.scad, line 795
TRACE: called by '_make_all_prism_anchors' in file /usr/share/openscad/libraries/BOSL2/skin.scad, line 931
TRACE: called by 'linear_sweep' in file /usr/share/openscad/libraries/BOSL2/skin.scad, line 766
TRACE: caled by 'linear_sweep' in file poc.scad, line 3

Expected behavior
Produces solid with a hexagonal cross-section that sweeps around a half turn.

Screenshots
Not necessary.

Additional context
Add any other context about the problem here.

  • OpenSCAD Version: 2.0.736 packaged by Fedora
  • Other libraries used:

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions