Mercurial > repos > public > sbplib
comparison +multiblock/Def.m @ 773:edb1d60b0b77 feature/grids
Return line handles from show methods in Def and Ti
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 18 Jul 2018 15:26:15 -0700 |
parents | 687756646aa9 |
children |
comparison
equal
deleted
inserted
replaced
772:687756646aa9 | 773:edb1d60b0b77 |
---|---|
46 end | 46 end |
47 | 47 |
48 g = multiblock.Grid(grids, obj.connections, obj.boundaryGroups); | 48 g = multiblock.Grid(grids, obj.connections, obj.boundaryGroups); |
49 end | 49 end |
50 | 50 |
51 function show(obj, label, gridLines, varargin) | 51 function h = show(obj, label, gridLines, varargin) |
52 default_arg('label', 'name') | 52 default_arg('label', 'name') |
53 default_arg('gridLines', false); | 53 default_arg('gridLines', false); |
54 | 54 |
55 h = []; | |
55 if isempty('label') && ~gridLines | 56 if isempty('label') && ~gridLines |
56 for i = 1:obj.nBlocks | 57 for i = 1:obj.nBlocks |
57 obj.blockMaps{i}.show(2,2); | 58 h = [h, obj.blockMaps{i}.show(2,2)]; |
58 end | 59 end |
59 axis equal | 60 axis equal |
60 return | 61 return |
61 end | 62 end |
62 | 63 |
63 if gridLines | 64 if gridLines |
64 ms = obj.getGridSizes(varargin{:}); | 65 ms = obj.getGridSizes(varargin{:}); |
65 for i = 1:obj.nBlocks | 66 for i = 1:obj.nBlocks |
66 obj.blockMaps{i}.show(ms{i}(1),ms{i}(2)); | 67 h = [h, obj.blockMaps{i}.show(ms{i}(1),ms{i}(2))]; |
67 end | 68 end |
68 end | 69 end |
69 | 70 |
70 | 71 |
71 switch label | 72 switch label |