Last change of this documentation page: 2023-01-09 of SolidGeometry 5.2
axisAIM- Just sets some figure values for the AIM Book von Tim Lueth and Mattias Traeger

axisAIM% axisAIM - Just sets some figure values for the AIM Book von Tim Lueth and Mattias Traeger
% (by Tim Lueth, VLFL-Lib, 2022-DEZ-25 as class: VISUALIZATION)
%
% Introduced first in SolidGeometry 5.2
%
% See also: exportgraphicsSG
%
% axisAIM
%
% EXAMPLE:
% SGfigure(-30,30);
% axisAIM
% exportgraphicsSG
%
% See also: exportgraphicsSG
%
%
% Copyright 2022-2023 Tim C. Lueth

AIM_NavCarm- Creation of Pictures for a Navigation C-Arm scenario

AIM_NavCarm% AIM_NavCarm - Creation of Pictures for a Navigation C-Arm scenario
% (by Tim Lueth, VLFL-Lib, 2022-DEZ-24 as class: EXPERIMENTS)
%
% Introduced first in SolidGeometry 5.2
%
% See also: AIM_NavEndo
%
% AIM_NavCarm
%
% See also: AIM_NavEndo
%
%
% Copyright 2022-2023 Tim C. Lueth

ezofT(T)- just returns the ez vector of an HT Matrix as row

ezofT(T)% ezofT(T) - just returns the ez vector of an HT Matrix as row
% (by Tim Lueth, VLFL-Lib, 2022-DEZ-19 as class: KINEMATICS AND FRAMES)
%
% Introduced first in SolidGeometry 5.2
%
% See also: ezofchar, ezof3P
%
% ez=ezofT([T])
% === INPUT PARAMETERS ===
% T: DH Matrix 4x4
% === OUTPUT RESULTS ======
% ez: T(1:3,3)'
%
% EXAMPLE:
% ezofT(TofR([0 pi/2 pi/4]))
%
% See also: ezofchar, ezof3P
%
%
% Copyright 2022-2023 Tim C. Lueth

exportgraphicsSG(go,fname)- creates figure exports for the AIM Book or other Books of Tim Lueth

exportgraphicsSG(go,fname)% exportgraphicsSG(go,fname) - creates figure exports for the AIM Book or other Books of Tim Lueth
% (by Tim Lueth, VLFL-Lib, 2022-DEZ-19 as class: VISUALIZATION)
%
% Introduced first in SolidGeometry 5.2
%
% See also: axisAIM, setgcapixelsize
%
% exportgraphicsSG([go,fname])
% === INPUT PARAMETERS ===
% go: default is gca
% fname: default is desktopdir('SNAPSHOT')
%
% See also: axisAIM, setgcapixelsize
%
%
% Copyright 2022-2023 Tim C. Lueth

SGendoscope(D,L)- Creates an Endoscope in KARL STORZ Design

SGendoscope(D,L)% SGendoscope(D,L) - Creates an Endoscope in KARL STORZ Design
% (by Tim Lueth, VLFL-Lib, 2022-DEZ-16 as class: PARAMETRIC DESIGN)
%
% Introduced first in SolidGeometry 5.2
%
% See also: AIM_NavEndo
%
% SG=SGendoscope([D,L])
% === INPUT PARAMETERS ===
% D: Diameter
% L: Length
% === OUTPUT RESULTS ======
% SG: Solid Geoemtry
%
% EXAMPLE:
% SGendoscope(8,40)
%
% See also: AIM_NavEndo
%
%
% Copyright 2022-2023 Tim C. Lueth

setcamangle(na,nd)- set the camera angle is set

setcamangle(na,nd)% setcamangle(na,nd) - set the camera angle is set
% (by Tim Lueth, VLFL-Lib, 2022-DEZ-16 as class: VISUALIZATION)
%
% This fnctn belongs to a set of fnctn useful for AIM lectures (Status
% of: 2022-12-16)
%
% Introduced first in SolidGeometry 5.2
%
% See also: setcamzoom, setcamdistance, setcamtarget, setcamdirection
%
% setcamangle([na,nd])
% === INPUT PARAMETERS ===
% na: empty or 3D point or 4x4 HT Matrix
% nd:
%
% EXAMPLE:
% load AIM.mat; VM=V; [AM,as]=VMresize(VM,[0.5 0.5 0.5],vs); AM(:,230:256,:)=0;
% SG=SGofVMisosurface(AM>1400,as);
% SGfigure; SGplotalpha(SG,'w',0.5); rotate3dlight('off')
% view(-30,30); setcamtarget
%
%
% See also: setcamzoom, setcamdistance, setcamtarget, setcamdirection
%
%
% Copyright 2022 Tim C. Lueth

AIM_NavEndo- Creation of Pictures for a Navigation C-Arm scenario

AIM_NavEndo% AIM_NavEndo - Creation of Pictures for a Navigation C-Arm scenario
% (by Tim Lueth, VLFL-Lib, 2022-DEZ-15 as class: EXPERIMENTS)
%
% Introduced first in SolidGeometry 5.2
%
% See also: AIM_NavEndo, AIM_NavCarm
%
% AIM_NavEndo
%
% See also: AIM_NavEndo, AIM_NavCarm
%
%
% Copyright 2022-2023 Tim C. Lueth

setcamdirection(T)- sets the camera position without changing the camera target

setcamdirection(T)% setcamdirection(T) - sets the camera position without changing the camera target
% (by Tim Lueth, VLFL-Lib, 2022-DEZ-13 as class: VISUALIZATION)
%
% Introduced first in SolidGeometry 5.2
%
% See also: setcamdistance, setcamtarget, setcamzoom
%
% setcamdirection(T)
% === INPUT PARAMETERS ===
% T: ez or HT matrix; only ez is used
%
% EXAMPLE:
% SGbox; pause(1); setcamdirection([1 1 1]); shg
%
%
% See also: setcamdistance, setcamtarget, setcamzoom
%
%
% Copyright 2022-2023 Tim C. Lueth

SGimaging(SG,T,d,al,pix,dims)- creates a simulated transparent surface view or slice view

SGimaging(SG,T,d,al,pix,dims)% SGimaging(SG,T,d,al,pix,dims) - creates a simulated transparent surface view or slice view
% (by Tim Lueth, VLFL-Lib, 2022-DEZ-10 as class: VISUALIZATION)
%
% Introduced first in SolidGeometry 5.2
%
% [I,TI,sc]=SGimaging(SG,[T,d,al,pix,dims])
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% T: View direction of target to camera
% d: thickness of volume
% al: alpha value of solid during imaging
% pix: pixel size of image; default is 512 x 512
% dims: dimensions of the image; default is maximum
% === OUTPUT RESULTS ======
% I: Image struct including cdata, 'TI', and 'sc' as fields
% TI: Frame of upper left pixel
% sc: scale of image
%
% EXAMPLE:
% load AIM.mat; VM=V; [AM,as]=VMresize(VM,[0.5 0.5 0.5],vs); AM(:,230:256,:)=0;
% SG=SGofVMisosurface(smooth3(AM>1400),as);
% SGimaging(SG,[-1 -1 1],'',1);
% SGimaging(SG,[-1 -1 1],'',1,1024);
% SGimaging(SG,[-1 -1 1],'',1,1024,[50 600]);
%
%
%
% Copyright 2022 Tim C. Lueth

setcamzoom(zf)- zoom by changing the camera view angle;

setcamzoom(zf)% setcamzoom(zf) - zoom by changing the camera view angle;
% (by Tim Lueth, VLFL-Lib, 2022-DEZ-09 as class: VISUALIZATION)
%
% This fnctn belongs to a set of fnctn useful for AIM lectures (Status
% of: 2022-12-13)
%
% Introduced first in SolidGeometry 5.2
%
% See also: setcamdistance, setcamtarget, setcamdirection
%
% setcamzoom([zf])
% === INPUT PARAMETERS ===
% zf: zoom factor; default is 1
%
% EXAMPLE:
% load AIM.mat; VM=V; [AM,as]=VMresize(VM,[0.5 0.5 0.5],vs); AM(:,230:256,:)=0;
% SG=SGofVMisosurface(AM>1400,as);
% SGfigure; SGplotalpha(SG,'w',0.5); rotate3dlight('off')
% view(-30,30); setcamdistance(1000); setcamzoom(10);
%
% See also: setcamdistance, setcamtarget, setcamdirection
%
%
% Copyright 2022 Tim C. Lueth

setcamtarget (pp)- set the camera target interactively by a mouse click or a point or a frame

setcamtarget (pp)% setcamtarget (pp) - set the camera target interactively by a mouse click or a point or a frame
% (by Tim Lueth, VLFL-Lib, 2022-DEZ-09 as class: VISUALIZATION)
%
% This fnctn belongs to a set of fnctn useful for AIM lectures (Status
% of: 2022-12-13)
%
% Introduced first in SolidGeometry 5.2
%
% See also: setcamzoom, setcamdistance, setcamdirection
%
% setcamtarget([pp])
% === INPUT PARAMETERS ===
% pp: empty or 3D point or 4x4 HT Matrix
%
% EXAMPLE:
% load AIM.mat; VM=V; [AM,as]=VMresize(VM,[0.5 0.5 0.5],vs); AM(:,230:256,:)=0;
% SG=SGofVMisosurface(AM>1400,as);
% SGfigure; SGplotalpha(SG,'w',0.5); rotate3dlight('off')
% view(-30,30); setcamtarget
%
%
% See also: setcamzoom, setcamdistance, setcamdirection
%
%
% Copyright 2022 Tim C. Lueth

setcamdistance(nd,zf)- The distance of the camera position relative to the target position is fixed

setcamdistance(nd,zf)% setcamdistance(nd,zf) - The distance of the camera position relative to the target position is fixed
% (by Tim Lueth, VLFL-Lib, 2022-DEZ-09 as class: VISUALIZATION)
%
% This fnctn belongs to a set of fnctn useful for AIM lectures (Status
% of: 2022-12-13)
%
% Introduced first in SolidGeometry 5.2
%
% See also: setcamtarget, setcamzoom, setcamdirection
%
% setcamdistance([nd,zf])
% === INPUT PARAMETERS ===
% nd: new distance; default is unchanged
% zf: zoom factor at this positionl default is 1
%
% EXAMPLE:
% load AIM.mat; VM=V; [AM,as]=VMresize(VM,[0.5 0.5 0.5],vs); AM(:,230:256,:)=0;
% SG=SGofVMisosurface(AM>1400,as);
% SGfigure; SGplotalpha(SG,'w',0.5); rotate3dlight('off')
% setcamdistance
% setcamdistance(1000)
% setcamdistance(1000,2)
%
%
%
% See also: setcamtarget, setcamzoom, setcamdirection
%
%
% Copyright 2022 Tim C. Lueth

SGcut2T(SG,T1,T2,ct)- cuts out the SG that is below frame T1 and frame T2

SGcut2T(SG,T1,T2,ct)% SGcut2T(SG,T1,T2,ct) - cuts out the SG that is below frame T1 and frame T2
% (by Tim Lueth, VLFL-Lib, 2022-DEZ-08 as class: SURFACES)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGcut, SGcut2, SGcut2TextrudeT, SGcut2fit, SGcutBB, SGcutT,
% SGcutT4design, SGcutTA, SGcutTCPL, SGcutTCPLentry, SGcutTbladeangle,
% SGcutTcrossblade, SGcutTcylindricblade, SGcutTextrudeT,
% SGcutTfischertechnik, SGcutTinsertpins, SGcutend, SGcutrecursivly
%
% [SGM,SGO1,SGO2]=SGcut2T(SG,[T1,T2,ct])
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% T1: Frame T1
% T2: Frame T2; if numerical scalar; T1 and T2 are symmetrically shifted
% from T2 along ez axis
% ct: not used yet;
% === OUTPUT RESULTS ======
% SGM: Middle Solid (Green)
% SGO1: Above frame T1 (Gray)
% SGO2: Above frame T2 (Magenta)
%
% EXAMPLE:
% load AIM.mat; VM=V;
% [AM,as]=VMresize(VM,[0.5 0.5 0.5],vs);
% SG=SGofVMisosurface(AM>1400,as);
% mm=mean(SG.VL); VLplot(mm,'r*'); TT=TofPez(mm,[1 -1 0]);
% SGcut2T(SG,TT,5);
%
% See also: SGcut, SGcut2, SGcut2TextrudeT, SGcut2fit, SGcutBB, SGcutT,
% SGcutT4design, SGcutTA, SGcutTCPL, SGcutTCPLentry, SGcutTbladeangle,
% SGcutTcrossblade, SGcutTcylindricblade, SGcutTextrudeT,
% SGcutTfischertechnik, SGcutTinsertpins, SGcutend, SGcutrecursivly
%
%
% Copyright 2022 Tim C. Lueth

exp_2022_12_05_learncamera(TT)- EXPERIMENT TO SHOW HOW TO MOUNT AN IMAGE IN SPACE

exp_2022_12_05_learncamera(TT)% exp_2022_12_05_learncamera(TT) - EXPERIMENT TO SHOW HOW TO MOUNT AN IMAGE IN SPACE
% (by Tim Lueth, VLFL-Lib, 2022-DEZ-06 as class: EXPERIMENTS)
%
% Introduced first in SolidGeometry 5.2
%
% exp_2022_12_05_learncamera([TT])
% === INPUT PARAMETERS ===
% TT: View Direction of Kamera
%
% EXAMPLE:
% close all; load spine.mat; TT=TofPez([0 0 0],[1 1 0],pi)
% % SG=SGsphere(100); SGfigure; SGplotalpha(SG,'w',0.5);
% % SG=SGbox(200); SGfigure; SGplotalpha(SG,'w',0.5);
% set(gcf,'Color',[1 1 1]); set(gca,'Color',[1 1 1]); grid on; shg; title('');
% h=imwarpT (X,TT,'',true); axis tight; caxis auto; fontsize(24); axis equal; rotate3d on
% exp_2022_12_05_learncamera(TT); colormap gray; caxis auto; shg;
% % delete(h); h=imwarpT (X,TT,'',true);
%
%
% Copyright 2022 Tim C. Lueth

isT(T)- returns whether a variable is a HT matrix or a list of HT matrices

isT(T)% isT(T) - returns whether a variable is a HT matrix or a list of HT matrices
% (by Tim Lueth, VLFL-Lib, 2022-NOV-04 as class: KINEMATICS AND FRAMES)
%
% Introduced first in SolidGeometry 5.2
%
% See also: isSG, mat2celldim3, cell2matdim3
%
% ii=isT(T)
% === INPUT PARAMETERS ===
% T: 3x3 or 4x4 HT frame or array or cell list
% === OUTPUT RESULTS ======
% ii: result true or false
%
% EXAMPLE:
% isT(eye(3))
% isT(eye(4))
% TL=TofPLpath(PLcircle)
% isT(TL)
% isT(mat2celldim3(TL))
% isT(rot([3,3,3]))
%
% See also: isSG, mat2celldim3, cell2matdim3
%
%
% Copyright 2022 Tim C. Lueth

SGpedestal(F,S)- creates simple solids for pedestals

SGpedestal(F,S)% SGpedestal(F,S) - creates simple solids for pedestals
% (by Tim Lueth, VLFL-Lib, 2022-SEP-18 as class: PARAMETRIC DESIGN)
%
% It is a fnctn for calculating pedestals under which a robot can perform
% its suction-wipe fnctns. (Status of: 2022-09-19)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGbox, SGconetruncated
%
% SG=SGpedestal([F,S])
% === INPUT PARAMETERS ===
% F: Size of plate; default is [900 700 15]
% S: Size of stands; default is [120 40 50]
% === OUTPUT RESULTS ======
% SG:
%
% EXAMPLE:
% SGpedestal('M'); B=ans;
% SGpedestal('L'); A=ans;
% SGplotalpha(A); SGplotalpha(B,'','','',A,'left',10,'alignback'); SGplotalpha(B,'','','',A,'right',10,'alignback');
%
%
% See also: SGbox, SGconetruncated
%
%
% Copyright 2022 Tim C. Lueth

ageofbirthday(day,refd)- returns tge age in years of a birtday string and an optional reference date string

ageofbirthday(day,refd)% ageofbirthday(day,refd) - returns tge age in years of a birtday string and an optional reference date string
% (by Tim Lueth, VLFL-Lib, 2022-SEP-02 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.2
%
% See also: datenum, datetime, now
%
% [age,chkd,refd]=ageofbirthday(day,[refd])
% === INPUT PARAMETERS ===
% day: string of birthday, such as '30.11.1965)
% refd: string of refence date, such as {1.6.2016'; default is now
% === OUTPUT RESULTS ======
% age: age in years
% chkd: numerical value of date
% refd: numerical value of reference date
%
% EXAMPLE:
% ageofbirthday('30.11.1965')
% ageofbirthday('30.11.1965','1.10.1984')
% ageofbirthday('30.11.1965','3.2.1989')
% ageofbirthday('30.11.1965','3.2.1993')
% ageofbirthday('30.11.1965','2.7.1997')
%
% See also: datenum, datetime, now
%
%
% Copyright 2022 Tim C. Lueth

SGcathetertorquer(CCtyp,CAP)- creates different catheter torquers to be actived by SGcathetercapsule

SGcathetertorquer(CCtyp,CAP)% SGcathetertorquer(CCtyp,CAP) - creates different catheter torquers to be actived by SGcathetercapsule
% (by Tim Lueth, VLFL-Lib, 2022-AUG-18 as class: PARAMETRIC DESIGN)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGcathetercapsule, exp_2022_08_14_capsnew.m
%
% [SGA,SGB]=SGcathetertorquer([CCtyp,CAP])
% === INPUT PARAMETERS ===
% CCtyp: such as 'MANDRIN', or 'MICRO2.8F.018'
% CAP: size of roller; default is [35 20 14 3 6] mm
% === OUTPUT RESULTS ======
% SGA: Front side (Catheter) including Frames
% SGB: Back side (Luerlock) including Frames
%
% EXAMPLE:
% SGcathetertorquer('SHEAT');
% SGcathetertorquer('MANDRIN')
% SGcathetertorquer('CORDIS4F.038');
% SGcathetertorquer('CORDIS5F.035');
% SGcathetertorquer('MICRO2.8F.018');
%
%
% See also: SGcathetercapsule, exp_2022_08_14_capsnew.m
%
%
% Copyright 2022 Tim C. Lueth

SGdrillnotch (T,M)- sets a simple drilling notch on top of a surface

SGdrillnotch (T,M)% SGdrillnotch (T,M) - sets a simple drilling notch on top of a surface
% (by Tim Lueth, VLFL-Lib, 2022-AUG-10 as class: PARAMETRIC DESIGN)
%
% Sometimes it is easier to drill a hole in a solid object using a
% drilling machine than to design a hole, since the exat diameter is
% unkown or flexible. In this cases you would need a drilling notch on
% the surface of the solid for a precise positioning of the drill's tip.
% (Status of: 2022-11-04)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGTdrill, SGbox
%
% SGdrillnotch([T,M])
% === INPUT PARAMETERS ===
% T: Frame or cell{Solid, Framename}
% M: metric diameter of the notch
%
% EXAMPLE:
% SGdrillnotch(eye(4),10)
% SGdrillnotch({SGbox,'X+'},3)
%
% See also: SGTdrill, SGbox
%
%
% Copyright 2022 Tim C. Lueth

SGlevelheight(SG,mmz,ax)- changes the height of a solid depending on the x/y coordinates

SGlevelheight(SG,mmz,ax)% SGlevelheight(SG,mmz,ax) - changes the height of a solid depending on the x/y coordinates
% (by Tim Lueth, VLFL-Lib, 2022-AUG-09 as class: SURFACES)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGbending, GofCPLzdelaunayGrid, SGofCPLsphere, CPLaddauxpoints
%
% SG=SGlevelheight(SG,[mmz,ax])
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% mmz: [minvalue maxvalue maxheight]; default is [-inf inf nan] nan == no
% change
% ax: height-axis; dimension-axis]; default is [z y]
% === OUTPUT RESULTS ======
% SG: modified Solid
%
% EXAMPLE:
% SGlevelheight(SGbox,[-5 inf 2],'zx')
% SGlevelheight(SGbox,[-5 inf 2],'zy')
%
% See also: SGbending, GofCPLzdelaunayGrid, SGofCPLsphere, CPLaddauxpoints
%
%
% Copyright 2022 Tim C. Lueth

SGgyroid(R,w,D)- creates a gyroid shape solid

SGgyroid(R,w,D)% SGgyroid(R,w,D) - creates a gyroid shape solid
% (by Brian Li & Tim Lueth, VLFL-Lib, 2022-AUG-08 as class: SURFACES)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGmeshground, VLFLweave
%
% SG=SGgyroid([R,w,D])
% === INPUT PARAMETERS ===
% R: Cubic size
% w: angle; default is 4*pi
% D: wall Thicknessl default is 0
% === OUTPUT RESULTS ======
% SG: Gyroid solid
%
% See also: SGmeshground, VLFLweave
%
%
% Copyright 2022 Tim C. Lueth

dbcheck(vari)- checks wether a variable is stored in global workspace and listed in SGvar

dbcheck(vari)% dbcheck(vari) - checks wether a variable is stored in global workspace and listed in SGvar
% (by Tim Lueth, VLFL-Lib, 2022-AUG-01 as class: AUXILIARY PROCEDURES)
%
% returns 1 if variable existst with the same value as paremeter 2
% returns 0 if variable existst but with a different value
% returns -1 if variable does not exist at all (Status of: 2022-08-01)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGvar, dbload, dbsave
%
% ri=dbcheck(vari)
% === INPUT PARAMETERS ===
% vari: variable
% === OUTPUT RESULTS ======
% ri: true if variable is unchanged or not exisiting; false if different
%
% See also: SGvar, dbload, dbsave
%
%
% Copyright 2022 Tim C. Lueth

whoSG(vari,desc)- SG list of global variables stored in the work space

whoSG(vari,desc)% whoSG(vari,desc) - SG list of global variables stored in the work space
% (by Tim Lueth, VLFL-Lib, 2022-JUL-31 as class: AUXILIARY PROCEDURES)
%
% the fnctn shows which variables were stored in the global workspace
% using dbsave or dbplot, and in which code line those creation took
% place (Status of: 2022-10-04)
%
% Introduced first in SolidGeometry 5.2
%
% See also: dbcheck, dbload, dbsave, SGvar
%
% ri=whoSG(vari,desc)
% === INPUT PARAMETERS ===
% vari: variable in global workspace
% desc: description of variable
% === OUTPUT RESULTS ======
% ri: returns true or false if not existing or existing in global
% SG_variables
%
% EXAMPLE:
%
%
% See also: dbcheck, dbload, dbsave, SGvar
%
%
% Copyright 2022 Tim C. Lueth

dbload (var2base)- imports a workspace varibale into a fnct

dbload (var2base)% dbload (var2base) - imports a workspace varibale into a fnct
% (by Tim Lueth, VLFL-Lib, 2022-JUL-27 as class: AUXILIARY PROCEDURES)
%
% sometimes it makes sense in time consuming fnctn to use the workspace
% to store variables for debugging. It also makes senso to read them in
% into fnctns during development to develop modules independently and
% merge them later (Status of: 2022-07-27)
%
% Introduced first in SolidGeometry 5.2
%
% See also: dbsave, dbprintf, dbreturn, dbexit, dbprintmode
%
% dbload([var2base])
% === INPUT PARAMETERS ===
% var2base: string list of variables to be read in from the global
% workspace
%
% EXAMPLE:
% A=4;
% fnction test_dbload
% dbload('A','B')
% A
% B
% end
% test_dbload
%
% See also: dbsave, dbprintf, dbreturn, dbexit, dbprintmode
%
%
% Copyright 2022 Tim C. Lueth

gcfSG- in contrast to gcf, this fnct returns empty if there is no open window

gcfSG% gcfSG - in contrast to gcf, this fnct returns empty if there is no open window
% (by MATLAB-CENTRAL, VLFL-Lib, 2022-JUL-19 as class: VISUALIZATION)
%
% See also: gcf
%
% h=gcfSG
% === OUTPUT RESULTS ======
% h: handle or empty
%
% EXAMPLE:
% close all
% gcfSG
%
% See also: gcf
%

CVLofCPL(CPL,T,d)- returns a CVL from a CPL

CVLofCPL(CPL,T,d)% CVLofCPL(CPL,T,d) - returns a CVL from a CPL
% (by Tim Lueth, VLFL-Lib, 2022-JUL-04 as class: CLOSED POLYGON LISTS)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGofCPLextrude, VLaddz
%
% CVL=CVLofCPL(CPL,[T,d])
% === INPUT PARAMETERS ===
% CPL: Contour
% T: direction such as 'x' or HT matrix
% d: distance from origin; default is 0
% === OUTPUT RESULTS ======
% CVL: CVL
%
% EXAMPLE:
% CVLofCPL(CPLsample(12),'y',100);
%
% See also: SGofCPLextrude, VLaddz
%
%
% Copyright 2022 Tim C. Lueth

CATIAbackground(iscat)- just switches to colors similar to CATIA

CATIAbackground(iscat)% CATIAbackground(iscat) - just switches to colors similar to CATIA
% (by Tim Lueth, VLFL-Lib, 2022-JUL-04 as class: USER INTERFACE)
%
% In use since 2012 i app_2012_11_09 , bnut now extracted as fnctn
% (Status of: 2022-07-21)
%
% Introduced first in SolidGeometry 5.2
%
% See also: app_2012_11_09
%
% CATIAbackground([iscat])
% === INPUT PARAMETERS ===
% iscat: true or false; toggles if not used
%
% EXAMPLE:
% SGsample(1:4)
% CATIAbackground
%
% See also: app_2012_11_09
%
%
% Copyright 2022 Tim C. Lueth

CPLunionreplace(CPLA,CPLB,relparam,"type","ol")- countour union after a subtraction of a bounding box or convex hull

CPLunionreplace(CPLA,CPLB,relparam,% CPLunionreplace(CPLA,CPLB,relparam,"type","ol") - countour union after a subtraction of a bounding box or convex hull
% (by Tim Lueth, VLFL-Lib, 2022-JUL-03 as class: CLOSED POLYGON LISTS)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGunionreplace, CPLunion, CPLadd, CPLbool, CPLsubtract,
% CPLintersect, CPLxor, CPLconcat
%
% CPL=CPLunionreplace(CPLA,CPLB,[relparam,"type","ol"])
% === INPUT PARAMETERS ===
% CPLA: Contour A
% CPLB: Contour B
% relparam: relative parameter to adjust position
% "type": bb, convexhull, delaunay, fillgap
% "ol": optional overl; default is 0
% === OUTPUT RESULTS ======
% CPL: Final contour
%
% EXAMPLE:
% CPLunionreplace(PLcircle(30),CPLsample(13))
% CPLunionreplace(PLcircle(30),CPLsample(13),'type','bb')
% CPLunionreplace(PLcircle(30),CPLsample(13),'type','convexhull')
% CPLunionreplace(PLcircle(30),CPLsample(13),'type','delaunay')
% CPLunionreplace(PLcircle(30),CPLsample(13),'aligntop','type','fillgap')
%
%
% See also: SGunionreplace, CPLunion, CPLadd, CPLbool, CPLsubtract,
% CPLintersect, CPLxor, CPLconcat
%
%
% Copyright 2022 Tim C. Lueth

CPLselectbynearestP(CPL,PL,aux)- returns an index list to select by the neareat Points/CPLs

CPLselectbynearestP(CPL,PL,aux)% CPLselectbynearestP(CPL,PL,aux) - returns an index list to select by the neareat Points/CPLs
% (by Tim Lueth, VLFL-Lib, 2022-JUL-02 as class: CLOSED POLYGON LISTS)
%
% Introduced first in SolidGeometry 5.2
%
% See also: crosstest, insideCPL, insideCPS, isInteriorofCPL, insideC,
% CPLselectbyP
%
% [ind,ddd]=CPLselectbynearestP(CPL,PL,[aux])
% === INPUT PARAMETERS ===
% CPL: CPL
% PL: Single point to check
% aux: density of auxiliary points; default is 0.1
% === OUTPUT RESULTS ======
% ind: index list
% ddd: distance to nearest point
%
% EXAMPLE:
% CPLselectbynearestP(CPLsample(14),[0 0 0])
% CPLselectbynearestP(CPLsample(14),[5 0 0])
% CPLselectbynearestP(CPLsample(14),[5 0 ;10 -3])
% CPLselectbynearestP(CPLsample(14),[25 0])
%
% See also: crosstest, insideCPL, insideCPS, isInteriorofCPL, insideC,
% CPLselectbyP
%
%
% Copyright 2022 Tim C. Lueth

PLtrapezoid(b,h)- returns a trapezoid shape liek the stern of a slalom water ski

PLtrapezoid(b,h)% PLtrapezoid(b,h) - returns a trapezoid shape liek the stern of a slalom water ski
% (by Tim Lueth, VLFL-Lib, 2022-JUL-02 as class: CLOSED POLYGON LISTS)
%
% Introduced first in SolidGeometry 5.2
%
% See also: PLlemo, PLcircle, PLcirctrapezoid
%
% PL=PLtrapezoid([b,h])
% === INPUT PARAMETERS ===
% b: base and top default is [60 90]
% h: height of trapezoid; default is 210
% === OUTPUT RESULTS ======
% PL: Point list
%
% EXAMPLE:
% PLtrapezoid([60 90],210)
%
% See also: PLlemo, PLcircle, PLcirctrapezoid
%
%
% Copyright 2022 Tim C. Lueth

SGslalomshoes(LL,SkiS,Rail,FinS,Foil,"cover")- Finn-Foil-Protector for Slalomski

SGslalomshoes(LL,SkiS,Rail,FinS,Foil,% SGslalomshoes(LL,SkiS,Rail,FinS,Foil,"cover") - Finn-Foil-Protector for Slalomski
% (by Tim Lueth, VLFL-Lib, 2022-JUL-02 as class: MODELING PROCEDURES)
%
% Designed for
% European Vice-Campion Trickski Sigita Rosovaite and
% Waterski-Club WSC Kiefersfelden Rosenheim e.V. and
% Waterski-Club WSV Friedberg (Status of: 2022-07-03)
%
% Introduced first in SolidGeometry 5.2
%
% See also: CPLradialhatch
%
% [SGall,CPL3,CPL2,CPL4]=SGslalomshoes([LL,SkiS,Rail,FinS,Foil,"cover"])
% === INPUT PARAMETERS ===
% LL: length of proptector ; default is 50mm
% SkiS: size of Ski stern; default is [60 90 210 14]
% Rail: size of rail; default is [25 210 14]
% FinS: size of fin; default is [3 18 65]
% Foil: size of foil protection box; default is [43 43 43]
% "cover": if true; the tube gets an floor cover
% === OUTPUT RESULTS ======
% SGall: Solid Geometry to print
% CPL3: Contour
% CPL2: contour of tube
% CPL4: contour of connector bars
%
% EXAMPLE:
% SGslalomshoes
% SGslalomshoes([10 3 22])
%
% See also: CPLradialhatch
%
%
% Copyright 2022 Tim C. Lueth

PLlemo(d,sl)- returns the contour of a insertion hole for a LEMO plug/socket

PLlemo(d,sl)% PLlemo(d,sl) - returns the contour of a insertion hole for a LEMO plug/socket
% (by Tim Lueth, VLFL-Lib, 2022-JUN-30 as class: PARAMETRIC DESIGN)
%
% Introduced first in SolidGeometry 5.2
%
% See also: PLcircle, PLcirctrapezoid, PLtrapezoid
%
% CPL=PLlemo([d,sl])
% === INPUT PARAMETERS ===
% d: Outer Diameter and inner diameter; default is [12 10.5]
% sl: slot; default is 0
% === OUTPUT RESULTS ======
% CPL: Contour of hole
%
% Additional Hyperlinks:
% Lemo FGG
%
% EXAMPLE:
% PLcircle; PL=ans;
%
% See also: PLcircle, PLcirctrapezoid, PLtrapezoid
%
%
% Copyright 2022 Tim C. Lueth

SGboxstructure(siz,dim,typ)- creates a box based on SGbarstructure

SGboxstructure(siz,dim,typ)% SGboxstructure(siz,dim,typ) - creates a box based on SGbarstructure
% (by Tim Lueth, VLFL-Lib, 2022-JUN-27 as class: PARAMETRIC DESIGN)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGbarstructure
%
% SG=SGboxstructure([siz,dim,typ])
% === INPUT PARAMETERS ===
% siz: [x y z]
% dim: [bx by bz]
% typ: 'xzzxxo'
% === OUTPUT RESULTS ======
% SG: Box as bar stucture
%
% EXAMPLE:
% SGboxstructure([30 20 20],[1 1 1],'oooxxx')
%
% See also: SGbarstructure
%
%
% Copyright 2022 Tim C. Lueth

SGbarstructure(siz,bh,typ,alp)- creates rectangle as bar structure

SGbarstructure(siz,bh,typ,alp)% SGbarstructure(siz,bh,typ,alp) - creates rectangle as bar structure
% (by Tim Lueth, VLFL-Lib, 2022-JUN-27 as class: PARAMETRIC DESIGN)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGboxstructure
%
% SG=SGbarstructure([siz,bh,typ,alp])
% === INPUT PARAMETERS ===
% siz: [x y]
% bh: [db dh]
% typ: 'o' or 'z' or 'x'; default is 'x'
% alp: angle of cross; default is 51 degree
% === OUTPUT RESULTS ======
% SG: Solid Geometry
%
% EXAMPLE:
% SGbarstructure([20 10],1,'o')
% SGbarstructure([20 10],1,'z')
% SGbarstructure([20 10],1,'x')
%
% See also: SGboxstructure
%
%
% Copyright 2022 Tim C. Lueth

SGofCPLhatch(CPL,d,a,zz,"cross")- creates a solid using CPLhatch

SGofCPLhatch(CPL,d,a,zz,% SGofCPLhatch(CPL,d,a,zz,"cross") - creates a solid using CPLhatch
% (by Tim Lueth, VLFL-Lib, 2022-JUN-27 as class: SURFACES)
%
% Introduced first in SolidGeometry 5.2
%
% See also: CPLhatch, SGofCPLz, CPLradialhatch
%
% SG=SGofCPLhatch([CPL,d,a,zz,"cross"])
% === INPUT PARAMETERS ===
% CPL: Contour
% d: [thickness and distance of hatch bars]
% a: angle of hatch or [hatch crosshatch] angles; default is 51 degree
% zz: height of solid
% "cross": if used; there will be crossed angle=[a a+90]
% === OUTPUT RESULTS ======
% SG: Solid Geometry
%
% EXAMPLE:
% SGofCPLhatch(CPLsample(14)+[123 23],.4,'');
% SGofCPLhatch(CPLsample(14)+[123 23],.2,'');
%
%
% See also: CPLhatch, SGofCPLz, CPLradialhatch
%
%
% Copyright 2022-2023 Tim C. Lueth

SGcmd(par)- Shortcut for SGofCPLcommand but supports also sprintftext format

SGcmd(par)% SGcmd(par) - Shortcut for SGofCPLcommand but supports also sprintftext format
% (by Tim Lueth, VLFL-Lib, 2022-JUN-26 as class: PARAMETRIC DESIGN)
%
% if the 1st argument is a cell, sprintftext is used to process the 1st
% argument (Status of: 2022-06-26)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGofCPLcommand, sprintftext
%
% [SG,CPLO,warn,ocstr,macrol,STAT]=SGcmd([par])
% === INPUT PARAMETERS ===
% par: see SGofCPLcommand
% === OUTPUT RESULTS ======
% SG: see SGofCPLcommand
% CPLO: see SGofCPLcommand
% warn: see SGofCPLcommand
% ocstr: see SGofCPLcommand
% macrol: see SGofCPLcommand
% STAT: SGofCPLcommand
%
% EXAMPLE:
% SGcmd('b 23 19 , h 1.5, enter, b 1.5 19,h 25, dups 3 1 1 10, rel center, rel aligntop -0.1, cat'); % STRING FORMAT
%
% SGcmd({'b 23 19 , h 1.5, enter, b 1.5 19,h 25, dups ',[3 1 1 10],', rel center, rel aligntop -0.1, cat'}); CELL FORMAT ==> sprintftext
%
% See also: SGofCPLcommand, sprintftext
%
%
% Copyright 2022 Tim C. Lueth

SGdesignSupplement2connectSG(SG,T,wt,ra,zz)- fills in a solid block to connect the surfaces of SG

SGdesignSupplement2connectSG(SG,T,wt,ra,zz)% SGdesignSupplement2connectSG(SG,T,wt,ra,zz) - fills in a solid block to connect the surfaces of SG
% (by Tim Lueth, VLFL-Lib, 2022-JUN-25 as class: AUTOMATIC DESIGN)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGdesignSupplement2connect2SG
%
% [SGN,SG2]=SGdesignSupplement2connectSG(SG,[T,wt,ra,zz])
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% T: Frame or z-axis used for 2.5 projection solid
% wt: wall thickness for fillgap
% ra: radius for radial edges
% zz: height ; default is [zmin zmax]
% === OUTPUT RESULTS ======
% SGN: Final Solid
% SG2: Just filling block solid
%
%
% EXAMPLE: SGconcat(SGbox,SGtransP(SGbox,[0 30 0])); SG=ans;
% SGdesignSupplement2connectSG(SG,'z',10,5)
% SGdesignSupplement2connectSG(SG,'x',10,5)
%
% See also: SGdesignSupplement2connect2SG
%
%
% Copyright 2022 Tim C. Lueth

SGunionreplace(A,B,relparam,"ol")- adds a solid after removing the bounding box of the solid

SGunionreplace(A,B,relparam,% SGunionreplace(A,B,relparam,"ol") - adds a solid after removing the bounding box of the solid
% (by Tim Lueth, VLFL-Lib, 2022-JUN-24 as class: AUTOMATIC DESIGN)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGbool, SGtransrelSG, SGboolh, SGintersect, SGsubtract,
% SGxor, SGconcat, SGsupplement, SGreplace
%
% SG=SGunionreplace(A,B,[relparam,"ol"])
% === INPUT PARAMETERS ===
% A: Solid A
% B: Solid to unite after subtracting the bound box
% relparam: relative arrangement parameter
% "ol": option overlap parameter default is [0.1 0.1 0.1]
% === OUTPUT RESULTS ======
% SG: Modified Solid A
%
% EXAMPLE:
% A=SGbox([100 20 2]); [B,C]=SGboxbolted([40 16 15]); B=SGTsetBFsimple(B); C=SGTsetBFsimple(C);
% SGunionreplace(A,B,'matchT',{'F','F',TofP([0 0 .1])},'ol',0.1);
% SGunionreplace(A,C,'matchT',{'F','F',TofP([0 0 0])},'ol',[0.1 0.1 0]);
%
% See also: SGbool, SGtransrelSG, SGboolh, SGintersect, SGsubtract,
% SGxor, SGconcat, SGsupplement, SGreplace
%
%
% Copyright 2022 Tim C. Lueth

exp_2022_06_20_FDMcompare- comparison of printing time

exp_2022_06_20_FDMcompare% exp_2022_06_20_FDMcompare - comparison of printing time
% (by Tim Lueth, VLFL-Lib, 2022-JUN-20 as class: EXPERIMENTS)
%
% printing time is only 15% smaller and material is 25 % if the part is
% not printed solid from ground
% Printing time
% 11:57 with legs
% 12:52 als full block
% 11:51 with rhombus (Status of: 2022-06-20)
%
% Introduced first in SolidGeometry 5.2
%
% exp_2022_06_20_FDMcompare
%
%
% Copyright 2022 Tim C. Lueth

hesseplaneofT(T,T0)- Hessennormalform of T's xy plane

hesseplaneofT(T,T0)% hesseplaneofT(T,T0) - Hessennormalform of T's xy plane
% (by Tim Lueth, VLFL-Lib, 2022-JUN-19 as class: ANALYTICAL GEOMETRY)
%
% d=planedistanceofT(T,[0 0 0])
% The Hesse Normal Form to describe a plane in 3D is a combination of the
% ez vector of the plane and the distance from the world origin to the
% plane in the direction of the normal vector. (Status of: 2022-06-19)
%
% Introduced first in SolidGeometry 5.2
%
% See also: planedistanceofT
%
% [dh,ez,XL]=hesseplaneofT(T,[T0])
% === INPUT PARAMETERS ===
% T: HT Matrix
% T0: reference plane default is eye(4)
% === OUTPUT RESULTS ======
% dh: hesse distance to plane
% ez: ez vector of T
% XL: PL that defined the cutting edge
%
% EXAMPLE:
% T=TofPez([4 4 0],[2 +1 1]), hesseplaneofT(T)
% T2=T; T2(1:3,4)=T2(1:3,4)+2*T2(1:3,1)+40*T2(1:3,2); hesseplane(T2)
% hesseplaneofT(T,T2)
%
% See also: planedistanceofT
%
%
% Copyright 2022 Tim C. Lueth

Tofhesseplane(d,ez,T0)- returns an HT amtrix from a hesse normal form of a plane

Tofhesseplane(d,ez,T0)% Tofhesseplane(d,ez,T0) - returns an HT amtrix from a hesse normal form of a plane
% (by Tim Lueth, VLFL-Lib, 2022-JUN-19 as class: ANALYTICAL GEOMETRY)
%
% Introduced first in SolidGeometry 5.2
%
% See also: TofPez, hesseplaneofT
%
% T=Tofhesseplane([d,ez,T0])
% === INPUT PARAMETERS ===
% d: distance to plane
% ez: ez vector of plane
% T0: optional relative plane that is used for d and ez; default is eye(4)
% === OUTPUT RESULTS ======
% T: HT matrix of plane
%
% EXAMPLE:
% Tofhesseplane(5,[0.8 0.4 0.4]) % relative to T=eye(4)
% Tofhesseplane(5,[1 1 1], TofPez([0 0 -10],[0 0 1])) % with respect to a plane at [0 0 -10]
%
% See also: TofPez, hesseplaneofT
%
%
% Copyright 2022 Tim C. Lueth

SGhollowrhombus(SG,WNA);- creates a hollow soild for FDM printer

SGhollowrhombus(SG,WNA);% SGhollowrhombus(SG,WNA); - creates a hollow soild for FDM printer
% (by Tim Lueth, VLFL-Lib, 2022-JUN-19 as class: AUTOMATIC DESIGN)
%
% It makes almost no sense since printing time and material use seem to
% be very similar (90%) even in case of small objects.
% If the angle is larger than 50 degree most FDM printer can print hollow
% structures without support structures (Status of: 2022-06-19)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGhollowshell, SGhollowsolid
%
% SG=SGhollowrhombus(SG,[WNA]);
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% WNA: [wall thickness, edge number, angle in degree]; default is [1.2 0
% 55]
% === OUTPUT RESULTS ======
% SG: Solid with included rhombus to save material and printing time
%
% EXAMPLE:
% SGhollowrhombus(SGbox([10 10 40]))
% SGhollowrhombus(SGsphere(30,'','','',30,60))
%
% See also: SGhollowshell, SGhollowsolid
%
%
% Copyright 2022 Tim C. Lueth

SGselect(SG,comsequ,"debug")- selects solids from a cell list using a command language

SGselect(SG,comsequ,% SGselect(SG,comsequ,"debug") - selects solids from a cell list using a command language
% (by Tim Lueth, VLFL-Lib, 2022-JUN-16 as class: SURFACES)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGseparate
%
% SG=SGselect(SG,[comsequ,"debug"])
% === INPUT PARAMETERS ===
% SG: cell list of solids
% comsequ: sequence of commands such as 'maxdim, mindim, maxbbvol,
% minbbvol, 'zmax','xmax','ymax', 'zmin','xmin','ymin'
% "debug": if used the selection is shown step by step
% === OUTPUT RESULTS ======
% SG: cell ist of selected solids
%
% EXAMPLE:
% loadweb JACO_robot.mat
% SGselect(JACO,'mindim',1:4)
% SGselect(JACO,'mindim',1:4,'maxbbvol')
% SGselect(JACO,'mindim',1:4,'minbbvol')
% SGselect(JACO,'mindim',1:4,'zmin','debug')
%
% See also: SGseparate
%
%
% Copyright 2022 Tim C. Lueth

SGlemoFAGEGG- Plug and socket for the LEMO FAG EGG family

SGlemoFAGEGG% SGlemoFAGEGG - Plug and socket for the LEMO FAG EGG family
% (by Tim Lueth, VLFL-Lib, 2022-JUN-15 as class: PARAMETRIC DESIGN)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGDIN912
%
% [FAG,EGG]=SGlemoFAGEGG
% === OUTPUT RESULTS ======
% FAG: Plug
% EGG: Socket
%
% Additional Hyperlinks:
% Lemo-Connectors
%
% EXAMPLE:
% [FAG,EGG]=SGlemoFAGEGG; SGbox; B=ans;
% SGtransrelSG(FAG,B,'alignT',{'C','F'})
% SGtransrelSG(EGG,B,'alignT',{'C','F'})
%
% See also: SGDIN912
%
%
% Copyright 2022 Tim C. Lueth

Ttransrel(T,comsequ,"debug")- language based fnct for spatial arrangement of frames

Ttransrel(T,comsequ,% Ttransrel(T,comsequ,"debug") - language based fnct for spatial arrangement of frames
% (by Tim Lueth, VLFL-Lib, 2022-JUN-15 as class: KINEMATICS AND FRAMES)
%
% important language concept. First started as ToftransrelSG in 2020-12-12
% currently supported is
% 'rotz, roty, 'flip','flipy', rotx, transz, transy, transx, attachz'
%
% SGtransrelSG, CPLtransrelCPL, Ttransrel
% ==> create movements relative to another class instance
%
% SGtransrelT, CPLtransrelT
% ==> make movements of relative to TA into relative to TB
%
% Tofchar and TofPez('',ezofchar())
% ==> create frames (Status of: 2022-06-29)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGtransrelSG, CPLtransrelCPL, Tofchar, ezofchar
%
% [T,k]=Ttransrel([T,comsequ,"debug"])
% === INPUT PARAMETERS ===
% T: Frame to translate/rotate
% comsequ: commandsequence such as 'rotz',pi/3,'tranz',5
% "debug": if used; the indiviual sequences are plotted
% === OUTPUT RESULTS ======
% T: resulting Frame
% k: number of transformations made
%
% EXAMPLE:
% Ttransrel(eye(4),'rotz',pi/10,'transz',5,'rotx',-pi/10,'transz',-5,'debug')
%
% See also: SGtransrelSG, CPLtransrelCPL, Tofchar, ezofchar
%
%
% Copyright 2022 Tim C. Lueth

PLcirctrapezoid(bh,al,wz)- creates a trapezoid contour with a predefied angle

PLcirctrapezoid(bh,al,wz)% PLcirctrapezoid(bh,al,wz) - creates a trapezoid contour with a predefied angle
% (by Tim Lueth, VLFL-Lib, 2022-JUN-11 as class: CLOSED POLYGON LISTS)
%
% for self tapping screws (Status of: 2022-06-13)
%
% Introduced first in SolidGeometry 5.2
%
% See also: PLcircle, SGmotorshaftcoupling
%
% PL=PLcirctrapezoid([bh,al,wz])
% === INPUT PARAMETERS ===
% bh: [diameter/width and height]; default is [4 0]
% al: rotation of CPL; default is 0
% wz: default is 51 degree; used to calculate the height
% === OUTPUT RESULTS ======
% PL: PL to replace a circular solid using
%
% EXAMPLE:
% PLcirctrapezoid(1.6/2)
% PLcirctrapezoid(DIN13(3,'Core_Diameter_Bolt')/2)
%
% See also: PLcircle, SGmotorshaftcoupling
%
%
% Copyright 2022 Tim C. Lueth

SGmotorshaftcoupling(MM,LD,DH,MS,"thread")- creates a rigit motor shaft coupling

SGmotorshaftcoupling(MM,LD,DH,MS,% SGmotorshaftcoupling(MM,LD,DH,MS,"thread") - creates a rigit motor shaft coupling
% (by Tim Lueth, VLFL-Lib, 2022-JUN-11 as class: PARAMETRIC DESIGN)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGmotorshaft
%
% SGA=SGmotorshaftcoupling([MM,LD,DH,MS,"thread"])
% === INPUT PARAMETERS ===
% MM: [d1 d2]; default is [3 4]
% LD: [L D]; default is 20 9
% DH: if true there are two grubscews per side
% MS: metrix size of grub scew; defaul is M3
% "thread": if true, there is a thread designed; useless for M3 or FDM
% === OUTPUT RESULTS ======
% SGA: SG of coupling
%
% EXAMPLE:
% SGmotorshaftcoupling([3 6],[20 12]);
% SGmotorshaftcoupling([3 4],[20 9]);
%
% See also: SGmotorshaft
%
%
% Copyright 2022 Tim C. Lueth

Tofchar(T,relparam)- creates an HT frame based on spatial relations

Tofchar(T,relparam)% Tofchar(T,relparam) - creates an HT frame based on spatial relations
% (by Tim Lueth, VLFL-Lib, 2022-JUN-10 as class: KINEMATICS AND FRAMES)
%
% Introduced first in SolidGeometry 5.2
%
% See also: Ttransrel, ezofchar
%
% TN=Tofchar([T,relparam])
% === INPUT PARAMETERS ===
% T: char of ez, or empty for eye(4)
% relparam: additional relative parameters for Ttransrel
% === OUTPUT RESULTS ======
% TN: new T matrix
%
% EXAMPLE:
% Tofchar('y') % ez = ey
% Tofchar('x','roty',pi) % ez = x and rotated aorund ey
% Tofchar('rotz',pi))
%
% See also: Ttransrel, ezofchar
%
%
% Copyright 2022 Tim C. Lueth

SGwebcamcover- Simply a cover for a desktop webcam

SGwebcamcover% SGwebcamcover - Simply a cover for a desktop webcam
% (by Tim Lueth, VLFL-Lib, 2022-JUN-09 as class: PARAMETRIC DESIGN)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGcompass
%
% SG=SGwebcamcover
% === OUTPUT RESULTS ======
% SG: Solid Geometry
%
% See also: SGcompass
%
%
% Copyright 2022 Tim C. Lueth

SGmirrorD(SG,T,D,centr)- Mirrors a solid in a distance to the maximal dimension in the specified direction

SGmirrorD(SG,T,D,centr)% SGmirrorD(SG,T,D,centr) - Mirrors a solid in a distance to the maximal dimension in the specified direction
% (by Tim Lueth, VLFL-Lib, 2022-JUN-08 as class: ANALYTICAL GEOMETRY)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGmirrorD, SGmirrorTxy
%
% [SGN,C]=SGmirrorD([SG,T,D,centr])
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% T: 'x','y','z' or T matrix
% D: distance in direction
% centr: true if result is centered; default is true
% === OUTPUT RESULTS ======
% SGN: mirrored Solid
% C: Both solids combined (and centered)
%
% EXAMPLE:
% SGmirrorD(SGbox([30,2,10]),'x',19)
% SGmirrorD(SGbox([30,2,10]),'y',19)
% SGmirrorD(SGbox([30,2,10]),'z',19)
%
% See also: SGmirrorD, SGmirrorTxy
%
%
% Copyright 2022 Tim C. Lueth

dbplot(SG,"sub")- plots a SG class for debug purposes

dbplot(SG,% dbplot(SG,"sub") - plots a SG class for debug purposes
% (by Tim Lueth, VLFL-Lib, 2022-JUN-07 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.2
%
% See also: dbdisp, dbexit, dbpause, dbprintf, dbprintmode, dbreturn,
% dbsave
%
% dbplot([SG,"sub"])
% === INPUT PARAMETERS ===
% SG: List of SG,CVL,CPL etc
% "sub": use subplots instead of a single figure
%
% EXAMPLE:
% A=SGseedcube; dbplot(rand(10,3),rand(10,2),SGbox,A,'sub')
%
% See also: dbdisp, dbexit, dbpause, dbprintf, dbprintmode, dbreturn,
% dbsave
%
%
% Copyright 2022 Tim C. Lueth

SGboxradial(siz,rrr,ddd)- similar to SGbox but with radial edges in 2.5 D

SGboxradial(siz,rrr,ddd)% SGboxradial(siz,rrr,ddd) - similar to SGbox but with radial edges in 2.5 D
% (by Tim Lueth, VLFL-Lib, 2022-JUN-07 as class: PARAMETRIC DESIGN)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGbox, SGbar, SGseedcube
%
% SG=SGboxradial([siz,rrr,ddd])
% === INPUT PARAMETERS ===
% siz: [x y z] size
% rrr: radius for radial edges;de fault is 2
% ddd: optional extrusion direction; default is 'z'
% === OUTPUT RESULTS ======
% SG:
%
% See also: SGbox, SGbar, SGseedcube
%
%
% Copyright 2022 Tim C. Lueth

SGcolorerrors(SG)- idea simply to color solids instead of showing the errors

SGcolorerrors(SG)% SGcolorerrors(SG) - idea simply to color solids instead of showing the errors
% (by Tim Lueth, VLFL-Lib, 2022-JUN-07 as class: SURFACES)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGmeshlab, SGcheckmeshlab, SGchecknonmanifoldedges,
% SGchecknonmanifoldvertices, SGcheckboundaryedges
%
% SG=SGcolorerrors(SG)
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% === OUTPUT RESULTS ======
% SG: Colored Solid Geometry
%
% EXAMPLE:
% SGcolorerrors(SGDIN13(6,80)) % still need to debug for long screws
% SGcolorerrors(SGsample(35))
% SGcolorerrors(SGsample(41)) % Need to separate the solids by doubling the non manifold egdes and moving them
% SGcolorerrors(SGsample(40)) % Need to separate the solids by doubling the non manifold egdes and moving them
%
%
% See also: SGmeshlab, SGcheckmeshlab, SGchecknonmanifoldedges,
% SGchecknonmanifoldvertices, SGcheckboundaryedges
%
%
% Copyright 2022 Tim C. Lueth

SGtube(RR,LL,sl)- Simplified version of SGplugintube

SGtube(RR,LL,sl)% SGtube(RR,LL,sl) - Simplified version of SGplugintube
% (by Tim Lueth, VLFL-Lib, 2022-JUN-07 as class: SURFACES)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGplugintube
%
% SG=SGtube([RR,LL,sl])
% === INPUT PARAMETERS ===
% RR: [Inner Radius x Wall size]; default is 8 1.5
% LL: Length of tube; default is 100
% sl: slot size
% === OUTPUT RESULTS ======
% SG: Solid Geometry
%
% EXAMPLE:
% SGtube([2.5 .5],200)
%
% See also: SGplugintube
%
%
% Copyright 2022 Tim C. Lueth

SGdesignConeconnector(RHA)- designs a peg in hole connection using a truncated cone that can be printed with FDM

SGdesignConeconnector(RHA)% SGdesignConeconnector(RHA) - designs a peg in hole connection using a truncated cone that can be printed with FDM
% (by Tim Lueth, VLFL-Lib, 2022-JUN-06 as class: AUTOMATIC DESIGN)
%
% Design even for small and long cylindric objects such as spindles
% (Status of: 2022-06-07)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGdesignPeginHole, SGsteepspindle
%
% [Hsub,Nsub,S,Hadd,Nadd]=SGdesignConeconnector([RHA])
% === INPUT PARAMETERS ===
% RHA: Radius Height Angle; default is [2.0 10 55]
% === OUTPUT RESULTS ======
% Hsub: Subtraction Solid for Ground Level
% Nsub: not used yet
% S: not used yet
% Hadd: not used yet
% Nadd: Supplement Solid for Top Level
%
% EXAMPLE:
% SGDIN13(6,20,2); SG=SGTsetBFsimple(ans);
% [Hsub,~,~,~,Nadd]=SGdesignConeconnector([2.0 10]);
% SG=SGsubtract(SG,Hsub,'alignT',{'C','B'}); SG=SGunion(SG,Nadd,'alignT',{'C','F'});
% SGfigure(-30,30); SGTplotalpha(SG);
%
% SGDIN13(6,100,2); SG=SGTsetBFsimple(ans);
% [Hsub,~,~,~,Nadd]=SGdesignConeconnector([2.0 25]);
% SG=SGsubtract(SG,Hsub,'alignT',{'C','B'}); SG=SGunion(SG,Nadd,'alignT',{'C','F'}); SGfigure(-30,30); SGTplotalpha(SG);
%
% See also: SGdesignPeginHole, SGsteepspindle
%
%
% Copyright 2022 Tim C. Lueth

SGpartslistfindproductcodes(AParts)- creates a text line or cell list of hyperlinks to order parts of a parts list

SGpartslistfindproductcodes(AParts)% SGpartslistfindproductcodes(AParts) - creates a text line or cell list of hyperlinks to order parts of a parts list
% (by Tim Lueth, VLFL-Lib, 2022-JUN-05 as class: AUTOMATIC DESIGN)
%
% this fnctn requires the use of product codes in the parts list using
% the syntax
% 'PC[' ']'
% and the already stored code in the productcode table
% "productcode_list.mat" (Status of: 2022-06-05)
%
% Introduced first in SolidGeometry 5.2
%
% See also: productcode
%
% urls=SGpartslistfindproductcodes([AParts])
% === INPUT PARAMETERS ===
% AParts: parts list as cell or text or file name
% === OUTPUT RESULTS ======
% urls: text line with hyperlink descriptions to order components
%
% EXAMPLE:
% SGpartslistfindproductcodes('/Users/lueth/Desktop/STLmult SGpaprottkaCathRotator/StandardParts_parts.txt')
%
%
% See also: productcode
%
%
% Copyright 2022 Tim C. Lueth

SGdesignIgusdragchain(M)- creates the subtraction and supplemet solids for fixing a igus drag chain

SGdesignIgusdragchain(M)% SGdesignIgusdragchain(M) - creates the subtraction and supplemet solids for fixing a igus drag chain
% (by Tim Lueth, VLFL-Lib, 2022-JUN-04 as class: AUTOMATIC DESIGN)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGdesignDIN7991BushingE
%
% [Nsub,Nadd,S,AParts]=SGdesignIgusdragchain([M])
% === INPUT PARAMETERS ===
% M: [2 5 2 7],true); % M2 DIN 7991, Distance 5, Pin 2 length 7)
% === OUTPUT RESULTS ======
% Nsub: Subtraction solid (green)
% Nadd: Supplement solid (yellow)
% S: Screw (magenta)
% AParts: Parts list
%
% See also: SGdesignDIN7991BushingE
%
%
% Copyright 2022 Tim C. Lueth

SGdesignDIN7991BushingE(mlb,ins,tpl)- creates subtraction solids for a screw fixation at a specific frame position of a solid

SGdesignDIN7991BushingE(mlb,ins,tpl)% SGdesignDIN7991BushingE(mlb,ins,tpl) - creates subtraction solids for a screw fixation at a specific frame position of a solid
% (by Tim Lueth, VLFL-Lib, 2022-JUN-04 as class: AUTOMATIC DESIGN)
%
% This fnctn is designed for KERBKONUS bushings
% THIS FNCTN USES FITTINGS by fnctn slfit und DIN4AMfitting
% If two elements should be connected using a DIN7991 Screw and a
% Kerbkonus bushing, this fnctn helps to create the subtraction solids to
% achive a fnctnal connection using standard machine elements.
% No pocket holes are support yet
% Support spacer such as radial bearings, axial bearings
% (Status of: 2022-06-04)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGdesignDIN7991, SGdesignDIN912BushingE,
% SGdesignDIN912DIN985, SGdesignDIN912DIN985axialbearing,
% SGdesignDIN912DIN985axradbearing, SGdesignDIN912DIN985radialbearing
%
% [Hsub,Nsub,SS,Hadd,Nadd,Parts]=SGdesignDIN7991BushingE([mlb,ins,tpl])
% === INPUT PARAMETERS ===
% mlb: [M-Screw Length overlength and spacer]; default [2.5 6 0 0]
% ins: Characters for "T"unnel or "P"ocket; default is 'TT' for [HEAD NUT]
% tpl: Length of Insertion T/P for [HEAD NUT]; default is 10 10
% === OUTPUT RESULTS ======
% Hsub: Subtraction Solid for Head side including frame 'C'
% Nsub: Subtraction Solid for Bushing side including frame 'C'
% SS: Srew and Nut for Visualziation including frame 'C'
% Hadd: remaining wall thickness
% Nadd: parts list for assembly of one connection
% Parts:
%
% EXAMPLE:
% SGdesignDIN7991BushingE([2.5 3 0 5],'TT',5);
% [Hsub,Nsub,S,Hadd,Nadd]=SGdesignDIN7991BushingE([2.5 3 0 5],'TT',5);
%
% See also: SGdesignDIN7991, SGdesignDIN912BushingE,
% SGdesignDIN912DIN985, SGdesignDIN912DIN985axialbearing,
% SGdesignDIN912DIN985axradbearing, SGdesignDIN912DIN985radialbearing
%
%
% Copyright 2022 Tim C. Lueth

SGdragstrip(siz,ch,alp)- creates a dragchain cables as texture strip

SGdragstrip(siz,ch,alp)% SGdragstrip(siz,ch,alp) - creates a dragchain cables as texture strip
% (by Tim Lueth, VLFL-Lib, 2022-JUN-03 as class: PARAMETRIC DESIGN)
%
% extracted from exp_2022_06_02_dragchain (Status of: 2022-06-03)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGdragchain, SGdragchainelement
%
% [SGA,SGB]=SGdragstrip([siz,ch,alp])
% === INPUT PARAMETERS ===
% siz: [Length Width wall pinheight pinwidth pindistance
% ch: cable heigt; default is 1.4mm
% alp: hook angle; default is 51 degree
% === OUTPUT RESULTS ======
% SGA: Lower Strip
% SGB: Upper Strip
%
% EXAMPLE:
% SGdragstrip([90 12],1.4)
%
% See also: SGdragchain, SGdragchainelement
%
%
% Copyright 2022 Tim C. Lueth

amazon(searchterms)- just opens the website of this company

amazon(searchterms)% amazon(searchterms) - just opens the website of this company
% (by Tim Lueth, VLFL-Lib, 2022-JUN-03 as class: AUXILIARY PROCEDURES)
%
% In order to avoid the distraction of unwanted marketing and advertising
% by both operating system vendors and browser manufacturers as well as
% the companies themselves, I have written a series of fnctns that call
% relevant WWW pages directly from Matlab
% These fnctns will not be part of the SG-Lib, as they provide
% information about my personal way of working and my current research
% activities. The SG-Lib should help other people to pursue their own
% ideas and not my ideas. (Status of: 2022-06-03)
%
% Introduced first in SolidGeometry 5.2
%
% See also: firmen, SGexplain, Notiz, amazon_org, amazonbestellung,
% amazoncode2link, amazonlink2code
%
% amazon([searchterms])
% === INPUT PARAMETERS ===
% searchterms: string for search
%
% EXAMPLE:
% amazon
% amazon Motor N20
%
% See also: firmen, SGexplain, Notiz, amazon_org, amazonbestellung,
% amazoncode2link, amazonlink2code
%
%
% Copyright 2022 Tim C. Lueth

TofLR(L,R,T0)- returns a 2D link matrix or a 3D link matrix

TofLR(L,R,T0)% TofLR(L,R,T0) - returns a 2D link matrix or a 3D link matrix
% (by Tim Lueth, VLFL-Lib, 2022-JUN-01 as class: KINEMATICS AND FRAMES)
%
% Introduced first in SolidGeometry 5.2
%
% See also: TofDPhi, TofDPhiH, TofP, TofPEul, TofPez, TofPose, TofR,
% TofSG, TofSG2021, TofSGML, TofSGez, TofSGnew, TofT, TofTrel, TofVL,
% TofVLFL, TofVLFLULfi, TofVLUL, TofVLULez, TofVLprojection, Tofcam,
% TofcamVLPL, TofcrossedSG, Tofgca, Tofn, Tofplaneparam, Tofselect3d,
% ToftransrelSG, Tofview
%
% T=TofLR([L,R,T0])
% === INPUT PARAMETERS ===
% L: length of a link or [L wz] or [L wx wy wz]
% R: angle of a joint at the beginning of the link or just [wz] or [wx wy
% wz]
% T0: Frame the is is linked to default is eye(4); or List of L or cell
% list of T
% === OUTPUT RESULTS ======
% T: Homogenoues transformation matrix
%
% EXAMPLE:
% TofLR(10,[pi/4 pi/4 0],TofLR(10,pi/4));
% TofLR([10 pi/4],'',[5 0 0 pi/3; 5 0 pi/6 0; 5 0 0 -pi/4 ])
% TofLR([10 pi/4],'',{TofPez([10 10 10],[0 1 1])})
%
% See also: TofDPhi, TofDPhiH, TofP, TofPEul, TofPez, TofPose, TofR,
% TofSG, TofSG2021, TofSGML, TofSGez, TofSGnew, TofT, TofTrel, TofVL,
% TofVLFL, TofVLFLULfi, TofVLUL, TofVLULez, TofVLprojection, Tofcam,
% TofcamVLPL, TofcrossedSG, Tofgca, Tofn, Tofplaneparam, Tofselect3d,
% ToftransrelSG, Tofview
%
%
% Copyright 2022 Tim C. Lueth

BBconcat(BBA,BBB)- concatenate two bounding boxes

BBconcat(BBA,BBB)% BBconcat(BBA,BBB) - concatenate two bounding boxes
% (by Tim Lueth, VLFL-Lib, 2022-MAI-25 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.2
%
% See also: BBofBB, BBofCPL, BBofCPS, BBofPS, BBofPose, BBofSG,
% BBofSGcutT, BBofT, BBofVL, VLDLBBofVLFL
%
% BBC=BBconcat(BBA,BBB)
% === INPUT PARAMETERS ===
% BBA: Bounding box B or solid A
% BBB: Bounding box B or solid A
% === OUTPUT RESULTS ======
% BBC: New boundin box [xmin xmax ymin ymax zmin zmax]
%
% EXAMPLE:
% BBconcat(SGbox,SGtransP(SGbox,[0 0 30]))
%
% See also: BBofBB, BBofCPL, BBofCPS, BBofPS, BBofPose, BBofSG,
% BBofSGcutT, BBofT, BBofVL, VLDLBBofVLFL
%
%
% Copyright 2022 Tim C. Lueth

SGTmatchT(SG,T,TM,az)- matches two frame to have same ey-vectors ez and ex vectors

SGTmatchT(SG,T,TM,az)% SGTmatchT(SG,T,TM,az) - matches two frame to have same ey-vectors ez and ex vectors
% (by Tim Lueth, VLFL-Lib, 2022-MAI-22 as class: KINEMATICS AND FRAMES)
%
% Fnctn has been implemented as part of SGtransrelSG in 2016 (Status of:
% 2022-05-22)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGtransT, SGTalignT, SGtransrelSG
%
% SGN=SGTmatchT(SG,[T,TM,az])
% === INPUT PARAMETERS ===
% SG: Original Position
% T: Frame Name of SG or Frame
% TM: eye(4) or new coordinate System
% az: final turn around ez
% === OUTPUT RESULTS ======
% SGN: Final Position of SG
%
% EXAMPLE:
% SGbox; SG=ans; SGTmatchT(SG,'Y-')
% SGTmatchT(SG,'Y-',TofPez([0 0 40],[0 -1 0]))
%
% See also: SGtransT, SGTalignT, SGtransrelSG
%
%
% Copyright 2022 Tim C. Lueth

SGTalignT(SG,T,TM,az)- aligns two frame to have same ey-vectors by opposite ez vectors

SGTalignT(SG,T,TM,az)% SGTalignT(SG,T,TM,az) - aligns two frame to have same ey-vectors by opposite ez vectors
% (by Tim Lueth, VLFL-Lib, 2022-MAI-22 as class: KINEMATICS AND FRAMES)
%
% Fnctn has been implemented as part of SGtransrelSG in 2016 (Status of:
% 2022-05-22)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGtransT, SGTmatchT, SGtransrelSG
%
% SGN=SGTalignT(SG,[T,TM,az])
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% T: Frame or Frame name of SG
% TM: eye(4) or new coordiante system to match
% az: optional final turn around ez
% === OUTPUT RESULTS ======
% SGN: New Position of SG using SGtransT
%
% EXAMPLE:
% SGbox; SG=ans; SGTalignT(SG,'Y-')
% SGTalignT(SG,'Y-',TofPez([0 0 40],[0 -1 0]))
%
% See also: SGtransT, SGTmatchT, SGtransrelSG
%
%
% Copyright 2022 Tim C. Lueth

CPLplothatched(CPL,c,al)- plots a CPL including hatch

CPLplothatched(CPL,c,al)% CPLplothatched(CPL,c,al) - plots a CPL including hatch
% (by Tim Lueth, VLFL-Lib, 2022-MAI-20 as class: VISUALIZATION)
%
% Introduced first in SolidGeometry 5.2
%
% See also: CPLhatch
%
% h=CPLplothatched(CPL,[c,al])
% === INPUT PARAMETERS ===
% CPL: CPL
% c: color
% al: [alpha width, distance]
% === OUTPUT RESULTS ======
% h: handle to go
%
% EXAMPLE:
% SGfigure; CPLplothatched(CPLsample(21),'b',[80 .4]); shg
%
% See also: CPLhatch
%
%
% Copyright 2022 Tim C. Lueth

CPLhatch(CPL,d,al,co)- creates a hatch for a CPL

CPLhatch(CPL,d,al,co)% CPLhatch(CPL,d,al,co) - creates a hatch for a CPL
% (by Tim Lueth, VLFL-Lib, 2022-MAI-20 as class: CLOSED POLYGON LISTS)
%
% Completely Modified 2.1.2023 to support all angles and have angle
% independent slot distance (Status of: 2023-01-02)
%
% Introduced first in SolidGeometry 5.2
%
% See also: CPLplothatched, CPLradialhatch
%
% [CPLI,CPLS,mm,d]=CPLhatch(CPL,[d,al,co])
% === INPUT PARAMETERS ===
% CPL: CPL
% d: thickness and distance as multiple
% al: angle in degree; default is 60 degree
% co: contours to select
% === OUTPUT RESULTS ======
% CPLI: CPL of hatch by intersection => Thin lines=> Thin hatch
% CPLS: CPL of hatch by subtraction => Thin lines=> Thick hatch
% mm: center point
% d: thickness and distance as multiple
%
% EXAMPLE:
% CPLhatch(CPLsample(14)+[123 23],[.1 1],80);
% CPLhatch(CPLsample(20)+[123 23],'',10);
% CPLhatch(CPLsample(14)+[123 23],.4,45);
% CPLhatch(CPLsample(14)+[123 23],.4,10,[0 1; 1 2]);
% CPLhatch(CPLsample(14)+[123 23],.4,45,[2 3]);
%
% See also: CPLplothatched, CPLradialhatch
%
%
% Copyright 2022-2023 Tim C. Lueth

VMplotvoxels(VM,vs,c,ea)- plots a voxel model as transperent cubes

VMplotvoxels(VM,vs,c,ea)% VMplotvoxels(VM,vs,c,ea) - plots a voxel model as transperent cubes
% (by Tim Lueth, VLFL-Lib, 2022-MAI-19 as class: VOXELS)
%
% there is no handle to the graphics object because of speed reasons
% very slow fnctn since Matlab doe simulates a volume renderer by a
% surface rendering (Status of: 2022-05-20)
%
% Introduced first in SolidGeometry 5.2
%
% See also: VLplotvoxel
%
% VMplotvoxels(VM,[vs,c,ea])
% === INPUT PARAMETERS ===
% VM: Voxel Model
% vs: size of voxels; default is [1 1 1]
% c: color default is 'k'
% ea: edge alpha value; default is 0.5
%
% EXAMPLE:
% I=zeros(10,10,10); I(4:6,4:6,3:8)=1;
% VMplotvoxels(I,[1 1 1],'r',1)
%
%
% [VM,vs]=VMreaddicomdir('/Volumes/LUETH-WIN/WIN AIM Matlab Libraries/SolidGeometry-Code/AIM_DICOMFILES/');
% [VN,ns]=VMresize(VM,[0.1 0.1 0.1],vs);
%
%
% See also: VLplotvoxel
%
%
% Copyright 2022 Tim C. Lueth

VLplotvoxel(VL,vs,c,a)- plots a voxel at the position VL

VLplotvoxel(VL,vs,c,a)% VLplotvoxel(VL,vs,c,a) - plots a voxel at the position VL
% (by Tim Lueth, VLFL-Lib, 2022-MAI-19 as class: VOXELS)
%
% Introduced first in SolidGeometry 5.2
%
% See also: VLplot, VLscatter
%
% VLplotvoxel(VL,[vs,c,a])
% === INPUT PARAMETERS ===
% VL: point or list of points
% vs: size of voxel; default is [1 1 1]
% c: globol color or list of colors of same size as VL
% a: globol transparency or list of transparency of same size as VL
%
% EXAMPLE:
% xx=1:1:10; yy=1:1:10; zz=1:1:10;
% VL=VLmeshgrid(xx,yy,zz);
% SGfigure(-30,30); VLplotvoxel(VL,[1 1 1],'w',0.4);
%
% See also: VLplot, VLscatter
%
%
% Copyright 2022 Tim C. Lueth

HTplot(T,Torg)- plots a HT matrix

HTplot(T,Torg)% HTplot(T,Torg) - plots a HT matrix
% (by Tim Lueth, VLFL-Lib, 2022-MAI-18 as class: KINEMATICS AND FRAMES)
%
% in the plane San Diego to Boston (Status of: 2022-05-18)
%
% Introduced first in SolidGeometry 5.2
%
% See also: tplot
%
% h=HTplot(T,[Torg])
% === INPUT PARAMETERS ===
% T: HT matrix
% Torg: Origin of T
% === OUTPUT RESULTS ======
% h: handle to go
%
% EXAMPLE:
% A=SGsample(27); SGfigure(-30,30); T=TofP([20 0 10],rot(0,0,pi/10)); A=SGtransT(A,T);
% SGplotalpha(A,'w',0.5); B=SGtransT(A,T); SGplotalpha(B,'w',0.5); HTplot(T,T);
%
% See also: tplot
%
%
% Copyright 2022 Tim C. Lueth

SGbar(S,n,pack,nofram)- returns a box without frames

SGbar(S,n,pack,nofram)% SGbar(S,n,pack,nofram) - returns a box without frames
% (by Tim Lueth, VLFL-Lib, 2022-MAI-18 as class: PARAMETRIC DESIGN)
%
% SGbox, SGbar and SGseedcube are very similar
% SGbox has 6 frames
% SGbar has no frames
% SGseedcube has one "F" frame and is below the xy plane (Status of:
% (Status of: 2022-05-18)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGbox, SGseedcube
%
% SG=SGbar([S,n,pack,nofram])
% === INPUT PARAMETERS ===
% S:
% n:
% pack:
% nofram:
% === OUTPUT RESULTS ======
% SG: Solid Geometry
%
% EXAMPLE:
% SGbar([30 20 10])
%
% See also: SGbox, SGseedcube
%
%
% Copyright 2022 Tim C. Lueth

plotrulerline(P1,P2,nam)- draws an simple ruler between two points in 2D

plotrulerline(P1,P2,nam)% plotrulerline(P1,P2,nam) - draws an simple ruler between two points in 2D
% (by Tim Lueth, VLFL-Lib, 2022-MAI-14 as class: VISUALIZATION)
%
% Introduced first in SolidGeometry 5.2
%
% See also: tplotruler
%
% plotrulerline(P1,P2,[nam])
% === INPUT PARAMETERS ===
% P1: Start Point or [P1;P2]
% P2: End Point
% nam: Name, for instace "D="
%
% See also: tplotruler
%
%
% Copyright 2022 Tim C. Lueth

SGdragchainelement(L,R,al,h)- returns a single element of a drag chain

SGdragchainelement(L,R,al,h)% SGdragchainelement(L,R,al,h) - returns a single element of a drag chain
% (by Tim Lueth, VLFL-Lib, 2022-MAI-13 as class: PARAMETRIC DESIGN)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGmeanderchain, SGdragstrip, SGdragchain
%
% SGdragchainelement([L,R,al,h])
% === INPUT PARAMETERS ===
% L: Distance of axis; default is 10
% R: [Height Width and axis diameter]; default is [8 11 4]
% al: rotating angle; default is pi/2 [0 pi/2]
% h: material thickness; default is 1.2 mm
%
% See also: SGmeanderchain, SGdragstrip, SGdragchain
%
%
% Copyright 2022 Tim C. Lueth

PLslottapering(D,H,sl,rm,al)- CPL of a slot tapering for creating blades for axis etc

PLslottapering(D,H,sl,rm,al)% PLslottapering(D,H,sl,rm,al) - CPL of a slot tapering for creating blades for axis etc
% (by Tim Lueth, VLFL-Lib, 2022-MAI-13 as class: CLOSED POLYGON LISTS)
%
% Introduced first in SolidGeometry 5.2
%
% See also: PLshaft, PLshaftrad, CPLmotorshaft
%
% CPLX=PLslottapering([D,H,sl,rm,al])
% === INPUT PARAMETERS ===
% D: Diameter of the axis
% H: Height of the Channel / Blade
% sl: slot size; default is slfit'c'
% rm: [tapering height-block height-ramp];m default is [2*sl 1.5 2]
% al: optional rotation angle
% === OUTPUT RESULTS ======
% CPLX: Contour to cout out
%
% EXAMPLE:
% PLslottapering(6,10,0.4,[.2 1 1]);
% PLslottapering(6,10,0.4,[.2 1 1],-pi/3);
%
% See also: PLshaft, PLshaftrad, CPLmotorshaft
%
%
% Copyright 2022 Tim C. Lueth

SGdragchain(L,R)- creates a 3D printable already assembled drag chain

SGdragchain(L,R)% SGdragchain(L,R) - creates a 3D printable already assembled drag chain
% (by Tim Lueth, VLFL-Lib, 2022-MAI-13 as class: PARAMETRIC DESIGN)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGdragstrip, SGdragchainelement
%
% SG=SGdragchain([L,R])
% === INPUT PARAMETERS ===
% L:
% R:
% === OUTPUT RESULTS ======
% SG:
%
% See also: SGdragstrip, SGdragchainelement
%
%
% Copyright 2022 Tim C. Lueth

SGmeshground(s,"fix")- creates a ground mesh that is a flexible texture on a FDM printer

SGmeshground(s,% SGmeshground(s,"fix") - creates a ground mesh that is a flexible texture on a FDM printer
% (by Tim Lueth, VLFL-Lib, 2022-MAI-13 as class: PARAMETRIC DESIGN)
%
% Introduced first in SolidGeometry 5.2
%
% See also: VLFLweave, SGdragchain, SGdragchainelement, SGdragstrip,
% SGmeanderchain
%
% [SGF,xx,yy]=SGmeshground([s,"fix"])
% === INPUT PARAMETERS ===
% s: [x-wdith y-width grid opening wires height]; default is [100 12 2
% .45 0]
% "fix": if used; the grid is adjusted to create a best fit
% === OUTPUT RESULTS ======
% SGF: Solid
% xx: xx values
% yy: yy values
%
% EXAMPLE:
% SGmeshground([40 40 2])
%
% See also: VLFLweave, SGdragchain, SGdragchainelement, SGdragstrip,
% SGmeanderchain
%
%
% Copyright 2022 Tim C. Lueth

tplotruler(T,z,s,st)- plots a 3D ruler als arrow sequence in a figure

tplotruler(T,z,s,st)% tplotruler(T,z,s,st) - plots a 3D ruler als arrow sequence in a figure
% (by Tim Lueth, VLFL-Lib, 2022-MAI-13 as class: VISUALIZATION)
%
% Introduced first in SolidGeometry 5.2
%
% See also: tplot, tplotangle, tplotaxis, tplotcolored, SGruler, rulerCPL
%
% tplotruler([T,z,s,st])
% === INPUT PARAMETERS ===
% T: Frame to start the ruler along ez
% z: sequence of z values
% s: size; default is 15
% st: z values; default is "delta", other is "coord"
%
% See also: tplot, tplotangle, tplotaxis, tplotcolored, SGruler, rulerCPL
%
%
% Copyright 2022 Tim C. Lueth

PLrhombus(d,h,a)- Point list of a rhombus

PLrhombus(d,h,a)% PLrhombus(d,h,a) - Point list of a rhombus
% (by Tim Lueth, VLFL-Lib, 2022-MAI-12 as class: ANALYTICAL GEOMETRY)
%
% Introduced first in SolidGeometry 5.2
%
% See also: PLinbus, PLcircseg, PLevolvente, PLgearDIN, PLhelix,
% PLkidney, PLrand, PLspiral, PLsquare, PLstar, PLcircleoval, PLtubbing,
% PLarrow, CPLcirclesofPL
%
% PL=PLrhombus([d,h,a])
% === INPUT PARAMETERS ===
% d: diameter in x; default is [6 6 5 2]);
% h: y value for each diameter; default is [0 3 4 15]
%
% a: turning angle after design; default is 0 rad
% === OUTPUT RESULTS ======
% PL:
%
% EXAMPLE:
% PLrhombus([5 5 2],[0 2 10])
%
% See also: PLinbus, PLcircseg, PLevolvente, PLgearDIN, PLhelix,
% PLkidney, PLrand, PLspiral, PLsquare, PLstar, PLcircleoval, PLtubbing,
% PLarrow, CPLcirclesofPL
%
%
% Copyright 2022 Tim C. Lueth

SGTremovedistframes(SG)- removes frames that are outside the bounding box of the surface of a solid

SGTremovedistframes(SG)% SGTremovedistframes(SG) - removes frames that are outside the bounding box of the surface of a solid
% (by Tim Lueth, VLFL-Lib, 2022-MAI-08 as class: KINEMATICS AND FRAMES)
%
% The SG-Lib writes out STL files including frames! Nevertheless, some
% slicer such as the Ultimaker CURA slicer have problems with Solids that
% have far distant frames, and the solid surface is not sliced on the
% base plate but in distant from the ground. Therefor, starting from
% SG-Lib 5.2, SGwriteSTL will not export the distant frames if not
% explicitly mentioned (Status of: 2022-05-08)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGwriteSTL
%
% [SG,ww]=SGTremovedistframes(SG)
% === INPUT PARAMETERS ===
% SG: Solid Geometry with frames.
% === OUTPUT RESULTS ======
% SG: Solid Geometry will all frames removed that are outside the BB of SG
% ww: true if any frames was removed
%
% EXAMPLE:
% SGTremovedistframes(SGbox);
% SGTremovedistframes(SGTset(SGbox,'OUT',TofP([30 30 30])));
%
% See also: SGwriteSTL
%
%
% Copyright 2022 Tim C. Lueth

Videoquickanimatego(dw,i,i,i)- rotates a set of graphics objects around axis in different speed radios

Videoquickanimatego(dw,i,i,i)% Videoquickanimatego(dw,i,i,i) - rotates a set of graphics objects around axis in different speed radios
% (by Tim Lueth, VLFL-Lib, 2022-MAI-07 as class: VISUALIZATION)
%
% Introduced first in SolidGeometry 5.2
%
% See also: animatego, Videoquickcloseandopen, Videoquickrotate3D,
% Videoquickstart, Videoquickwritegcf, Videoquickwritetextpage
%
% hh=Videoquickanimatego([dw,i,i,i])
% === INPUT PARAMETERS ===
% dw: [steps angle]; default is [60 2*pi]
% i: {handle frame ratio style}; default is ['',eye(4),1 'rotz']
% i: {handle frame ratio style}; default is ['',eye(4),1 'rotz']
% i: {handle frame ratio style}; default is ['',eye(4),1 'rotz']
% === OUTPUT RESULTS ======
% hh: array of handles
%
% EXAMPLE:
% SGfigure(-30,30);
% Videoquickanimatego('',{SGplotalpha(SGbox,'g'),'',5},SGplotalpha(SGtransP(SGbox,[50 0 0])))
% SGfigure(-30,30);
% Videoquickanimatego('',{SGplotalpha(SGbox,'g'),'',5,'linz'},SGplotalpha(SGtransP(SGbox,[50 0 0])))
%
% See also: animatego, Videoquickcloseandopen, Videoquickrotate3D,
% Videoquickstart, Videoquickwritegcf, Videoquickwritetextpage
%
%
% Copyright 2022 Tim C. Lueth

CPLremovethinwall(CPL,wall)- just removes thin walls from CPLS same as CPLdullededges and CPLremovebuffer

CPLremovethinwall(CPL,wall)% CPLremovethinwall(CPL,wall) - just removes thin walls from CPLS same as CPLdullededges and CPLremovebuffer
% (by Tim Lueth, VLFL-Lib, 2022-MAI-07 as class: CLOSED POLYGON LISTS)
%
% Used in automatic design fnctn to avoid thin walls that will break
% after printing or in use
% same as CPLN=CPLbuffer(CPLbuffer(CPL,-d),d);
% (Status of: 2022-05-07)
%
% Introduced first in SolidGeometry 5.2
%
% See also: CPLremovebuffer, CPLdullededges, CPLremovearea
%
% CPLN=CPLremovethinwall([CPL,wall])
% === INPUT PARAMETERS ===
% CPL: CPL conotur
% wall: minimal wall thickness; default is 1.2
% === OUTPUT RESULTS ======
% CPLN: New Contour without thin walls
%
% EXAMPLE:
% CPL=CPLunion(PLsquare(40,40), PLsquare([30,50])+[36 0]);
% CPL=CPLsubtract(CPLbuffer(CPLconvexhull(CPL),2),CPL);
% CPLremovethinwall(CPL,0.5); % Wall remains
% CPLremovethinwall(CPL,1); % Wall removed
%
% CPLremovebuffer(CPLsample(21),3)
% CPLremovebuffer(CPLsample(21),4)
% CPLdullededges(CPLsample(21),3/2)
% CPLdullededges(CPLsample(21),4/2)
%
% See also: CPLremovebuffer, CPLdullededges, CPLremovearea
%
%
% Copyright 2022 Tim C. Lueth

SGseedcube(h)- Creates a small cube below the surface with just one Frame 'F" to start SGdesingconcepts

SGseedcube(h)% SGseedcube(h) - Creates a small cube below the surface with just one Frame 'F" to start SGdesingconcepts
% (by Tim Lueth, VLFL-Lib, 2022-MAI-06 as class: AUTOMATIC DESIGN)
%
% SGdesignseed
% depuseString('SGseedcube',true) (Status of: 2022-05-07)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGtransrelSG
%
% SG0=SGseedcube([h])
% === INPUT PARAMETERS ===
% h: height (size) of cube);
% === OUTPUT RESULTS ======
% SG0: A small cube [1 x 1 x h] with one Fram 'F" at position eye(4)
%
% EXAMPLE:
% SGseedcube
%
% See also: SGtransrelSG
%
%
% Copyright 2022 Tim C. Lueth

animatego(h,T,w,style)- rotates one or several objects in a loop

animatego(h,T,w,style)% animatego(h,T,w,style) - rotates one or several objects in a loop
% (by Tim Lueth, VLFL-Lib, 2022-MAI-04 as class: VISUALIZATION)
%
% unfortuntately there is a need to redraw the parts, since SGTplotalpha
% returns also handles to Frames.
% This fnctn is used within Videoquickanimatego (Status of: 2022-05-08)
%
% Introduced first in SolidGeometry 5.2
%
% See also: Videoquickanimatego, viewsmooth, Videoquickrotate3D,
% figurerotate, drawnowvid
%
% h=animatego(h,T,w,[style])
% === INPUT PARAMETERS ===
% h: handle
% T: Frame 4x4
% w: angle difference in ez
% style: 'rotz' or 'linz'; default is 'rotz'
% === OUTPUT RESULTS ======
% h: handle to new graphics object
%
% EXAMPLE:
% close all; SGfigure(-30,30); A=SGbox; A=SGTretain(A,'F'); T=TofPez([30 0 50],[-1 -1 1]),
% SGplotalpha(A,'g'); h=SGTplotalpha(SGtransT(A,T));
% for i=1:50; w=2*pi/50; h=animatego(h,T,w); drawnow; shg; end;
%
% [~,a,b]=SGgearpair; SGfigure(-30,30); ha=SGplotalpha(a); hb=SGplotalpha(b);
% load ADAM_Amono.mat; b=SGconcat(b,SGmagnifyVL(ADAM_Amono,0.1),'center','ontop','alignfront',-3);
% ha=SGplotalpha(a); hb=SGplotalpha(b);
% while true; ha=animatego(ha,SGTget(a,'B'),0.1); hb=animatego(hb,SGTget(b,'F'),+0.1/2.5);
% ch=get(gcf,'CurrentCharacter'); if uint8(ch)==27; break; end; drawnow; shg; end;
%
% See also: Videoquickanimatego, viewsmooth, Videoquickrotate3D,
% figurerotate, drawnowvid
%
%
% Copyright 2022 Tim C. Lueth

TmirrorTxy(TA,T)- mirrors frames or cell list of frames

TmirrorTxy(TA,T)% TmirrorTxy(TA,T) - mirrors frames or cell list of frames
% (by Tim Lueth, VLFL-Lib, 2022-MAI-01 as class: KINEMATICS AND FRAMES)
%
% used in SGmirrorTxy (Status of: 2022-05-01)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGmirrorTxy
%
% TB=TmirrorTxy(TA,[T])
% === INPUT PARAMETERS ===
% TA: frame or cell list of frames to be mirrored
% T: mirror axis is given by ez, T, ez, 'x'
% === OUTPUT RESULTS ======
% TB: mirrored fram of mirrored frame list
%
% See also: SGmirrorTxy
%
%
% Copyright 2022 Tim C. Lueth

SGcatheter(PLR,PLL,HLL)- Creates a solid of a catheter

SGcatheter(PLR,PLL,HLL)% SGcatheter(PLR,PLL,HLL) - Creates a solid of a catheter
% (by Tim Lueth, VLFL-Lib, 2022-MAI-01 as class: PARAMETRIC DESIGN)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGcatheterroller, SGcatheterfeeder
%
% [SGC,AParts]=SGcatheter([PLR,PLL,HLL])
% === INPUT PARAMETERS ===
% PLR: Diameter of segements; last value is diamter; default is [8 6
% 2.33] (8 French)
% PLL: Length of segments; default is [2 25 20]);
% HLL: Length and displacement of handle; default is [11 8]
% === OUTPUT RESULTS ======
% SGC: SG of Catheter
% AParts: Parts list
%
% EXAMPLE:
% SGcatheter
% SGcatheter([6.5 6 5 2.33],[10 16 3 10],[13 12]) % Green one for Philipp P
%
% See also: SGcatheterroller, SGcatheterfeeder
%
%
% Copyright 2022 Tim C. Lueth

TofSGez(SG,ez,alp)- finds simple angle by ez vector using SGTsetBF

TofSGez(SG,ez,alp)% TofSGez(SG,ez,alp) - finds simple angle by ez vector using SGTsetBF
% (by Tim Lueth, VLFL-Lib, 2022-MAI-01 as class: KINEMATICS AND FRAMES)
%
% In contrast to TofSGMLez, this fnctn will find faces with similar
% angles (Status of: 2022-06-17)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGTsetBF, TofSGMLez, FSselect, TofcrossedSG
%
% [T,err]=TofSGez(SG,ez,[alp])
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% ez: desired ez vector
% alp: allowed deviation; default is pi/4
% === OUTPUT RESULTS ======
% T: Found frame
% err: angle difference between ez vectors
%
% EXAMPLE:
% TofSGMLez(SGsample(3),[0 0 1])
% TofSGez(SGsample(3),[0 0 1])
%
% See also: SGTsetBF, TofSGMLez, FSselect, TofcrossedSG
%
%
% Copyright 2022 Tim C. Lueth

SGextend(SG,T,b,typ,"debug")- just extends the solid in one direction

SGextend(SG,T,b,typ,% SGextend(SG,T,b,typ,"debug") - just extends the solid in one direction
% (by Tim Lueth, VLFL-Lib, 2022-APR-30 as class: SURFACES)
%
% helpful for quick and dirty construction by try to avoid (Status of:
% 2022-05-01)
%
% Introduced first in SolidGeometry 5.2
%
% See also: TofSG, TofSGez, SGof2T, SGdesignSupplement2connect2SG,
% SGof2SGT
%
% [SGN,SGS]=SGextend([SG,T,b,typ,"debug"])
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% T: cutting frame, or 'under (TofSG) or [0 0 -1] (TofSGez)
% b: [extension intrusion] default is [4 -.5];
% typ: 'fill, sub, unite', default is 'unite'
% "debug": if used; the fnctn shows the progress
% === OUTPUT RESULTS ======
% SGN: extended Solid
% SGS: Solid supplement
%
% EXAMPLE:
% SGextend(SGsample(3),'under',4)
% SGextend(SGsample(3),'under',4,'sub')
%
% See also: TofSG, TofSGez, SGof2T, SGdesignSupplement2connect2SG,
% SGof2SGT
%
%
% Copyright 2022 Tim C. Lueth

whichSG(pat,"list4doc")- searches for patters in filenames of matlab files

whichSG(pat,% whichSG(pat,"list4doc") - searches for patters in filenames of matlab files
% (by Tim Lueth, VLFL-Lib, 2022-APR-30 as class: FILE HANDLING)
%
% helps also to find fnctns in the sglib by using searchterm (Status of:
% 2022-05-04)
%
% Introduced first in SolidGeometry 5.2
%
% See also: which, SGexplain, depuseString, searchdirTL, whichTL
%
% [flist,mlist]=whichSG([pat,"list4doc"])
% === INPUT PARAMETERS ===
% pat: pattern to search
% "list4doc": if used the output is given as string sequence too
% === OUTPUT RESULTS ======
% flist: list fo files in working directory
% mlist: matlab fnctns of this name
%
% EXAMPLE:
% whichSG sgtitle
% whichSG chain % finds all m files that contain chain in the name
%
% See also: which, SGexplain, depuseString, searchdirTL, whichTL
%
%
% Copyright 2022 Tim C. Lueth

axis4all(fig,axisparams)- applies the commands for axis to all subplots applies the commands for axis to all subplots

axis4all(fig,axisparams)% axis4all(fig,axisparams) - applies the commands for axis to all subplots applies the commands for axis to all subplots
% (by Tim Lueth, VLFL-Lib, 2022-APR-28 as class: VISUALIZATION)
%
% Introduced first in SolidGeometry 5.2
%
% See also: axisscale, view4all
%
% axis4all([fig,axisparams])
% === INPUT PARAMETERS ===
% fig: default is gcf; no need to use it as first paramter
% axisparams: list of parameters same as for axis
%
% EXAMPLE:
% close all
% SGsample; % or SGfigure; SGplot4(SGbox)
% axisscale
% axis4all('on','tight'); drawnow
% axis4all(gcf, 'off'); drawnow
%
%
%
% See also: axisscale, view4all
%
%
% Copyright 2022 Tim C. Lueth

SGstampname(SG,txtparams)- creates a textfield to understand the parameters of the solid

SGstampname(SG,txtparams)% SGstampname(SG,txtparams) - creates a textfield to understand the parameters of the solid
% (by Tim Lueth, VLFL-Lib, 2022-APR-28 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.2
%
% See also: sprintftext
%
% SG=SGstampname(SG,[txtparams])
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% txtparams: parameter to create a string such as in sprintftext
% === OUTPUT RESULTS ======
% SG: SG including stampname and stampdate
%
%
% EXAMPLE:
% SGstampname(SGbox,'SGbox([',[30 20 10],'])')
%
% See also: sprintftext
%
%
% Copyright 2022 Tim C. Lueth

PLvaryfrom(VL,dd,rr)- simply adds small values in a determinstic way to a point list

PLvaryfrom(VL,dd,rr)% PLvaryfrom(VL,dd,rr) - simply adds small values in a determinstic way to a point list
% (by Tim Lueth, VLFL-Lib, 2022-APR-26 as class: AUXILIARY PROCEDURES)
%
% The set of fnctns
% VLvaryfrom, PLvaryfrom, TLvaryfrom, SGvaryfrom
% tries to compensate the weakness of the boolean operations in
% combination with the weakness of 64 Bit numeric and the weakness of the
% delaunay implementation of matlab.
% this fnctn takes a solid and adds small values to the position of the
% solid to avoid problems with boolean operations!
% Helpful in combination with SGunion, SGsubtract and SGsubtractnaddTL
% (Status of: 2022-04-26)
%
% Introduced first in SolidGeometry 5.2
%
% See also: TLvaryfrom, VLvaryfrom, SGvaryfrom
%
% VLN=PLvaryfrom(VL,[dd,rr])
% === INPUT PARAMETERS ===
% VL: point list
% dd: [dx dy dz]; default is [1 1 1]/1234
% rr: [wx wy wz]; default is [1 1 1]*34/14333
% === OUTPUT RESULTS ======
% VLN: New point list
%
% EXAMPLE:
% PLvaryfrom(PLsquare(4))
%
% See also: TLvaryfrom, VLvaryfrom, SGvaryfrom
%
%
% Copyright 2022 Tim C. Lueth

VLvaryfrom(VL,dd,rr)- simply adds small values in a determinstic way to a vertex list

VLvaryfrom(VL,dd,rr)% VLvaryfrom(VL,dd,rr) - simply adds small values in a determinstic way to a vertex list
% (by Tim Lueth, VLFL-Lib, 2022-APR-26 as class: AUXILIARY PROCEDURES)
%
% The set of fnctns
% VLvaryfrom, PLvaryfrom, TLvaryfrom, SGvaryfrom
% tries to compensate the weakness of the boolean operations in
% combination with the weakness of 64 Bit numeric and the weakness of the
% delaunay implementation of matlab.
% this fnctn takes a solid and adds small values to the position of the
% solid to avoid problems with boolean operations!
% Helpful in combination with SGunion, SGsubtract and SGsubtractnaddTL
% (Status of: 2022-04-26)
%
% Introduced first in SolidGeometry 5.2
%
% See also: TLvaryfrom, PLvaryfrom, SGvaryfrom
%
% VLN=VLvaryfrom(VL,[dd,rr])
% === INPUT PARAMETERS ===
% VL: Vertex list
% dd: [dx dy dz]; default is [1 1 1]/1234
% rr: [wx wy wz]; default is [1 1 1]*34/14333
% === OUTPUT RESULTS ======
% VLN: New vertex list
%
% EXAMPLE:
% VLvaryfrom(VLaddz(PLsquare(4),1))
%
% See also: TLvaryfrom, PLvaryfrom, SGvaryfrom
%
%
% Copyright 2022 Tim C. Lueth

SGvaryfrom(SG,)- simply adds small values in a determinstic way to the vertices of a solid

SGvaryfrom(SG,)% SGvaryfrom(SG,) - simply adds small values in a determinstic way to the vertices of a solid
% (by Tim Lueth, VLFL-Lib, 2022-APR-26 as class: SURFACES)
%
% The set of fnctns
% VLvaryfrom, PLvaryfrom, TLvaryfrom, SGvaryfrom
% tries to compensate the weakness of the boolean operations in
% combination with the weakness of 64 Bit numeric and the weakness of the
% delaunay implementation of matlab.
% this fnctn takes a solid and adds small values to the position of the
% solid to avoid problems with boolean operations!
% Helpful in combination with SGunion, SGsubtract and SGsubtractnaddTL
% (Status of: 2022-04-26)
%
% Introduced first in SolidGeometry 5.2
%
% See also: TLvaryfrom, VLvaryfrom, PLvaryfrom
%
% SGN=SGvaryfrom(SG,[])
% === INPUT PARAMETERS ===
% SG: Solid to be modified
% === OUTPUT RESULTS ======
% SGN: Solid with slightly adjusted coordinates
%
% EXAMPLE:
% load ADAM_Aframes.mat;
% SGvaryfrom(ADAM_Aframes) % Natural Solid ==> Most probably only a few changes
% SGvaryfrom(SGbox) % Ideal geometry ==> Almost all coordinates are changed
%
% See also: TLvaryfrom, VLvaryfrom, PLvaryfrom
%
%
% Copyright 2022 Tim C. Lueth

SGdesignPintle(MM,sl)- Designs a simple pindle bolt connection

SGdesignPintle(MM,sl)% SGdesignPintle(MM,sl) - Designs a simple pindle bolt connection
% (by Tim Lueth, VLFL-Lib, 2022-APR-25 as class: AUTOMATIC DESIGN)
%
% In contrast to other SGdesing fnctns, the "screw", the SG of the bolt
% is designed using slfit('b').
% Reason is that this solid should have after print out the nominal value
% and not just shown in Simulation! (Status of: 2022-04-26)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGdesignDIN7991, SGsubtractnaddTL
%
% [Hsub,Nsub,SGB,Hadd,Nadd,AParts]=SGdesignPintle([MM,sl])
% === INPUT PARAMETERS ===
% MM: default is [3 6 0 0]; [M-Bolt Length overlength and spacer];
% default [2.5 6 0 0]
% sl: default is 'tt' for transition and clearance fittion on head side
% and nut side
% === OUTPUT RESULTS ======
% Hsub: Subtraction solid on head side
% Nsub: Subtraction solid on nut side
% SGB: SG of Bolt USED TO BE PRINTED OUT!
% Hadd: Supplement solid on head side
% Nadd: Supplement solid on nut side
% AParts: Parts list
%
% EXAMPLE:
% SGdesignPintle
%
% See also: SGdesignDIN7991, SGsubtractnaddTL
%
%
% Copyright 2022 Tim C. Lueth

CPLdistancewall(CPLo,CPLi)- returns the minimal wall thickness between 2 CPLs or a region

CPLdistancewall(CPLo,CPLi)% CPLdistancewall(CPLo,CPLi) - returns the minimal wall thickness between 2 CPLs or a region
% (by Tim Lueth, VLFL-Lib, 2022-APR-25 as class: CLOSED POLYGON LISTS)
%
% Introduced first in SolidGeometry 5.2
%
% See also: VLnearestNeighbor
%
% [wmin,wmax]=CPLdistancewall([CPLo,CPLi])
% === INPUT PARAMETERS ===
% CPLo: Outer CPL
% CPLi: Innver CPL
% === OUTPUT RESULTS ======
% wmin: maximal wall thickness
% wmax: maximal wall thickness
%
% EXAMPLE:
% CPL=CPLsample(3)*3; w=2; CPL=CPLsubtract(CPL,CPLbuffer(CPL,-2)); SGofCPLz(CPL,50); SG=ans;
% CPLdistancewall(CPL)
%
% See also: VLnearestNeighbor
%
%
% Copyright 2022 Tim C. Lueth

exp_2022_04_25_Adam- EXPERIMENT JUST TO INSERT A MOTOR INTO ADAM

exp_2022_04_25_Adam% exp_2022_04_25_Adam - EXPERIMENT JUST TO INSERT A MOTOR INTO ADAM
% (by Tim Lueth, VLFL-Lib, 2022-APR-25 as class: EXPERIMENTS)
%
% Introduced first in SolidGeometry 5.2
%
% See also: exp_2020_09_07_ADAM_NEW, SGdesignMotorN40horiz,
% exp_2022_04_21_ADAM_MOTORS
%
% exp_2022_04_25_Adam
%
% See also: exp_2020_09_07_ADAM_NEW, SGdesignMotorN40horiz,
% exp_2022_04_21_ADAM_MOTORS
%
%
% Copyright 2022 Tim C. Lueth

SGof2CPLtransition4FDM(CPLB0,CPLi,rmin,alpha)- creates transition solid to avoid support structures for FDM printer

SGof2CPLtransition4FDM(CPLB0,CPLi,rmin,alpha)% SGof2CPLtransition4FDM(CPLB0,CPLi,rmin,alpha) - creates transition solid to avoid support structures for FDM printer
% (by Tim Lueth, VLFL-Lib, 2022-APR-23 as class: SURFACES)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGof2CPLzheurist
%
% [EE,hE]=SGof2CPLtransition4FDM(CPLB0,CPLi,[rmin,alpha])
% === INPUT PARAMETERS ===
% CPLB0: Lower Contour
% CPLi: Higher Contour
% rmin: optional minimal angle
% alpha: optional transition angle; default is 50/180*pi
% === OUTPUT RESULTS ======
% EE: Transition solid
% hE: height of EE in z
%
% EXAMPLE:
%
% SGof2CPLtransition4FDM(CPLsubtract(PLstar(10),PLcircle(3)),CPLsubtract(PLstar(10),PLcircle(2)))
%
% See also: SGof2CPLzheurist
%
%
% Copyright 2022 Tim C. Lueth

view4all(AZ,EL)- sets the view angles for all subplots the same

view4all(AZ,EL)% view4all(AZ,EL) - sets the view angles for all subplots the same
% (by Tim Lueth, VLFL-Lib, 2022-APR-23 as class: VISUALIZATION)
%
% This a fnctn of a set of fnctns the modify all subplots of a figure
% (Status of: 2022-04-23)
%
% Introduced first in SolidGeometry 5.2
%
% See also: axisscale, view, SGplotcellmultiple
%
% view4all([AZ,EL])
% === INPUT PARAMETERS ===
% AZ: azimut angle; default is AZ of gca
% EL: elevation angle; default is EL of gca
%
% EXAMPLE:
% A=SGbox([5,5,5]); B=SGbox(20,30,10); SG={A,B}; SGplotcellmultiple(SG);
% view4all % use AZ,EL of last gca
% view4all(0,90) % set all AZ and EL to [0,90]
%
% See also: axisscale, view, SGplotcellmultiple
%
%
% Copyright 2022 Tim C. Lueth

SGofCPLzplugin(CPL,z,l)- created extruded solids that can be pluged in if they are very long

SGofCPLzplugin(CPL,z,l)% SGofCPLzplugin(CPL,z,l) - created extruded solids that can be pluged in if they are very long
% (by Tim Lueth, VLFL-Lib, 2022-APR-21 as class: AUTOMATIC DESIGN)
%
% helpful for rail covers of robots or other long tubes etc.
% This fnctn doen not creates caps yet but allowes open CPLs in contrast
% to SGplugintube (Status of: 2022-04-21)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGplugintube
%
% SG=SGofCPLzplugin(CPL,[z,l])
% === INPUT PARAMETERS ===
% CPL: CPL consisting of a an inner and outer contour
% z: [zmin zmax]; default ist [0 length]
% l: [segement-length overlapp] default is [160 30];
% === OUTPUT RESULTS ======
% SG: cell list of segments
%
% EXAMPLE:
% SGofCPLzplugin(CPLsubtract(PLstar(20),PLcircle(10)),170,[65])
% SGofCPLzplugin(CPLsample(18),170,[65])
% SGofCPLzplugin(CPLsample(30),170,[65])
%
% See also: SGplugintube
%
%
% Copyright 2022 Tim C. Lueth

exp_2022_04_21_ADAM_MOTORS- EXPERIMENT TO SHOW THE SIMPLICITY OF INTEGRATING DRIVES INTO BODIES

exp_2022_04_21_ADAM_MOTORS% exp_2022_04_21_ADAM_MOTORS - EXPERIMENT TO SHOW THE SIMPLICITY OF INTEGRATING DRIVES INTO BODIES
% (by Tim Lueth, VLFL-Lib, 2022-APR-21 as class: EXPERIMENTS)
%
% While in exp_2020_09_07_ADAM_NEW screws were used, in this experiment
% exp_2022_04_21_ADAM_MOTORS we use the Chihai GW12-N20 Encoder motors
% (Status of: 2022-04-21)
%
% Introduced first in SolidGeometry 5.2
%
% See also: exp_2020_09_07_ADAM_NEW, SGdesignMotorN40horiz
%
% exp_2022_04_21_ADAM_MOTORS
%
% See also: exp_2020_09_07_ADAM_NEW, SGdesignMotorN40horiz
%
%
% Copyright 2022 Tim C. Lueth

SGplugintube(RR,LL,sl,"cap","close")- create a tube that can be elongated piece by piece

SGplugintube(RR,LL,sl,% SGplugintube(RR,LL,sl,"cap","close") - create a tube that can be elongated piece by piece
% (by Tim Lueth, VLFL-Lib, 2022-APR-19 as class: PARAMETRIC DESIGN)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGofCPLzplugin, SGcylinder, SGofCPLrot, SGofCPLCVLR
%
% [SG,SGB,SGC,AParts]=SGplugintube([RR,LL,sl,"cap","close"])
% === INPUT PARAMETERS ===
% RR: [Ri Wt n] [Inner-Radius wall-thickness edges]; default is [8.0 1.5
% 0]; Minimal wall size is 1.5mm
% LL: [LL LU LO] [length lower-overlap top-overlap]; default is [160 30
% 30]
% sl: slot size to increase
% "cap": if used there will be caps to plug-in
% "close": if closed (LL(2)==0 || LL(3)==0; floor and/or the top are
% closed
% === OUTPUT RESULTS ======
% SG: Solid of the tube
% SGB: lower cap
% SGC: top cap
% AParts: Parts-List
%
% EXAMPLE:
% SGplugintube('',[40 20 10],'cap');
% SGplugintube('',[40 20 10]);
% SGplugintube('',[40 0 0],'close'); % Hollow solid
% SGplugintube([15/2 1.5 4],[60 20]); % Square
%
% See also: SGofCPLzplugin, SGcylinder, SGofCPLrot, SGofCPLCVLR
%
%
% Copyright 2022 Tim C. Lueth

TLvaryfrom(TL,dd,rr)- this fnct takes a frame list and adds small values to the position and orientation

TLvaryfrom(TL,dd,rr)% TLvaryfrom(TL,dd,rr) - this fnct takes a frame list and adds small values to the position and orientation
% (by Tim Lueth, VLFL-Lib, 2022-APR-19 as class: KINEMATICS AND FRAMES)
%
% The set of fnctns
% VLvaryfrom, PLvaryfrom, TLvaryfrom, SGvaryfrom
% tries to compensate the weakness of the boolean operations in
% combination with the weakness of 64 Bit numeric and the weakness of the
% delaunay implementation of matlab.
% this fnctn takes a frame list and adds small values to the position
% and orientation to avoid problems with boolean operations!
% Helpful in combination with SGunion, SGsubtract and SGsubtractnaddTL
% (Status of: 2022-04-26)
%
% Introduced first in SolidGeometry 5.2
%
% See also: TcopyVLez, TLofPL, SGsubtractnaddTL
%
% TLN=TLvaryfrom(TL,[dd,rr])
% === INPUT PARAMETERS ===
% TL: Frame list
% dd: [dx dy dz] = default is [1 1 1]/1234
% rr: [wx wy wz]; default is [1 1 1]*34/14333
%
% === OUTPUT RESULTS ======
% TLN: modified frame list
%
% EXAMPLE:
% A=SGTremove(SGbox); SGfigure (-30,30); SGplotalpha(A,'w',0.9);
% [~,~,TL]=CPLofSGTez(A,[0 0 1],[4 1 2],'style','grid'); tplot(TL,0); shg
% SGsubtractnaddTL(A,SGcylinder(1,[-2 2]),TL)
% SGsubtractnaddTL(A,SGcylinder(1,[-2 2]),TLvaryfrom(TL))
%
% See also: TcopyVLez, TLofPL, SGsubtractnaddTL
%
%
% Copyright 2022 Tim C. Lueth

SGdesignMotorN40horiz(LM,sh,sz,gb,PL)- Designs a subtraction solids for the N20 L-type encoder motor

SGdesignMotorN40horiz(LM,sh,sz,gb,PL)% SGdesignMotorN40horiz(LM,sh,sz,gb,PL) - Designs a subtraction solids for the N20 L-type encoder motor
% (by Tim Lueth, VLFL-Lib, 2022-APR-19 as class: AUTOMATIC DESIGN)
%
% The default motor is a Chihai GW12-N20 Encoder (Status of: 2022-04-21)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGmotorN40horiz, SGdesignMotorN40, SGmotorN40
%
% [Hsub,Nsub,SGM,Hadd,Nadd,AParts]=SGdesignMotorN40horiz([LM,sh,sz,gb,PL])
% === INPUT PARAMETERS ===
% LM: [housinh-height wall-thickness topwall-thickness rotation-angle]
% default is [14 1.5 2 0]
% sh: Shaft Diameter and Shaft Flattening; default is [3 2.5]
% sz: [maxsize-x maxsize-y length-shaft diameter shaft-socket, height
% shaft-socket]; default is [10 12 6.5 4 .5]
% gb: gearbox [size-x size-y height motor-length Mscrews xshift yshift];
% default is [18 12 10 14 1.6 5 0]
% PL: Point list of screws; default is [-2.5 -4.5;-2.5 +4.5]
% === OUTPUT RESULTS ======
% Hsub: Head Subtraction Solid (Shaft Side)
% Nsub: Nut Subtraction Solid (Motor Side)
% SGM: Motor Geometry
% Hadd: Head Supplement (Shaft Side)
% Nadd: Nut Supplement (Motor Side)
% AParts: Part list
%
% Additional Hyperlinks:
% Chihai GW12-N20 Encoder
%
% EXAMPLE:
% SGdesignMotorN40horiz
% [Hsub,Nsub,SGM,Hadd,Nadd,AParts]=SGdesignMotorN40horiz
% A=SGbox([20,20,2]); B=A; A=SGTretain(A,'F'); B=SGTretain(B,'B'); A=SGtransP(A,[1 1 1]/1000); B=SGtransrelSG(B,A,'alignT',{'B','F'});
%
% A=SGunion(A,Nadd,'alignT',{'C','F'}); A=SGsubtract(A,Nsub,'alignT',{'C','F'}); SGfigure; SGplotalpha(A);
%
% B=SGunion(B,Hadd,'alignT',{'C','B'}); B=SGsubtract(B,Hsub,'alignT',{'C','B'}); SGfigure; SGplotalpha(B);
%
%
% See also: SGmotorN40horiz, SGdesignMotorN40, SGmotorN40
%
%
% Copyright 2022 Tim C. Lueth

exp_2022_04_19_numbers(n)- experiment for formating numbers wrt exp(1), pi, 2^ as fractions

exp_2022_04_19_numbers(n)% exp_2022_04_19_numbers(n) - experiment for formating numbers wrt exp(1), pi, 2^ as fractions
% (by Tim Lueth, VLFL-Lib, 2022-APR-19 as class: EXPERIMENTS)
%
% rats(pi) => pi= 355/113
% rats(exp(1)) => e = 1457/536
% (Status of: 2022-04-19)
%
% Introduced first in SolidGeometry 5.2
%
% See also: rats
%
% fnn=exp_2022_04_19_numbers([n])
% === INPUT PARAMETERS ===
% n: number
% === OUTPUT RESULTS ======
% fnn: string of number
%
% EXAMPLE:
% exp_2022_04_19_numbers(1/19)
% exp_2022_04_19_numbers(1/19*exp(1))
% exp_2022_04_19_numbers(1/19*pi)
% exp_2022_04_19_numbers(2^(1/19))
%
%
% See also: rats
%
%
% Copyright 2022 Tim C. Lueth

SGjuicermachineclip(name)- A missing useful part for the Bosch juicer machine

SGjuicermachineclip(name)% SGjuicermachineclip(name) - A missing useful part for the Bosch juicer machine
% (by Tim Lueth, VLFL-Lib, 2022-APR-17 as class: MODELING PROCEDURES)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGcompass
%
% SGB=SGjuicermachineclip([name])
% === INPUT PARAMETERS ===
% name: Name string on back side
% === OUTPUT RESULTS ======
% SGB: Solid Geomerty to print
%
% EXAMPLE:
% SGjuicermachineclip
%
% See also: SGcompass
%
%
% Copyright 2022 Tim C. Lueth

SGmotorN40horiz(sh,sz,gb,PL)- returns the Geometry of a N20 HEININGER Motor with 90 degree flansch

SGmotorN40horiz(sh,sz,gb,PL)% SGmotorN40horiz(sh,sz,gb,PL) - returns the Geometry of a N20 HEININGER Motor with 90 degree flansch
% (by Tim Lueth, VLFL-Lib, 2022-APR-16 as class: MODELING PROCEDURES)
%
% Helps to design motor driven mechanisms
% Example for designing such components using
% PARTS: SGpartslist, SGpartsfuncparams, sprintftext, SGpartslistastext
% SHAPE: sprintftext, SGofCPLcommand, TcopyVLez, SGsubtractnaddTL
% (Status of: 2022-04-25)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGbatteriepack, SGmotorSolExpert, SGcapontop, SGmotorshaft,
% SGmotorhousing, SGmotorN40, SGdesignMotorN40horiz
%
% SG=SGmotorN40horiz([sh,sz,gb,PL])
% === INPUT PARAMETERS ===
% sh: Shaft Diameter and Shaft Flattening; default is [3 2.5]
% sz: [maxsize-x maxsize-y length-shaft diameter shaft-socket, height
% shaft-socket]; default is [10 12 6.5 4 .5]
% gb: gearbox [size-x size-y height motor-length Mscrews shift-x
% shift-y]; default is [18 12 10 14 1.6 5 0]
% PL: Point list of screws; default is [-2.5 -4.5;-2.5 +4.5]
% === OUTPUT RESULTS ======
% SG: Solid Geometry of a N20 Motor by Sebastian Heininger Selection
%
% Additional Hyperlinks:
% Chihai GW12-N20 Encoder , Controller
%
% EXAMPLE:
% SGmotorN40horiz
%
% See also: SGbatteriepack, SGmotorSolExpert, SGcapontop, SGmotorshaft,
% SGmotorhousing, SGmotorN40, SGdesignMotorN40horiz
%
%
% Copyright 2022 Tim C. Lueth

SGpartslistastext(oldlist,addlist)- appends parts as text lines to a parts list and returns text lines

SGpartslistastext(oldlist,addlist)% SGpartslistastext(oldlist,addlist) - appends parts as text lines to a parts list and returns text lines
% (by Tim Lueth, VLFL-Lib, 2022-APR-15 as class: AUTOMATIC DESIGN)
%
% VERY SIMILAR AS SGpartslist but based noct on cell lists but on text
% lines (easier to understand and use)
% new parts are added by a string such as
% * if there are several parts required or
% if there is only one part (Status of: 2022-04-16)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGpartslist, sprintftext, SGpartsfuncparams,
% SGwriteMultipleSTL
%
% [newlist,AParts]=SGpartslistastext(oldlist,[addlist])
% === INPUT PARAMETERS ===
% oldlist: parts list or empty as text string or cell list
% addlist: parts list to add as as text string or cell list
% === OUTPUT RESULTS ======
% newlist: parts list as text list
% AParts: parts list as cell list
%
% EXAMPLE:
% SGpartslist([],'DIN912','DIN985','DINX'); pp=ans
% SGpartslist(pp,'2 DIN912','3 DIN985','4 * DINX'); pp2=ans
% SGpartslist(pp,pp2); pp3=ans
% [~,b]=SGpartslist(pp,pp2)
% [~,b]=SGpartslist([],b,b,b,b)
%
% See also: SGpartslist, sprintftext, SGpartsfuncparams,
% SGwriteMultipleSTL
%
%
% Copyright 2022 Tim C. Lueth

sprintftext(textelementlist)- creates as simple as possible a string for design parameters

sprintftext(textelementlist)% sprintftext(textelementlist) - creates as simple as possible a string for design parameters
% (by Tim Lueth, VLFL-Lib, 2022-APR-14 as class: AUXILIARY PROCEDURES)
%
% Originally written for SGpartslist but extremely helpful also for
% SGofCPLcommand (Status of: 2022-04-14)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGpartslist, SGofCPLcommand, SGpartsfuncparams,
% SGwriteMultipleSTL
%
% txt=sprintftext([textelementlist])
% === INPUT PARAMETERS ===
% textelementlist: list of numbers, chars, and textlines
% === OUTPUT RESULTS ======
% txt: string to bu used for fprintf or SGpartslist
%
% EXAMPLE:
% d=4; l=5; cmd=sprintftext('c ',d,', h ',l), SGofCPLcommand(cmd)
% sprintftext(1,' DIN7991 Screw ',2.5,'x',6,'mm')
%
% %% FULL CONCEPT USE
% AParts=SGpartslist({},SGpartsfuncparams(1,2,3)); % Creates Partslist
% for i=1:size(TL,3);
% AParts=SGpartslist(AParts,sprintftext(1,'DIN7991 M',MM(1),'x',MM(2),'mm'));
% end
% [~,partext]=SGpartslist(AParts); SGwriteMultipleSTL({SGW},'','',partext);
%
%
% See also: SGpartslist, SGofCPLcommand, SGpartsfuncparams,
% SGwriteMultipleSTL
%
%
% Copyright 2022 Tim C. Lueth

CPLofSGprojection(SG,T)- returns a projection contour of a solid using the graphics board

CPLofSGprojection(SG,T)% CPLofSGprojection(SG,T) - returns a projection contour of a solid using the graphics board
% (by Tim Lueth, VLFL-Lib, 2022-APR-14 as class: CLOSED POLYGON LISTS)
%
% First version of 2021-08-11 by Tim Lueth
% Limited resolution (Status of: 2022-04-14)
%
% Introduced first in SolidGeometry 5.2
%
% See also: CPLofgcaprojection
%
% [CPL,CVL]=CPLofSGprojection(SG,[T])
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% T: Projektion Orientation or just ez vctor; default is eye(4)
% === OUTPUT RESULTS ======
% CPL: CPL to be projected using T
% CVL: CVL already projected CPL
%
% EXAMPLE:
% load JACO_robot.mat
% close all; CPLofSGprojection (JC1,[1 1 1]);
% CPLofSGprojection(SGsample(45)
% CPLofSGprojection(SGtransT(JC1,TofR([1 2 3]/2/pi)),[1 0 1]);
%
% See also: CPLofgcaprojection
%
%
% Copyright 2022 Tim C. Lueth

SGpartsfuncparams(params)- creates a documentation string to explain the fnct call including all parameters

SGpartsfuncparams(params)% SGpartsfuncparams(params) - creates a documentation string to explain the fnct call including all parameters
% (by Tim Lueth, VLFL-Lib, 2022-APR-13 as class: AUXILIARY PROCEDURES)
%
% In parameterized design, it is very easy to create very different STL
% structures during an experimental design process. Unfortunately, it is
% almost impossible to remember a few days later the exact parameter set
% used to create these parameterized (automatically designed) structures.
% Therefore this fnctn creates a string that can be used in combination
% with SGpartslist to add the parameter set to the part list and with
% SGwriteMultipleSTL to add the fnctn parameter set to the directory
% containing the final STL set (Status of: 2022-04-16)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGpartslist, sprintftext, SGwriteMultipleSTL
%
% txt=SGpartsfuncparams([params])
% === INPUT PARAMETERS ===
% params: exact same list of parameters as used in fnctn definition
% === OUTPUT RESULTS ======
% txt: resulting text
%
% EXAMPLE:
% Just call this fnct with the same parameter list as the mother fncts to create the string
% SGpartsfuncparams(12,13,'t',[1 1.5 2 12 23 34.0 pi])
%
% txt=SGpartsfuncparams(MA,p,CPL,sl,BL) % Same order of parameters as used in the fncts definition
%
% [AParts,partext]=SGpartslist({},SGpartsfuncparams(MA,p,CPL,sl,BL)); % Same order of parameters as used in the fncts definition
% SGwriteMultipleSTL({A,B,C,E},'','',partext);
%
%
% See also: SGpartslist, sprintftext, SGwriteMultipleSTL
%
%
% Copyright 2022 Tim C. Lueth

SGsubtractnaddTL(SGA,SGSUB,TLX,SGADD,TSA)- Basic fnct to support repeated frame based union and subtraction of solids

SGsubtractnaddTL(SGA,SGSUB,TLX,SGADD,TSA)% SGsubtractnaddTL(SGA,SGSUB,TLX,SGADD,TSA) - Basic fnct to support repeated frame based union and subtraction of solids
% (by Tim Lueth, VLFL-Lib, 2022-APR-12 as class: PARAMETRIC DESIGN)
%
% Make sure to avoid in parallel lines in TLX (Status of: 2022-04-12)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGsubtract, SGunion
%
% SGA=SGsubtractnaddTL(SGA,[SGSUB,TLX,SGADD,TSA])
% === INPUT PARAMETERS ===
% SGA: SOlid to add first and subtract later
% SGSUB: SUBTRACTION SOLID
% TLX: List of Frames relative to SGA
% SGADD: SUPPLEMENT SOLID
% TSA: Frame relative to SGSUB and SGADD; default is 'C'
% === OUTPUT RESULTS ======
% SGA: Final solid
%
% See also: SGsubtract, SGunion
%
%
% Copyright 2022 Tim C. Lueth

SGdesignSupplementPlugin(SGA,wt,sl,ez,CPL,fill)- designs a plugin holder for another solid

SGdesignSupplementPlugin(SGA,wt,sl,ez,CPL,fill)% SGdesignSupplementPlugin(SGA,wt,sl,ez,CPL,fill) - designs a plugin holder for another solid
% (by Tim Lueth, VLFL-Lib, 2022-APR-12 as class: AUTOMATIC DESIGN)
%
% Originallu used to create safety clutchs in ez mot robot motor axis
% (Status of: 2022-04-12)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGdesignSupplement2connect2SG, SGdesignSupplement
%
% SGB=SGdesignSupplementPlugin(SGA,[wt,sl,ez,CPL,fill])
% === INPUT PARAMETERS ===
% SGA: Solid Geometry
% wt: [wall thickness height modification]; default is [1.5 0]
% sl: slot size; default is 'c' fit or a number
% ez: default is [0 0 1]; not used
% CPL: CPL out contour; default is same as contour of SGA
% fill: if true; SGB is a block; default is false;
% === OUTPUT RESULTS ======
% SGB: Supplement solid to plug in SGA
%
% EXAMPLE:
% SGDIN985(4); B=ans; % Create a solid
% SGdesignSupplementPlugin(B,2,'t'); % Plugin with fitting 't'
% SGdesignSupplementPlugin(B,0,'t'); % Full solid with fitting 't'
% SGdesignSupplementPlugin(B,[0 1],'t'); % Full solid with fitting 't' just 1 mm height
% SGdesignSupplementPlugin(B,[0 -1],'t'); % Full solid with fitting 't' shorten height by 1 mm
%
% See also: SGdesignSupplement2connect2SG, SGdesignSupplement
%
%
% Copyright 2022 Tim C. Lueth

SGdesignSupplement2connect2SG(SGA,SGB,de)- first appraoch to create bridges between two solids

SGdesignSupplement2connect2SG(SGA,SGB,de)% SGdesignSupplement2connect2SG(SGA,SGB,de) - first appraoch to create bridges between two solids
% (by Tim Lueth, VLFL-Lib, 2022-APR-11 as class: AUTOMATIC DESIGN)
%
% Important fnctn to assemble independenty design component groups
% SGdesignSupplement4screws (SGdesignSupplement) (Status of: 2022-04-12)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGdesignSupplement
%
% [SGA,SGB,SGC]=SGdesignSupplement2connect2SG(SGA,SGB,[de])
% === INPUT PARAMETERS ===
% SGA: Solid A
% SGB: Solid B
% de: connector width; default is automatic mode ''
% === OUTPUT RESULTS ======
% SGA: Solid A with optional Bridging solid
% SGB: Solid B with optional Bridging solid
% SGC: Connecting solid
%
% EXAMPLE:
% A=SGbox; B=SGtransP(A,[40 0 5]); SGfigure(-30,30); SGplotalpha(A,'r'); SGplotalpha(B,'g')
% SGdesignSupplement2connect2SG(A,B,5)
%
% SGofCPLz(CPLsubtract(PLsquare([60,40]),PLsquare([50 ,40]),'aligntop',-5),10); A=ans; % Solid A
% SGtransP(SGDIN985(4),[15 10 0]); B=ans; % Solid B
% SGfigure(-30,30); SGTplotalpha(A,'r'); SGTplotalpha(B,'g'); % Show relation
% SGdesignSupplement2connect2SG(A,B,5)
%
%
% See also: SGdesignSupplement
%
%
% Copyright 2022 Tim C. Lueth

tplotaxis(TL,c,a,dl)- plots the elongation of the z-axhis of a frame or a frame list

tplotaxis(TL,c,a,dl)% tplotaxis(TL,c,a,dl) - plots the elongation of the z-axhis of a frame or a frame list
% (by Tim Lueth, VLFL-Lib, 2022-APR-11 as class: VISUALIZATION)
%
% Introduced first in SolidGeometry 5.2
%
% See also: tplot
%
% h=tplotaxis(TL,[c,a,dl])
% === INPUT PARAMETERS ===
% TL: Frame list
% c: color
% a: alpha value
% dl: radius and z starting at T
% === OUTPUT RESULTS ======
% h: handle to graphics
%
% EXAMPLE:
% PL=PLsquare(40), TL=TcopyVLez(PL)
% cla; tplotaxis(TL)
%
% See also: tplot
%
%
% Copyright 2022 Tim C. Lueth

TLL2TL(TLL)- Converts a long list of frames into an array of frames

TLL2TL(TLL)% TLL2TL(TLL) - Converts a long list of frames into an array of frames
% (by Tim Lueth, VLFL-Lib, 2022-APR-11 as class: AUXILIARY PROCEDURES)
%
% The long list format should be avoided!
% In the SG-Lib frames are 4x4 homogenous transformation matrices.
% Nevertheless by development-over-time reasons, there are 3 different
% concepts for lists of frames
% CELL FORMAT A cell list of [4x4] matrices {T1,T2,...}
% ARRAY FORMAT An array of [4x4xn] matrices
% LONG LIST FORMAT A long array list of [n*4 x 4] (SHOULD BE AVOIDED)
% (Status of: 2022-04-11)
%
% Introduced first in SolidGeometry 5.2
%
% See also: mat2celldim3, cell2matdim3, mat2cell, cell2array, cell2mat
%
% TLA=TLL2TL(TLL)
% === INPUT PARAMETERS ===
% TLL: Long list format [n*4 x 4]
% === OUTPUT RESULTS ======
% TLA: array format [4 x 4 x n]
%
% EXAMPLE:
% PL=PLsquare(40), TcopyVLez(PL(1:2,:)); TL=ans;
% TLC=mat2celldim3(TL)
%
% TLL=cell2mat(TLC) % AVOID !!!!!! BETTER USE cell2matdim3
% TLA=TLL2TL(TLL) % ONLY NECESSARY IF cell2mat was used instead of cell2matdim3
%
%
%
%
%
% See also: mat2celldim3, cell2matdim3, mat2cell, cell2array, cell2mat
%
%
% Copyright 2022 Tim C. Lueth

cell2matdim3(TL)- converts a cell list of frames into an array format

cell2matdim3(TL)% cell2matdim3(TL) - converts a cell list of frames into an array format
% (by Tim Lueth, VLFL-Lib, 2022-APR-11 as class: AUXILIARY PROCEDURES)
%
% In the SG-Lib frames are 4x4 homogenous transformation matrices.
% Nevertheless by development-over-time reasons, there are 3 different
% concepts for lists of frames
% CELL FORMAT A cell list of [4x4] matrices {T1,T2,...}
% ARRAY FORMAT An array of [4x4xn] matrices
% LONG LIST FORMAT A long array list of [n*4 x 4] (SHOULD BE AVOIDED)
% (Status of: 2022-04-11)
%
% Introduced first in SolidGeometry 5.2
%
% See also: mat2celldim3, mat2cell, cell2array, TLL2TL
%
% TLA=cell2matdim3(TL)
% === INPUT PARAMETERS ===
% TL: Cell list of frames
% === OUTPUT RESULTS ======
% TLA: Array format of Frames
%
% EXAMPLE:
% PL=PLsquare(40), TcopyVLez(PL);TL=ans;
% TLC=mat2celldim3(TL)
% TLL=cell2mat(TLC)
% TLA=cell2matdim3(TLC)
% TLC=mat2celldim3(TLL)
% TLA=cell2matdim3(TLC)
%
% See also: mat2celldim3, mat2cell, cell2array, TLL2TL
%
%
% Copyright 2022 Tim C. Lueth

getframeaxis(ax)- same as frameaxis but also stores the axis information

getframeaxis(ax)% getframeaxis(ax) - same as frameaxis but also stores the axis information
% (by Tim Lueth, VLFL-Lib, 2022-APR-10 as class: VISUALIZATION)
%
% Introduced first in SolidGeometry 5.2
%
% See also: getframe, implot
%
% I=getframeaxis([ax])
% === INPUT PARAMETERS ===
% ax: default is gca
% === OUTPUT RESULTS ======
% I: Image struct as of getframe
%
% EXAMPLE:
% SGbox; view(0,90); I=getframeaxis(gca); figure(123); implot(I); axis equal;
%
% See also: getframe, implot
%
%
% Copyright 2022 Tim C. Lueth

sprintfilehyperlink(fname)- creates a string containing two hyperlinks to open an file

sprintfilehyperlink(fname)% sprintfilehyperlink(fname) - creates a string containing two hyperlinks to open an file
% (by Tim Lueth, VLFL-Lib, 2022-APR-10 as class: AUXILIARY PROCEDURES)
%
% Used in SGwriteSTL (Status of: 2022-04-10)
%
% Introduced first in SolidGeometry 5.2
%
% See also: openbydoubleclick, strhyperlink
%
% str=sprintfilehyperlink(fname)
% === INPUT PARAMETERS ===
% fname: full file name
% === OUTPUT RESULTS ======
% str: hyperlinkstring
%
% EXAMPLE:
% fname=SGwriteSTL(SGbox,'test'), sprintfilehyperlink(fname)
%
% See also: openbydoubleclick, strhyperlink
%
%
% Copyright 2022 Tim C. Lueth

SGTsetTL(SG,FN,TL,nn)- adds a set of frames to a solid

SGTsetTL(SG,FN,TL,nn)% SGTsetTL(SG,FN,TL,nn) - adds a set of frames to a solid
% (by Tim Lueth, VLFL-Lib, 2022-APR-10 as class: KINEMATICS AND FRAMES)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGTset
%
% SG=SGTsetTL(SG,[FN,TL,nn])
% === INPUT PARAMETERS ===
% SG: Solid geometry
% FN: Leadning Frame letter or string
% TL: array [4 x 4 x n] of Frames
% nn: maximum number to support ith leading zeros; default is size(TL,3)
% === OUTPUT RESULTS ======
% SG: Solid Geometry with additonal Frames from the Frame list
%
% EXAMPLE:
% PLsquare(10); PL=ans, TcopyVLez(VLaddz(PL,5)); TL=ans
%
% SGTsetTL(SGTremove(SGbox,'all'),'F',TL) % Minimal frame name length for 4 F
% SGTsetTL(SGTremove(SGbox,'all'),'F',TL,30) % up to 30 frames for 30 F
%
% See also: SGTset
%
%
% Copyright 2022 Tim C. Lueth

mat2celldim3(TL)- converts an [a:b:n] array into a cell list {n x [a b]}

mat2celldim3(TL)% mat2celldim3(TL) - converts an [a:b:n] array into a cell list {n x [a b]}
% (by Tim Lueth, VLFL-Lib, 2022-APR-10 as class: AUXILIARY PROCEDURES)
%
% matlabs version supports only dim2
% In the SG-Lib frames are 4x4 homogenous transformation matrices.
% Nevertheless by development-over-time reasons, there are 3 different
% concepts for lists of frames
% CELL FORMAT A cell list of [4x4] matrices {T1,T2,...}
% ARRAY FORMAT An array of [4x4xn] matrices
% LONG LIST FORMAT A long array list of [n*4 x 4] (should be avoided)
% (Status of: 2022-04-11)
%
% Introduced first in SolidGeometry 5.2
%
% See also: mat2cell, cell2array, cell2matdim3, TLL2TL
%
% NL=mat2celldim3(TL)
% === INPUT PARAMETERS ===
% TL: [4 x 4 x n] array of n 4x4 frames
% === OUTPUT RESULTS ======
% NL: cell list of [4x4 frames
%
% EXAMPLE:
% TcopyVLez(PL,'','',[pi/20 pi/30 pi/10]); TL=ans; SGcopyTL(SGbox(2),TL);
% TL
% mat2celldim3(TL)
%
%
% PL=PLsquare(40), TcopyVLez(PL);TL=ans;
% TLC=mat2celldim3(TL)
% TLL=cell2mat(TLC)
% TLA=cell2matdim3(TLC)
% TLC=mat2celldim3(TLL)
% TLA=cell2matdim3(TLC)
%
% See also: mat2cell, cell2array, cell2matdim3, TLL2TL
%
%
% Copyright 2022 Tim C. Lueth

TcopyVLez(VL,ez,wa,po,wo,TT)- creates frames at specific positions in space

TcopyVLez(VL,ez,wa,po,wo,TT)% TcopyVLez(VL,ez,wa,po,wo,TT) - creates frames at specific positions in space
% (by Tim Lueth, VLFL-Lib, 2022-APR-10 as class: KINEMATICS AND FRAMES)
%
% usefull for supplement and subtraction solids such as created by
% SGdesignDIN912DIN985
% This fnctn is different to TLofCVL or TLofPL!
% po could be: doff=[exp(1)/500 exp(1)/500 exp(1)/500];
% (Status of: 2022-04-17)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGcopyVL, SGcopyTL, TLofCVL, TLofPL
%
% TL=TcopyVLez([VL,ez,wa,po,wo,TT])
% === INPUT PARAMETERS ===
% VL: Point list or vertex list
% ez: ez vector default is [0 0 1]
% wa: rotation around ez
% po: position offset that is added to each translation vector * (i-1);
% default is [0 0 0]
% wo: angle offset that is added to each translation vector * (i-1);
% default is 0 or [0 0 0]
% TT: Frame to transfer all resulting frames with; default is ''
% === OUTPUT RESULTS ======
% TL: List of Frames
%
% EXAMPLE:
% PL=PLsquare(10)
% TcopyVLez(PL) % Just points
% TcopyVLez(PL,[0 0 1],pi/3) % All frames rotated
% TcopyVLez(PL,[1 1 1]) % changed Orientation
% TcopyVLez(PL,'','',[0 0 1]) % Increasing offset in z by 1
% TcopyVLez(PL,'','','',pi/10) % Increasing offset angle rot ez
% TcopyVLez(PL,'','','',[pi/20 pi/30 pi/10]) % Increasing offset angle rot xyz
%
% TcopyVLez(PL,'','','',[pi/20 pi/30 pi/10]); TL=ans; SGcopyTL(SGbox(2),TL);
%
% TcopyVLez(PL,'','','','',TofPez([0 0 10],[0 -1 0]))
%
%
% See also: SGcopyVL, SGcopyTL, TLofCVL, TLofPL
%
%
% Copyright 2022 Tim C. Lueth

num2strCNT(i,n,txt)- creates numberstring including addition zeros

num2strCNT(i,n,txt)% num2strCNT(i,n,txt) - creates numberstring including addition zeros
% (by Tim Lueth, VLFL-Lib, 2022-APR-10 as class: AUXILIARY PROCEDURES)
%
% used for automatic frame name creation (Status of: 2022-04-10)
%
% Introduced first in SolidGeometry 5.2
%
% See also: num2strUP, num2str
%
% num2strCNT(i,[n,txt])
% === INPUT PARAMETERS ===
% i: index
% n: maximal number of indices
% txt: optional leading string
%
% EXAMPLE:
% num2strCNT(2,12); % if counter runs from 1 to 12
% num2strCNT(2,12,'F'); % if counter runs from 1 to 12 with leading 'F"
% num2strCNT(1,4999); % if counter runs to 4999
%
% See also: num2strUP, num2str
%
%
% Copyright 2022 Tim C. Lueth

CPLofSGcutTBB(SG,zz)- returns a CPL based on the Bounding Box of a solid

CPLofSGcutTBB(SG,zz)% CPLofSGcutTBB(SG,zz) - returns a CPL based on the Bounding Box of a solid
% (by Tim Lueth, VLFL-Lib, 2022-APR-09 as class: CLOSED POLYGON LISTS)
%
% Used in SGdesignMotorN40
% Helpful to design covers for Solids (Status of: 2022-04-09)
%
% Introduced first in SolidGeometry 5.2
%
% See also: CPLofSGcutT, CPLofSGslice
%
% CPL=CPLofSGcutTBB([SG,zz])
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% zz: [zmin zmax]; default is [-inf +inf]);
% === OUTPUT RESULTS ======
% CPL: CPLofBB of the considered Solid shape between zmin and zmax
%
% EXAMPLE:
% CPLofSGcutTBB(SGsample(17),[0 15])
% CPLofSGcutTBB(SGsample(17),[10 15])
% CPLofSGcutTBB(SGsample(17),[15 inf])
%
%
% See also: CPLofSGcutT, CPLofSGslice
%
%
% Copyright 2022 Tim C. Lueth

SGmotorspindleclutch(DM,SP,M,slt)- creates a motor spindle clutch between a motor shaft and a steep spindle

SGmotorspindleclutch(DM,SP,M,slt)% SGmotorspindleclutch(DM,SP,M,slt) - creates a motor spindle clutch between a motor shaft and a steep spindle
% (by Tim Lueth, VLFL-Lib, 2022-APR-09 as class: PARAMETRIC DESIGN)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGsteepspindle, CPLmotorshaft
%
% [SGA,SGB,SGN,AParts]=SGmotorspindleclutch([DM,SP,M,slt])
% === INPUT PARAMETERS ===
% DM: [Shaft-Diameter Shaft-Flattening, Coupling-Diameter
% Coupling-Height]; default is [3 2.5 9 10]
% SP: Spindle Diameter x Spindle Length and Specified Pitch]; default is
% [6 10 NaN]; NaN means default
% M: [Bushing-Diameter x Screw-Length; default is [2 4]
% slt: fitting; default is 'c'
% === OUTPUT RESULTS ======
% SGA: Spindle clutch
% SGB: spindle
% SGN: Lock nut
% AParts: cell list parts list
%
% EXAMPLE:
% SGmotorspindle([3 2.5 9 10],[6 10 NaN],[2 6])
%
% See also: SGsteepspindle, CPLmotorshaft
%
%
% Copyright 2022 Tim C. Lueth

SGofCPLztwist(CPL,z,w)- Creates twisted solids from a CPL and a turning angle

SGofCPLztwist(CPL,z,w)% SGofCPLztwist(CPL,z,w) - Creates twisted solids from a CPL and a turning angle
% (by Tim Lueth, VLFL-Lib, 2022-APR-07 as class: SURFACES)
%
% In contrast to SGofCPLtransT, this fnctn allows several turns.
% Works differnt to SGsteepspindle (Status of: 2022-04-07)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGofCPLz, SGofCPLtransT, SGsteepspindle, exp_2022_04_07_rails
%
% SG=SGofCPLztwist([CPL,z,w])
% === INPUT PARAMETERS ===
% CPL: CPL (centered at origin)
% z: height or [zmin zmax]
% w: turning angle
% === OUTPUT RESULTS ======
% SG: solid geometry
%
% EXAMPLE:
% SGofCPLztwist(PLrope([2 0.3],[1 .5],true),10)
% SGofCPLztwist(PLrope([2 0.3],[1 .5],false),10)
% SGofCPLztwist(PLrope([4 1],[1 .5],true),5)
% SGofCPLztwist(PLrope([4 1],[1 .5],false),5)
%
% See also: SGofCPLz, SGofCPLtransT, SGsteepspindle, exp_2022_04_07_rails
%
%
% Copyright 2022 Tim C. Lueth

sprintfvecUP(vec,unit,dig,cut0,sep,unitall)- string format for engineering applications

sprintfvecUP(vec,unit,dig,cut0,sep,unitall)% sprintfvecUP(vec,unit,dig,cut0,sep,unitall) - string format for engineering applications
% (by Tim Lueth, VLFL-Lib, 2022-APR-07 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.2
%
% See also: num2strUP, sprintfvec
%
% si=sprintfvecUP(vec,[unit,dig,cut0,sep,unitall])
% === INPUT PARAMETERS ===
% vec: vector with doubles
% unit: unit string such as 'mm'
% dig: number of digits; default is 2
% cut0: if true (default); ending zeros are cut
% sep: separator between numbers; default is '/'
% unitall: if true (false); all numbers get only a unit if they differ
% === OUTPUT RESULTS ======
% si: string of units
%
% EXAMPLE:
% num=[1 2 2.3]/pi/pi/pi
% sprintfvecUP(num,'m',2,true,'/',true) % meter, cut zeros, all get units
% sprintfvecUP(num,'m',2,true,' x ',false) % only once a unit
% num=[1 2 2.3/100]/pi/pi/pi
% sprintfvecUP(num,'m',2,true,' x ',false) % all units if units differ
%
% See also: num2strUP, sprintfvec
%
%
% Copyright 2022 Tim C. Lueth

SGcatheterroller(CLR,CLL,HLL,PLL)- Creates for a cather lock a gear drive

SGcatheterroller(CLR,CLL,HLL,PLL)% SGcatheterroller(CLR,CLL,HLL,PLL) - Creates for a cather lock a gear drive
% (by Tim Lueth, VLFL-Lib, 2022-APR-06 as class: AUTOMATIC DESIGN)
%
% SGP=SGTsetorigin(SGP,'B');
% SGC=SGtransrelSG(SGC,SGP,'alignT',{'B','F'});
% SGG=SGtransrelSG(SGG,SGC,'matchT',{'F','F'}); (Status of: 2022-05-06)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGcatheterroller, SGcatheterfeeder, SGcatheter
%
% [SGG,SGC,SGP,AParts]=SGcatheterroller([CLR,CLL,HLL,PLL])
% === INPUT PARAMETERS ===
% CLR: Diameter of segements; last value is diameter; default is [8 6
% 2.33] (8 French)
% CLL: Length of segments; default is [2 25 20]);
% HLL: Length and displacement of handle; default is [11 8]
% PLL: [Diameter width wall space]; default is [20 12 3 5]
% === OUTPUT RESULTS ======
% SGG: Gear cylinder for cather lock ('white')
% SGC: SG of catheter ('green')
% SGP: Podest for cather lock ('yellow')
% AParts: Parts list
%
% EXAMPLE:
% SGcatheterroller([8 6 .23])
%
% See also: SGcatheterroller, SGcatheterfeeder, SGcatheter
%
%
% Copyright 2022 Tim C. Lueth

PLrope(D,v2,fuse)- creates cross section of twisted (laid) ropes

PLrope(D,v2,fuse)% PLrope(D,v2,fuse) - creates cross section of twisted (laid) ropes
% (by Tim Lueth, VLFL-Lib, 2022-APR-06 as class: CLOSED POLYGON LISTS)
%
% This fnctn must be changed since Bravaislattice is the wrong approach
% to create rope pattern
% The results created for SGofCPLztwist does no work for threadbars since
% the shape is not symmetric! (Status of: 2022-04-07)
%
% Introduced first in SolidGeometry 5.2
%
% See also: Bravaislattice, CPLcopypatternPL, CPLfillgap, SGofCPLztwist
%
%
% CPL2=PLrope([D,v2,fuse])
% === INPUT PARAMETERS ===
% D: [Outer Diameter inner Diameter]
% v2: second vector such as [1 0]
% fuse: if true, there are no single cardeel anymore; default is false
% === OUTPUT RESULTS ======
% CPL2: Final Contour
%
% EXAMPLE:
% PLrope(5,[.9 .5])
% PLrope(3,[.9 .5])
% PLrope(7,[.9 .5])
% PLrope(7,[1 .5])
% PLrope(7,[1 .5],true)
%
% See also: Bravaislattice, CPLcopypatternPL, CPLfillgap, SGofCPLztwist
%
%
%
% Copyright 2022 Tim C. Lueth

SGsteepspindle(MA,p,CPL,sl,BL,isleft)- returns the geometry of a steep spindle and a nut

SGsteepspindle(MA,p,CPL,sl,BL,isleft)% SGsteepspindle(MA,p,CPL,sl,BL,isleft) - returns the geometry of a steep spindle and a nut
% (by Tim Lueth, VLFL-Lib, 2022-APR-05 as class: PARAMETRIC DESIGN)
%
% In contrast to standard threads which have an pitch angle less than 45
% degree and therefor cannot be printed in 3D-FDM without support
% structures, steep spindle threads with a pitch angle larger than 45 can
% be printed in an upright position. Both Screws and Nuts.
% On 2022-04-05 I was able to print several M6 by 160mm upright spindles
% on an Anycubic Predator (Status of: 2022-06-07)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGDIN13, SGDIN985
%
% [A,B,C,E,F,AParts]=SGsteepspindle([MA,p,CPL,sl,BL,isleft])
% === INPUT PARAMETERS ===
% MA: [DM-Diameter | Screw-Length | Nut-Height | Hole-Diameter] all in mm
% (checked bei DIN13/985)
% p: pitch by winding. Per default it is the DIN13 value multplied with 2
% CPL: A contour to create a nut; per default the standard DIN985 shape
% and height is used
% sl: fitting between screw and nut; default is 'c' for clearance
% BL: [Diameter Length Top Length-Bottom] of bearing; default is [0 M M]
% isleft: if true a left thread is used
% === OUTPUT RESULTS ======
% A: Solid Geometry of Spindle
% B: Solid Geometry of Nut
% C: Solid Geometry of open Nut
% E: Solid Geometry of Spindle and Nut with conical transition
% F: Plugable spindle
% AParts: Parts list
%
% Additional Hyperlinks:
% Trapezoidal thread
%
% EXAMPLE:
% SGsteepspindle([6 30]) % M6 spindle length is 30
% SGsteepspindle([6 30 10]) % M6 spindle length is 30, Nut height is 10
% SGsteepspindle([6 30 10],5) % Pitch is 5 wich will lead to (30-6)/5 ~ 4 windinds
% SGsteepspindle([6 16 0 2],'',[0 8]); % hole for steel bar, 8 edge nut
% SGsteepspindle([6 16 0 2],'',[0 8],'',[5 10]); % 5mm diameter, bearing
% SGsteepspindle([6 16 0 1.5],'',[0 8],'t',[4 5]); A=ans;
%
% See also: SGDIN13, SGDIN985
%
%
% Copyright 2022 Tim C. Lueth

SGslidingcarriage(bbb,xa,w,slt,B,H)- returns a slider for 2 rails

SGslidingcarriage(bbb,xa,w,slt,B,H)% SGslidingcarriage(bbb,xa,w,slt,B,H) - returns a slider for 2 rails
% (by Tim Lueth, VLFL-Lib, 2022-APR-03 as class: PARAMETRIC DESIGN)
%
% SGgearrackDIN(1,50.01,'',5,false,true) (Status of: 2022-04-13)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGgearrackDIN
%
% [SG,SGE,SGC]=SGslidingcarriage([bbb,xa,w,slt,B,H])
% === INPUT PARAMETERS ===
% bbb: [Ri Ro W] Inner radius, outer Radius width of bearing
% xa: Distance of bars; and width of carrier; default is [60 max]
% w: [wb wc] width of slider and thickness of carriage; default is [1.5 3]
% slt: fitting char or slot size; default is 't' for slfit
% B: thickness of rail cover; default is 0 (no cover)
% H: Height of plattform aboce rails; default is min
% === OUTPUT RESULTS ======
% SG: Solid geometry of carriage
% SGE: Solid geometry of end block
% SGC: Solid geometry of cover
%
% Additional Hyperlinks:
% Ball Bearing, Bars
%
% EXAMPLE:
% SGslidingcarriage([6 12 19],[60],[1.5 3],'t')
% SGslidingcarriage([6 12 19],[60],[1.5 3],'t',3)
% SGslidingcarriage([6 12 19],[60],[1.5 3],'t',3,30)
%
% See also: SGgearrackDIN
%
%
% Copyright 2022 Tim C. Lueth

TofCPLT(CPL,TF,nr,style)- creates a list of frames inside a CPL or a planar CVL

TofCPLT(CPL,TF,nr,style)% TofCPLT(CPL,TF,nr,style) - creates a list of frames inside a CPL or a planar CVL
% (by Tim Lueth, VLFL-Lib, 2022-APR-02 as class: KINEMATICS AND FRAMES)
%
% Used in combination or as part of CPLofSGTez (Status of: 2022-04-02)
%
% Introduced first in SolidGeometry 5.2
%
% See also: CPLofSGTez, ezofchar, TofPez
%
% TL=TofCPLT([CPL,TF,nr,style])
% === INPUT PARAMETERS ===
% CPL: CPL
% TF: T matrix, or ez vector of ezofchar
% nr: [number of points, radius, distance to cpl boundary
% style: "contour", "grid", "xgrid"
% === OUTPUT RESULTS ======
% TL: list of frames with same ez as TF
%
% EXAMPLE:
% TofCPLT(CPLsample(12),'-y')
% TofCPLT(PLcircle(10,8),'-y',[20 1 0],'contour');
% TofCPLT(PLcircle(10,8),'-y',[20 1 0],'grid');
% TofCPLT(PLcircle(10,8),'-y',[20 1 0],'xgrid');
%
% TofCPLT(CPLsample(12),'-y',[6 1 0],'xgrid');
% TofCPLT(CPLsample(12),'-y',[6 1 0],'grid');
% TofCPLT(CPLsample(12),'-y',[6 1 0],'contour');
%
% See also: CPLofSGTez, ezofchar, TofPez
%
%
% Copyright 2022 Tim C. Lueth

SGshutterbeltcover(cov,"stamp")- Creates covers for shutter belts as an example for design using SG-Lib

SGshutterbeltcover(cov,% SGshutterbeltcover(cov,"stamp") - Creates covers for shutter belts as an example for design using SG-Lib
% (by Tim Lueth, VLFL-Lib, 2022-APR-01 as class: PARAMETRIC DESIGN)
%
% From time to time there is a need to design simple things to test the
% efficiency and limits of the SG-Lib for design tasks. (Status of:
% 2022-04-02)
%
% Introduced first in SolidGeometry 5.2
%
% SG=SGshutterbeltcover([cov,"stamp"])
% === INPUT PARAMETERS ===
% cov: [Length Width Height]; default is [182 55 5]
% "stamp": option text string for backside
% === OUTPUT RESULTS ======
% SG: Solid Geometry
%
% EXAMPLE:
% SGshutterbeltcover([199 55 5], 'stamp','Living Room');
%
%
% Copyright 2022 Tim C. Lueth

CPLofPLseparatedlines(PL)- converts a list of 2D points paris into a CPLs that separates the each pair by nan nan

CPLofPLseparatedlines(PL)% CPLofPLseparatedlines(PL) - converts a list of 2D points paris into a CPLs that separates the each pair by nan nan
% (by Tim Lueth, VLFL-Lib, 2022-APR-01 as class: CLOSED POLYGON LISTS)
%
% Used in CPLofSGTez (Status of: 2022-04-01)
%
% Introduced first in SolidGeometry 5.2
%
% See also: CPLofSGTez, CPLofPLcrossCPL, PLofCPLequidistant
%
% CPL=CPLofPLseparatedlines(PL)
% === INPUT PARAMETERS ===
% PL: List of point [nx2] n is an even integer
% === OUTPUT RESULTS ======
% CPL: Pairs separated by nan nan
%
% EXAMPLE:
% CPLofPLseparatedlines([0 0; 10 0; 20 20 ; 20 40])
%
% See also: CPLofSGTez, CPLofPLcrossCPL, PLofCPLequidistant
%
%
% Copyright 2022 Tim C. Lueth

CVLplotsurface(CVL,c,a,e,planar)- plots a planar CVL as surface

CVLplotsurface(CVL,c,a,e,planar)% CVLplotsurface(CVL,c,a,e,planar) - plots a planar CVL as surface
% (by Tim Lueth, VLFL-Lib, 2022-APR-01 as class: CLOSED POLYGON LISTS)
%
% Introduced first in SolidGeometry 5.2
%
% See also: CVLplot, CVLplots
%
% h=CVLplotsurface(CVL,[c,a,e,planar])
% === INPUT PARAMETERS ===
% CVL: CVL
% c: color
% a: transparenct
% e: edge color
% planar: true for planar CVL's; default is true
% === OUTPUT RESULTS ======
% h: handle to graphics
%
% EXAMPLE:
% CVLplotsurface(CVLsample(32))
% SGfigure(-30,30); CVLplotsurface(CVLsample(17),'','','',true); % error for 3D contour
% SGfigure(-30,30); CVLplotsurface(CVLsample(17),'','','',false); % correct for 3D contour
%
% See also: CVLplot, CVLplots
%
%
% Copyright 2022 Tim C. Lueth

CPLofSGTez(SG,T,nr,"style")- returns the CPL and the frames plus a frame list using TofCPLT

CPLofSGTez(SG,T,nr,% CPLofSGTez(SG,T,nr,"style") - returns the CPL and the frames plus a frame list using TofCPLT
% (by Tim Lueth, VLFL-Lib, 2022-APR-01 as class: CLOSED POLYGON LISTS)
%
% Introduced first in SolidGeometry 5.2
%
% See also: PLofCPLequidistant, GPLauxgridpointsCPS2, TofCPLT
%
% [CPLorg,TF,TL,ACVL]=CPLofSGTez(SG,[T,nr,"style"])
% === INPUT PARAMETERS ===
% SG: Solid Geomtry
% T: Frame of Surface or ez vector
% nr: [number-of-points, radius, border]; default is [0 1 0]
% "style": 'contour', 'grid', 'xgrid'; default is 'contour'
% === OUTPUT RESULTS ======
% CPLorg: Contour of surface
% TF: Frame to create CVL from CPL
% TL: List of Frames
% ACVL: cell list of CVLi;that defined the contours
%
% EXAMPLE:
% CPLofSGTez(SGsample(25),[0 0 1],[6 1]);
% CPLofSGTez(SGsample(40),[0 0 1]);
% CPLofSGTez(SGsample(41),[0 0 1]);
% CPLofSGTez(SGsample(27),[0 0 1]);
% CPLofSGTez(SGsample(27),[0 0 1],[20 2],'style','contour');
% CPLofSGTez(SGsample(27),[0 0 1],[20 2],'style','grid');
% CPLofSGTez(SGsample(27),[0 0 1],[6 1 1],'style','xgrid');
%
% See also: PLofCPLequidistant, GPLauxgridpointsCPS2, TofCPLT
%
%
% Copyright 2022 Tim C. Lueth

zoomsubplot- opens a figure and zooms the subplot image

zoomsubplot% zoomsubplot - opens a figure and zooms the subplot image
% (by Tim Lueth, VLFL-Lib, 2022-MÄR-31 as class: VISUALIZATION)
%
% Introduced first in SolidGeometry 5.2
%
% See also: copyfig
%
% zoomsubplot
%
% EXAMPLE:
% SGsample(3:12); % Click into one subplot
% zoomsubplot
%
% See also: copyfig
%
%
% Copyright 2022 Tim C. Lueth

SGshearing(SG,PL,dd)- shearing or bending of a Solid Geometry

SGshearing(SG,PL,dd)% SGshearing(SG,PL,dd) - shearing or bending of a Solid Geometry
% (by Tim Lueth, VLFL-Lib, 2022-MÄR-31 as class: SURFACES)
%
% Introduced first in SolidGeometry 5.2
%
% See also: linearinterp, SGbending, SGbendedCPL
%
% SGN=SGshearing(SG,[PL,dd])
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% PL: point list; if scalar the value describes the delta
% dd: direction such as 'xz' or 'yz'
% === OUTPUT RESULTS ======
% SGN: Sheared SG
%
% EXAMPLE:
% SGshearing(SGbox,10,'xz');
% SGshearing(SGbox,10,'yz');
% SGshearing( SGtetramesh(SGbox),PLcircle(20,'',pi),'xz'); % bending in x
% SGshearing( SGtetramesh(SGbox),PLcircle(20,'',pi),'yz'); SG=ans; % bending in y
% SGremsurfedgepoints(SG)
%
% See also: linearinterp, SGbending, SGbendedCPL
%
%
% Copyright 2022 Tim C. Lueth

SGcatheterfeeder(ss,typ,fix)- creates rollers to move wires and catheters

SGcatheterfeeder(ss,typ,fix)% SGcatheterfeeder(ss,typ,fix) - creates rollers to move wires and catheters
% (by Tim Lueth, VLFL-Lib, 2022-MÄR-31 as class: PARAMETRIC DESIGN)
%
% For the fixation, there is a need for a thread and a screw and a
% silicon tube
% Silkon tubes 9mm/11mm (Status of: 2022-05-06)
%
% Introduced first in SolidGeometry 5.2
%
% See also: exp_2022_03_27_N20shiftplug, SGmotorN20, SGcatheterroller
%
% [SGA,SGB]=SGcatheterfeeder([ss,typ,fix])
% === INPUT PARAMETERS ===
% ss: [r1-motorshaft r2-motorshaft r3 roller w-silicon]; default is [9 2
% 3 2.5 ])
% typ: "Single", "Double",
% fix: Kerbkonus default is [2.0 6]
% === OUTPUT RESULTS ======
% SGA: Roller A
% SGB: Roller B
%
% Additional Hyperlinks:
% Mechanical Engineering Department, Grub screw DIN 915 with allen, Bushing (Kerbkonus E)
%
% EXAMPLE:
% SGcatheterfeeder([9 2 3 2.5])
% SGcatheterfeeder([9 2 3 2.5],'double')
% SGcatheterfeeder([9 2 3 2.5],'',[2/0 6])
%
% See also: exp_2022_03_27_N20shiftplug, SGmotorN20, SGcatheterroller
%
%
% Copyright 2022 Tim C. Lueth

ashft(i)- creates a irrational number between and 66 degree (1.155 rad)

ashft(i)% ashft(i) - creates a irrational number between and 66 degree (1.155 rad)
% (by Tim Lueth, VLFL-Lib, 2022-MÄR-31 as class: AUTOMATIC DESIGN)
%
% This fnctn is used if in an repeated way boolean fnctns are used with
% the same geometry
% zz=2*pi/exp(1);
% pp=primes(100);
% a=zz/pp(end+1-i);
% the fnctn creates an irrational number based on pi/exp(1)/pime numbers
% to avoid any kind a repeated angles. The use of SGremsurfedgepoints is
% still recommended.
% (Status of: 2022-03-31)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGsubtract, SGunion
%
% a=ashft(i)
% === INPUT PARAMETERS ===
% i: number between 1 and 25
% === OUTPUT RESULTS ======
% a: angle to turn
%
% EXAMPLE:
% A=SGbox([30 20 10]); B=SGcylinder(1,20); GPLauxgridpointsCPS2(CPLbuffer(PLsquare([30,20]),-1.5),10); PL=ans; CPSplot(PLsquare([30,20]))
% %% FAILS
% C=A; for i=1:size(PL,1); Bi=SGtransP(B,[PL(i,:) -10]); C=SGsubtract(C,Bi); end; cla; SGplotalpha(C); view(-30,30);
% %% NO PROBLEMS
% C=A; for i=1:size(PL,1); Bi=SGtransR(B,rot(0,0,ashft(i))); Bi=SGtransP(Bi,[PL(i,:) -10]); C=SGsubtract(C,Bi); end; cla; SGplotalpha(C); view(-30,30);
%
%
% See also: SGsubtract, SGunion
%
%
% Copyright 2022 Tim C. Lueth

SGdesignPeginHole(CPL,h,sl)- design subtraction solid and supplement solid for peg in hole connections using fittings

SGdesignPeginHole(CPL,h,sl)% SGdesignPeginHole(CPL,h,sl) - design subtraction solid and supplement solid for peg in hole connections using fittings
% (by Tim Lueth, VLFL-Lib, 2022-MÄR-31 as class: AUTOMATIC DESIGN)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGdesignDIN912BushingE, SGdesignPluginFrame
%
% [PA,HS]=SGdesignPeginHole([CPL,h,sl])
% === INPUT PARAMETERS ===
% CPL: Desired contour;
% h: [lp lh]; length peg; length hole; hole per default peg plus
% slfit('c')
% sl: fitting; per default 'c'
% === OUTPUT RESULTS ======
% PA: Supplement solid for peg using frame 'C' and 'alignT'
% HS: Subtraction solid for hole using frame 'C' and 'alignT'
%
% EXAMPLE:
% [PA,HS]=SGdesignPeginHole('',[5 10],'t');
% SGunion(SGbox,PA,'alignT',{'C','F'}), A=ans;
% SGsubtract(SGbox,HS,'alignT',{'C','F'}), B=ans;
% cla; SGplotalpha(A,'Y'); SGplotalpha(B,'','','',A,'alignT',{'F','F'}); VLFLplotlight(1,0.5);
%
% See also: SGdesignDIN912BushingE, SGdesignPluginFrame
%
%
% Copyright 2022 Tim C. Lueth

axisscale(ss)- scales the axis to a defined size

axisscale(ss)% axisscale(ss) - scales the axis to a defined size
% (by Tim Lueth, VLFL-Lib, 2022-MÄR-29 as class: VISUALIZATION)
%
% The more often solids consist of several parts and the more often the
% functiion SGplotcellmultiple is used, the is alos a need to see the
% indivudal parts in the same scale (Status of: 2022-03-29)
%
% Introduced first in SolidGeometry 5.2
%
% See also: view4all, axisratio, axis4math, axis4animation,
% SGplotcellmultiple
%
% axisscale(ss)
% === INPUT PARAMETERS ===
% ss: [dx dy dz]
%
% EXAMPLE:
% A=SGbox([5,5,5]); B=SGbox(20,30,10); SG={A,B}; SGplotcellmultiple(SG)
% A=SGbox([5,5,5]); B=SGbox(20,30,10); SG={A,B}; SGplotcellmultiple(SG,'scale')
%
% See also: view4all, axisratio, axis4math, axis4animation,
% SGplotcellmultiple
%
%
% Copyright 2022 Tim C. Lueth

SGofCPLextrudealongCPL(RL,CPL,adjst,r)- extrudes a contour ([x z]) along a 2D-contour [x y]

SGofCPLextrudealongCPL(RL,CPL,adjst,r)% SGofCPLextrudealongCPL(RL,CPL,adjst,r) - extrudes a contour ([x z]) along a 2D-contour [x y]
% (by Tim Lueth, VLFL-Lib, 2022-MÄR-26 as class: SURFACES)
%
% See also powerful fnctn SGofCPLtransT and TLofCVL
% Not completely bug free because of TLofCVL (Status of: 2022-03-26)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGofCPLtransT, TLofCVL, SGofCPLextrude
%
% SG=SGofCPLextrudealongCPL([RL,CPL,adjst,r])
% === INPUT PARAMETERS ===
% RL: Point list in x and z
% CPL: Contour path for extrusion; considered as close
% adjst:
% r:
% === OUTPUT RESULTS ======
% SG: Solid Geometry
%
% EXAMPLE:
% SGofCPLextrudealongCPL(PLsquare(2,10),CPLsample(3)*10);
% SGofCPLextrudealongCPL(CPLsample(3),CPLsample(3)*10); % bug
% SGofCPLextrudealongCPL(CPLsample(3),CPLsample(3)*20); % correct
%
%
% See also: SGofCPLtransT, TLofCVL, SGofCPLextrude
%
%
% Copyright 2022 Tim C. Lueth

SGdesignPluginFrame(SG,T,H,sl,styl)- adds a plug-in sleeve to a solid

SGdesignPluginFrame(SG,T,H,sl,styl)% SGdesignPluginFrame(SG,T,H,sl,styl) - adds a plug-in sleeve to a solid
% (by Tim Lueth, VLFL-Lib, 2022-MÄR-26 as class: AUTOMATIC DESIGN)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGsupplement
%
% [SG,SGP]=SGdesignPluginFrame([SG,T,H,sl,styl])
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% T: HT Frame or ez vector (roughly) or Frame name
% H: height of the sleeve
% sl: fitting; default is 't' for transition
% styl: straight or bezier1 or bezier2; default is bezier1
% === OUTPUT RESULTS ======
% SG: Solid plus plug-in sleeve
% SGP: jsut the plug-in sleeve
%
% EXAMPLE:
% SGdesignPluginFrame(SGbox ,[0 -1 0],[8 1.5],'','bezier1')
% SGdesignPluginFrame(SGcylinder(10,'','',8) ,[0 0 1],[8 1],'','straight')
% SGdesignPluginFrame(SGcylinder(10,'','',8) ,[0 0 1],[8 1],'','bezier1')
% SGdesignPluginFrame(SGcylinder(10,'','',8) ,[0 0 1],[8 1],'','bezier2')
%
% See also: SGsupplement
%
%
% Copyright 2022 Tim C. Lueth

SGmotorN40(sh,sz,gb,PL)- returns the Geometry of a Chihai motor CHF-GM13-050S

SGmotorN40(sh,sz,gb,PL)% SGmotorN40(sh,sz,gb,PL) - returns the Geometry of a Chihai motor CHF-GM13-050S
% (by Tim Lueth, VLFL-Lib, 2022-MÄR-23 as class: MODELING PROCEDURES)
%
% Helps to design motor driven mechanisms
% To learn to write such fnctn better look into SGmotorN40_90 (Status of:
% 2022-04-20)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGbatteriepack, SGmotorSolExpert, SGcapontop, SGmotorshaft,
% SGmotorhousing, SGmotorN40_90
%
% SG=SGmotorN40([sh,sz,gb,PL])
% === INPUT PARAMETERS ===
% sh: Shaft Diameter and Shaft Flattening; default is [3 2.5]
% sz: [maxsize-x maxsize-y length-shaft diameter shaft-socket, height
% shaft-socket]; default is [15.4 12 9 4 1]
% gb: [maxsize-x maxsize-y length-shaft diameter shaft-socket, height
% shaft-socket]; default is [15.4 12 9 4 1]
% PL: Point list of screws; default is [0 -4.5; 0 4.5]
% === OUTPUT RESULTS ======
% SG: Solid Geometry of a N20 Motor by Sebastian Heininger Selection
%
% Additional Hyperlinks:
% N20 Motor with Encoder, Chihai motor CHF-GM13-050S, N30 Motor with Encoder,
% TT Motor long list
%
% EXAMPLE:
% SGmotorN40
%
% See also: SGbatteriepack, SGmotorSolExpert, SGcapontop, SGmotorshaft,
% SGmotorhousing, SGmotorN40_90
%
%
% Copyright 2022 Tim C. Lueth

SGdesignBoltedLid(SG,T,MM,w,H,"assembly","screws","bolt")- creates a cover lid and a fixation for an open 2.5 designed box

SGdesignBoltedLid(SG,T,MM,w,H,% SGdesignBoltedLid(SG,T,MM,w,H,"assembly","screws","bolt") - creates a cover lid and a fixation for an open 2.5 designed box
% (by Tim Lueth, VLFL-Lib, 2022-MÄR-22 as class: AUTOMATIC DESIGN)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGboxbolted, SGofCPLzboxbolted
%
% [A,C,S,mt,Aparts]=SGdesignBoltedLid([SG,T,MM,w,H,"assembly","screws","b
% olt"])
% === INPUT PARAMETERS ===
% SG: Solid Geometry without a cover lid
% T: Frame Name, 4x4 matrix or ez-vector; default is [0 0 1]
% MM: [diameter length] metrix of screw; default is [M2.0 6]
% w: width of walls and height of cover
% H: size of bolts
% "assembly": DIN7991 or DIN912bush or DIN912985
% "screws": number of screws; default is 4
% "bolt": if used, there is a bolt below the screw fixation
% === OUTPUT RESULTS ======
% A: New Solid with scrw fixation
% C: Cover lid
% S: screws used
% mt: not used yet, for compatibilty with other SGdesignfnctn
% Aparts: parts list
%
% EXAMPLE:
% CPL=PLcircle(30,7); CPL=[CPL;nan nan;CPLbuffer(CPL,2)]; SGofCPLz(CPL,10); SG=ans;
% SGtransrelSG(SG,'','rotx',pi/10,'roty',pi/20); SG=ans;
% SGdesignBoltedLid(SG,[0 0 1])
%
% See also: SGboxbolted, SGofCPLzboxbolted
%
%
% Copyright 2022 Tim C. Lueth

PLofCPLequidistant(CPL,nr,isc)- returns points on closed or open contours with equal distances

PLofCPLequidistant(CPL,nr,isc)% PLofCPLequidistant(CPL,nr,isc) - returns points on closed or open contours with equal distances
% (by Tim Lueth, VLFL-Lib, 2022-MÄR-20 as class: CLOSED POLYGON LISTS)
%
% IN contrast to PLaddauxpoints, this fnctn does not return a fitting
% contour but only a unsorted points list.
% Be careful with holes that also generate points (Status of: 2022-03-20)
%
% Introduced first in SolidGeometry 5.2
%
% See also: CPLlength, PLaddauxpoints
%
% PLN=PLofCPLequidistant(CPL,[nr,isc])
% === INPUT PARAMETERS ===
% CPL: SINGLE CLOSED CONTOUR
% nr: bumber of points; default is 4; negative number means minimal
% distance
% isc: false= open CPL; true=closed CPL; default is true
% === OUTPUT RESULTS ======
% PLN: POINT LIST on Contour with equal distances
%
% EXAMPLE:
% PLofCPLequidistant(PLsquare(2,7),4)
% PLofCPLequidistant(CPLsample(18),8)
% PLofCPLequidistant(PLsquare(2,7),40,true) % Closed contour by default
% PLofCPLequidistant(PLsquare(2,7),40,false) % Open contour
% PLofCPLequidistant([-10 0;20 0],1,false) % 1 Point
% PLofCPLequidistant([-10 0;20 0],2,false) % Two points
% PLofCPLequidistant([-10 0;20 0],3,false) % 3 Points
% PLofCPLequidistant([-10 0;20 0],-3,false) % Distance 3
% PLofCPLequidistant(CPLsample(29),4,true) % multi region CPLs - numbers
% PLofCPLequidistant(CPLsample(29),-4,true) % multi region CPLs - distance
%
% See also: CPLlength, PLaddauxpoints
%
%
% Copyright 2022 Tim C. Lueth

SGboxbolted(CPL,H,w,MM,"assembly","radial","screws","bolt")- creates a box that is closed by a simple lid cover

SGboxbolted(CPL,H,w,MM,% SGboxbolted(CPL,H,w,MM,"assembly","radial","screws","bolt") - creates a box that is closed by a simple lid cover
% (by Tim Lueth, VLFL-Lib, 2022-MÄR-19 as class: AUTOMATIC DESIGN)
%
% future releases will add a sealing lip at the top
% and opening for cabeling
% Please be aware, that the screws sockets need space inside, and
% therefor not the complete volume CPL x H is available (Status of:
% 2022-06-23)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGdesignBoltedLid
%
% [A,C,Aparts]=SGboxbolted([CPL,H,w,MM,"assembly","radial","screws","bolt
% "])
% === INPUT PARAMETERS ===
% CPL: Inner Contour required for assembly
% H: Inner height required for assembly
% w: [wall cover floor screws]; default is [2 2 2 2];
% MM: [Diameer Length] default is 2.6 6
% "assembly": "DIN7991" or "DIN912985", or "DIN912bush"
% "radial": radius for outside box radius; default is 1
% "screws": number of screws; default is 4
% "bolt": if used, there are bolts under the screw sockets
% === OUTPUT RESULTS ======
% A: SG of the Box
% C: SG of the Lid/Cover
% Aparts: Parts list for Assembly
%
% EXAMPLE:
% SGboxbolted(PLcircle(40),20,[2 4],[2.5 5.9],'screws',4,'bolt')
% SGboxbolted(PLcircle(40,8),20,[2 4],[2.5 5.9],'screws',8,'bolt')
% SGboxbolted(PLcircle(40,8),20,[2 4],[2.5 5.9],'screws',4,'bolt')
% SGboxbolted(PLcircle(40,8),20,[2 4],[2.0 5.9],'screws',4,'bolt','assembly','DIN912bush')
% SGboxbolted(CPLsample(18)*2,20,[2 4],[2.0 5.9],'screws',4,'assembly','DIN912985')
%
%
% See also: SGdesignBoltedLid
%
%
% Copyright 2022 Tim C. Lueth

SGDIN13(D,L,p,CPL,shr,left)- returns a screw geometry related to DIN13 (same as SGscrewDIN)

SGDIN13(D,L,p,CPL,shr,left)% SGDIN13(D,L,p,CPL,shr,left) - returns a screw geometry related to DIN13 (same as SGscrewDIN)
% (by Tim Lueth, VLFL-Lib, 2022-MÄR-19 as class: PARAMETRIC DESIGN)
%
% Written as "SGscrewDIN" for SG-Lib 4.4 and SGofCPLcommand
% It is used to create wrt DIN13 watertight threads for
% a) Screws (Positive Diameter, no outer CPL contour)
% b) Screw tap (Negative Diameter, no outer CPL contour)
% c) Nuts (Negative Diameter, outer Radius or CPL contour)
% In SG 4.5 the Screw starts at z=0 (Michael Kruttschnitt)
% In SG 4.7 bug using CPLs removed by comment from Simon Schiele
% In SG 5.0, left-hand threads are also supported (Status of: 2022-03-24)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGsteepspindle, SGDIN985, SGthread, SGscrewDIN(old),
% PLthreadDIN
%
% SG=SGDIN13(D,L,[p,CPL,shr,left])
% === INPUT PARAMETERS ===
% D: Diameter (negative creates a screw cutter or nut)
% L: Length
% p: optional pitch
% CPL: Outer Diameter or CPL, creates nuts when D<0 and Holes if D>0
% shr: shrinkage because of printer oversize; default is 0
% left: if true, a left winding is designed
% === OUTPUT RESULTS ======
% SG: Solid Geometry
%
% EXAMPLE:
% SGDIN13( 32,50) % Screw
% SGDIN13(+32,50,'',25) % Screw with tube to insert a carbon or metal bar
% SGDIN13(-32,50) % Screw cutter
% SGDIN13(-32,50,'',35) % circular nut
% SGDIN13(-32,50,'',PLcircle(40,7)); nut hexagon shape
% SGDIN13( 32,50,'','','',true) % Screw - Left orientation
%
%
% See also: SGsteepspindle, SGDIN985, SGthread, SGscrewDIN(old),
% PLthreadDIN
%
%
% Copyright 2022 Tim C. Lueth

SGclampCTtable(LL,M,clpar)- returns the solid geometry for a CT table clamp

SGclampCTtable(LL,M,clpar)% SGclampCTtable(LL,M,clpar) - returns the solid geometry for a CT tabel clamp
% (by Tim Lueth, VLFL-Lib, 2022-MÄR-19 as class: PARAMETRIC DESIGN)
%
% Introduced first in SolidGeometry 5.2
%
% See also: PLclampCTtable
%
% SG=SGclampCTtable([LL,M,clpar])
% === INPUT PARAMETERS ===
% LL: Width of clamp
% M: Diameter of metric screw (positive core hole; negative nut); default
% is 0
% clpar: same parameter as PLclampCTtable; default may be [40 3 0.5 3]
% === OUTPUT RESULTS ======
% SG: Solid geometry including Frame at centered screw position
%
% EXAMPLE:
% SGclampCTtable(35,+8);
% SGclampCTtable(35,-8);
%
% See also: PLclampCTtable
%
%
% Copyright 2022 Tim C. Lueth

SGboxturnswitch()- Solid Geometry for 6V Batterie box plus 1 turn-switch to support simple DC-Motor control

SGboxturnswitch()% SGboxturnswitch() - Solid Geometry for 6V Batterie box plus 1 turn-switch to support simple DC-Motor control
% (by Tim Lueth, VLFL-Lib, 2022-MÄR-17 as class: AUTOMATIC DESIGN)
%
% Test with a project of Philipp Paprottka
% Rotary switch: 4 x 3 for switching but 2 x 3 ==> (+/-) x
% (forward/stop/backward) would be enough
% 6 V Battery box is used: https://www.amazon.de/gp/product/B0761TSC32
% 4x3 Rotary switch used: https://www.amazon.de/gp/product/B07DQLNWQL
% 2.5mm JST-SM 2 pole used: https://www.amazon.de/dp/B07QM13SRX
% Wire 22 AWG: https://www.amazon.de/dp/B0792Y7RHP
% or
% https://www.amazon.de/dp/B06WGN56V2/
% ==
% Crimping tool 32WM-20AWG: https://www.amazon.de/gp/product/B002AVVO7K/
% Wire stripper 34-22AWG: https://www.amazon.de/dp/B001YHELPS
% (Status of: 2022-03-24)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGclampCTtable, SGdesignBoltedLid,
% https://www.amazon.de/gp/product/B07DQLNWQL,
% https://www.amazon.de/gp/product/B0761TSC32,
% https://www.amazon.de/dp/B07QM13SRX,
% https://www.amazon.de/dp/B0792Y7RHP, https://www.amazon.de/dp/B06WGN56V2
%
% SGboxturnswitch([])
%
% EXAMPLE:
% SGboxturnswitch
%
%
% See also: SGclampCTtable, SGdesignBoltedLid,
% https://www.amazon.de/gp/product/B07DQLNWQL,
% https://www.amazon.de/gp/product/B0761TSC32,
% https://www.amazon.de/dp/B07QM13SRX,
% https://www.amazon.de/dp/B0792Y7RHP, https://www.amazon.de/dp/B06WGN56V2
%
%
% Copyright 2022 Tim C. Lueth

mm2French(mm)- converts Diameters in mm in French units

mm2French(mm)% mm2French(mm) - converts Diameters in mm in French units
% (by Tim Lueth, VLFL-Lib, 2022-MÄR-16 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.2
%
% See also: French2mm
%
% cha=mm2French(mm)
% === INPUT PARAMETERS ===
% mm: diameter (!) in mm
% === OUTPUT RESULTS ======
% cha: diameter in french
%
% EXAMPLE:
% mm=French2mm(7), mm2French(mm)
%
%
% See also: French2mm
%
%
% Copyright 2022 Tim C. Lueth

SGdesignMotorN20(LM)- creates subtraction solids for the design of motor driven mechanisms

SGdesignMotorN20(LM)% SGdesignMotorN20(LM) - creates subtraction solids for the design of motor driven mechanisms
% (by Tim Lueth, VLFL-Lib, 2022-MÄR-15 as class: AUTOMATIC DESIGN)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGdesignDIN912DIN985, SGdesignDIN912BushingE,
% SGdesignDIN7991, SGdesignMotorN20
%
%
% [H,N,S,Supp,Parts]=SGdesignMotorN20([LM])
% === INPUT PARAMETERS ===
% LM: [LengthofMotor gearbox/Supplement wall]; default is [26 9 2.0]
% === OUTPUT RESULTS ======
% H: Head / Shaft subtraction solid (Red)
% N: Head / Mtor subtraction solid (Green)
% S: Shape of Motor N20 (Magenta)
% Supp: Supplement solid (Yellow)
% Parts: required parts for assembly
%
% EXAMPLE:
% [H,N,S,Supp,Parts]=SGdesignMotorN20
% A=SGbox;A=SGsubtract(A,H,'alignT',{'C','B'}); A=SGcolorfaces(A,'y'); SGwriteSTL(A,'BoxN20-A');
% B=SGbox; B=SGsubtract(B,N,'alignT',{'C','F'}); B=SGcolorfaces(B,'g'); SGwriteSTL(B,'BoxN20-B');
% SGfigure(-12,5); SGplotalpha(A); SGplotalpha(B,'','','',A,'alignT',{'F','B'}); VLFLplotlight(1,0.5);
% SGplotalpha(S,'m','','',A,'alignT',{'C','B'});
% SGbox([50,50,2]);B=ans; B=SGunion(B,Supp,'alignT',{'C','F'}); cla; SGTplotalpha(B);
% SGsubtract(B,N,'alignT',{'C','F'}); B=ans; SGwriteSTL(B,'PlateN20');
% SGcylinder(9/2,15);A=ans; A=SGTsetBFsimple(A);
% SGsubtract(A,H,'alignT',{'C','F'}); A=ans; SGwriteSTL(A,'PinN20');
% SGbox([5,5,2]);B=ans; B=SGunion(B,Supp,'alignT',{'C','F'}); cla; SGTplotalpha(B); SGsubtract(B,N,'alignT',{'C','F'}); B=ans; SGwriteSTL(B,'MiniN20');
%
%
% See also: SGdesignDIN912DIN985, SGdesignDIN912BushingE,
% SGdesignDIN7991, SGdesignMotorN20
%
%
%
% Copyright 2022 Tim C. Lueth

CPLremovebuffer(CPL,wall)- just removes thin walls from CPLS (same as CPLdullededges)

CPLremovebuffer(CPL,wall)% CPLremovebuffer(CPL,wall) - just removes thin walls from CPLS (same as CPLdullededges)
% (by Tim Lueth, VLFL-Lib, 2022-MÄR-15 as class: CLOSED POLYGON LISTS)
%
% Used in automatic design fnctn to avoid thin walls that will break
% after printing or in use
% same as CPLN=CPLbuffer(CPLbuffer(CPL,-d),d);
% (Status of: 2022-03-15)
%
% Introduced first in SolidGeometry 5.2
%
% See also: CPLbuffer, CPLremovearea, CPLdullededges
%
% CPLN=CPLremovebuffer(CPL,[wall])
% === INPUT PARAMETERS ===
% CPL: CPL conotur
% wall: minimal wall thickness
% === OUTPUT RESULTS ======
% CPLN: New Contour without CPLwall
%
% EXAMPLE:
% CPLremovebuffer(CPLsample(21),3)
% CPLremovebuffer(CPLsample(21),4)
% CPLdullededges(CPLsample(21),3/2)
% CPLdullededges(CPLsample(21),4/2)
%
% See also: CPLbuffer, CPLremovearea, CPLdullededges
%
%
% Copyright 2022 Tim C. Lueth

PLclampCTtable(wal)- returns the CPL of a clamp for an hybrid-OR CT-table

PLclampCTtable(wal)% PLclampCTtable(wal) - returns the CPL of a clamp for an hybrid-OR CT-table
% (by Tim Lueth, VLFL-Lib, 2022-MÄR-12 as class: CLOSED POLYGON LISTS)
%
% Introduced first in SolidGeometry 5.2
%
% See also: PLjunkerhallpart
%
% [CPLC,CPLT]=PLclampCTtable([wal])
% === INPUT PARAMETERS ===
% wal: [width wallsize radius lowerwallsize]; default is [40 3 0.5 3]
% === OUTPUT RESULTS ======
% CPLC: Contour of the clamp
% CPLT: Contour of the table; not centered
%
% EXAMPLE:
% CPL=PLclampCTtable; SG=SGofCPLextrude(CPL,30,'y'); SGfigure(-30,30); SGTplotalpha(SG,'w');
%
% See also: PLjunkerhallpart
%
%
% Copyright 2022 Tim C. Lueth

writetextfile(fname,txt)- writes a character string into a text file

writetextfile(fname,txt)% writetextfile(fname,txt) - writes a character string intop a text file
% (by Tim Lueth, VLFL-Lib, 2022-MÄR-10 as class: FILE HANDLING)
%
% Introduced first in SolidGeometry 5.2
%
% See also: readtextfile
%
% wfname=writetextfile([fname,txt])
% === INPUT PARAMETERS ===
% fname: filenname for desktop or full path
% txt: ascii text
% === OUTPUT RESULTS ======
% wfname: full filename
%
% EXAMPLE:
% writetextfile('test','this is a test')
%
%
% See also: readtextfile
%
%
% Copyright 2022 Tim C. Lueth

SGpartslist(parts,newpartorpartslist)- appends parts to a parts list or parts lsit to parts list

SGpartslist(parts,newpartorpartslist)% SGpartslist(parts,newpartorpartslist) - appends parts to a parts list or parts lsit to parts list
% (by Tim Lueth, VLFL-Lib, 2022-MÄR-10 as class: AUTOMATIC DESIGN)
%
% new parts are added by a string such as
% * if there are several parts required or
% if there is only one part (Status of: 2022-04-16)
%
% Introduced first in SolidGeometry 5.2
%
% See also: SGpartslist, sprintftext, SGpartsfuncparams,
% SGwriteMultipleSTL
%
% [parts,txt]=SGpartslist(parts,[newpartorpartslist])
% === INPUT PARAMETERS ===
% parts: parts list or empty for a new list
% newpartorpartslist: either new parts or a parts list or a text output
% === OUTPUT RESULTS ======
% parts: parts list
% txt: text output to write into a file
%
% EXAMPLE:
% SGpartslist([],'DIN912','DIN985','DINX'); pp=ans
% SGpartslist(pp,'2 DIN912','3 DIN985','4 * DINX'); pp2=ans
% SGpartslist(pp,pp2); pp3=ans
% [~,b]=SGpartslist(pp,pp2)
% [~,b]=SGpartslist([],b,b,b,b)
%
% See also: SGpartslist, sprintftext, SGpartsfuncparams,
% SGwriteMultipleSTL
%
%
% Copyright 2022 Tim C. Lueth

SGanimateSLLL(SLLL,tmax)- Animates a set of solids using the SLLL format

SGanimateSLLL(SLLL,tmax)% SGanimateSLLL(SLLL,tmax) - Animates a set of solids using the SLLL format
% (by Tim Lueth, VLFL-Lib, 2022-MÄR-10 as class: VISUALIZATION)
%
% The SLLL format is a cell list in wich each row contains the following
% information
% {Namestr, SG, TL-Framelist, color, [minlay maxlay]}
% The 5th colum is not used bny this fnctn (Status of: 2022-03-10)
%
% Introduced first in SolidGeometry 5.2
%
% See also: fourBarCLLL2SGdesign, drawnowvid, Videoquickrotate3D
%
% h=SGanimateSLLL(SLLL,[tmax])
% === INPUT PARAMETERS ===
% SLLL: {Namestr, SG, TL-Framelist, color, [minlay maxlay]}
% tmax: time period to animate the movement; default is 10 sec
% === OUTPUT RESULTS ======
% h: handle to solids and annotation
%
% EXAMPLE:
% PosesampleHook; PS=ans; fourBarposesyntheses(PS,[1 2 3],16,[1 2 3],[1 3]);PS=ans;
% fourBarposesortsolution(PS,'base-posy',[-inf -20],'ground-length','flip'); PSX=ans;
% fourBarposelayering(PSX,1,[3 1.6 3],[0 1 -1 2],'wlim',[0 165]); CLLL=ans;
% [a,b]=fourBarCLLL2SGdesign(CLLL,[3 1.6 3],'assembly','DIN7991');
% SGfigure; SGanimateSLLL(b,10); delete(ans);
% Videoquickstart; SGfigure; SGanimateSLLL(b,10); Videoquickrotate3D; Videoquickcloseandopen;
%
% See also: fourBarCLLL2SGdesign, drawnowvid, Videoquickrotate3D
%
%
% Copyright 2022 Tim C. Lueth

PLaddauxpoints(PL,d)- adds auxilary points to an open point list

PLaddauxpoints(PL,d)% PLaddauxpoints(PL,d) - adds auxilary points to an open point list
% (by Tim Lueth, VLFL-Lib, 2022-MÄR-09 as class: CLOSED POLYGON LISTS)
%
% same as RLaddauxpoints from 2013--807
% In contast to this fnctn PLaddauxpoints, the fnctn PLofCPLequidistant
% returns just equal distant points
% (Status of: 2022-03-09)
%
% Introduced first in SolidGeometry 5.2
%
% See also: PLofCPLequidistant, RLaddauxpoints, CPLaddauxpoints,
% CPLremdensity
%
% PLN=PLaddauxpoints(PL,d)
% === INPUT PARAMETERS ===
% PL: Open Point list
% d: distance of axuilary points
% === OUTPUT RESULTS ======
% PLN: New Point list
%
% EXAMPLE:
% CPLF=[-0 -0 ; 0 20; 30 30]; PLaddauxpoints(CPLF,5); % Open Contour PL add...
% CPLF=[-0 -0 ; 0 20; 30 30]; RLaddauxpoints(CPLF,5); % Closed Contour RL add..
% CPLF=[-0 -0 ; 0 20; 30 30]; CPLaddauxpoints(CPLF,5); % Nested Contours CPL add..
%
% See also: PLofCPLequidistant, RLaddauxpoints, CPLaddauxpoints,
% CPLremdensity
%
%
% Copyright 2022 Tim C. Lueth

Videoquickrotate3D(lim)- records a manual movement of the 3D View using rotate3d by drawnowvid

Videoquickrotate3D(lim)% Videoquickrotate3D(lim) - records a manual movement of the 3D View using rotate3d by drawnowvid
% (by Tim Lueth, VLFL-Lib, 2022-MÄR-08 as class: VIDEO/AUDIO/PDF)
%
% There is a time span of 3 seconds to change the viewpoint in the graph.
% As soon as the viewpoint is changed, the recording of the movement
% starts as a list of angles. Immediately after another movement pause of
% 3 seconds, the movement is repeated and this time written to a video
% file with drawnowvid if it was previously opened with Videoquickstart.
% Otherwise one sees only a repeated movement. it is planned with the
% fnctn also recorded courses to play automatically. (Status of:
% 2022-05-04)
%
% Introduced first in SolidGeometry 5.2
%
% See also: viewsmooth, animatego, figurerotate, drawnowvid
%
% awt=Videoquickrotate3D([lim])
% === INPUT PARAMETERS ===
% lim: waiting time before stop OR awt sequnce list for
% === OUTPUT RESULTS ======
% awt: List of view angles and time period
%
% EXAMPLE:
% SGbox; Videoquickstart; Videoquickrotate3D; awt=ans; Videoquickcloseandopen; awt % record video
% SGbox; Videoquickstart; Videoquickrotate3D(awt); Videoquickcloseandopen; % replay sequence
%
% See also: viewsmooth, animatego, figurerotate, drawnowvid
%
%
% Copyright 2022 Tim C. Lueth

fourbarposesearchcouplercurve(PS,CPLF,acc,rots)- sorts 4bar solutions wrt minimal distance of coupler path to a given set of points

fourbarposesearchcouplercurve(PS,CPLF,acc,rots)% fourbarposesearchcouplercurve(PS,CPLF,acc,rots) - sorts 4bar solutions wrt minimal distance of coupler path to a given set of points
% (by Tim Lueth, VLFL-Lib, 2022-MÄR-03 as class: KINEMATICS AND FRAMES)
%
% The solutions are sorted by the square distance to points of the point
% list CPLF. If only the start and end points of a straight line are
% specified, then only these two points are optimized. If you want to
% search a straight line, then many points must lie on this straight
% line. For this you can use PLaddauxpoints, RLaddauxpoints,
% CPLaddauxpoints. The point distribution can also be used to achieve a
% weighting of the locality fidelity by allowing the important points to
% occur more frequently in the point list.
% Since the Points of CPLF are used to calculate the minimal distance,
% the non fitting part of the Pose does not disadvantage a solution
% it is also possible to add an angle diffence list (Status of:
% 2022-03-09)
%
% Introduced first in SolidGeometry 5.2
%
% See also: fourBarposesyntheses, fourBarposesortsolution,
% fourBarposeplotsolution
%
% [PSX,di]=fourbarposesearchcouplercurve(PS,[CPLF,acc,rots])
% === INPUT PARAMETERS ===
% PS: Pose struct
% CPLF: Point List or contour considered as SET of points!
% acc: [min max]; default is [0 inf]
% rots: true==rotating, false=non rotating; default is ''
% === OUTPUT RESULTS ======
% PSX: Pose struct sorted by minimal square distance
% di: sum of minimal square distance
%
% EXAMPLE:
% Posesample(29); PS=ans; % Just squares
% fourBarposesyntheses(PS,1,[16]);PS=ans; % 57104 solution were found using 1-Pose-Synthesis.
% CPLF=[0 0 ; 30 30]; fourbarposesearchcouplercurve(PS,CPLF); PSX=ans; SGfigure;PLplot(CPLF,'b-',2); fourBarposeplotsolution(PSX,1,'animate')
% SGfigure; PLplot(CPLF,'k-',2);PLplot(CPLF([1,end],:),'k*',2); fourBarposeplotsolution(PSX,1,'animate');
% CPLF=[-0 -0 ; 10 20; 30 30]; CPLF=PLaddauxpoints(CPLF,5); fourbarposesearchcouplercurve(PS,CPLF); PSX=ans;
% CPLF=PLcircle(50,'',pi/2)+[10 20]; fourbarposesearchcouplercurve(PS,CPLF); PSX=ans;
% CPLF=PLcircle(50,'',pi/2)+[10 20]; fourbarposesearchcouplercurve(PS,CPLF,[1 5],true); PSX=ans; % only rotating
%
% See also: fourBarposesyntheses, fourBarposesortsolution,
% fourBarposeplotsolution
%
%
% Copyright 2022 Tim C. Lueth

PLBezierC(PL,k)- Bezier splines for open point list

PLBezierC(PL,k)% PLBezierC(PL,k) - Bezier splines for open point list
% (by Tim Lueth, VLFL-Lib, 2022-MÄR-03 as class: CLOSED POLYGON LISTS)
%
% exactly the same as VLBezierC but handles the 2D output (Status of:
% 2022-03-08)
%
% Introduced first in SolidGeometry 5.2
%
% See also: VLBezierC
%
% PL=PLBezierC(PL,[k])
% === INPUT PARAMETERS ===
% PL: 2D Point list
% k: number of points of the Bezier curve; default is size(PL,1)
% === OUTPUT RESULTS ======
% PL: 2D Point list
%
% EXAMPLE:
% PLBezierC(PLsample(6),12)
%
% See also: VLBezierC
%
%
% Copyright 2022 Tim C. Lueth

str2numendsWith(ttt)- returns the number that are part of in a string

str2numendsWith(ttt)% str2numendsWith(ttt) - returns the number that are part of in a string
% (by Tim Lueth, VLFL-Lib, 2022-FEB-26 as class: AUXILIARY PROCEDURES)
%
% Many DICOM files or CT raw data files contain number that describe the
% order. This fnctn extracts the numbers that are part of a string
% (Status of: 2022-02-26)
%
% Introduced first in SolidGeometry 5.2
%
% See also: str2num, elem2array, elem2cell
%
% nn=str2numendsWith(ttt)
% === INPUT PARAMETERS ===
% ttt: string or cell list of strings
% === OUTPUT RESULTS ======
% nn: rows with numbers for each string of the cell list
%
% EXAMPLE:
% a=dir('/Users/lueth/Desktop/imstack_imstack_300/*.raw') % find all raw files in a folder
% ttt={a.name}' % create a cell list from the multiple results
% str2numendsWith({a.name}'); nn=ans
%
% See also: str2num, elem2array, elem2cell
%
%
% Copyright 2022 Tim C. Lueth

PLELconcat(PL1,EL1,PL2,EL2,lnk,CPL)- concatenates two different PL and EL and connects them

PLELconcat(PL1,EL1,PL2,EL2,lnk,CPL)% PLELconcat(PL1,EL1,PL2,EL2,lnk,CPL) - concatenates two different PL and EL and connects them
% (by Tim Lueth, VLFL-Lib, 2022-FEB-24 as class: CLOSED POLYGON LISTS)
%
% More complex than VLFLcat because of collision free search path (Status
% of: 2022-02-24)
%
% Introduced first in SolidGeometry 5.2
%
% See also: VLFLcat2, crossC2P, PLshortestpathinCPLcost,
% VLnearestNeighborN
%
% [PL,EL]=PLELconcat(PL1,EL1,PL2,EL2,[lnk,CPL])
% === INPUT PARAMETERS ===
% PL1: Point list 1
% EL1: Edge list 1
% PL2: Point list 2
% EL2: Edge list 2
% lnk: if true; an additional edge is created to connect PL1 and PL2;
% default is false
% CPL: to connecting edges should be collision free inside a CPL
% === OUTPUT RESULTS ======
% PL: Point List
% EL: Edge List
%
% EXAMPLE:
% PL1=rand(4,2)*20; EL1=ELofPL(PL1,true); PL2=rand(3,2)*20+[10 0]; EL2=ELofPL(PL2,true);
% PLELconcat(PL1,EL1,PL2,EL2)
% PLELconcat(PL1,EL1,PL2,EL2,true)
%
% PLELconcat([-10 -6; -10 4],'',[10 0; 10 8;],'');
% PLELconcat([-10 -6; -10 4],'',[10 0; 10 8;],'',true);
% PLELconcat([-10 -6; -10 4],'',[10 0; 10 8;],'',true,CPLsample(31));
%
% See also: VLFLcat2, crossC2P, PLshortestpathinCPLcost,
% VLnearestNeighborN
%
%
% Copyright 2022 Tim C. Lueth

CPLskeletonsearch(CPL,)- creates a point list and an edge list

CPLskeletonsearch(CPL,)% CPLskeletonsearch(CPL,) - creates a point list and an edge list
% (by Tim Lueth, VLFL-Lib, 2022-FEB-24 as class: CLOSED POLYGON LISTS)
%
% Complex recursive fnctn including path planning
% Finds a skeleton by shinking the contour until it breaks into points,
% lines, or separateed contours. The detected points or lines are linked
% trough straigt lines or collision free pathes around the holes, if this
% is possible
% The skeleton fnctn is useful for many automatic construction fnctn
% (Status of: 2022-05-05)
%
% Introduced first in SolidGeometry 5.2
%
% See also: CPLskeleton, CPLregionshrink, CPLregionbufferintersect,
% PLELconcat, matrixskeleton
%
% [PL,EL]=CPLskeletonsearch(CPL,[])
% === INPUT PARAMETERS ===
% CPL: Closed contour line
% === OUTPUT RESULTS ======
% PL: Point list
% EL: Edge list
%
% EXAMPLE:
% CPLskeletonsearch(CPLsample(35))
% CPLskeletonsearch(CPLsample(41))
% CPLskeletonsearch(CPLsample(40))
% CPLskeletonsearch(CPLsample(10)); [a,b]=CPLskeletonsearch(CPLsample(10))
% CPLskeletonsearch([CPLsample(3);nan nan;PLcircle(2)])
% CPLskeletonsearch([CPLsample(3)])
%
% See also: CPLskeleton, CPLregionshrink, CPLregionbufferintersect,
% PLELconcat, matrixskeleton
%
%
% Copyright 2022 Tim C. Lueth

CPLregionbufferintersect(CPL,dx)- detects the overlapping area of increased regions

CPLregionbufferintersect(CPL,dx)% CPLregionbufferintersect(CPL,dx) - detects the overlapping area of increased regions
% (by Tim Lueth, VLFL-Lib, 2022-FEB-24 as class: CLOSED POLYGON LISTS)
%
% Introduced first in SolidGeometry 5.2
%
% See also: CPLbuffer, CPLregionshrink
%
% [cc,vv,reg]=CPLregionbufferintersect(CPL,[dx])
% === INPUT PARAMETERS ===
% CPL: Original CPL
% dx: buffered
% === OUTPUT RESULTS ======
% cc: cell list if overlapping polyshapes
% vv: list of comparision [i k]
% reg: cell list of regions
%
% EXAMPLE:
% CPLregionbufferintersect(CPLsample(41),1)
% [x,vv]=CPLregionbufferintersect(CPLsample(41),1)
%
% See also: CPLbuffer, CPLregionshrink
%
%
% Copyright 2022 Tim C. Lueth

strhyperlink2str(str)- separates hyperlinks into real text and a list of keywords plus a list of urls

strhyperlink2str(str)% strhyperlink2str(str) - separates hyperlinks into real text and a list of keywords plus a list of urls
% (by Tim Lueth, VLFL-Lib, 2022-FEB-24 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.2
%
% See also: strhyperlink, sprintfhyperlinktab
%
% [str,wrds,urls]=strhyperlink2str(str)
% === INPUT PARAMETERS ===
% str: string includes hyperlinks
% === OUTPUT RESULTS ======
% str: string without hyperlinks
% wrds: list of keywords used in in original string
% urls: list of urls used in in original string
%
% EXAMPLE:
% a=strhyperlink('test','http://www.mimed.de')
% strhyperlink2str(a)
%
% See also: strhyperlink, sprintfhyperlinktab
%
%
% Copyright 2022 Tim C. Lueth

PosesampleHook- Pose sample for Hook Movement Task

PosesampleHook% PosesampleHook - Pose sample for Hook Movement Task
% (by Tim Lueth, VLFL-Lib, 2022-FEB-22 as class: KINEMATICS AND FRAMES)
%
% Introduced first in SolidGeometry 5.2
%
% See also: PosesampleHook, VLFL_EXP69
%
% PS=PosesampleHook
% === OUTPUT RESULTS ======
% PS: returns the Pose task for a hook
%
% See also: PosesampleHook, VLFL_EXP69
%
%
% Copyright 2022 Tim C. Lueth

PLhook(h,w,o,a,r)- creates the shape of a hook

PLhook(h,w,o,a,r)% PLhook(h,w,o,a,r) - creates the shape of a hook
% (by Tim Lueth, VLFL-Lib, 2022-FEB-22 as class: CLOSED POLYGON LISTS)
%
% Introduced first in SolidGeometry 5.2
%
% See also: PLarrow, PLshaft, PLshaftrad, PLevolvente, PLthreadDIN
%
% PL=PLhook([h,w,o,a,r])
% === INPUT PARAMETERS ===
% h: height
% w: widht
% o: overhang
% a: angle; default is 45 degree
% r: radial edges
% === OUTPUT RESULTS ======
% PL: PL
%
% EXAMPLE:
% PLhook(30,10,[10 1],'',0)
%
% See also: PLarrow, PLshaft, PLshaftrad, PLevolvente, PLthreadDIN
%
%
% Copyright 2022 Tim C. Lueth
RapidWeaver Icon

Last Change Oct 2023 for SG-Lib 5.3