V1 : rectangularExtrude()'s "roundEnds" boolean parameter seems to be ignored
See original GitHub issueExpected 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:
Identical to when the roundedEnds
parameter is true
:
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
- paste the above code in https://openjscad.org/
Specifications
- Version: Current OpenJSCAD.org (v1.9.0)
- Platform: Linux
- Environment: Chromium
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@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.
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