?? gmshowcolor.m
字號:
function gmshowcolor(b, dim);% gmshowcolor(obj {, dim}) makes a plot of the colors of% the faces of the object. This is useful for setting% up boundary conditions. dim is the dimension of faces% whose colors show, default for dim is the embedded% dimension of the brep - 1 or its intrinsic dim, whicheverif ~isa(b,'zba') error('Object passed to gmrndcolor not a zba');endif length(b) < 1 error('Object passed to gmrndcolor not a brep');endglobal GM_BREP_TYPE_CODEif ~strcmpi(double(b{0}), GM_BREP_TYPE_CODE) error('Object passed to gmrndcolor not a brep');endgdim = double(b{1});di = double(b{2});if nargin < 2 dim = min(di - 1, gdim);endif dim < 0 | dim > gdim error('Second argument must lie between 0 and intrinsic dim');end[scrap,numface] = size(b{5+dim});fi = figure;hgt = 25;off = 40;set(fi, 'units', 'pixels');v = get(fi, 'Position');set(fi, 'Position', [v(1),v(2), 600, (hgt * numface + off)]);ax = gca;set(ax,'Units', 'pixels');set(ax,'Visible', 'off');set(ax,'NextPlot', 'add');set(ax,'Xlim',[0,2.5])fa = 0;[engine, filename, filestat, notify, format, ... thicken, default_color, beziersub] = gmvizgui_get_state(dim);for fa1 = 0 : numface - 1 cspec = gm_lookup_prop(b,dim,fa1,'color'); if length(cspec) == 0 co = default_color; default = 1; else co = sscanf(cspec, '(%f %f %f %f)')'; default = 0; end if co(4) > 0 ypos = (numface - 1 - fa) * hgt + off; h = fill([0,1,1,0], [ypos,ypos,(ypos+hgt),(ypos+hgt)], co(1:3)); text(1.1, ypos+10, sprintf('%d', fa1), 'units','data'); if default text(1.2,ypos+10,'default', 'units','data'); else text(1.2,ypos+10,sprintf('(%f %f %f %f)',co(1),co(2),co(3),co(4)),... 'units','data'); end fa = fa + 1; endenduicontrol('style', 'pushbutton', 'string','Dismiss','callback', ... 'delete(gcf)', ... 'units', 'centimeters', 'position', [0, 0, 1.6, 1], ... 'backgroundcolor',[1,1,0]);set(ax,'HandleVisibility', 'callback');set(fi,'HandleVisibility', 'callback');% ------------------------------------------------------------------% Copyright (c) 1996 by Cornell University. All rights reserved.% See the accompanying file 'Copyright' for authorship information,% the terms of the license governing this software, and disclaimers% concerning this software.% ------------------------------------------------------------------% This file is part of the QMG software. % Version 1.1 of QMG, release date November 15, 1996.% ------------------------------------------------------------------
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -