1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
function CSX = AddCylindricalShell(CSX, propName, prio, start, stop, rad, shell_width, varargin)
%function CSX = AddCylindricalShell(CSX, propName, prio, start, stop, rad, shell_width, varargin)
%
% Add a cylinder shell to CSX and assign to a property with name <propName>.
%
% start: cylinder axis start coordinates
% stop : cylinder axis box stop coordinates
% rad : cylinder radius
% shell_width: cylinder shell width
% prio : primitive priority
%
% Note:
% the inner radius of this shell is rad-shell_width/2
% the outer radius of this shell is rad+shell_width/2
%
% example:
% CSX = AddMetal(CSX,'metal'); %create PEC with propName 'metal'
% CSX = AddCylindricalShell(CSX,'metal',10,[0 0 0],[0 0 200],50,10);
%
% See also AddBox, AddCylinder, AddSphere, AddSphericalShell,
% AddCurve, AddWire, AddMetal
%
% CSXCAD matlab interface
% -----------------------
% author: Thorsten Liebig
cylinder.ATTRIBUTE.Priority = prio;
cylinder.ATTRIBUTE.Radius = rad;
cylinder.ATTRIBUTE.ShellWidth = shell_width;
cylinder.P1.ATTRIBUTE.X=start(1);
cylinder.P1.ATTRIBUTE.Y=start(2);
cylinder.P1.ATTRIBUTE.Z=start(3);
cylinder.P2.ATTRIBUTE.X=stop(1);
cylinder.P2.ATTRIBUTE.Y=stop(2);
cylinder.P2.ATTRIBUTE.Z=stop(3);
cylinder = AddPrimitiveArgs(cylinder,varargin{:});
CSX = Add2Property(CSX,propName, cylinder, 'CylindricalShell');
|