question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

V1 : rectangularExtrude()'s "roundEnds" boolean parameter seems to be ignored

See original GitHub issue

Expected Behavior

The shape produced by the following code should be an “L” shape, with flat ends, and a sharp corner

function main () {
var path = new CSG.Path2D([[0,0], [10,0], [10, 10]], /* closed = */ false);
return path.rectangularExtrude(3, 4, 12, false);
}

Actual Behavior

The ends are rounded:

screenshot from 2018-10-15 13 48 14

Identical to when the roundedEnds parameter is true:

screenshot from 2018-10-15 13 50 03

It’s possible i’m just misunderstanding what this parameter is supposed to be doing. The description I read is from here: https://www.openjscad.org/dokuwiki/doku.php?id=design_guide_rectangular_extrude

roundEnds: if true, the ends of the polygon will be rounded, otherwise they will be flat

Steps to Reproduce the Problem

  1. paste the above code in https://openjscad.org/

Specifications

  • Version: Current OpenJSCAD.org (v1.9.0)
  • Platform: Linux
  • Environment: Chromium

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
z3devcommented, Oct 23, 2020

@gabrielgrant www.jscad.xyz is now running the latest V2 JSCAD (alpha version). There’s an example on the new offset functionality, which includes ‘chamfer’, ‘edge’, and ‘rounded’ corners.

1reaction
z3devcommented, May 26, 2020

Not yet, but pretty soon.

If you’d like there are some V2 notes for early adopters, here…

https://openjscad.org/dokuwiki/doku.php?id=early_v2

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is wrong with boolean parameters?
A boolean parameter is a small brick in the code complexity wall. It's a common one. Hopefully, it's also one that is easy...
Read more >
Boolean parameters in user macros ignore default values - Jira
Create a user macro with the following Code: ## @param debug:title=Debug Mode|type=boolean|default=false ## Print default set #if($paramdebug) BOOLEAN VARIABLE ...
Read more >
Is it wrong to use a boolean parameter to determine behavior?
So you have a bug because someone omitted to pass the parameter. ... The basic scenario that should be avoided regarding boolean parameters...
Read more >
How to pass boolean values to a PowerShell script from a ...
It appears that powershell.exe does not fully evaluate script arguments when the -File parameter is used. In particular, the $false argument ...
Read more >
No love for boolean parameters - TkDodo's blog
So simple and predictable. At the end of the day, all code we write winds up in lots of zeros and ones. There...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found