Skip to content

Commit b5766d0

Browse files
committed
added accuracy to OpenJsCad options
1 parent d77a913 commit b5766d0

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/core/openjscad.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,13 @@ module MakerJs.exporter {
151151
var depthModel: IModel;
152152

153153
var opts: IOpenJsCadOptions = {
154-
extrusion: 1
154+
extrusion: 1,
155+
accuracy: .0001
155156
};
156157

157158
extendObject(opts, options);
158159

159-
var loops = model.findLoops(modelToExport);
160+
var loops = model.findLoops(modelToExport, options.accuracy);
160161

161162
while (depthModel = loops.models[depth]) {
162163
var union = '';
@@ -210,6 +211,11 @@ module MakerJs.exporter {
210211
* Optional size of curve facets.
211212
*/
212213
facetSize?: number;
214+
215+
/**
216+
* Optional accuracy of points.
217+
*/
218+
accuracy?: number
213219
}
214220
}
215221

0 commit comments

Comments
 (0)