1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
|
BUGS (FIXME: Verify and move these to github)
---------------------------------------------
o Some invalid DXF data gets pass the import checks and breaks the tessing code
o Tesselation via GLU sometimes produces strange results
o Export STL: Exports existing CGAL model even though the current model is changed, but not CGAL rendered
o Look into the polygon winding and rotate_extrude() problem reported by Britton
o CGAL Aff_transformation_3 doesn't support non-affine transformations (non-aff-matrix.scad)
o 2D union of polygons with a touching vertex doesn't work. see testdata/scad/bugs/polygon-touch.scad
STL Import BUGS (FIXME: Verify and move these to github)
--------------------------------------------------------
Using STL-imported models is tricky and triggers multiple issues:
(these all fail with the usual "Illegal polygonal object" error)
1) null-faces causes F6 rendering to fail while F5 rendering succeeds.
(null-faces are exported by OpenSCAD). Example: adns2610_dev_circuit_inv.stl
by Andrew Plumb
2) Even very simple imported STL models don't render correctly with F5 when taking
a difference(), though F6 looks correct. Example: test_cube.stl by Andrew Plumb
with this scad file:
difference() {
import_stl("test_cube.stl");
translate([2,2,2]) cylinder(h=10);
}
3) More complex STL models with something simple unioned or subtracted fails rendering
using F6 even though F5 works. Example: adns2610_dev_circuit_inv.stl
by Andrew Plumb with the three null-faces removed by MeshLab with this scad file:
union() {
import_stl("adns2610_dev_circuit_inv_4.stl");
sphere(r=5);
}
4) More complex STL models cannot be projected (both F5 and F6).
Example: adns2610_dev_circuit_inv.stl by Andrew Plumb with the three
null-faces removed by MeshLab and this scad file:
projection(cut=true) {
import_stl("adns2610_dev_circuit_inv.stl");
}
USER INTERFACE
--------------
o Preferences
- Beautify color schemes
- Color schemes read from file
- Color scheme editor
- wireframe width
- pointsize
- OpenGL params
- Default language feature settings
- Make the library search path configurable?
- Turn on/off caching (advanced)
o MDI
- Think about how to do MDI the right way
- Ctrl-W should close the current dialog, not the current main window
-> implement as for Preferences?
- Menu bar handling:
Mac: share menubar among all top-level windows?
- currentPath is global but is used by each document, e.g. parser
and handle_dep.
o 3D View
- Improve mouse rotation/zoom/pan
- Add modifier key combos to handle pan and zoom on 1 mouse button systems
- Show grid
- Measurement ticks on the axes that look like rulers that one can turn off and on.
- 4 x split view w/orthogonal cameras?
- Quick highlighting of object under the cursor in the editor
- View All
- Allow specifying viewpoint in the scad file
- overlay indicator displaying current view mode
- Use OpenGL picking to facilitate ray-tracing like features like measuring
thicknesses, distances, slot thicknesses etc.
- Add option to change lights, e.g. add an optional camera light
- 2D objects are rendered at z = -0.1 - why?
- Rewrite to use VBOs or smth. - avoid inline calculations
- Rewrite to a higher-level library (e.g. OSG)?
- Make navigation (e.g. zoom) available through menu entries (requested by disabled user)
o Editor wishlist
- More infrastructure for external editor (allow communication from the outside)
- Preferences GUI for the features below
- line numbers
- tear-off/maximize options?
- Save somehow uses current dir, even if the file is already saved earlier
- Code completion/hints for builtin (and user-defined) functions/modules
- builtin quick function reference/help
- Drawer/popup with all modules/functions listed which can be inserted into
the editor by clicking or drag&drop -> icons in toolbar?
-> This would be moving in the direction of a traditional CAD GUI
and needs a fair bit of thinking.
- Display some kind of line wrap indicator
- Couple the source code to the AST to allow highlighting selected elements
in the source code in the 3D view
- Tabbed editor for designs including other files
- C-c/C-v should work on the focused widget, not always in the editor
- Auto-indent on enter and on tab
o Error reporting/debugging
- Provide better error messages when polygon ordering causes CGAL errors:
o Detect common error: self-intersecting polyhedron()
o Supply syntax highlighting of the exact polygon indices which are
reported to be wrong
o Provide some interaction for debug walk-through?
- Provide visual highlighting of geometry corresponding to code
-> could aid debugging a lot
- Optionally output console log to a file
- Common error: detect and report (and ignore?) duplicate line segments in DXF
o Computation
- Multi-threaded computation (mostly important for CGAL)
- Progress: Call progresswidget more often to improve feedback
o Misc
- Save: Ask for confirmation if file has been externally changed
- Rename OpenCSG and CGAL to smth. not specific to the underlying libraries
(e.g Preview, Render)
- If trying to export STL/DXF but source is newer than the CGAL rendering, ask
for confirmation.
- Go through keyboard shortcuts and make them more conformant to platform standards
- Show design info/stats (sizes, caches etc.)
- Support Voice Over and related technologies for vision-impaired users
o Cmd-line
- Add verbose option (PRINT command from mainwin.cc and progress output)
OpenCSG-related
---------------
o OpenCSG rendering: Coincident surfaces causes z-buffer fighting. Is this somehow
avoidable tuning the depth tests in OpenCSG?
o When specifying a transparency with the color() statement,
the object is not sorted and will be rendered wrongly. See issue #310 for some good test models.
o Bug: Using the background operator (%) on the only object in a scene triggers a
CSG error: No top level object found
CGAL-related
------------
o Hollow donut problem
When extruding a 2D CSG tree (e.g. a polygon with a hole), the hole
information is lost when performing the extrusion. For linear
extrusions, this has only a minor visual impact, but for rotate
extrusion, the resulting CGAL models will lose the hole. The OpenCSG
rendering keeps the hole, but renders slightly incorrect.
o CGAL issues
- CGAL doesn't handle almost planar polygons. Consider splitting into triangles ourselves. See WillamAdams/dodec.scad
o Look at the EPEC kernel for improved performance (suggested by Giles)
o Look at performance: Is CGAL doing proper bounding box calculation before testing all primitives?
LANGUAGE && BUILTINS
--------------------
o Primitives
- Springs, spirals (requested by Cathal Garvey)
- (TTF) Text
- Image-based height field like http://www.thingiverse.com/thing:2078
- mesh (coordinates and indices)
o 2D Subsystem
- Performance: Is it necessary to union children before extrusion
when compiling? Can this be postponed to CGAL evaluation time?
- Add inset() operation
o Built-in modules
- extrude*: Allow the base 2D primitive to have a Z value
- rotate_extrude(): Allow for specification of start/stop/sweep angle?
o Advanced Transformations
- Add statement for refinement via surface subdivision
- Add statement for intersections in cartesian product of childs
o Function-Module-Interface
- Pass a module instanciation to a function (e.g. for a volume() function)
- Pass a function to a module instanciation (e.g. for dynamic extrusion paths)
o Language Frontend
- Allow local variables and functions everywhere (not only on module level)
- Rethink for vs. intersection_for vs. group. Should for loops
generate child lists instead, and make these passable to other
modules or accessible by child()?
o Misc
- center as default: Very often, center=true is used everywhere.
Make a global variable ($center?) control this to beautify code
and the avoid typical errors when forgetting to specify center
- Go through default values of parameters (e.g. cube() has x,y,z=1 while linear_extrude() has height=100)
- Add support for symbolic names to child() statement
- Add 'lines' object type for non-solid 2d drawings
- Is there a reason why modules like echo, empty if, empty for loop returns an
empty AbstractNode instead of being ignored?
- Dependency tracking of libraries (USE'd modules) isn't implemented. See Mail from nophead 20110823.
o Grammar/Parser
- dim->name -> dim->label
- A random(seed) function
- linear_extrude()/rotate_extrude(): Cumbersome names? -> (extrude, revolve, lathe, sweep ?)
- If a compile error occurs in an included file, line numbers are global
and doesn't say in which file the error occurred.
INFRASTRUCTURE
--------------
o DXF Import/Export
- Use dxflib from RibbonSoft for import/export? -> investigate
- Import
- Support for POLYLINE entity
- Support for SPLINE entity
- Support for LEADER entity
- Support for MTEXT entity ?
- idea: DXF inline - convert from dxf to OpenSCAD syntax -> parametrize dxf content
- Progress when exporting large STLs
o Mesh optimization on STL export
- Remove super small triangles (all sides are short)
- Replace super thin triangles (one h is short)
o Use a logging framework to get debugging/info output more under control?
(check log4j, google project)
o Export to other file formats
- IGES: Should support CSG so it might be possible to keep some structure
IDEAS FOR LANGUAGE CHANGES
--------------------------
o More strict checking of module parameters to make e.g. this fail:
module test(a,b) { a=1; b=2; echo(a,b,c); } test(c=3);
(also for built-in modules)
CODE
----
o Refactor from MainWindow:
- Put all application-global data in one place (QApplication subtype?)
- Fix current_win hack
- CSG data structure (compiled model)
- CGAL data structure (compiled model)
o C++-ify
- Use static_cast/dynamic_cast instead of C-style casts
o dxflinextrude and dxfrotextrude could share code
o Consider decoupling DXF-specific functionality from the 2D subsystem
o Visitation refactoring
- Make AbstractNode members private/protected?
DOCUMENTATION
-------------
o Auto-generate API documentation instead of, in addition to or combined with, the wikibooks docs.
o Write checklists for typical extension work (add new module, add new function)
-> make sure new test files are added
o Clarify include/use better in the wikibook docs (e.g. that use'd modules have to be self-contained)
TESTING
-------
o Caching and MDI looks suspicious when the code relies on external resources
which might be loaded from difference locations in different documents
-> we might get a false cache hit
o Collect "all" available OpenSCAD scripts from the internets and run the integration
tests on them all
MISSING TESTS:
--------------
o cmd-line -D variable override
o OPENSCADPATH env.variable
o all functions
o mirror
o scale
o open polyline from dxf using new method
o linear_extrude DXF
o rotate_extrude DXF
o import_stl
o import_off
o import_*
- open polylines
o include: test subdirs under librarydir (e.g. include <MCAD/gears.scad>)
o variants of module transparent() { %child(); }
o define modules
o define functions
o built-in variables and constants (builtin-tests.scad)
o Caching
- Test that caching is actually performed (speedup + same results)
- Test the modifier characters correctly influence the cache (also when
added/removed)
- Test the individual caches
- PolySetCache
- CGALCache
- nodecache
- ModuleCache
o other tests
- export
- cmd-line tests
- leaf nodes having children, e.g. cube() cylinder();
- dependency tracking (use and include)
|