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):
247247 else :
248248 width = height * (bb .xlen / bb .ylen )
249249
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+
250256 # width pixels for x, height pixels for y
251257 unitScale = min (width / bb .xlen * bb_scale , height / bb .ylen * bb_scale )
252258
@@ -290,8 +296,8 @@ def getSVG(shape, opts=None):
290296 "visibleContent" : visibleContent ,
291297 "xTranslate" : str (xTranslate ),
292298 "yTranslate" : str (yTranslate ),
293- "width" : str (width ),
294- "height" : str (height ),
299+ "width" : str (image_width ),
300+ "height" : str (image_height ),
295301 "textboxY" : str (height - 30 ),
296302 "uom" : str (uom ),
297303 "axesIndicator" : axesIndicator ,
You can’t perform that action at this time.
0 commit comments