forked from youen/assembly_handbook
Increased line width for better readability when drawings are printed
This commit is contained in:
parent
dfe5d329b3
commit
ed487eab3d
@ -423,7 +423,7 @@ class RasterView:
|
||||
|
||||
# We need to set two different values otherwise freecad does not always update LineWidth of sub-elements
|
||||
obj.ViewObject.LineWidth = 1.0
|
||||
obj.ViewObject.LineWidth = 2.0
|
||||
obj.ViewObject.LineWidth = 3.0
|
||||
else:
|
||||
link.ViewObject.Visibility = False
|
||||
|
||||
@ -482,12 +482,13 @@ class RasterView:
|
||||
|
||||
print_verbose('Extracting outlines...')
|
||||
outlines_img = None
|
||||
for x in range(0, 3):
|
||||
for y in range(0, 3):
|
||||
if x == 1 and y == 1: continue
|
||||
kernel = [0, 0, 0, 0, 1, 0, 0, 0, 0]
|
||||
kernel[y * 3 + x] = -1
|
||||
partial_outlines = shapes_img.filter(ImageFilter.Kernel((3, 3), kernel, 1, 127))
|
||||
for x in range(0, 5):
|
||||
for y in range(0, 5):
|
||||
if x == 2 and y == 2: continue
|
||||
if (x-2)*(x-2) + (y-2)+(y-2) > 4: continue
|
||||
kernel = [0,0,0,0,0, 0,0,0,0,0, 0,0,1,0,0, 0,0,0,0,0, 0,0,0,0,0]
|
||||
kernel[y * 5 + x] = -1
|
||||
partial_outlines = shapes_img.filter(ImageFilter.Kernel((5, 5), kernel, 1, 127))
|
||||
partial_outlines = partial_outlines.point(lambda p: 255 if p == 127 else 0)
|
||||
partial_outlines = partial_outlines.convert("L")
|
||||
partial_outlines = partial_outlines.point(lambda p: 255 if p == 255 else 0)
|
||||
|
Loading…
Reference in New Issue
Block a user