Comments (6)
Further investigation shows this is due to end point and begin point of polygon being equal.
Simple test case to see this:
function main() {
var points = [new CSG.Vector2D(0,0)];
points[1] = new CSG.Vector2D(0,10);
points[2] = new CSG.Vector2D(10,10);
points[3] = new CSG.Vector2D(0,0);
var shape1 = CAG.fromPoints( points );
return shape1;
}
At a minimum, a clear error to the user when begin and endpoint are equal would be nicest. Allowing begin=end would nicer still!
from openjscad.org.
test in openscad shows that begin=end is allowed there. Just paste:
polygon( points=[[0,0],[2,1],[1,2],[1,3],[3,4],[0,5],[0,0] ]);
and press F5 and F6.
from openjscad.org.
@bmcage could you submit a pull request making that compatible with OpenSCAD's way of doing things? I haven't personally run into this, but seems like a quick fix.
from openjscad.org.
@richievos I don't have a patch, so not sure what you mean with a pull request. I would expect opening an issue to be the only step possible at the moment.
You hit the same bug when internal points are double. I have that in some procedurs for simplicity of code, eg a kerf on a lasercutter. If you set kerf=0, my procedures make polygons with twice the same point, which works in openscad, but not in openJSCAD, For openJSCAD, I need to add if then blocks testing on the 0.
from openjscad.org.
fixed in joostn/OpenJsCad#54
See also #33
from openjscad.org.
I tested the examples from @bmcage using Release 0.3.0. Both render properly. I'm closing this issue.
from openjscad.org.
Related Issues (20)
- Balloons appear to be regenerating after toggling dropdown menu on jscad.app HOT 1
- V3 : test IO translations
- Union of 2D polygon and its mirrorX doesn't work HOT 1
- V3: parameter definitions
- subtracting extrudeHelical object (like threads) from a cube does not work as expected HOT 4
- Geometry is not closed error
- Vertices get merged unexpectedly HOT 5
- Select in parameters does not match other inputs style HOT 2
- JSCAD GUI does not cleanup messages for repeated SHIFT+ENTER on same script
- Feature request: openjscad.xyz/?uri= support for "data" scheme in addition to "http(s)" HOT 7
- Feature request: custom mouse controls HOT 1
- Typo in example
- plane.fromPoints() implementation buggy HOT 5
- V2 backwards compatibility with V1 HOT 15
- @jscad/stl-deserializer in the browser? HOT 7
- stl-deserializer having issues with some STLs HOT 4
- https issue and/or openjscad.xyz domain expired? HOT 9
- Keyboard Shortcuts Some Not Working HOT 1
- jscad cli does not work via clean install on fresh linux machine HOT 1
- 3D quickhull() does not always work correctly when all vertices are in same plane HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openjscad.org.