File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
cadquery/occ_impl/exporters Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -247,6 +247,12 @@ def getSVG(shape, opts=None):
247
247
else :
248
248
width = height * (bb .xlen / bb .ylen )
249
249
250
+ image_width = width + (marginLeft * 2.0 )
251
+ image_height = height + (marginTop * 2.0 )
252
+ else :
253
+ image_width = width
254
+ image_height = height
255
+
250
256
# width pixels for x, height pixels for y
251
257
unitScale = min (width / bb .xlen * bb_scale , height / bb .ylen * bb_scale )
252
258
@@ -290,8 +296,8 @@ def getSVG(shape, opts=None):
290
296
"visibleContent" : visibleContent ,
291
297
"xTranslate" : str (xTranslate ),
292
298
"yTranslate" : str (yTranslate ),
293
- "width" : str (width ),
294
- "height" : str (height ),
299
+ "width" : str (image_width ),
300
+ "height" : str (image_height ),
295
301
"textboxY" : str (height - 30 ),
296
302
"uom" : str (uom ),
297
303
"axesIndicator" : axesIndicator ,
You can’t perform that action at this time.
0 commit comments