Skip to content

Commit

Permalink
[bug] mcxplotshapes patch by ChenJY-L to plot Box, close #227
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Jul 14, 2024
1 parent 78716e4 commit b17cb1a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion utils/mcxplotshapes.m
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@
tag = obj.Tag;
end
gridsize = obj.Size;
[no, fc] = latticegrid([0 obj.Size(1)], [0 obj.Size(2)], [0 obj.Size(3)]);
if (isfield(obj, 'O'))
[no, fc] = latticegrid([0 obj.Size(1)] + obj.O(1), [0 obj.Size(2)] + obj.O(2), [0 obj.Size(3)] + obj.O(3));
else
[no, fc] = latticegrid([0 obj.Size(1)], [0 obj.Size(2)], [0 obj.Size(3)]);
end
hseg(end + 1) = plotmesh(no * voxelsize, fc, 'facealpha', 0.3, 'linestyle', '-', 'facecolor', 'none', varargin{:});
case 'Sphere'
obj = shp.(sname{1});
Expand Down

0 comments on commit b17cb1a

Please sign in to comment.