Last change of this documentation page: 2022-06-02 of SolidGeometry 5.0
SGversion- returns a license string

SGversion% SGversion - returns a license string
% (by Tim Lueth, VLFL-Lib, 2021-FEB-22 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: version, verTL
%
% [outstr,Toolboxname,VNAME,LDAYS]=SGversion
% === OUTPUT RESULTS ======
% outstr: current license (last compiled version)
% Toolboxname:
% VNAME:
% LDAYS:
%
% EXAMPLE: SGversion
%
% See also: version, verTL
%
%
% Copyright 2021 Tim C. Lueth

Rofrdintrusion(d,r)- provides the minimum intrusion distance to fully insert a cylinder into a sphere

Rofrdintrusion(d,r)% Rofrdintrusion(d,r) - provides the minimum intrusion distance to fully insert a cylinder into a sphere
% (by Tim Lueth, VLFL-Lib, 2021-FEB-20 as class: ANALYTICAL GEOMETRY)
%
% Better name would be Rofarcchord:
% a=atan(d/r);
% R=d/(1-cos(2*a)) (Status of: 2021-02-20)
%
% Introduced first in SolidGeometry 5.0
%
% See also: sofrd, dofRintrusion, rofRintrusion, PLchordof2PR
%
% R=Rofrdintrusion([d,r])
% === INPUT PARAMETERS ===
% d: distance between chord and Radius R
% r: radius of the chord
% === OUTPUT RESULTS ======
% R: Radius of a circle with chordlength 2*r and d between chord and R
%
% EXAMPLE:
% Rofrdintrusion(5,13.2288)
%
% See also: sofrd, dofRintrusion, rofRintrusion, PLchordof2PR
%
%
% Copyright 2021 Tim C. Lueth

SGiqanglerect(L,slb,a,rs,w,slw)- returns a recangular angle for changing directions in mechanisms

SGiqanglerect(L,slb,a,rs,w,slw)% SGiqanglerect(L,slb,a,rs,w,slw) - returns a recangular angle for changing directions in mechanisms
% (by Tim Lueth, VLFL-Lib, 2021-FEB-14 as class: MODELING PROCEDURES)
%
% first version was exp_2021_02_06_RobotBase
% IN CONTRAST TO all other SGiq* fnctn the value for slw is slfit('c')
% oblique triangle
% right-angled triangle (Status of: 2021-02-15)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGiqpin, SGiqknob, SGiqlink, SGiqsocket
%
% SGiqanglerect([L,slb,a,rs,w,slw])
% === INPUT PARAMETERS ===
% L: [Height Radius edge-number]
% slb: ring distance; default is slfit('s') separated
% a: ring anglel default is pi/2 90degree
% rs: ring size default is 2mm
% w: wall thickness; default is 2mm
% slw: Inch quarted pin fitting; default is slfit ('t') -
%
% EXAMPLE:
% SGiqanglerect
%
%
% See also: SGiqpin, SGiqknob, SGiqlink, SGiqsocket
%
%
% Copyright 2021 Tim C. Lueth

SGiqsocket(L,slb,a,rs,w,slw)- returns a socket or a foot for an inch quarter mechanism

SGiqsocket(L,slb,a,rs,w,slw)% SGiqsocket(L,slb,a,rs,w,slw) - returns a socket or a foot for an inch quarter mechanism
% (by Tim Lueth, VLFL-Lib, 2021-FEB-14 as class: MODELING PROCEDURES)
%
% first version was exp_2021_02_06_RobotBase
% IN CONTRAST TO all other SGiq* fnctn the value for slw is slfit('c')
% (Status of: 2021-02-14)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGiqpin, SGiqknob, SGiqlink, SGiqanglerect
%
% SGiqsocket([L,slb,a,rs,w,slw])
% === INPUT PARAMETERS ===
% L: [Height Radius edge-number]
% slb: ring distance; default is slfit('s') separated
% a: ring anglel default is pi/2 90degree
% rs: ring size default is 2mm
% w: wall thickness; default is 2mm
% slw: Inch quarted pin fitting; default is slfit ('c') -
%
% EXAMPLE:
% SGiqsocket([20 20 0])
%
% See also: SGiqpin, SGiqknob, SGiqlink, SGiqanglerect
%
%
% Copyright 2021 Tim C. Lueth

filenameadddate4gcode(fname,renn,fmdat,protf)- CHANGES THE NAME FOR GCODE FILES

filenameadddate4gcode(fname,renn,fmdat,protf)% filenameadddate4gcode(fname,renn,fmdat,protf) - CHANGES THE NAME FOR GCODE FILES
% (by Tim Lueth, VLFL-Lib, 2021-FEB-14 as class: FILE HANDLING)
%
% HHHBBBAP_(yyyy-mm-dd)
% such as
% 22060AP_RobotBase(2021-01-11).gcode
% Tested ony with MARLIN code and Predator and CURA (Status of:
% 2021-02-15)
%
% Introduced first in SolidGeometry 5.0
%
% See also: filenameadddate, filenamestartswithdate, filenameinc,
% strcounter
%
% [newfile,fname,fdname]=filenameadddate4gcode(fname,[renn,fmdat,protf])
% === INPUT PARAMETERS ===
% fname: filename (wildcards allowed)
% renn: if true, the file will be changed (if possible)
% fmdat:
% protf:
% === OUTPUT RESULTS ======
% newfile: full filename to be written or written
% fname: core filename without prefix and postfix
% fdname:
%
% See also: filenameadddate, filenamestartswithdate, filenameinc,
% strcounter
%
%
% Copyright 2021 Tim C. Lueth

SGiqlink(L,slb,a,rs,w,slw)- Creates links for inch quarter drive mechanisms

SGiqlink(L,slb,a,rs,w,slw)% SGiqlink(L,slb,a,rs,w,slw) - Creates links for inch quarter drive mechanisms
% (by Tim Lueth, VLFL-Lib, 2021-FEB-14 as class: MODELING PROCEDURES)
%
% More or less the same as exp_2021_01_31_link2. The delay in developing
% this geometry is primarily due to the fact that the mobility cannot be
% predicted when printing with several different Anycubic Predator FDM
% printers. Although with the Neon Orange material, the links can be
% reliably printed on the "PREADTOR" at 200/55 degrees, this is not
% successful on the "MIMETAURUS" or the "STEGOSAURUS". The obvious
% assumption is (after the nozzles have already been uniformly exchanged)
% that the temperatures of the hotend are not comparable. For research,
% the question therefore arises whether)
% 1. automatic construction should be advanced with one printer (but then
% only with one printer) or one should - since several printers
% drastically increase the development timeb)
% 2. pursue the understanding of geometry distortion
% ==> work on Predator with known parameters
% ==> attempts to work on Stegosaurus with a 10 degree lower hotend
% (Status of: 2021-02-15)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGiqpin, SGiqknob, SGiqsocket, SGiqanglerect, SGsblink
%
% SGiqlink([L,slb,a,rs,w,slw])
% === INPUT PARAMETERS ===
% L: Length in mm; default is 50
% slb: Fitting for bearing; default is slfit('s')
% a: angle for bearing; default is 90 degree pi/2
% rs: intrusion of ring; default is 2mm
% w: wall thickness ; default is 2mm
% slw: Fitting for IQ sockets; default is slfit('t')
%
% EXAMPLE:
% SGiqlink(50)
%
% See also: SGiqpin, SGiqknob, SGiqsocket, SGiqanglerect, SGsblink
%
%
% Copyright 2021 Tim C. Lueth

MGTcoefficientsPID2bi(P,I,D,n)- returns an PID controller equivalent sequence of an numerator polynomial coefficients of the FIR Controller in a closed loop control

MGTcoefficientsPID2bi(P,I,D,n)% MGTcoefficientsPID2bi(P,I,D,n) - returns an PID controller equivalent sequence of an numerator polynomial coefficients of the FIR Controller in a closed loop control
% (by Tim Lueth, VLFL-Lib, 2021-FEB-11 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: MGTsystemFIR, MGTsystemIIR, MGTsysteminvFIR,
% MGTcontrolIIRIIR, MGTcoefficientsai2bi
%
% bi=MGTcoefficientsPID2bi(P,I,D,[n])
% === INPUT PARAMETERS ===
% P: Proportional Part P*u[k]
% I: Integral Part I*sum(u[k:-1:k-n])
% D: Differential part D*(u[k]-k[k-1])
% n: number of bi numerator polynomial coefficients of the FIR Controller
% === OUTPUT RESULTS ======
% bi: numerator polynomial coefficients of the FIR Controller
%
% EXAMPLE:
% MGTcoefficientsPID2bi(0.4,0.9,0.1)
%
%
% See also: MGTsystemFIR, MGTsystemIIR, MGTsysteminvFIR,
% MGTcontrolIIRIIR, MGTcoefficientsai2bi
%
%
% Copyright 2021 Tim C. Lueth

MGTcoefficientsai2bi(ai,thr)- converts a z-transform Denominator polynomial into Numerator polynomial

MGTcoefficientsai2bi(ai,thr)% MGTcoefficientsai2bi(ai,thr) - converts a z-transform Denominator polynomial into Numerator polynomial
% (by Tim Lueth, VLFL-Lib, 2021-FEB-11 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: MGTsystemFIR, MGTsystemIIR, MGTsysteminvFIR, MGTcontrolIIRIIR
%
% [bi,cbi]=MGTcoefficientsai2bi([ai,thr])
% === INPUT PARAMETERS ===
% ai: ai coefficients of a strucuture of type 1/ai polynomial
% thr: default is 1e-3
% === OUTPUT RESULTS ======
% bi: ai coefficients of an equivalent strucuture of type bi polynomial
% cbi:
%
% EXAMPLE:
% ai=[1.2 -0.3 0.1]
% [bi,cbi]=MGTcoefficientsai2bi(ai)
%
%
% See also: MGTsystemFIR, MGTsystemIIR, MGTsysteminvFIR, MGTcontrolIIRIIR
%
%
% Copyright 2021 Tim C. Lueth

MGTsysteminvFIR(u,y)- calculates the FIR coefficients by solving a linear equation system

MGTsysteminvFIR(u,y)% MGTsysteminvFIR(u,y) - calculates the FIR coefficients by solving a linear equation system
% (by Tim Lueth & Simon Schiele, VLFL-Lib, 2021-FEB-09 as class:
% AUXILIARY PROCEDURES)
%
% This fnctn is used to create the coefficients of an FIR controller that
% controls a FIR Systems specified by an ai polynom or an other bi
% polynom.
% For those who understand that the FIR is a convolution operation, it is
% clear that this fnctn is the inverse convolution fnctn. It is possible
% with it, to compensate a system behavior or to prescribe the total
% behavior. It would be interesting to use this knowledge with the
% spreading of infectious diseases in order to give the spreading a
% purposeful progression, instead of watching anxiously that an averaging
% does not solve the problem. (Status of: 2021-02-09)
%
% Introduced first in SolidGeometry 5.0
%
% See also: MGTsystemFIR, MGTsystemIIR
%
% bi=MGTsysteminvFIR(u,y)
% === INPUT PARAMETERS ===
% u: input sequence
% y: output sequence
% === OUTPUT RESULTS ======
% bi: FIR coefficients (convolution fnctn), magenta coloured subplot
%
% EXAMPLE:
% MGTsysteminvFIR([4 3 2 1],[1 0 0 0]); di=ans
% MGTsystemFIR([4 3 2 1],di)
%
% See also: MGTsystemFIR, MGTsystemIIR
%
%
% Copyright 2021 Tim C. Lueth

exp_2021_02_09_FIRIIR- EXPERIMENT TO SHOW HOW TO DESIGN A FORWARD CONTROL SYSTEM FROM AN IMPULSE RESPONSE

exp_2021_02_09_FIRIIR%% PUBLISHABLE EXP_2021_02_09_FIRIIR EXPERIMENT TO SHOW HOW TO DESIGN A FORWARD CONTROL SYSTEM FROM AN IMPULSE RESPONSE
% (by Tim Lueth, VLFL-Lib, 2021-FEB-09 as class: EXPERIMENTS)

%%

% exp_2021_02_09_FIRIIR - EXPERIMENT TO SHOW HOW TO DESIGN A FORWARD CONTROL SYSTEM FROM AN IMPULSE RESPONSE
% (by Tim Lueth, VLFL-Lib, 2021-FEB-09 as class: EXPERIMENTS)
%
% Introduced first in SolidGeometry 5.0
%
% See also: MGTsystemIIR, MGTsystemFIR, MGTsysteminvF
%
% exp_2021_02_09_FIRIIR
%
% See also: MGTsystemIIR, MGTsystemFIR, MGTsysteminvF
%
%
% Copyright 2021 Tim C. Lueth

axisratio- returns the axis ratio x y z

axisratio% axisratio - returns the axis ratio x y z
% (by Tim Lueth, VLFL-Lib, 2021-FEB-09 as class: VISUALIZATION)
%
% Introduced first in SolidGeometry 5.0
%
% See also: axis, axis4math, axis4animation, axisscale
%
% ar=axisratio
% === OUTPUT RESULTS ======
% ar: [1 y/x z/x]
%
% EXAMPLE:
% figure; view(-30,30); SGplotalpha(SGbox); axisratio
%
% See also: axis, axis4math, axis4animation, axisscale
%
%
% Copyright 2021-2022 Tim C. Lueth

MGTsystemFIR(u0,bi,sh)- generates a system response for a transfer fnct that has only bi coefficients

MGTsystemFIR(u0,bi,sh)% MGTsystemFIR(u0,bi,sh) - generates a system response for a transfer fnct that has only bi coefficients
% (by Tim Lueth, VLFL-Lib, 2021-FEB-09 as class: AUXILIARY PROCEDURES)
%
% the coefficients of the equation
% y[k]=b0*u[k]+b1*u[k-1]+b2*u[k-2]+b3*u[k-3]+... (Status of: 2021-02-09)
%
% Introduced first in SolidGeometry 5.0
%
% See also: MGTsystemIIR, MGTsysteminvFIR
%
% y=MGTsystemFIR([u0,bi,sh])
% === INPUT PARAMETERS ===
% u0: numer sequence describin a signal / fnctn
% bi: [1 x n] Coefficients [b0 b1 b2 b3 .....bn-1]
% sh: if true; the progess is shown step by step
% === OUTPUT RESULTS ======
% y: response of y "masked" with coefficients bi
%
% EXAMPLE:
% MGTsystemFIR([0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0],[0 0 1 1 1 1 0 0 ]/4); % Mean + Delay
%
% See also: MGTsystemIIR, MGTsysteminvFIR
%
%
% Copyright 2021 Tim C. Lueth

MGTsystemIIR(u0,ai,bi,sh)- implements a IIR structure for signal filter or control tasks

MGTsystemIIR(u0,ai,bi,sh)% MGTsystemIIR(u0,ai,bi,sh) - implements a IIR structure for signal filter or control tasks
% (by Tim Lueth, VLFL-Lib, 2021-FEB-08 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: MGTsystemFIR, MGTsysteminvFIR
%
% y=MGTsystemIIR([u0,ai,bi,sh])
% === INPUT PARAMETERS ===
% u0: input signal
% ai: Denominator polynomial coefficients
% bi: Counts polynomial coefficients
% sh: Show progress step by step if true
% === OUTPUT RESULTS ======
% y: result signal
%
% EXAMPLE:
% MGTsystemIIR(impulse,[1 2 3],[1 2 3])
%
% See also: MGTsystemFIR, MGTsysteminvFIR
%
%
% Copyright 2021 Tim C. Lueth

roundgauss(x,s,n)- returns a mean value and standard deviation in an accuracy wrt to the sample number N

roundgauss(x,s,n)% roundgauss(x,s,n) - returns a mean value and standard deviation in an accuracy wrt to the sample number N
% (by Tim Lueth, VLFL-Lib, 2021-FEB-08 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: meanGauss, num2strUP
%
% [xr,sr]=roundgauss([x,s,n])
% === INPUT PARAMETERS ===
% x: Mean Value
% s: Standard deviation
% n: number of measurement; if 1 we use 2 significant numbers
% === OUTPUT RESULTS ======
% xr: mean rounded
% sr: standard deviation rounded
%
% EXAMPLE:
% [x,s]=roundgauss(123.45678,34.567890,2)
% [x,s]=roundgauss(123.45678,34.567890,10)
% [x,s]=roundgauss(123.45678,34.567890,100)
% [x,s]=roundgauss(123.45678,3.4567890,1000)
%
% See also: meanGauss, num2strUP
%
%
% Copyright 2021 Tim C. Lueth

MGTmotor(u,m,d,c,ss)- Fnct to explain the behavior of a motor or any mass damper spring system

MGTmotor(u,m,d,c,ss)% MGTmotor(u,m,d,c,ss) - Fnct to explain the behavior of a motor or any mass damper spring system
% (by Tim Lueth, VLFL-Lib, 2021-FEB-08 as class: AUXILIARY PROCEDURES)
%
% This fnctn is the origin of the MGTsystemIIR fnctn (Status of:
% 2021-02-10)
%
% Introduced first in SolidGeometry 5.0
%
% See also: MGTsystemFIR, MGTsystemIIR, MGTsysteminvFIR
%
% [y,ai]=MGTmotor([u,m,d,c,ss])
% === INPUT PARAMETERS ===
% u: input signal
% m: mass constant kg; default is 0.1kg (increasing means higher mass)
% d: damper constant kg/sec; default is 0.01 kg/sec (increasing means
% higher damping)
% c: spring constant kg/sec^2; default is 1 kg/sec^2 (increasing means
% higher stiffness)
% ss: if true, progress is shown step by step
% === OUTPUT RESULTS ======
% y: motor response
% ai: ai coifficients calculated from m d c
%
% EXAMPLE:
% Impulse=[0 1 1 1 1 1 1 1 1 1 1 1]
% MGTmotor(Impulse,1,2,1); % Standard motor behavior
% MGTmotor(Impulse,0.1,0.01, 1);
% MGTmotor([0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1],1,0.2, 0.01); % Spread of any other contagious disease or any product in 100 percent market distribution
% ai=[ 4.000,-4.000,1.000]
% MGTsystemIIR(MGTsystemFIR(Impulse,ai),ai)
%
%
%
% See also: MGTsystemFIR, MGTsystemIIR, MGTsysteminvFIR
%
%
% Copyright 2021 Tim C. Lueth

axis4math- sets axis for mathematical fncts instead of solid geometries or CPLs

axis4math% axis4math - sets axis for mathematical fncts instead of solid geometries or CPLs
% (by Tim Lueth, VLFL-Lib, 2021-FEB-07 as class: USER INTERFACE)
%
%
% axis normal; axis tight; grid on; view(0,90); ax=axis;
% (Status of: 2022-03-29)
%
% Introduced first in SolidGeometry 5.0
%
% See also: axis, zoomVL, view, axisratio, axis4animation, axisscale
%
% ax=axis4math
% === OUTPUT RESULTS ======
% ax: axis ratio after call
%
% EXAMPLE:
% meanGauss(rand(10,1))
% axis4math
%
% See also: axis, zoomVL, view, axisratio, axis4animation, axisscale
%
%
% Copyright 2021-2022 Tim C. Lueth

exp_2021_02_07_Convolution(num)- Fnct to axplaon convolution

exp_2021_02_07_Convolution(num)% exp_2021_02_07_Convolution(num) - Fnct to axplaon convolution
% (by Tim Lueth, VLFL-Lib, 2021-FEB-07 as class: EXPERIMENTS)
%
% Introduced first in SolidGeometry 5.0
%
% See also: exp_2021_01_25_convolution
%
% exp_2021_02_07_Convolution([num])
% === INPUT PARAMETERS ===
% num:
%
% See also: exp_2021_01_25_convolution
%
%
% Copyright 2021 Tim C. Lueth

PLplotdiscretesample(PL,)- plots a PL as a digital signal to avoid problem of misinterpretation

PLplotdiscretesample(PL,)% PLplotdiscretesample(PL,) - plots a PL as a digital signal to avoid problem of misinterpretation
% (by Tim Lueth, VLFL-Lib, 2021-FEB-07 as class: CLOSED POLYGON LISTS)
%
% educational fnctn for teaching mechatronics.
% In contrast to PL plot, this fnctn creates an double sampled fnctn that
% makes jumps (Status of: 2021-02-07)
%
% Introduced first in SolidGeometry 5.0
%
% See also: PLplotdiscretetime, PLplot, lplots
%
%
% h=PLplotdiscretesample(PL,[])
% === INPUT PARAMETERS ===
% PL: Signal [k x()]
% === OUTPUT RESULTS ======
% h: handle to plot
%
% EXAMPLE:
% SGfigure; PLplotdiscretesample([[0:20]',sin([0:20]/4)'],'b*--'); axis normal
%
% See also: PLplotdiscretetime, PLplot, lplots
%
%
%
% Copyright 2021 Tim C. Lueth

PLplotdiscretetime(PL,col,wth)- plots a PL as a digital signal to avoid problem of misinterpretation

PLplotdiscretetime(PL,col,wth)% PLplotdiscretetime(PL,col,wth) - plots a PL as a digital signal to avoid problem of misinterpretation
% (by Tim Lueth, VLFL-Lib, 2021-FEB-07 as class: CLOSED POLYGON LISTS)
%
% educational fnctn for teaching mechatronics.
% In contrast to PL plot, this fnctn creates an double sampled fnctn that
% makes jumps (Status of: 2021-02-07)
%
% Introduced first in SolidGeometry 5.0
%
% See also: PLplotdiscretesample, PLplot, lplots
%
%
% h=PLplotdiscretetime(PL,[col,wth])
% === INPUT PARAMETERS ===
% PL: Signal [k x()]
% col: color similar to
% wth: with of line
% === OUTPUT RESULTS ======
% h: handle to plot
%
% EXAMPLE:
% SGfigure; PLplotdiscretetime([[0:20]',sin([0:20]/4)'],'b*-.',2); axis normal
%
% See also: PLplotdiscretesample, PLplot, lplots
%
%
%
% Copyright 2021 Tim C. Lueth

readtextfile(fname)- simply reads an ascii text file

readtextfile(fname)% readtextfile(fname) - simply reads an ascii text file
% (by Tim Lueth, VLFL-Lib, 2021-FEB-05 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGgcoderead, PosereadAPD, SGreadstructfile, writetextfile
%
% [TEXT,s,fname]=readtextfile([fname])
% === INPUT PARAMETERS ===
% fname: file name
% === OUTPUT RESULTS ======
% TEXT: ASCII content uin8 / char
% s: separator by newlin
% fname: filename
%
% EXAMPLE:
% readtextfile('/Volumes/LUETH-WIN/WIN AIM Matlab Libraries/SolidGeometry-Code/PLcircle.m')
%
% See also: SGgcoderead, PosereadAPD, SGreadstructfile, writetextfile
%
%
% Copyright 2021-2022 Tim C. Lueth

CPLdistance(CPLA,CPLB,d,lim)- calculates the distance between two contours after supplementing colinear points

CPLdistance(CPLA,CPLB,d,lim)% CPLdistance(CPLA,CPLB,d,lim) - calculates the distance between two contours after supplementing colinear points
% (by Tim Lueth, VLFL-Lib, 2021-FEB-04 as class: CLOSED POLYGON LISTS)
%
% Introduced first in SolidGeometry 5.0
%
% See also: CPLdisttopoint
%
% [dp,PLA,PLB]=CPLdistance(CPLA,CPLB,[d,lim])
% === INPUT PARAMETERS ===
% CPLA: Contour A
% CPLB: Contour B
% d: sample distance
% lim: if true d is limit not sample distance
% === OUTPUT RESULTS ======
% dp: minimal distance
% PLA: List of Points on CPLA (including auxiliary points)
% PLB: List of Points on CPLB (including auxiliary points)
%
% EXAMPLE:
% CPLdistance(CPLsample(22),PLcircle(6)+[34 10])
% CPLdistance(CPLsample(22),PLcircle(6)+[34 10],1)
%
% CPLdistance(CPLsample(22),PLcircle(6)+[34 50],1,true)
%
% CPLdistance(PLsquare(4),PLsquare(4)+[10 1],1),
% [d,ai,bi]=CPLdistance(PLsquare(4),PLsquare(4)+[10 1],1),
%
% See also: CPLdisttopoint
%
%
% Copyright 2021 Tim C. Lueth

CPLconnect(CPLA,CPLB,ma)- Creates a coonecting contour between two contour

CPLconnect(CPLA,CPLB,ma)% CPLconnect(CPLA,CPLB,ma) - Creates a coonecting contour between two contour
% (by Tim Lueth, VLFL-Lib, 2021-FEB-03 as class: CLOSED POLYGON LISTS)
%
% Introduced first in SolidGeometry 5.0
%
% See also: CPLfillgap
%
% CPLconnect(CPLA,[CPLB,ma])
% === INPUT PARAMETERS ===
% CPLA: Contour A
% CPLB: Contour A
% ma: minimal area for connection
%
% EXAMPLE:
% CPLconnect(CPLsample(9),'',40)
% CPLconnect(CPLsample(8),CPLsample(8)+[30 0],4)
%
% See also: CPLfillgap
%
%
% Copyright 2021 Tim C. Lueth

exp_2021_02_03_boxjoint(FN,line)- EXPERIMENT to create hinges for a hollow box

exp_2021_02_03_boxjoint(FN,line)% exp_2021_02_03_boxjoint(FN,line) - EXPERIMENT to create hinges for a hollow box
% (by Tim Lueth, VLFL-Lib, 2021-FEB-03 as class: EXPERIMENTS)
%
% Introduced first in SolidGeometry 5.0
%
% exp_2021_02_03_boxjoint([FN,line])
% === INPUT PARAMETERS ===
% FN: Frame of SGbox suc ahs X+
% line: cutting line in 'x' or 'y'
%
% EXAMPLE:
% exp_2021_02_03_boxjoint('Y-','x') % cuts along x axis of framee 'Y-'
% exp_2021_02_03_boxjoint('Y-','y') % cuts along y axis of framee 'Y-'
%
%
% Copyright 2021 Tim C. Lueth

PLhexalobular(D,Amin,ncalc)- returns a hexalobular Point list related to DIN ISO 10664:1999-09-01

PLhexalobular(D,Amin,ncalc)% PLhexalobular(D,Amin,ncalc) - returns a hexalobular Point list related to DIN ISO 10664:1999-09-01
% (by Tim Lueth, VLFL-Lib, 2021-FEB-03 as class: CLOSED POLYGON LISTS)
%
% This fnctn is used to create torx shaped pins (Status of: 2021-02-22)
%
% Introduced first in SolidGeometry 5.0
%
% See also: PLinbus, PLcircle, PLcircseg, PLevolvente, PLgearDIN,
% PLhelix, PLkidney, PLrand, PLspiral, PLsquare, PLstar, PLcircleoval,
% PLtubbing, PLarrow, CPLcirclesofPL
%
% PLC=PLhexalobular(D,[Amin,ncalc])
% === INPUT PARAMETERS ===
% D: Outer Diameter
% Amin: optional contour accuracy limit; default is 0.005mm^2
% ncalc: optional number of points to cal contour; default is at least 100
% === OUTPUT RESULTS ======
% PLC: Point List of Torx/hexalobular shape
%
% EXAMPLE:
% PLhexalobular(6.75); % Contour for a TORX 40
%
% See also: PLinbus, PLcircle, PLcircseg, PLevolvente, PLgearDIN,
% PLhelix, PLkidney, PLrand, PLspiral, PLsquare, PLstar, PLcircleoval,
% PLtubbing, PLarrow, CPLcirclesofPL
%
%
% Copyright 2021 Tim C. Lueth

SGiqknob(H,iqpar,RL)- returns a inch quarter knurled knob for inserting hexagon pin as bolt or shaft for mechanisms

SGiqknob(H,iqpar,RL)% SGiqknob(H,iqpar,RL) - returns a inch quarter knurled knob for inserting hexagon pin as bolt or shaft for mechanisms
% (by Tim Lueth, VLFL-Lib, 2021-FEB-02 as class: MODELING PROCEDURES)
%
% This fnctn and solid is part of the quarter inch mechanism family, that
% can be actuated by a standard hand drill with quarter inch bits.
% The pin is inserted using a transition fit
%
% This ist just a replacement for a real tool. I would recommend to
% better use a torque screw driver to hold a hexagon or hexalobular
% (torx) bit
% (Status of: 2021-02-14)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGiqpin, SGiqlink
%
% SGiqknob([H,iqpar,RL])
% === INPUT PARAMETERS ===
% H: Height default is 4 rings (16 mm)
% iqpar: [wall ring angle slfit('c')]; default is [2 2 pi/2 slfit('c')]
% RL: Wrench size diameter; default is 25.4/4 mm
%
% EXAMPLE:
% SGiqpin(16)
%
% See also: SGiqpin, SGiqlink
%
%
% Copyright 2021 Tim C. Lueth

SGiqpin(H,iqpar,RL)- returns a inch quarter hexagon pin as bolt or shaft for mechanisms

SGiqpin(H,iqpar,RL)% SGiqpin(H,iqpar,RL) - returns a inch quarter hexagon pin as bolt or shaft for mechanisms
% (by Tim Lueth, VLFL-Lib, 2021-FEB-02 as class: MODELING PROCEDURES)
%
% This fnctn and solid is part of the quarter inch mechanism family, that
% can be actuated by a standard hand drill with quarter inch bits.
% If the parts are 3D printed make sure that you may need on some
% machines an offset such as 2*slfit('t') of exchieve the same dimensions
% as a metal part
% (Status of: 2022-01-09)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGiqpin, SGiqknob, SGiqlink, SGsbpin
%
% SG=SGiqpin([H,iqpar,RL])
% === INPUT PARAMETERS ===
% H: Height default is 4 rings (16 mm)
% iqpar: [wall ring angle slfit('c')]; default is [2 2 pi/2 slfit('c')]
% RL: Wrench size diameter; default is 25.4/4 mm
% === OUTPUT RESULTS ======
% SG: Pin with Base frame and Follower frame
%
% EXAMPLE:
% SGiqpin(16)
%
% See also: SGiqpin, SGiqknob, SGiqlink, SGsbpin
%
%
% Copyright 2021-2022 Tim C. Lueth

SGTtrans0(SG,z0)- move the center of the solid into the origin of the coordinate system

SGTtrans0(SG,z0)% SGTtrans0(SG,z0) - move the center of the solid into the origin of the coordinate system
% (by Tim Lueth, VLFL-Lib, 2021-JAN-31 as class: KINEMATICS AND FRAMES)
%
% Should better be intergrated into SGtrans0 (Status of: 2021-10-13)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGtrans0
%
% SGN=SGTtrans0(SG,[z0])
% === INPUT PARAMETERS ===
% SG: Solid Geoemtry
% z0: if used, the minimal z value is this paremter z0
% === OUTPUT RESULTS ======
% SGN: Resulting Geometry with all frames modified
%
% EXAMPLE:
% SGTtrans0(SGbox,100)
%
% See also: SGtrans0
%
%
% Copyright 2021 Tim C. Lueth

SGread3MF(fname)- opens and reads a 3mf file with respect to the microsoft specification

SGread3MF(fname)% SGread3MF(fname) - opens and reads a 3mf file with respect to the microsoft specification
% (by Tim Lueth, VLFL-Lib, 2021-JAN-31 as class: SURFACES)
%
% the 3mf file is a zip file that contains a directory 3D in which an XML
% file named '3dmodel.model' is located. This file is read and
% interpreted in a simple way.
% (Status of: 2021-02-01)
%
% Introduced first in SolidGeometry 5.0
%
% See also: ms3Dmodel2SG, SGreadSTL
%
% text=SGread3MF(fname)
% === INPUT PARAMETERS ===
% fname: filename
% === OUTPUT RESULTS ======
% text: XML text
%
% See also: ms3Dmodel2SG, SGreadSTL
%
%
% Copyright 2021 Tim C. Lueth

lastuidir- returns the file parts of the last uiopend file

lastuidir% lastuidir - returns the file parts of the last uiopend file
% (by Tim Lueth, VLFL-Lib, 2021-JAN-31 as class: AUXILIARY PROCEDURES)
%
% lastuidir addresses the last opend file in the editor bu uiopen (drag
% and drop into the command window) (Status of: 2022-05-18)
%
% Introduced first in SolidGeometry 5.0
%
% See also: lasttouchedSG, imreadlastchanged
%
% [fp,fn,fe]=lastuidir
% === OUTPUT RESULTS ======
% fp: file path plus filesep
% fn: file name
% fe: file extension
%
% See also: lasttouchedSG, imreadlastchanged
%
%
% Copyright 2021-2022 Tim C. Lueth

exp_2021_01_31_link(rs,sl,a)- EXPERIMENT to create a playfree double axial beared joint with a defined distance

exp_2021_01_31_link(rs,sl,a)% exp_2021_01_31_link(rs,sl,a) - EXPERIMENT to create a playfree double axial beared joint with a defined distance
% (by Tim Lueth, VLFL-Lib, 2021-JAN-31 as class: EXPERIMENTS)
%
% Introduced first in SolidGeometry 5.0
%
% See also: exp_2021_01_28_insertRjoint
%
% exp_2021_01_31_link([rs,sl,a])
% === INPUT PARAMETERS ===
% rs: oversize of rings
% sl: slot distance default is 'c'
% a: angle default is 90 degree
%
% See also: exp_2021_01_28_insertRjoint
%
%
% Copyright 2021 Tim C. Lueth

SGwritetable(fname,Tab,Comm,fsort)- writes a table similar to writetable

SGwritetable(fname,Tab,Comm,fsort)% SGwritetable(fname,Tab,Comm,fsort) - writes a table similar to writetable
% (by Tim Lueth, VLFL-Lib, 2021-JAN-30 as class: FILE HANDLING)
%
% Introduced first in SolidGeometry 5.0
%
% See also: writetable
%
% SGwritetable([fname,Tab,Comm,fsort])
% === INPUT PARAMETERS ===
% fname: full filename
% Tab: table to write
% Comm: Comment lines
% fsort: if true, the fnctn tries to sort the table first
%
% EXAMPLE:
% SGwritetable('test.xls',array2tableTL([1 2 3 4],'A','B','C','D'),{'this is a a comment'})
%
% See also: writetable
%
%
% Copyright 2021 Tim C. Lueth

SGanycubicPredatorCoverPMMA- calculates size and testing elements for the plexi glas shielding for the Anycubic predator

SGanycubicPredatorCoverPMMA% SGanycubicPredatorCoverPMMA - calculates size and testing elements for the plexi glas shielding for the Anycubic predator
% (by Tim Lueth, VLFL-Lib, 2021-JAN-30 as class: MODELING PROCEDURES)
%
% Can also be used to design the bow for a crossbow. In Amazon Baisc PLA
% white considerable restoring force (Status of: 2021-02-20)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGanycubicPredatorCover
%
% SGanycubicPredatorCoverPMMA
%
% See also: SGanycubicPredatorCover
%
%
% Copyright 2021 Tim C. Lueth

SGreadtable(fname)- This fnct reads in EXCEL tables with comments

SGreadtable(fname)% SGreadtable(fname) - This fnct reads in EXCEL tables with comments
% (by Tim Lueth, VLFL-Lib, 2021-JAN-29 as class: AUXILIARY PROCEDURES)
%
% Lines that have a % character in column 1 are evaluated as comment lines
% Lines that contain a date are converted to a string
% Lines that contain numbers are converted to doubles
% https://www.befestigungsfuchs.de/blog/wp-content/uploads/2011/12/Cheats
% heet-Schraube-abgerissen-oder-rundgedreht.pdf
% (Status of: 2021-11-25)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGgcoderead, readtable, SGwritetable
%
% [Tab,VNames,CTab]=SGreadtable([fname])
% === INPUT PARAMETERS ===
% fname: filename of excel file
% === OUTPUT RESULTS ======
% Tab: Table
% VNames: Variable Names
% CTab: Comment lines, cell list
%
% EXAMPLE:
% SGreadtable('/Volumes/LUETH-WIN/WIN AIM Matlab Libraries/SolidGeometry-Code/DIN4AMtemperature.xls')
%
% See also: SGgcoderead, readtable, SGwritetable
%
%
% Copyright 2021 Tim C. Lueth

exp_2021_01_28_insertRjoint(rs,sl,a)- Motor experiment with 1/4 Inch connector, printer assembled

exp_2021_01_28_insertRjoint(rs,sl,a)% exp_2021_01_28_insertRjoint(rs,sl,a) - Motor experiment with 1/4 Inch connector, printer assembled
% (by Tim Lueth, VLFL-Lib, 2021-JAN-27 as class: EXPERIMENTS)
%
% The reason for this third experiment is that driving-in the shaft was
% only possible up to a ring diameter of 0.5 mm. In fact, after driving
% in, the shaft is secured against falling out and can be turned
% manually. (So for manual four-joints this solution makes sense exp_26).
% If, however, a drilling machine is used for the drive, the plastic
% rings are worn away by friction within a few revolutions and the axial
% locking fails. The radial enlargement of the ring provides too much
% static friction and causes destruction/deformation of the 1/4 inch
% bushing for the drilling machine (exp_27). It was therefore necessary
% to correct the contour of the pin ring and perform experiments again
% with clearly defined gaps between shaft and bushing. The value rs
% indicates height of the wedge-shaped ring, the value sl indicates the
% distance between shaft and bushing.On 28.01.2021, the test was
% successful with a 2mm and 0.4mm and 60 degree opening using a Bosch PSB
% 18Li-2 akku drilling machine as drive (Status of: 2021-01-28)
%
% Introduced first in SolidGeometry 5.0
%
% exp_2021_01_28_insertRjoint([rs,sl,a])
% === INPUT PARAMETERS ===
% rs: radius of the
% sl: Distance between sleeve and Pin, default slfit('t')
% a: opening agnle; default is 60 degree
%
% EXAMPLE:
% exp_2021_01_28_insertRjoint(2,slfit('c'),pi/180*60)
%
%
% Copyright 2021 Tim C. Lueth

exp_2021_01_27_insertRjoint- Motor experiment with 1/4 Inch connector, printer assembled

exp_2021_01_27_insertRjoint% exp_2021_01_27_insertRjoint - Motor experiment with 1/4 Inch connector, printer assembled
% (by Tim Lueth, VLFL-Lib, 2021-JAN-27 as class: EXPERIMENTS)
%
% Works but the size of the inner ring must be bigger for the motor power
% (Status of: 2021-01-28)
%
% Introduced first in SolidGeometry 5.0
%
% See also: exp_2021_01_26_insertRjoint, exp_2021_01_28_insertRjoint
%
% exp_2021_01_27_insertRjoint
%
% See also: exp_2021_01_26_insertRjoint, exp_2021_01_28_insertRjoint
%
%
% Copyright 2021 Tim C. Lueth

hexstr2str(hs,len)- converts a uint8 string into a hex string array

hexstr2str(hs,len)% hexstr2str(hs,len) - converts a uint8 string into a hex string array
% (by Tim Lueth, VLFL-Lib, 2021-JAN-26 as class: AUXILIARY PROCEDURES)
%
% This fnctn is helpful in combination with str2codelines to integrate
% default content for special format files to write such as DXF into an m
% fnctn
% mainly written for the use in CPLwriteDXF in combination with
% str2codelines (Status of: 2021-01-26)
%
% Introduced first in SolidGeometry 5.0
%
% See also: str2codelines, str2hexsstr, CPLwriteDXF
%
% text=hexstr2str([hs,len])
% === INPUT PARAMETERS ===
% hs: rows
% len: hex numbers per row ; default is 40 (80 chars)
% === OUTPUT RESULTS ======
% text: String array with [... x len] chars
%
% EXAMPLE:
% hs=str2hexsstr('The quick brown fox jumps over the lazy dog')
% str2codelines(hs)
% char(hexstr2str(hs')) % make shure that hs is a row vector
%
% See also: str2codelines, str2hexsstr, CPLwriteDXF
%
%
% Copyright 2021 Tim C. Lueth

exp_2021_01_26_insertRjoint- Motor experiment with 1/4 Inch connector, printer separatetly

exp_2021_01_26_insertRjoint% exp_2021_01_26_insertRjoint - Motor experiment with 1/4 Inch connector, printer separatetly
% (by Tim Lueth, VLFL-Lib, 2021-JAN-26 as class: EXPERIMENTS)
%
% Works but the size of the inner ring must be bigger for the motor power
% (Status of: 2021-01-27)
%
% Introduced first in SolidGeometry 5.0
%
% See also: exp_2021_01_27_insertRjoint, exp_2021_01_28_insertRjoint
%
% exp_2021_01_26_insertRjoint
%
% See also: exp_2021_01_27_insertRjoint, exp_2021_01_28_insertRjoint
%
%
% Copyright 2021 Tim C. Lueth

str2hexsstr(text,len)- converts a uint8 string into a hex string array

str2hexsstr(text,len)% str2hexsstr(text,len) - converts a uint8 string into a hex string array
% (by Tim Lueth, VLFL-Lib, 2021-JAN-26 as class: AUXILIARY PROCEDURES)
%
% This fnctn is helpful in combination with str2codelines to integrate
% default content for special format files to write such as DXF into an m
% fnctn (Status of: 2021-01-26)
%
% Introduced first in SolidGeometry 5.0
%
% See also: str2codelines, hexstr2str
%
% TT=str2hexsstr([text,len])
% === INPUT PARAMETERS ===
% text: char array or uint8 array to convert into hex
% len: hex numbers per row ; default is 40 (80 chars)
% === OUTPUT RESULTS ======
% TT: String array with [... x len] chars
%
% EXAMPLE:
% hs=str2hexsstr('The quick brown fox jumps over the lazy dog')
% str2codelines(hs)
%
% See also: str2codelines, hexstr2str
%
%
% Copyright 2021 Tim C. Lueth

CPL2DXF(CPL,pcnt)- Returns LWPOLYLINE strings with increasing object number

CPL2DXF(CPL,pcnt)% CPL2DXF(CPL,pcnt) - Returns LWPOLYLINE strings with increasing object number
% (by Tim Lueth, VLFL-Lib, 2021-JAN-26 as class: CLOSED POLYGON LISTS)
%
% ATTENTION: This fnctn works different if called with pcnt==76; (Status
% of: 2021-01-26)
%
% Introduced first in SolidGeometry 5.0
%
% See also: CPLwriteSVG, CPLwriteDXF
%
% texta=CPL2DXF([CPL,pcnt])
% === INPUT PARAMETERS ===
% CPL: CPL to convert into LWPOLYLINEs
% pcnt: already existing number of objects; default is 76
% === OUTPUT RESULTS ======
% texta: textstring for inserting into DXF file
%
% EXAMPLE:
% CPL2DXF(CPLsample(9),0)
% CPL2DXF(CPLsample(9)) % first LWPOLYLINE command is missing
%
% See also: CPLwriteSVG, CPLwriteDXF
%
%
% Copyright 2021 Tim C. Lueth

CPLwriteDXF(CPL,fname,fcl)- writes a 2D DXF File from a CPL

CPLwriteDXF(CPL,fname,fcl)% CPLwriteDXF(CPL,fname,fcl) - writes a 2D DXF File from a CPL
% (by Tim Lueth, VLFL-Lib, 2021-JAN-25 as class: CLOSED POLYGON LISTS)
%
% Developed using LibreCad 2.1.3
% Thanks to Konstantin Struebig for his help using inkscape and autodesk
% fusion for testing the files.
% This fnctn works in correlation with CPL2DXF and the first contur has
% the id 4D (77dec) per default
% Konstantin Struebig also recommends the company LST Laserschneidtechnik
% GmbH, Carl-von-Linde-Str. 19, 85748 Garching b. Muenchen. Tel.
% 089-3684977-0 or info@lst-gmbh.com. Stahl up to 20mm, stainless steel
% up to 15mm, aluminum up to 10mm, plates up to a maximum of 2m x 4m.
% Prices: Set-up costs (Jan 2021) 25 Euro/plate, material 5mm x 65 x 30
% approx. 2 Euro, 2.5mm 45 x 30 approx. 1 Euro. (Status of: 2021-01-26)
%
% Introduced first in SolidGeometry 5.0
%
% See also: CPLwriteSVG, CPL2DXF
%
% LITERATURE:
% Martin Margreiter (2008): "Visualization and Processing of Building
% Structures for Person Flow Simulations', Bachelor Thesis in Computation
% in Engineering, FAKULTÄT FÜR BAUINGENIEUR- UND VERMESSUNGSWESEN,
% TECHNICAL UNIVERSITY OF MUNICH
%
% [fname,text]=CPLwriteDXF([CPL,fname,fcl])
% === INPUT PARAMETERS ===
% CPL: CPL
% fname: optional file name for write; default path is desktop
% fcl: force contour close; default is true
% === OUTPUT RESULTS ======
% fname: filename of DXF file
% text: written text in file
%
% EXAMPLE:
% CPLwriteDXF(PLcircle(100))
% CPLwriteDXF(CPLsample(21))
%
% See also: CPLwriteSVG, CPL2DXF
%
%
% Copyright 2021 Tim C. Lueth

SGanycubicPredatorCover- This fnct was made to motivate Markus Wörl

SGanycubicPredatorCover% SGanycubicPredatorCover - This fnct was made to motivate Markus Wörl
% (by Tim Lueth, VLFL-Lib, 2021-JAN-25 as class: MODELING PROCEDURES)
%
% To create a plexiglas cover for the anycubic predator printer, three
% upper connectors and three lower conncector are required (Status of:
% 2021-01-26)
%
% Introduced first in SolidGeometry 5.0
%
% See also: exp_2021_01_16_xblockfix, SGanycubicPredatorCoverPMMA
%
% SGall=SGanycubicPredatorCover
% === OUTPUT RESULTS ======
% SGall: Final Solid
%
% EXAMPLE:
% SGanycubicPredatorCover
%
% See also: exp_2021_01_16_xblockfix, SGanycubicPredatorCoverPMMA
%
%
% Copyright 2021 Tim C. Lueth

CPLfourbarcontour(L)- Contour that fullfills a fourbar condition

CPLfourbarcontour(L)% CPLfourbarcontour(L) - Contour that fullfills a fourbar condition
% (by Tim Lueth, VLFL-Lib, 2021-JAN-25 as class: CLOSED POLYGON LISTS)
%
% The contour is always selected where the contor approximately spans the
% largest area.
% Animate using:
% fourBarLinkageanimate(CPLfourbarcontour([80,90,100,100])) (Status of:
% 2021-12-11)
%
% Introduced first in SolidGeometry 5.0
%
% See also: fourBarplotPoints, fourBarLinkageanimate
%
% CPL=CPLfourbarcontour([L])
% === INPUT PARAMETERS ===
% L: [L1 L2 L3 L4]; default is [78,33,112,33]
% === OUTPUT RESULTS ======
% CPL: Points list
%
% EXAMPLE:
% CPLfourbarcontour ([200,80,100,80])
% SGfigure; fourBarplotPoints(CPLfourbarcontour ([200,80,100,80]),'','','',TofR(rot(pi/4),[40 40]));
%
%
% See also: fourBarplotPoints, fourBarLinkageanimate
%
%
% Copyright 2021-2022 Tim C. Lueth

linearinterp(tab,x,col)- linear interpolation

linearinterp(tab,x,col)% linearinterp(tab,x,col) - linear interpolation
% (by Tim Lueth, VLFL-Lib, 2021-JAN-25 as class: AUXILIARY PROCEDURES)
%
% First use in exp_2021_01_25_convolution to explain the death table
% changed in long term by population demography changes and deat rate per
% age
% CORONA induced fnctn (Status of: 2021-02-07)
%
% Introduced first in SolidGeometry 5.0
%
% See also: exp_2021_01_25_convolution
%
% y=linearinterp(tab,x,[col])
% === INPUT PARAMETERS ===
% tab: table or array
% x: [n x 1] row list of sample or a single value
% col: column to use for interpolation of x
% === OUTPUT RESULTS ======
% y: complete table row for interpolated x
%
% EXAMPLE:
% linearinterp([0 10;0 20]',pi)
% linearinterp([0:1:10;0:2:20]',pi)
% linearinterp([0:1:100;sin((0:2:200)/10)]',pi)
% linearinterp(array2table([0:1:100;sin((0:2:200)/10)]','VariableNames',{'k','sin(k)'}),pi)
%
% See also: exp_2021_01_25_convolution
%
%
% Copyright 2021-2022 Tim C. Lueth

exp_2021_01_25_convolution(num)- EXPERIMENT to exaplin the demographic change

exp_2021_01_25_convolution(num)% exp_2021_01_25_convolution(num) - EXPERIMENT to exaplin the demographic change
% (by Tim Lueth, VLFL-Lib, 2021-JAN-25 as class: EXPERIMENTS)
%
% Introduced first in SolidGeometry 5.0
%
% exp_2021_01_25_convolution([num])
% === INPUT PARAMETERS ===
% num:
%
%
% Copyright 2021 Tim C. Lueth

DIN4AMtemperature(quest)- request for tested printing temperatures

DIN4AMtemperature(quest)% DIN4AMtemperature(quest) - request for tested printing temperatures
% (by Tim Lueth, VLFL-Lib, 2021-JAN-24 as class: MECHANICAL PROCEDURES)
%
% This fnctn creates an excel sheet that can be modified by the user
% 'DIN4AMtemperature.xls'
% when called the first time, or when this file is not found in the
% search path
% (Status of: 2021-01-24)
%
% Introduced first in SolidGeometry 5.0
%
% See also: DIN4AMfitting, readtable2code
%
% answ=DIN4AMtemperature([quest])
% === INPUT PARAMETERS ===
% quest: known informaiton as cell list such
% === OUTPUT RESULTS ======
% answ: table entry
%
% EXAMPLE:
% DIN4AMtemperature('white')
%
% See also: DIN4AMfitting, readtable2code
%
%
% Copyright 2021 Tim C. Lueth

readtable2code (fname)- reads tables and creates strings in the command window that can be used as code in matlab m files

readtable2code (fname)% readtable2code (fname) - reads tables and creates strings in the command window that can be used as code in matlab m files
% (by Tim Lueth, VLFL-Lib, 2021-JAN-24 as class: LANGUAGE PROCEDURES)
%
% Helpful to insert EXCEL Sheet information in m files (Status of:
% 2021-01-24)
%
% Introduced first in SolidGeometry 5.0
%
% See also: DIN4AMtemperature
%
% readtable2code(fname)
% === INPUT PARAMETERS ===
% fname: file name of a table such as "temptable.xls"
%
% EXAMPLE:
% readtable2code('DIN4AMtemperature.xls')
%
% See also: DIN4AMtemperature
%
%
% Copyright 2021 Tim C. Lueth

SGfourbarlinkage2021(LA,LB,LC,LD,ns,fi,LV)- EXPERIMENT TO CREATE 4BAR LINKAGES FOR FRANZ IRLINGER

SGfourbarlinkage2021(LA,LB,LC,LD,ns,fi,LV)% SGfourbarlinkage2021(LA,LB,LC,LD,ns,fi,LV) - EXPERIMENT TO CREATE 4BAR LINKAGES FOR FRANZ IRLINGER
% (by Tim Lueth, VLFL-Lib, 2021-JAN-24 as class: PARAMETRIC DESIGN)
%
% In contrast to SGfourbarlinkage, this fnctn creates a quite stiff
% fourbar-linkage with 6mm bolts.
% Printed in many different configurations, Works reliable down to D4
% bolts and sometime to D3 bolts. (Status of: 2021-01-25)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGfourbarlinkage, SGfourbarlinkage2019, fourBarLinkageplotanim
%
% SGall=SGfourbarlinkage2021([LA,LB,LC,LD,ns,fi,LV])
% === INPUT PARAMETERS ===
% LA: Length A
% LB: Length B
% LC: Length C
% LD: Length D
% ns: solution angle' default is 1st
% fi: 'c' or 't' for fitting; default is 't'
% LV: Level; default is [0 1 2 1]
% === OUTPUT RESULTS ======
% SGall: 4 Links and 6 Pins to create the linkage
%
% EXAMPLE:
% SGfigure; fourBarLinkageplotanim([120,30,100,80])
% SGfourbarlinkage2021(120,30,80,80,7)
% SGfourbarlinkage2021(120,30,80,80,7,'c'); % more play in the joints
% SGfourbarlinkage2021(120,30,80,80,7,'t',[0 1 2 3])
%
%
% See also: SGfourbarlinkage, SGfourbarlinkage2019, fourBarLinkageplotanim
%
%
% Copyright 2021 Tim C. Lueth

exp_2021_01_20_4barfranz(LA,LB,LC,LD,ns,fi)- EXPERIMENT TO CREATE 4BAR LINKAGES FOR FRANZ IRLINGER

exp_2021_01_20_4barfranz(LA,LB,LC,LD,ns,fi)% exp_2021_01_20_4barfranz(LA,LB,LC,LD,ns,fi) - EXPERIMENT TO CREATE 4BAR LINKAGES FOR FRANZ IRLINGER
% (by Tim Lueth, VLFL-Lib, 2021-JAN-20 as class: EXPERIMENTS)
%
% In contrast to SGfourbarlinkage, this fnctn creates a quite stiff
% fourbar-linkage with 6mm bolts.
% Printed in many different configurations, Works reliable down to D4
% bolts and sometime to D3 bolts. (Status of: 2021-01-23)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGfourbarlinkage, SGfourbarlinkage2019, SGfourbarlinkage2021
%
% SGall=exp_2021_01_20_4barfranz([LA,LB,LC,LD,ns,fi])
% === INPUT PARAMETERS ===
% LA: Length A
% LB: Length B
% LC: Length C
% LD: Length D
% ns: solution angle' default is 1st
% fi: 'c' or 't' for fitting; default is 't'
% === OUTPUT RESULTS ======
% SGall: 4 Links and 6 Pins to create the linkage
%
% EXAMPLE:
% exp_2021_01_20_4barfranz(120,30,80,80,7)
% exp_2021_01_20_4barfranz(120,30,80,80,7,'c'); % more play in the joints
%
% See also: SGfourbarlinkage, SGfourbarlinkage2019, SGfourbarlinkage2021
%
%
% Copyright 2021 Tim C. Lueth

SGpinring(H,R,a,n,ol,os)- Returns the shape of a ring or a blade to create revolute joints

SGpinring(H,R,a,n,ol,os)% SGpinring(H,R,a,n,ol,os) - Returns the shape of a ring or a blade to create revolute joints
% (by Tim Lueth, VLFL-Lib, 2021-JAN-20 as class: MODELING PROCEDURES)
%
% For Shafts use os=0
% For Blades use os>0
% (Status of: 2021-01-31)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGpincountersink
%
% SG=SGpinring([H,R,a,n,ol,os])
% === INPUT PARAMETERS ===
% H: List of height segments [h1 h2 h3]
% R: [Ri Ro] default is Ro=Ri+slfit(c)
% a: angle; default is pi/180*60
% n: number od edges; default is nofrd
% ol: optional oversize at floor and top; default is 0;
% os: optional oversize to create Blades in a distance; default is 0
% === OUTPUT RESULTS ======
% SG: Solid geometry to print or subtract
%
% EXAMPLE:
% SGpinring([5 10 5], [3 3.5], '',4)
% SGpinring([5 10 5],'','','',-1)
% SGpinring([5 10 5],'','','',+5,1) % Creation of Blade with distance 1 and elongation of 5
% SGpinring('','','','',-2,1)
%
% See also: SGpincountersink
%
%
% Copyright 2021 Tim C. Lueth

PLpinring(H,R,a,o)- returns the contour of a SGpinring

PLpinring(H,R,a,o)% PLpinring(H,R,a,o) - returns the contour of a SGpinring
% (by Tim Lueth, VLFL-Lib, 2021-JAN-20 as class: CLOSED POLYGON LISTS)
%
% Introduced first in SolidGeometry 5.0
%
% See also: PLshaft, SGpinring
%
% PL=PLpinring([H,R,a,o])
% === INPUT PARAMETERS ===
% H: List of height segments [h1 h2 h3]
% R: [Ri Ro] default is Ro=Ri+slfit(c)
% a: angle; default is pi/180*60
% o: buffer, oversize for blade shapes; default is 0;
% === OUTPUT RESULTS ======
% PL: Point list to be rotated
%
% EXAMPLE:
% PLpinring([5 10 5], [3 3.5], pi/2)
% PLpinring([5 10 5], [3 3.5], pi/2,0.5) % plus oversize of 0.5 as distance
%
% See also: PLshaft, SGpinring
%
%
% Copyright 2021 Tim C. Lueth

SGscriptfileexecution- simplified interface for a stand alone version of the SG-Lib 5.0

SGscriptfileexecution% SGscriptfileexecution - simplified interface for a stand alone version of the SG-Lib 5.0
% (by Tim Lueth, VLFL-Lib, 2021-JAN-17 as class: LANGUAGE PROCEDURES)
%
% Colleagues like Franz Irlinger want to use SG-Lib as a stand-alone app
% without installing SG-Lib. This is an attempt to offer a mini-Matlab
% version as stand-alone script language
%
% This fnctn creates a file called SGscriptfile.txt that can be edited by
% any text editor. The fnctn SGscriptfileexecution just reads the file an
% executes the lines, if there is no comment char (Status of: 2021-01-17)
%
% Introduced first in SolidGeometry 5.0
%
% SGscriptfileexecution
%
%
% Copyright 2021 Tim C. Lueth

exp_2021_01_16_xblockfix- Addon- for Anycubic Predator

exp_2021_01_16_xblockfix% exp_2021_01_16_xblockfix - Addon- for Anycubic Predator
% (by Tim Lueth, VLFL-Lib, 2021-JAN-16 as class: EXPERIMENTS)
%
% With a 2mm drill bit and 2.6mm self-tapping screws, the housing can be
% mounted to a 3D printer.
%
% https://www.amazon.de/gp/product/B07JMTW1YD/ (Status of: 2021-01-26)
%
% Introduced first in SolidGeometry 5.0
%
% See also: https://www.amazon.de/gp/product/B07JMTW1YD/
%
% exp_2021_01_16_xblockfix
%
% See also: https://www.amazon.de/gp/product/B07JMTW1YD/
%
%
% Copyright 2021 Tim C. Lueth

dbreturn(var2base)- this is a fnct Mathworks should implement for debugging reasons

dbreturn(var2base)% dbreturn(var2base) - this is a fnct Mathworks should implement for debugging reasons
% (by Tim Lueth, VLFL-Lib, 2021-JAN-16 as class: LANGUAGE PROCEDURES)
%
% The orignal debug fnctns are
% keyboard, dbcont, dbstop, dbquit, dbstack
%
% (Status of: 2021-11-02)
%
% Introduced first in SolidGeometry 5.0
%
% See also: dbprintf, dbexit, dbsave, dbprintmode
%
% dbreturn([var2base])
% === INPUT PARAMETERS ===
% var2base: list of variables that should be in the workspace after return
%
% EXAMPLE: works only in funct
% testvar=4;
% dbreturn(testvar); % stops and creates testvar in workspace
%
% See also: dbprintf, dbexit, dbsave, dbprintmode
%
%
% Copyright 2021 Tim C. Lueth

zofBB(BB)- simple fnct to create a height of a bounding box

zofBB(BB)% zofBB(BB) - simple fnct to create a height of a bounding box
% (by Tim Lueth, VLFL-Lib, 2021-JAN-16 as class: AUXILIARY PROCEDURES)
%
% try 'x, y, z, xmax, xmin, ymax, ymin, zmax, zmin'
% (Status of: 2021-01-16)
%
% Introduced first in SolidGeometry 5.0
%
% See also: sofBB
%
% z=zofBB(BB)
% === INPUT PARAMETERS ===
% BB: BB or solid
% === OUTPUT RESULTS ======
% z: height of a bounding box
%
% EXAMPLE:
% zofBB(SGbox)
% zofBB(SGbox,'xmin')
%
% See also: sofBB
%
%
% Copyright 2021-2022 Tim C. Lueth

num2strUP(instr,unit,dig,cut0)- creates a string containing a unit prefix

num2strUP(instr,unit,dig,cut0)% num2strUP(instr,unit,dig,cut0) - creates a string containing a unit prefix
% (by Tim Lueth, VLFL-Lib, 2021-JAN-16 as class: AUXILIARY PROCEDURES)
%
% In many graphical outputs, numbers in type 1e-5 are unfortunate because
% they are difficult to read. Likewise with time specifications the range
% under 120 seconds is represented differently than over 120 seconds.
% This fnctn generates unit prefixes considering some peculiarities
% https://de.wikipedia.org/wiki/Vorsätze_für_Maßeinheiten (Status of:
% 2021-02-08)
%
% Introduced first in SolidGeometry 5.0
%
% See also: datestr, num2str, meanGauss, roundgauss, num2strCNT
%
% sstr=num2strUP(instr,[unit,dig,cut0])
% === INPUT PARAMETERS ===
% instr: number or string
% unit: number unit such as "Pa" or 's' or 'sec'
% dig: digits behind comma
% cut0: if true, ending zeros are cut; default is false
% === OUTPUT RESULTS ======
% sstr: final number string
%
% EXAMPLE:
% s=num2strUP(12300,'Pa',3) % 3 Digits in Pascal
% s=num2strUP(12300,'Pa',3,true) % 3 Digits in Pascal with cut zeros
% s=num2strUP(exp(1)*1234,'Pa',3) % 3 Digits in Pascal
% s=num2strUP(exp(1)/1234,'Pa',3) % 3 Digits in Pascal
% s=num2strUP(exp(1)*1234,'sec',3) % 3 Digits in Seconds
% s=num2strUP(exp(1)/1234,'sec',3) % 3 Digits in Seconds
%
% See also: datestr, num2str, meanGauss, roundgauss, num2strCNT
%
%
% Copyright 2021-2022 Tim C. Lueth

randdice()- same as rand but only numbers between 1 and 6

randdice()% randdice() - same as rand but only numbers between 1 and 6
% (by Tim Lueth, VLFL-Lib, 2021-JAN-15 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: rand, randnorm, normrand, meanGauss
%
% rd=randdice([])
% === OUTPUT RESULTS ======
% rd: equal distributed random numbers between 1 6
%
% EXAMPLE:
% x=randdice(100000,1); meanGauss(x)
%
% See also: rand, randnorm, normrand, meanGauss
%
%
% Copyright 2021 Tim C. Lueth

randnorm(r,c,m,s)- same as normrnd but a different argument more than rand

randnorm(r,c,m,s)% randnorm(r,c,m,s) - same as normrnd but a different argument more than rand
% (by Tim Lueth, VLFL-Lib, 2021-JAN-15 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: rand, randdice, normrand, meanGauss
%
% y=randnorm([r,c,m,s])
% === INPUT PARAMETERS ===
% r: rows
% c: cols; default is r
% m: mean
% s: standard deviation
% === OUTPUT RESULTS ======
% y: random numbers
%
% EXAMPLE:
% randnorm(6,1)
% randnorm(6,1,100,5)
% randnorm(6,1,100,5); meanGauss(ans)
%
% See also: rand, randdice, normrand, meanGauss
%
%
% Copyright 2021 Tim C. Lueth

erfinvGauss(x)- returns the inverse error fnct for the Gaussian distribution

erfinvGauss(x)% erfinvGauss(x) - returns the inverse error fnct for the Gaussian distribution
% (by Tim Lueth, VLFL-Lib, 2021-JAN-14 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: meanGauss, erfGauss
%
% y=erfinvGauss(x)
% === INPUT PARAMETERS ===
% x: probability
% === OUTPUT RESULTS ======
% y: sigma value
%
% EXAMPLE:
% erfinvGauss(0.01) % sigma for 1 percent
%
% See also: meanGauss, erfGauss
%
%
% Copyright 2021 Tim C. Lueth

erfGauss(x)- returns the error fnct for the Gaussian distribution

erfGauss(x)% erfGauss(x) - returns the error fnct for the Gaussian distribution
% (by Tim Lueth, VLFL-Lib, 2021-JAN-14 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: meanGauss, erfinvGauss
%
% y=erfGauss(x)
% === INPUT PARAMETERS ===
% x: normalized t value (1 = 1 sigma) (X-Xref)/s
% === OUTPUT RESULTS ======
% y: error probability (for negative values)
%
% EXAMPLE:
% erfGauss(-2); SGfigurepapermode
%
% See also: meanGauss, erfinvGauss
%
%
% Copyright 2021 Tim C. Lueth

meanGauss(x,Xref)- returns mean and standard deviation wrt accuracy aspects

meanGauss(x,Xref)% meanGauss(x,Xref) - returns mean and standard deviation wrt accuracy aspects
% (by Tim Lueth, VLFL-Lib, 2021-JAN-14 as class: AUXILIARY PROCEDURES)
%
% in experimental measuremets we expect that the result are statistical
% distributed. The high number of digitals of our devices leads to the
% error of specifying the results with too many digits and thus
% specifying a high precision (certainty of the statement). This fnctn
% reduces the number of valid digits to the standardized specification
% (Status of: 2021-01-15)
%
% Introduced first in SolidGeometry 5.0
%
% See also: erfGauss, erfinvGauss, roundgauss, num2strUP
%
% [X,ss,sx,se]=meanGauss(x,[Xref])
% === INPUT PARAMETERS ===
% x: Test (sample) List
% Xref: optional reference value for t-test
% === OUTPUT RESULTS ======
% X: Mean Value
% ss: Standard deviation
% sx: Standard deviation of X
% se: error value for deviation
%
% EXAMPLE:
% x=normrnd(200,1,[3,1]); meanGauss(x,202);
% x=randdice(100000,1); meanGauss(x)
% x=rand(100000,1); meanGauss(x)
% x=normrnd(3.5,1.7,[100000,1]); meanGauss(x)
% x=randnorm(100000,1); meanGauss(x)
%
%
% See also: erfGauss, erfinvGauss, roundgauss, num2strUP
%
%
% Copyright 2021 Tim C. Lueth

Videoquickcloseandopen(vw)- Simple concept to create videos from figures

Videoquickcloseandopen(vw)% Videoquickcloseandopen(vw) - Simple concept to create videos from figures
% (by Tim Lueth, VLFL-Lib, 2021-JAN-11 as class: VISUALIZATION)
%
% This is a simplified concept for the more complex "imageVideo..." fnctns
% Videoquickstart
% Videoquickwritetitle
% Videoquickwritegcf
% Videoquickcloseandopen
% (Status of: 2021-12-06)
%
% Introduced first in SolidGeometry 5.0
%
% See also: drawnowvid, Videoquickwritetextpage, Videoquickstart,
% Videoquickwritegcf
%
% Videoquickcloseandopen(vw)
% === INPUT PARAMETERS ===
% vw: video writer
%
% See also: drawnowvid, Videoquickwritetextpage, Videoquickstart,
% Videoquickwritegcf
%
%
% Copyright 2021 Tim C. Lueth

Videoquickwritegcf(vw,I,n)- Simple concept to create videos from figures

Videoquickwritegcf(vw,I,n)% Videoquickwritegcf(vw,I,n) - Simple concept to create videos from figures
% (by Tim Lueth, VLFL-Lib, 2021-JAN-11 as class: VISUALIZATION)
%
% CONSIDER USING drawnowvid
% This is a simplified concept for the more complex "imageVideo..." fnctns
% Videoquickstart
% Videoquickwritetitle
% Videoquickwritegcf
% Videoquickcloseandopen
% (Status of: 2021-12-06)
%
% Introduced first in SolidGeometry 5.0
%
% See also: drawnowvid, Videoquickcloseandopen, Videoquickwritetextpage,
% Videoquickstart
%
% Videoquickwritegcf(vw,[I,n])
% === INPUT PARAMETERS ===
% vw: video writer
% I: Image to write; default is I=getframe(gcf);
% n: number of frames; default is 1
%
% See also: drawnowvid, Videoquickcloseandopen, Videoquickwritetextpage,
% Videoquickstart
%
%
% Copyright 2021 Tim C. Lueth

Videoquickwritetextpage(vw,text,sec,reso);- Simple concept to create videos from figures

Videoquickwritetextpage(vw,text,sec,reso);% Videoquickwritetextpage(vw,text,sec,reso); - Simple concept to create videos from figures
% (by Tim Lueth, VLFL-Lib, 2021-JAN-11 as class: VISUALIZATION)
%
% This is a simplified concept for the more complex "imageVideo..." fnctns
% Videoquickstart
% Videoquickwritetextpage
% Videoquickwritegcf
% Videoquickcloseandopen
% drawnowvid (Status of: 2021-12-06)
%
% Introduced first in SolidGeometry 5.0
%
% See also: drawnowvid, Videoquickcloseandopen, Videoquickstart,
% Videoquickwritegcf
%
% Videoquickwritetextpage([vw,text,sec,reso]);
% === INPUT PARAMETERS ===
% vw: video writer
% text: Title of video; default is name of caller
% sec: number of seconds; default is 0.8
% reso: size; default is global Videoquick_vw size
%
% EXAMPLE:
% Videoquickstart('test'); Videoquickwritetextpage; Videoquickcloseandopen;
% Videoquickstart('test'); Videoquickwritetextpage ('This is TUM'); Videoquickcloseandopen;
%
% See also: drawnowvid, Videoquickcloseandopen, Videoquickstart,
% Videoquickwritegcf
%
%
% Copyright 2021 Tim C. Lueth

Videoquickstart(fname)- Simple concept to create videos from figures

Videoquickstart(fname)% Videoquickstart(fname) - Simple concept to create videos from figures
% (by Tim Lueth, VLFL-Lib, 2021-JAN-11 as class: VISUALIZATION)
%
% This is a simplified concept for the more complex "imageVideo..." fnctns
% Videoquickstart Starting a video
% Videoquickwritetextpage Display a text page
% Videoquickwritegcf Write the gcf in the video
% Videoquickcloseandopen Close the Video and open by double click
% (Status of: 2021-12-06)
%
% Introduced first in SolidGeometry 5.0
%
% See also: drawnowvid, Videoquickcloseandopen, Videoquickwritetextpage,
% Videoquickwritegcf
%
% vw=Videoquickstart([fname])
% === INPUT PARAMETERS ===
% fname: optional file name; default is name of caller
% === OUTPUT RESULTS ======
% vw: Video Writer
%
% See also: drawnowvid, Videoquickcloseandopen, Videoquickwritetextpage,
% Videoquickwritegcf
%
%
% Copyright 2021 Tim C. Lueth

stdexplain2 (X,s,n,xy)- Explains the behavior of the estimation of mean and standard deviation for measurements

stdexplain2 (X,s,n,xy)% stdexplain2 (X,s,n,xy) - Explains the behavior of the estimation of mean and standard deviation for measurements
% (by Tim Lueth, VLFL-Lib, 2021-JAN-11 as class: AUXILIARY PROCEDURES)
%
% The fnctns randnorm, randdice, can be used to generate different random
% exeriment values for Gaussian distribution and uniform
% distribution.This fnctn shows how the numerical values for the mean and
% standard deviation change over time. (Status of: 2021-01-15)
%
% Introduced first in SolidGeometry 5.0
%
% See also: meanGauss
%
% stdexplain2([X,s,n,xy])
% === INPUT PARAMETERS ===
% X: Mean Value
% s: Standard Deviation
% n: number of samples
% xy: optional measurement values size = [n x 2]
%
% EXAMPLE:
% stdexplain2('','','',randdice(100,2))
% stdexplain2('','','',rand(100,2))
%
% See also: meanGauss
%
%
% Copyright 2021 Tim C. Lueth

SGiPadFlip2stand(L)- creates a stand to insert an Apple iPad into the opening of an Samsung Flip2 55 Stand

SGiPadFlip2stand(L)% SGiPadFlip2stand(L) - creates a stand to insert an Apple iPad into the opening of an Samsung Flip2 55 Stand
% (by Tim Lueth, VLFL-Lib, 2021-JAN-10 as class: MODELING PROCEDURES)
%
% Printing time for 10cm is about 3h, for 32cm its about 9h (Status of:
% 2021-01-10)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGMacBookPlate
%
% SGiPadFlip2stand([L])
% === INPUT PARAMETERS ===
% L: Length up to 320 mm; default is 100mm
%
% EXAMPLE:
% SGiPadFlip2stand(320)
%
%
% See also: SGMacBookPlate
%
%
% Copyright 2021 Tim C. Lueth

SGraspicam2housing()- returns a housing for a Raspberry Pi camera type 2 (adjustable lenses)

SGraspicam2housing()% SGraspicam2housing() - returns a housing for a Raspberry Pi camera type 2 (adjustable lenses)
% (by Tim Lueth, VLFL-Lib, 2021-JAN-10 as class: MODELING PROCEDURES)
%
% https://www.amazon.de/gp/product/ (Status of: 2021-01-10)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGraspberrystarterkit,
% https://www.amazon.de/gp/product/B01ICNT3HC, SGbase4PCB, SGcover4PCB
%
% [SGP,SGB]=SGraspicam2housing([])
% === OUTPUT RESULTS ======
% SGP: Plate
% SGB: Box
%
% See also: SGraspberrystarterkit,
% https://www.amazon.de/gp/product/B01ICNT3HC, SGbase4PCB, SGcover4PCB
%
%
% Copyright 2021 Tim C. Lueth

SGcover4PCB(SGB,h,sl,constr)- creates a cover with openings for cables etc

SGcover4PCB(SGB,h,sl,constr)% SGcover4PCB(SGB,h,sl,constr) - creates a cover with openings for cables etc
% (by Tim Lueth, VLFL-Lib, 2021-JAN-10 as class: MODELING PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGplateunder, SGbase4PCB
%
% SGN=SGcover4PCB(SGB,[h,sl,constr])
% === INPUT PARAMETERS ===
% SGB: Solid plate to cover
% h: [h w]; height interlab and wall thickness (default is 1.5)
% sl: default is slfit('t')
% constr: cell of {side number, CPL, spatial relations}
% === OUTPUT RESULTS ======
% SGN:
%
% See also: SGplateunder, SGbase4PCB
%
%
% Copyright 2021 Tim C. Lueth

SGbase4PCB(Bsiz,PinL,PinS,rel)- returns base posts and pins for a PCB assembly

SGbase4PCB(Bsiz,PinL,PinS,rel)% SGbase4PCB(Bsiz,PinL,PinS,rel) - returns base posts and pins for a PCB assembly
% (by Tim Lueth, VLFL-Lib, 2021-JAN-10 as class: MODELING PROCEDURES)
%
% SGbase4PCB (Status of: 2021-01-26)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGcover4PCB
%
% SG=SGbase4PCB([Bsiz,PinL,PinS,rel])
% === INPUT PARAMETERS ===
% Bsiz: [x y z] size of a PCB
% PinL: Position of points
% PinS: [Ro, Ri, h, Ro, Ri, h, ...]
% rel: spatial relation for adusting the pin pattern
% === OUTPUT RESULTS ======
% SG: Solid Geometry
%
% EXAMPLE: SGbase4PCB([25 26 1.5],[-10.5 -6.5;-10.5 7.0;10.5 7.0;10.5 -6.5],[2 0 2;1 0 3],'alignback',-0.01); SG=ans; % baseplate for the Raspberry Camera
%
% See also: SGcover4PCB
%
%
% Copyright 2021 Tim C. Lueth

ttestexplain(x,X,s,n,Xr,sr,nr)- This Matlab fnct is intended to illustrate the effect of the t-test

ttestexplain(x,X,s,n,Xr,sr,nr)% ttestexplain(x,X,s,n,Xr,sr,nr) - This Matlab fnct is intended to illustrate the effect of the t-test
% (by Tim Lueth, VLFL-Lib, 2021-JAN-08 as class: AUXILIARY PROCEDURES)
%
% - If the routine is called without parameters, the standard
% distribution of the random fnctn with 21 x samples is simply displayed.
% - A mean value X and a dispersion s can be forced in the representation
% also without a first parameter.
% - In red the distribution of the samples is shown
% - In magenta the distribution of possible mean values is shown
% - In blue the reference value or a distribution of the reference value
% is shown (Status of: 2021-01-09)
%
% Introduced first in SolidGeometry 5.0
%
% See also: ttest
%
% [f,e,cv]=ttestexplain([x,X,s,n,Xr,sr,nr])
% === INPUT PARAMETERS ===
% x: optional list of sample
% X: optional mean value of the distribution; default is calculated from x
% s: optional standard deviation value of the distribution; default is
% calculated from x
% n: optionla number of sample; default is calculated from x
% Xr: optional reference value ; default is none
% sr: optional deviation of the distributio; default is 0;
% nr: optional number of samples of the reference; default is infinity
% === OUTPUT RESULTS ======
% f:
% e:
% cv:
%
% See also: ttest
%
%
% Copyright 2021 Tim C. Lueth

exp_2021_01_07_bikechain- Inpressive Experiment to show how to print reliable joints with FDM printers

exp_2021_01_07_bikechain% exp_2021_01_07_bikechain - Inpressive Experiment to show how to print reliable joints with FDM printers
% (by Tim Lueth, VLFL-Lib, 2021-JAN-08 as class: EXPERIMENTS)
%
% Tested using an anycubic predator with 0.8 wall, 20% infill, and 90
% mm/sec speed (Status of: 2021-01-08)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGboxMarie, exp_2021_01_08_bikechain
%
% XXX=exp_2021_01_07_bikechain
% === OUTPUT RESULTS ======
% XXX: Geometry of a bike chain
%
% See also: SGboxMarie, exp_2021_01_08_bikechain
%
%
% Copyright 2021 Tim C. Lueth

rofCPLsweep(CPL,rp,cp)- returns the radius of a fully circled CPL

rofCPLsweep(CPL,rp,cp)% rofCPLsweep(CPL,rp,cp) - returns the radius of a fully circled CPL
% (by Tim Lueth, VLFL-Lib, 2021-JAN-07 as class: CLOSED POLYGON LISTS)
%
% interesting examples for configuration space with fixed rotation and
% free rotation (Status of: 2021-01-07)
%
% Introduced first in SolidGeometry 5.0
%
% See also: CPLsweep
%
% [Rmax,Rmin,CPLC]=rofCPLsweep(CPL,[rp,cp])
% === INPUT PARAMETERS ===
% CPL: Original contour
% rp: center point for rotation; default is [0 0]
% cp: optional center point if CPLC rotates independently
% === OUTPUT RESULTS ======
% Rmax: Maximal Radius
% Rmin: Minimum Radius
% CPLC: Sweeped Contour
%
% EXAMPLE:
% rofCPLsweep (CPLsample(3)), % maximum of maximum distance
% rofCPLsweep(CPLsample(3),[10 0]) % rotation mit fixed orientation
% rofCPLsweep(CPLsample(3),[15 0]) % rotation mit fixed orientation
% rofCPLsweep(CPLsample(3),[15 0],[0 0]) % rotation mit free rotating orientation
% rofCPLsweep(PLcircle(8),[15 0],[0 0]) % rotation mit free rotating orientation
% rofCPLsweep(PLcircle(8),[15 0],[1 0]) % rotation mit free rotating orientation
% rofCPLsweep(PLcircle(8),[15 0],[2 0]) % rotation mit free rotating orientation
%
% See also: CPLsweep
%
%
% Copyright 2021 Tim C. Lueth

SGreplace(SG,A,B,ol)- First version to replace a part of a solid

SGreplace(SG,A,B,ol)% SGreplace(SG,A,B,ol) - First version to replace a part of a solid
% (by Tim Lueth, VLFL-Lib, 2021-JAN-07 as class: SURFACES)
%
% will be extended to support joint which need distance to guarantee DoF
% but also overlap to guarantee force transmission (Status of: 2021-01-07)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGbool, SGtransrelSG, SGboolh, SGintersect, SGsubtract,
% SGxor, SGconcat, SGsupplement
%
% SGreplace([SG,A,B,ol])
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% A: Volume of SG to be replaced; default is convex hull of B
% B: Solid Geometry to fill the replaced volume
% ol: oversize to cut; default is 0.05
%
% EXAMPLE:
% SGreplace(SGbox,'',SGbox([5 5 5]),1)
%
% See also: SGbool, SGtransrelSG, SGboolh, SGintersect, SGsubtract,
% SGxor, SGconcat, SGsupplement
%
%
% Copyright 2021 Tim C. Lueth

filecompareconditon(inf1,inf2,text)- strange fnct for paring english as condition

filecompareconditon(inf1,inf2,text)% filecompareconditon(inf1,inf2,text) - strange fnct for paring english as condition
% (by Tim Lueth, VLFL-Lib, 2021-JAN-06 as class: FILE HANDLING)
%
% requires
% inf1.mdat
% inf1.size
% inf2.mdat
% inf2.size
% (Status of: 2021-01-07)
%
% Introduced first in SolidGeometry 5.0
%
% See also: renamefile, movefiles2startwithdate
%
% [logic,text]=filecompareconditon(inf1,inf2,[text])
% === INPUT PARAMETERS ===
% inf1: information struct for source
% inf2: information struct for target
% text: text condition; default is 'newer and not smaller'
% === OUTPUT RESULTS ======
% logic: true if condition fulfilled
% text: final evaluated text
%
% See also: renamefile, movefiles2startwithdate
%
%
% Copyright 2021 Tim C. Lueth

SGbladeofpincone(r,pl,R,ol)- creates a subtraction solid

SGbladeofpincone(r,pl,R,ol)% SGbladeofpincone(r,pl,R,ol) - creates a subtraction solid
% (by Tim Lueth, VLFL-Lib, 2021-JAN-06 as class: MODELING PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGpincountersink
%
% [SG,SGS]=SGbladeofpincone([r,pl,R,ol])
% === INPUT PARAMETERS ===
% r: r or [r h]; default is [1.5 1.5]
% pl: play/slot in addition to clearance fit
% R: Outer radius for create movement freedom in x/y
% ol: overlap for supplement
% === OUTPUT RESULTS ======
% SG: Solid for subtraction/ Blade
% SGS: Solid as Suppelement
%
% EXAMPLE:
% SGbladeofpincone; Blade=ans
%
%
% See also: SGpincountersink
%
%
% Copyright 2021 Tim C. Lueth

exp_2021_01_05_box- EXPERIMENT to visualize the rotation of a revolute joint

exp_2021_01_05_box% exp_2021_01_05_box - EXPERIMENT to visualize the rotation of a revolute joint
% (by Tim Lueth, VLFL-Lib, 2021-JAN-05 as class: EXPERIMENTS)
%
% Introduced first in SolidGeometry 5.0
%
% See also: exp_2020_12_31_pins
%
% exp_2021_01_05_box
%
% See also: exp_2020_12_31_pins
%
%
% Copyright 2021 Tim C. Lueth

CPLtransrelCPL(CPLA,CPLB,rel,gap)- relative transformation of CPLs

CPLtransrelCPL(CPLA,CPLB,rel,gap)% CPLtransrelCPL(CPLA,CPLB,rel,gap) - relative transformation of CPLs
% (by Tim Lueth, VLFL-Lib, 2021-JAN-05 as class: CLOSED POLYGON LISTS)
%
% Similar to SGtransrelSG, but based on CPLs!
% Supported operations are:
% 'bottom','under','down', 'ontop','up','top', 'left',
% 'right', 'trans','transP', 'transx', 'transy', 'centerx',
% 'centery', 'incenter','center', 'alignright', 'alignleft',
% 'aligntop', 'alignbottom', 'alignunder', 'magnify',
% 'transT', 'alignrot', 'alignaxis', 'attached','touch',
% 'plus','add', 'intersect', 'subtract','-', 'sub', 'xor',
% 'cutleft', 'remainleft', 'cutright', 'grow',
% 'break','breakedge', 'rad','radial','radialedge', 'rotc',
% 'rot','rotz', 'help','info','?'' (Status of: 2021-01-07)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGtransrelSG, PLtrans
%
% CPL=CPLtransrelCPL(CPLA,CPLB,[rel,gap])
% === INPUT PARAMETERS ===
% CPLA: Original contour to manipulate
% CPLB: Contour that is considered as relation
% rel: relation term such as 'ontop' or 'alignleft'
% gap: optional numerical parameter
% === OUTPUT RESULTS ======
% CPL: Resulting CPL
%
% EXAMPLE:
% CPLA=PLsquare(20,30); CPLB=PLcircle(8)+[pi pi];
% CPLtransrelCPL(CPLA,CPLB,'center','ontop','rot',pi/10,'rad',20);
%
% See also: SGtransrelSG, PLtrans
%
%
% Copyright 2021 Tim C. Lueth

selectsubplot- interactively select a subplot

selectsubplot% selectsubplot - interactively select a subplot
% (by Tim Lueth, VLFL-Lib, 2021-JAN-05 as class: USER INTERFACE)
%
% extracted from SGTregisterframes (Status of: 2021-11-29)
%
% Introduced first in SolidGeometry 5.0
%
% See also: select3D, subplotnumber
%
% [hi,cfsp]=selectsubplot
% === OUTPUT RESULTS ======
% hi: selected subplot by last click cursor position
% cfsp: list of all subplots
%
% EXAMPLE:
% PLsample; ginput(1);
% selectsubplot
%
% See also: select3D, subplotnumber
%
%
% Copyright 2021 Tim C. Lueth

exp_2021_01_05_pinrings- EXPERIMENT TO EXPLAIN THE USE OF SGpincountersink

exp_2021_01_05_pinrings% exp_2021_01_05_pinrings - EXPERIMENT TO EXPLAIN THE USE OF SGpincountersink
% (by Tim Lueth, EXPERIMENT, 2021-JAN-05 as class: EXPERIMENTS)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGpincountersink
%
% exp_2021_01_05_pinrings
%
% EXAMPLE:
% exp_2021_01_05_pinrings
%
%
% See also: SGpincountersink
%
%
% Copyright 2021 Tim C. Lueth

SGpincountersink(d,ol,bl,R,V)- creates cone shaped pins and blades

SGpincountersink(d,ol,bl,R,V)% SGpincountersink(d,ol,bl,R,V) - creates cone shaped pins and blades
% (by Tim Lueth, VLFL-Lib, 2021-JAN-04 as class: MODELING PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGcone
%
% SG=SGpincountersink([d,ol,bl,R,V])
% === INPUT PARAMETERS ===
% d: diameter or [diameter height]; default is [3 1.5]
% ol: overlap in z; default is 0.1
% bl: oversize in radial; default i 0
% R: Ring Radius
% V: Shape of Ring "H', "V',, "VR', 'HR', "ART1', ART2
% === PROPERTY NAMES =====
% 'round' :
% === OUTPUT RESULTS ======
% SG: Solid Geometry
%
% EXAMPLE:
% SGpincountersink(3,0.1,0.5) % just creates a pin as bearing / joint with 0.5 mm border
% SGpincountersink(3,'','',5,'H') % Horizontal ring with radius 5
% SGpincountersink(3,'','',5,'V') % Horizontal ring with radius 5
% SGpincountersink(3,'','',5,30) % ART
%
% See also: SGcone
%
%
% Copyright 2021 Tim C. Lueth

SGsupplement(SGA,SGB,relpos)- Boolean addition of the solid parts of B that are outside of the convex hull of A

SGsupplement(SGA,SGB,relpos)% SGsupplement(SGA,SGB,relpos) - Boolean addition of the solid parts of B that are outside of the convex hull of A
% (by Tim Lueth, VLFL-Lib, 2021-JAN-04 as class: SURFACES)
%
% THIS IS DIFFERENT TO SGdesignSupplement
% More or less SG=SGtransrelSG(SGA,SGB,[varargin,{'Supp'}]);
% (Status of: 2021-01-04)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGbool, SGtransrelSG, SGboolh, SGintersect, SGsubtract,
% SGunion, SGxor, SGconcat
%
% SG=SGsupplement(SGA,SGB,[relpos])
% === INPUT PARAMETERS ===
% SGA: Solid A
% SGB: Solid B
% relpos: list of relative positions for SGtransrelSG
% === OUTPUT RESULTS ======
% SG: Boolean Result of A+(B-convechullof(A))
%
% EXAMPLE:
% SGA=SGofCPLz([PLcircle(10);nan nan;PLcircle(8)],12);
% SGB=SGTremove(SGbox,'all');
% SGB=SGtransrelSG(SGB,SGA,'center','right',-5)
% SGsupplement(SGA,SGB);
% SGtransrelSG(SGA,SGB,'supp'); % does the same
%
%
%
% See also: SGbool, SGtransrelSG, SGboolh, SGintersect, SGsubtract,
% SGunion, SGxor, SGconcat
%
%
% Copyright 2021 Tim C. Lueth

SGraspberrystarterkit(keyword)- this file creates documentation for an raspberry Pi 4 startup kit

SGraspberrystarterkit(keyword)% SGraspberrystarterkit(keyword) - this file creates documentation for an raspberry Pi 4 startup kit
% (by Tim Lueth, VLFL-Lib, 2021-JAN-03 as class: USER INTERFACE)
%
% This file shows also how to use the content of an explain file just as
% documentation in an m file and to create automatically an editable .txt
% documentation file
% The displayed information is without any guarantee and liability
% exclusively a reminder for the author personally. Each user of SG-Lib
% can change the information in the generated text file independently.
% (Status of: 2021-01-06)
%
% Introduced first in SolidGeometry 5.0
%
% See also: explainMfileheader
%
% textname=SGraspberrystarterkit([keyword])
% === INPUT PARAMETERS ===
% keyword: keyword for explainMfileheader
% === OUTPUT RESULTS ======
% textname: file name of the created or used documentation file
%
% EXAMPLE:
% SGraspberrystarterkit
% SGraspberrystarterkit('fdelete') % resets the information to default information
%
% See also: explainMfileheader
%
%
% Copyright 2021 Tim C. Lueth

explainMfileheader(funcname,keyword)- creates from a header of a m file a explain documenation file

explainMfileheader(funcname,keyword)% explainMfileheader(funcname,keyword) - creates from a header of a m file a explain documenation file
% (by Tim Lueth, VLFL-Lib, 2021-JAN-03 as class: USER INTERFACE)
%
% Sometimes it makes sense to use a m file just for creating
% documentation of the explain concept. (Status of: 2021-01-04)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGexplain, SGraspberrystarterkit
%
% textname=explainMfileheader(funcname,[keyword])
% === INPUT PARAMETERS ===
% funcname: Name of calling fnctn whose % header contains explain text
% keyword: keyword or 'fdelete'
% === OUTPUT RESULTS ======
% textname: file name of the created or used documentation file
%
% EXAMPLE:
% explainMfileheader('SGraspberrystarterkit'); fname=ans;
% uiopen(fname,1)
%
% See also: SGexplain, SGraspberrystarterkit
%
%
% Copyright 2021 Tim C. Lueth

SGpost(R,H,Sh)- returns a force optimated post

SGpost(R,H,Sh)% SGpost(R,H,Sh) - returns a force optimated post
% (by Tim Lueth, VLFL-Lib, 2021-JAN-02 as class: MODELING PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGcylinder
%
% SG=SGpost([R,H,Sh])
% === INPUT PARAMETERS ===
% R:
% H:
% Sh:
% === OUTPUT RESULTS ======
% SG: Solid Geometry
%
% EXAMPLE:
% SGpost([10 20 5.6],'','mattheck')
%
% See also: SGcylinder
%
%
% Copyright 2021 Tim C. Lueth

PLchamfer2side(z,x,sh,d)- two sided version of PLchamfer

PLchamfer2side(z,x,sh,d)% PLchamfer2side(z,x,sh,d) - two sided version of PLchamfer
% (by Tim Lueth, VLFL-Lib, 2021-JAN-02 as class: CLOSED POLYGON LISTS)
%
% Introduced first in SolidGeometry 5.0
%
% See also: PLchamfer, SGofCPLz, SGofCPLextrude
%
% PL=PLchamfer2side([z,x,sh,d])
% === INPUT PARAMETERS ===
% z: z or [z_left z-right]
% x: x or [x_left x-right]
% sh: shape or {shape_left, shape_right}
% d: delta or [delta_left delta-right]
% === OUTPUT RESULTS ======
% PL: Point list for SGofCPLextrude
%
% EXAMPLE:
% PLchamfer2side(10,10,{'mattheck','circ'},[0 6])
% PLchamfer2side(10,10,{'mattheck','line'},[0 6])
% PLchamfer2side(10,10,{'mattheck','circ2'},[0 6])
% PLchamfer2side(10,10,{'mattheck','circ3'},[0 6])
% PLchamfer2side(10,10,{'circ3','mattheck'},[0 6])
%
% See also: PLchamfer, SGofCPLz, SGofCPLextrude
%
%
% Copyright 2021 Tim C. Lueth

SGsilentbrass- creates a holder for a Yamaha Silent Brass for a Thomann Cornett

SGsilentbrass% SGsilentbrass - creates a holder for a Yamaha Silent Brass for a Thomann Cornett
% (by Tim Lueth, VLFL-Lib, 2021-JAN-01 as class: MODELING PROCEDURES)
%
% printing time Anycubic Predator 90mm/sec 0.3mm draft ~ 2h
% For a different trumpet, just try to adjust diameter of tubes (default
% is 13.3mm and distance, default is 75mm (Status of: 2021-01-02)
%
% Introduced first in SolidGeometry 5.0
%
% See also: PLchamfer
%
% SG=SGsilentbrass
% === OUTPUT RESULTS ======
% SG: Silent brass holder with clearance fitting
%
% EXAMPLE:
% SGsilentbrass
%
% See also: PLchamfer
%
%
% Copyright 2021 Tim C. Lueth

rofRintrusion(R,w)- provides the minimum intrusion distance to fully insert a cylinder into a sphere

rofRintrusion(R,w)% rofRintrusion(R,w) - provides the minimum intrusion distance to fully insert a cylinder into a sphere
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-31 as class: ANALYTICAL GEOMETRY)
%
% Better name would be cofarcchord:
% a=acos(1-w/R)
% r=sin(a)*R (Status of: 2021-02-20)
%
% Introduced first in SolidGeometry 5.0
%
% See also: sofrd, dofRintrusion, PLchordof2PR, Rofrdintrusion
%
% r=rofRintrusion(R,w)
% === INPUT PARAMETERS ===
% R: Radius of sphere
% w: wall thickness of sphere
% === OUTPUT RESULTS ======
% r: maximum radius to insert
%
% EXAMPLE:
% rofRintrusion(10,2)
%
% See also: sofrd, dofRintrusion, PLchordof2PR, Rofrdintrusion
%
%
% Copyright 2020-2021 Tim C. Lueth

dofRintrusion(R,r)- provides the minimum intrusion distance to fully insert a cylinder into a sphere

dofRintrusion(R,r)% dofRintrusion(R,r) - provides the minimum intrusion distance to fully insert a cylinder into a sphere
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-31 as class: ANALYTICAL GEOMETRY)
%
% Better name would be dofarcchord:
% a=asin(r/R)
% d=(1-cos(a))*R (Status of: 2021-02-20)
%
% Introduced first in SolidGeometry 5.0
%
% See also: sofrd, rofRintrusion, PLchordof2PR, Rofrdintrusion
%
% d=dofRintrusion(R,r)
% === INPUT PARAMETERS ===
% R: Radius of sphere
% r: radius of cylinder
% === OUTPUT RESULTS ======
% d: distance to insert
%
% EXAMPLE:
% dofRintrusion(10,8)
%
% See also: sofrd, rofRintrusion, PLchordof2PR, Rofrdintrusion
%
%
% Copyright 2020-2021 Tim C. Lueth

exp_2020_12_31_pins (slot)- EXPERIMENT TO CREATE JOINTS FOR 3D PRINTING

exp_2020_12_31_pins (slot)% exp_2020_12_31_pins (slot) - EXPERIMENT TO CREATE JOINTS FOR 3D PRINTING
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-31 as class: EXPERIMENTS)
%
% Wait several hours for coll down if PLA is used and a slot size ~ 0
% (Status of: 2020-12-31)
%
% Introduced first in SolidGeometry 5.0
%
% See also: exp_2020_12_30_pins
%
% exp_2020_12_31_pins([slot])
% === INPUT PARAMETERS ===
% slot: default is 0.1 (+ slfit('c'))
%
% EXAMPLE:
% exp_2020_12_31_pins ( 0.1 )
%
%
% See also: exp_2020_12_30_pins
%
%
% Copyright 2020 Tim C. Lueth

exp_2020_12_30_pins- EXPERIMENT TO CREATE JOINTS FOR 3D PRINTING

exp_2020_12_30_pins% exp_2020_12_30_pins - EXPERIMENT TO CREATE JOINTS FOR 3D PRINTING
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-31 as class: EXPERIMENTS)
%
% =======================================================================
% OBSOLETE (2020-12-31) - USE 'exp_2020_12_31_pins' INSTEAD
% =======================================================================
%
% Introduced first in SolidGeometry 5.0
%
% exp_2020_12_30_pins
%
% EXAMPLE:
% exp_2020_12_31_pins
%
%
% Copyright 2020 Tim C. Lueth

unixgrep(sstr,greps)- same as unix grep fnct

unixgrep(sstr,greps)% unixgrep(sstr,greps) - same as unix grep fnct
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-31 as class: FILE HANDLING)
%
% Introduced first in SolidGeometry 5.0
%
% See also: unix, depuseString
%
% b=unixgrep(sstr,[greps])
% === INPUT PARAMETERS ===
% sstr: search string
% greps: search file
% === OUTPUT RESULTS ======
% b: result
%
% EXAMPLE:
% unixgrep ('PLcircle')
%
% See also: unix, depuseString
%
%
% Copyright 2020 Tim C. Lueth

uniqueT(T,check,thr)- returns the difference between 2 4x4 HT matrices

uniqueT(T,check,thr)% uniqueT(T,check,thr) - returns the difference between 2 4x4 HT matrices
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-30 as class: KINEMATICS AND FRAMES)
%
% p checks the distance of the origins
% z checks the distance angle of the ez vectors
% y checks the distance angle of the ey vectors
% l checks the straight line distance angle of ez (Status of: 2020-12-30)
%
% Introduced first in SolidGeometry 5.0
%
% See also: diffangle, diffT, isequalT
%
% [T,ia,ic]=uniqueT(T,[check,thr])
% === INPUT PARAMETERS ===
% T: list of HT Matrix A
% check: letters of distances to check default is 'pz'
% thr: default 1e-4;
% === PROPERTY NAMES =====
% 'last' : if 'last, not the first but the last T is used
% === OUTPUT RESULTS ======
% T: logical true
% ia: index a
% ic: index c
%
% EXAMPLE:
% isequalT(eye(4),TofR(rot(0,0,pi/10),[0 0 1]))
% isequalT(eye(4),TofR(rot(0,0,pi/10),[0 0 1]),'last')
% isequalT(eye(4),TofR(rot(0,pi,pi/10),[0 0 1]),'last')
%
% See also: diffangle, diffT, isequalT
%
%
% Copyright 2020-2021 Tim C. Lueth

isequalT(TA,TB,check,thr)- returns the difference between 2 4x4 HT matrices

isequalT(TA,TB,check,thr)% isequalT(TA,TB,check,thr) - returns the difference between 2 4x4 HT matrices
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-30 as class: KINEMATICS AND FRAMES)
%
% p checks the distance of the origins
% z checks the distance angle of the ez vectors
% y checks the distance angle of the ey vectors
% l checks the straight line distance angle of ez (Status of: 2020-12-30)
%
% Introduced first in SolidGeometry 5.0
%
% See also: diffangle, diffT, uniqueT
%
% is=isequalT(TA,TB,[check,thr])
% === INPUT PARAMETERS ===
% TA: HT Matrix A
% TB: HT Matrix B
% check: letters of distances to check default is 'pz'
% thr: default 1e-4;
% === OUTPUT RESULTS ======
% is: logical true
%
% EXAMPLE:
% isequalT(eye(4),TofR(rot(0,0,pi/10),[0 0 1]))
% isequalT(eye(4),TofR(rot(0,0,pi/10),[0 0 1]),'l')
% isequalT(eye(4),TofR(rot(0,pi,pi/10),[0 0 1]),'l')
%
% See also: diffangle, diffT, uniqueT
%
%
% Copyright 2020 Tim C. Lueth

diffT(TA,TB)- returns the difference between 2 4x4 HT matrices

diffT(TA,TB)% diffT(TA,TB) - returns the difference between 2 4x4 HT matrices
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-30 as class: KINEMATICS AND FRAMES)
%
% dp returns the distance of the origins
% dz returns the distance angle of the ez vectors
% dy returns the distance angle of the ey vectors (w2 - w1)
% wz returns the straight line distance angle of ez
% wy returns the straight line distance angle of ey (Status of:
% 2021-03-15)
%
% Introduced first in SolidGeometry 5.0
%
% See also: diffanglew, diffangle, isequalT, uniqueT
%
% delta=diffT(TA,TB)
% === INPUT PARAMETERS ===
% TA: HT Matrix A
% TB: HT Matrix B
% === OUTPUT RESULTS ======
% delta: [dp dz dy wz wy]
%
% EXAMPLE:
% diffT(eye(4),TofR(rot(0,0,pi/10),[0 0 1]))
% diffT(eye(4),TofPez([0 0 1],[0 1 0],-pi/2))
%
% See also: diffanglew, diffangle, isequalT, uniqueT
%
%
% Copyright 2020-2021 Tim C. Lueth

pofselect3D(obj)- returns touch point, solid, handle normal vector etc.

pofselect3D(obj)% pofselect3D(obj) - returns touch point, solid, handle normal vector etc.
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-29 as class: USER INTERFACE)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGprofiledepthdimension
%
% [p,SG,ef,ec]=pofselect3D([obj])
% === INPUT PARAMETERS ===
% obj: graphics object; default is gca
% === OUTPUT RESULTS ======
% p: touched point
% SG: touched graphics object
% ef: normal vector of facet
% ec: normal vector to camera
%
% See also: SGprofiledepthdimension
%
%
% Copyright 2020 Tim C. Lueth

SGjointball(R,wl,pl,olap,plat)- returns ball and shell of a 3DoF joint

SGjointball(R,wl,pl,olap,plat)% SGjointball(R,wl,pl,olap,plat) - returns ball and shell of a 3DoF joint
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-28 as class: MODELING PROCEDURES)
%
% extracted from exp_2020_12_26_SphereA (Status of: 2020-12-31)
%
% Introduced first in SolidGeometry 5.0
%
% See also: exp_2020_12_26_SphereA
%
% X=SGjointball([R,wl,pl,olap,plat])
% === INPUT PARAMETERS ===
% R: Radius of the Sphere; default is 18mm
% wl: Wall = size of the cavity; default is 2mm
% pl: play ~ wrt to clearance fit; default is 0.1 mm
% olap: exuberant edge; default is 0.2mm
% plat: if true; cylyndrical plates are attached
% === OUTPUT RESULTS ======
% X: {Ball, Shell}
%
% EXAMPLE:
% SGjointball(18,2,0.5,0.2)
%
% See also: exp_2020_12_26_SphereA
%
%
% Copyright 2020 Tim C. Lueth

strfind2double(TEXT,codenr)- searches for pattern in char string and returns the next value as double real

strfind2double(TEXT,codenr)% strfind2double(TEXT,codenr) - searches for pattern in char string and returns the next value as double real
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-26 as class: AUXILIARY PROCEDURES)
%
% used for gcode analysis (Status of: 2020-12-28)
%
% Introduced first in SolidGeometry 5.0
%
% See also: strfind, str2double
%
% cr=strfind2double(TEXT,codenr)
% === INPUT PARAMETERS ===
% TEXT: ASCII TEXT string
% codenr: char patter to be matched
% === OUTPUT RESULTS ======
% cr: real number als double of the next chars up to space or newline
%
% EXAMPLE:
% strfind2double('a s d f ert fvsf x200, y300','x')
%
% See also: strfind, str2double
%
%
% Copyright 2020 Tim C. Lueth

SGgcodegetinfo(TEXT,)- Auxiliary fnct to get some parameter by interpreting gcode files or strings

SGgcodegetinfo(TEXT,)% SGgcodegetinfo(TEXT,) - Auxiliary fnct to get some parameter by interpreting gcode files or strings
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-26 as class: 3D MANUFACTURING)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGgcodefilenamechange, SGgcodesimulate
%
% inf=SGgcodegetinfo(TEXT,[])
% === INPUT PARAMETERS ===
% TEXT: gcode string or gcode file name
% === PROPERTY NAMES =====
% 'full' : full interpretation including shape and time
% 'temp' : faster algorithm jut to detect temperatur commands
% === OUTPUT RESULTS ======
% inf: struct containing information of gcode
%
% EXAMPLE:
% SGgcoderead(desktopdir('2021-01-05 AP_H220B60-4h plate.gcode')); TEXT=ans;
% SGgcodegetinfo(TEXT,'temp')
%
% See also: SGgcodefilenamechange, SGgcodesimulate
%
%
% Copyright 2020-2021 Tim C. Lueth

SGgcodefilechangetemp(TEXT,HotE,Base)- changes the temperature of hotend and base plate in a marlin gcode file

SGgcodefilechangetemp(TEXT,HotE,Base)% SGgcodefilechangetemp(TEXT,HotE,Base) - changes the temperature of hotend and base plate in a marlin gcode file
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-26 as class: FILE HANDLING)
%
% TEsted with Anycubic Predator and Ultimaker CURA (Status of: 2021-03-03)
%
% Introduced first in SolidGeometry 5.0
%
% See also: filenameadddate4gcode
%
% [TEXT,cname]=SGgcodefilechangetemp([TEXT,HotE,Base])
% === INPUT PARAMETERS ===
% TEXT: gcode string or gcode file name
% HotE: Temperature for hotend, default is [220 225]
% Base: Temperature for base plate, default is [60 65]
% === OUTPUT RESULTS ======
% TEXT: new gcode string or written gcode file
% cname: file name for gode file
%
% See also: filenameadddate4gcode
%
%
% Copyright 2020-2021 Tim C. Lueth

SGgcoderead(fname)- reads in a ascii gcode file and creates a line table

SGgcoderead(fname)% SGgcoderead(fname) - reads in a ascii gcode file and creates a line table
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-26 as class: 3D MANUFACTURING)
%
% extracted from SGgcodesimulate
% (Status of: 2020-12-26)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGgcodefilenamechange, SGgcodesimulate, SGgcodestrrep
%
% [TEXT,s]=SGgcoderead([fname])
% === INPUT PARAMETERS ===
% fname: File Name or empty for dialog
% === OUTPUT RESULTS ======
% TEXT: unsigned char
% s: new line positions
%
% EXAMPLE:
% SGgcoderead('AP_owl_pair.gcode')
%
% See also: SGgcodefilenamechange, SGgcodesimulate, SGgcodestrrep
%
%
% Copyright 2020 Tim C. Lueth

CVLofVLEL2(VLA,ELA)- processes a fortmat of

CVLofVLEL2(VLA,ELA)% CVLofVLEL2(VLA,ELA) - processes a fortmat of
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-25 as class: CLOSED POLYGON LISTS)
%
% Introduced first in SolidGeometry 5.0
%
% See also: CVLofVLEL, CVLofVLEL2
%
%
% CVL=CVLofVLEL2(VLA,ELA)
% === INPUT PARAMETERS ===
% VLA: VLA or [p2 p2; p2 p3; ...]
% ELA: ELA if VLA is used
% === OUTPUT RESULTS ======
% CVL: CVL
%
% EXAMPLE:
% CVLofVLEL2([0 0 1 0 0 2; 0 0 2 0 0 3; 0 0 3 0 0 4; 0 0 5 0 0 6])
%
% See also: CVLofVLEL, CVLofVLEL2
%
%
%
% Copyright 2020 Tim C. Lueth

SGgcodesimulate(fname,mwarn);- plots a simulation of the gcode-processing using Marlin dialect

SGgcodesimulate(fname,mwarn);% SGgcodesimulate(fname,mwarn); - plots a simulation of the gcode-processing using Marlin dialect
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-23 as class: VISUALIZATION)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGgcodefilenamechange, SGgcoderead, SGgcodestrrep
%
% SGgcodesimulate([fname,mwarn]);
% === INPUT PARAMETERS ===
% fname: file name of gcode file or empty for dialog
% mwarn:
%
% See also: SGgcodefilenamechange, SGgcoderead, SGgcodestrrep
%
%
% Copyright 2020 Tim C. Lueth

SGrobotTCPchanger- Simple Tool Changer for Yannick's robot

SGrobotTCPchanger% SGrobotTCPchanger - Simple Tool Changer for Yannick's robot
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-23 as class: MODELING PROCEDURES)
%
% Kerb-Konus M5 Spreizgewinde für Rändelschraube
% http://www.verbindungstechnik.at/bilder/PDF/spreizgew/fe.pdf
% Write three parts on disk;
% (Status of: 2020-12-23)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGveribor120yannick
%
% [D,B]=SGrobotTCPchanger
% === OUTPUT RESULTS ======
% D: Toolside (red) Adapter
% B: Robot Side (grey) TCP
%
% EXAMPLE:
% SGrobotTCPchanger
%
% See also: SGveribor120yannick
%
%
% Copyright 2020 Tim C. Lueth

movefiles(Oname,Tname,)- similar to movefile but works with wildcards

movefiles(Oname,Tname,)% movefiles(Oname,Tname,) - similar to movefile but works with wildcards
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-18 as class: AUXILIARY PROCEDURES)
%
% copies if source is write protected (Status of: 2020-12-22)
%
% Introduced first in SolidGeometry 5.0
%
% See also: movefile, SGdesktopdircleanup, movefiles2startwithdate
%
% movefiles(Oname,Tname,[])
% === INPUT PARAMETERS ===
% Oname: Source file list
% Tname: Target file list or directory
%
% EXAMPLE:
% movefiles ('*.doc', [desktopdir filesep 'DOC ARCHIVE'])
%
% See also: movefile, SGdesktopdircleanup, movefiles2startwithdate
%
%
% Copyright 2020 Tim C. Lueth

SGwarnfittinguse- devolper fnct to be used in a SG fnct if fittings are used within the fnct.

SGwarnfittinguse% SGwarnfittinguse - devolper fnct to be used in a SG fnct if fittings are used within the fnct.
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-18 as class: AUXILIARY PROCEDURES)
%
% To warn users and programmers that printer specific size adjustments
% and fittings are used this fnctn should be called at the beginning of a
% fnctn. The warning appears only time and would not appear if
% DIN4AMfitting('''', ''set'')
% was called before.
% Avoid to use fixed settings in fnctns!
% Use DIN4AMfitting('anycubic', 'set'); Only once after starting matlab
% or when designing for a different printer
% (Status of: 2020-12-18)
%
% Introduced first in SolidGeometry 5.0
%
% See also: DIN4AMfitting, slfit
%
% SGwarnfittinguse
%
% EXAMPLE:
% clear global AMprinter; SGwarnfittinguse;
%
% See also: DIN4AMfitting, slfit
%
%
% Copyright 2020 Tim C. Lueth

SGTcopyasopponent(B,A,NA,NB)- copies a frame that crosses a surface as surface frame

SGTcopyasopponent(B,A,NA,NB)% SGTcopyasopponent(B,A,NA,NB) - copies a frame that crosses a surface as surface frame
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-17 as class: KINEMATICS AND FRAMES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: TofcrossedSG
%
% B=SGTcopyasopponent(B,A,[NA,NB])
% === INPUT PARAMETERS ===
% B: Solid to receive the frame
% A: Solid that sends the frame
% NA: Name of the Solid to copy
% NB: optional new Name of B
% === OUTPUT RESULTS ======
% B: Solid that received the frame
%
% See also: TofcrossedSG
%
%
% Copyright 2020 Tim C. Lueth

TofcrossedSG(B,T,d);- finds a surface point using ez of T and creates a frame

TofcrossedSG(B,T,d);% TofcrossedSG(B,T,d); - finds a surface point using ez of T and creates a frame
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-17 as class: KINEMATICS AND FRAMES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: crosspointVLFL, SGTcopyasopponent
%
% T=TofcrossedSG([B,T,d]);
% === INPUT PARAMETERS ===
% B: Solid to be crossed
% T: Starting frame
% d: optional start distance from T
% === OUTPUT RESULTS ======
% T: Frame HT matrix
%
% EXAMPLE:
% TofcrossedSG(SGbox,TofPez([0 0 20],[0 0 -1]),0)
% TofcrossedSG(SGbox,TofPez([0 0 20],[0 0 -1]),20)
%
% See also: crosspointVLFL, SGTcopyasopponent
%
%
% Copyright 2020 Tim C. Lueth

SGsurfacedistance(A,B,ez)- calculates the shift distance from a solid to the surface of another solid

SGsurfacedistance(A,B,ez)% SGsurfacedistance(A,B,ez) - calculates the shift distance from a solid to the surface of another solid
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-16 as class: ANALYTICAL GEOMETRY)
%
% integrated also into SGtransrelSG (Status of: 2020-12-17)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGtransrelSG, VLprojection2SG, crosspointVLFL
%
% [d,NA]=SGsurfacedistance(A,B,[ez])
% === INPUT PARAMETERS ===
% A: Solid to move
% B: Solid to be touched
% ez: orientation i.e. shift vector
% === OUTPUT RESULTS ======
% d: distance
% NA: Shifted Solid A
%
% EXAMPLE:
% SGsurfacedistance(SGtransP(SGsphere(1),[5 0 15]),SGsample(50),[0 0 -1])
% SGsurfacedistance(SGtransP(SGsphere(1),[8 0 15]),SGsample(50),[0 0 -1])
% SGsurfacedistance(SGtransP(SGsphere(1),[8 0 15]),SGsample(50),ezofchar('-z'))
%
% See also: SGtransrelSG, VLprojection2SG, crosspointVLFL
%
%
% Copyright 2020 Tim C. Lueth

productcode(code,text,over)- Database fnct to store components to order

productcode(code,text,over)% productcode(code,text,over) - Database fnct to store components to order
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-13 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: amazoncode2link, amazonlink2code
%
% url=productcode([code,text,over])
% === INPUT PARAMETERS ===
% code: code
% text: descriptor
% over: overwrite if text is already stored
% === OUTPUT RESULTS ======
% url: url 2 order the parts
%
% EXAMPLE:
% productcode('2576-842','ISO 7380 Flachkopfschrauben mit Innensechskant ISO 7380 M 3 x 25 ROSTFREI A2',true)
% productcode
%
% See also: amazoncode2link, amazonlink2code
%
%
% Copyright 2020 Tim C. Lueth

amazonlink2code(link)- converts a valid amazon url into the product code

amazonlink2code(link)% amazonlink2code(link) - converts a valid amazon url into the product code
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-13 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: amazoncode2link
%
% code=amazonlink2code(link)
% === INPUT PARAMETERS ===
% link: url from the prodcut page
% === OUTPUT RESULTS ======
% code: 10 alphanumerical char code of amazon
%
% EXAMPLE:
% amazonlink2code('https://www.amazon.de/gp/product/B07B2XZBKF/ref=ppx_yo_dt_b_search_asin_image?ie=UTF8&psc=1')
%
%
% See also: amazoncode2link
%
%
% Copyright 2020 Tim C. Lueth

amazoncode2link(code,ext)- converts a amazon code into a valid url

amazoncode2link(code,ext)% amazoncode2link(code,ext) - converts a amazon code into a valid url
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-13 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: amazonlink2code
%
% url=amazoncode2link([code,ext])
% === INPUT PARAMETERS ===
% code: 10 alphanumerical char code of amazon
% ext: default is 'de'
% === OUTPUT RESULTS ======
% url: url to use as web(url)
%
% EXAMPLE:
% amazoncode2link('B01LCXPGXE')
% amazoncode2link('B077ZWB9CP','com')
%
%
% See also: amazonlink2code
%
%
% Copyright 2020 Tim C. Lueth

SGveribor210- returns the Geometry of a Veribor210 of Year 2020

SGveribor210% SGveribor210 - returns the Geometry of a Veribor210 of Year 2020
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-13 as class: MODELING PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGmakitaadapter, SGveribor120, SGveribor120yannick
%
% SG=SGveribor210
% === OUTPUT RESULTS ======
% SG: Solid Geometry of Veribor210
%
% EXAMPLE:
% SGveribor210; SG=ans; SGfigure(-30,30); SGTplotalpha(SG);
%
% See also: SGmakitaadapter, SGveribor120, SGveribor120yannick
%
%
% Copyright 2020 Tim C. Lueth

SGconetruncated(R1,R2,H,n)- returns a truncated cone by

SGconetruncated(R1,R2,H,n)% SGconetruncated(R1,R2,H,n) - returns a truncated cone by
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-13 as class: MODELING PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGcone
%
% [SG,FLW,FLA,FLB]=SGconetruncated([R1,R2,H,n])
% === INPUT PARAMETERS ===
% R1: Bottom Radius
% R2: Top Radius
% H: Height
% n: Option number of polygon points
% === OUTPUT RESULTS ======
% SG: Solid Geometry
% FLW: Facet list of Wall
% FLA: Facet list of Floor
% FLB: Facet list of Roof
%
% EXAMPLE:
% SGconetruncated(210/2, 185/2, 14)
%
% See also: SGcone
%
%
% Copyright 2020 Tim C. Lueth

SGconvexofSGintersect(SG,SGinter)- returns a solid to intersect or subtract

SGconvexofSGintersect(SG,SGinter)% SGconvexofSGintersect(SG,SGinter) - returns a solid to intersect or subtract
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-12 as class: SURFACES)
%
% Sometimes there is a need for intersecting just a part of a solid or
% get a simplified shape for subtraction or intersection (Status of:
% 2020-12-13)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGintersect, FLofcrossingSG, SGofVLdelaunay,
% SGremsurfedgepoints
%
% CISG=SGconvexofSGintersect(SG,SGinter)
% === INPUT PARAMETERS ===
% SG: Solid Geometry A to intersect
% SGinter: Intersecting Solid B
% === OUTPUT RESULTS ======
% CISG: Convex intersecting solid that contains alls surfaces of SG
% intersecting with SGinter
%
% EXAMPLE:
% SGconvexofSGintersect(SGsphere(15),SGbox)
%
% See also: SGintersect, FLofcrossingSG, SGofVLdelaunay,
% SGremsurfedgepoints
%
%
% Copyright 2020 Tim C. Lueth

SGveribor120yannick- returns a plate to connect 2 Veribor 120 by M8 SCrew and to fix the LCL base with 4 times M5

SGveribor120yannick% SGveribor120yannick - returns a plate to connect 2 Veribor 120 by M8 SCrew and to fix the LCL base with 4 times M5
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-12 as class: MODELING PROCEDURES)
%
% extracted from exp_2020_12_12_Veriborstand
% Uses Yannick_robot.mat (Status of: 2020-12-13)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGveribor120, SGveribor210
%
% C=SGveribor120yannick
% === OUTPUT RESULTS ======
% C: Solid Geometry of plate (Magenta)
%
% EXAMPLE:
% SGveribor120yannick
%
%
% See also: SGveribor120, SGveribor210
%
%
% Copyright 2020 Tim C. Lueth

SGattach2SG(A,B)- Assembles parts interactively by surface attachment

SGattach2SG(A,B)% SGattach2SG(A,B) - Assembles parts interactively by surface attachment
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-09 as class: KINEMATICS AND FRAMES)
%
% The attachment is done by frames that are deleted afterwards
% For kinematic chains it makes sense to define the revolute joint center
% (Status of: 2020-12-10)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGTsetofRL, SGTsetofFS, SGTregisterframes, SGTregisterframes
%
% [A,B]=SGattach2SG(A,B)
% === INPUT PARAMETERS ===
% A: Solid A to attach to Solid B
% B: Solid B
% === OUTPUT RESULTS ======
% A: Solid A
% B: Solid B
%
% See also: SGTsetofRL, SGTsetofFS, SGTregisterframes, SGTregisterframes
%
%
% Copyright 2020 Tim C. Lueth

FLofcrossingSG(SG,B)- separates the faces of a solid that are relevant for boolean operation with a second body

FLofcrossingSG(SG,B)% FLofcrossingSG(SG,B) - separates the faces of a solid that are relevant for boolean operation with a second body
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-09 as class: SURFACES)
%
% In future the number of boundary edges are als calucated to analyze the
% different parts the solid is separted into. (Status of: 2020-12-10)
%
% Introduced first in SolidGeometry 5.0
%
% See also: crossingfacets2VLFL, SGisInterior
%
% fii=FLofcrossingSG(SG,B)
% === INPUT PARAMETERS ===
% SG: Solid
% B: Solid to check interference
% === OUTPUT RESULTS ======
% fii: facet index of SG that intersects B
%
% EXAMPLE:
% SG=SGreadSTL('/Volumes/LUETH-WIN/STL Dateien/ADAM360/Adam360mono.STL');
%
%
% See also: crossingfacets2VLFL, SGisInterior
%
%
% Copyright 2020 Tim C. Lueth

VLprojection2SG(SG,VL,ez)- projects a Vertex list in parallel projection to a solid

VLprojection2SG(SG,VL,ez)% VLprojection2SG(SG,VL,ez) - projects a Vertex list in parallel projection to a solid
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-08 as class: ANALYTICAL GEOMETRY)
%
% this is not the 1st implementation ;-) but it was easier to implement
% than to search for the name (Status of: 2020-12-09)
%
% Introduced first in SolidGeometry 5.0
%
% See also: VLprojection
%
% VLN=VLprojection2SG(SG,VL,ez)
% === INPUT PARAMETERS ===
% SG: Solid to project to
% VL: Vertex list
% ez: normal vector
% === OUTPUT RESULTS ======
% VLN: Corresponding projection points; nan if there is no projection
% point
%
% EXAMPLE:
% PL=PLcircle(10); VL=VLaddz(PL,0); VL=VL(:,[1 3 2]);
% VLprojection2SG(SGbox,VL,[0 -1 0])
%
% See also: VLprojection
%
%
% Copyright 2020-2021 Tim C. Lueth

SGhullstripsagittal(A,x,b,w)- returns a string around the sagital plane

SGhullstripsagittal(A,x,b,w)% SGhullstripsagittal(A,x,b,w) - returns a string around the sagital plane
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-08 as class: MODELING PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: CPLofSGhull, CPLfft
%
% X=SGhullstripsagittal(A,[x,b,w])
% === INPUT PARAMETERS ===
% A: Solid
% x: x coordinate of the strip center
% b: width of the strip
% w: wall thickness of strip
% === OUTPUT RESULTS ======
% X: Solid Geometry of the Strip
%
% EXAMPLE:
% SGhullstripsagittal(SGbox,0,5,1)
%
% See also: CPLofSGhull, CPLfft
%
%
% Copyright 2020 Tim C. Lueth

SGTframeselect(SG,Fset)- Fnct to select frame set

SGTframeselect(SG,Fset)% SGTframeselect(SG,Fset) - Fnct to select frame set
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-06 as class: KINEMATICS AND FRAMES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGTframeplot
%
% Fi=SGTframeselect(SG,Fset)
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% Fset: Starting Letter or set of starting letter
% === OUTPUT RESULTS ======
% Fi: Logical index of T
%
% EXAMPLE:
% SGTframeselect(SGbox,'Y')
% SGTframeselect(SGbox,'X')
% SGTframeselect(SGbox,{'Y','X'})
%
% See also: SGTframeplot
%
%
% Copyright 2020 Tim C. Lueth

SGNameplate(txt,siz,D,wall)- returns name plates

SGNameplate(txt,siz,D,wall)% SGNameplate(txt,siz,D,wall) - returns name plates
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-06 as class: MODELING PROCEDURES)
%
% names plates can be fixed to robots by screws instead of always
% printing the new geometry (Status of: 2020-12-20)
%
% Introduced first in SolidGeometry 5.0
%
% See also: CPLoftext, SGofCPLz
%
% SGNameplate([txt,siz,D,wall])
% === INPUT PARAMETERS ===
% txt: text such as 'Luisa'
% siz: size in mm; default is [0 15 2]
% D: Diameter of Holes
% wall: Distance default is [ D D/2]
%
% EXAMPLE: SGNameplate ('Yannick #1',16)
%
% See also: CPLoftext, SGofCPLz
%
%
% Copyright 2020 Tim C. Lueth

findVLrankmax(VL)- find the first rows of a list that creates a matrix of rank(size(VL,2))

findVLrankmax(VL)% findVLrankmax(VL) - find the first rows of a list that creates a matrix of rank(size(VL,2))
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-06 as class: ANALYTICAL GEOMETRY)
%
% Introduced first in SolidGeometry 5.0
%
% See also: rank
%
% [VL3,si]=findVLrankmax(VL)
% === INPUT PARAMETERS ===
% VL: Vertex list a,b
% === OUTPUT RESULTS ======
% VL3: rows that create a max rank matrix
% si: indices in VL
%
% EXAMPLE:
% findVLrankmax([0 0 0;1 0 0; 0 1 0; 0 0 1])
% findVLrankmax([0 0 0;1 0 0; 2 0 0; 3 0 0])
%
% See also: rank
%
%
% Copyright 2020 Tim C. Lueth

SGTregisterframes(A,B,NA,NB,usez)- finds the optimal HT matrix to register two sets of frames

SGTregisterframes(A,B,NA,NB,usez)% SGTregisterframes(A,B,NA,NB,usez) - finds the optimal HT matrix to register two sets of frames
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-05 as class: KINEMATICS AND FRAMES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGTsetofRL
%
% [T,NSB,A]=SGTregisterframes(A,[B,NA,NB,usez])
% === INPUT PARAMETERS ===
% A: Solid A
% B: Solid B
% NA: Frame name wildcard or cell list of A; default is empty
% NB: Frame name wildcard or cell list of B; default is NA
% usez: if true, only set with same ez are options; default is true
% === OUTPUT RESULTS ======
% T: Transformation Matrix
% NSB: Transformed Sold with removed Frames
% A: Solid with removed Frames
%
% EXAMPLE:
% load Yannick_robot.mat
% SGTsetofRL(YKShoulder,'','Servo'); A=ans
% SGTsetofRL(YKShoulderServo,'','Screw'); B=ans
% SGTregisterframes(A,B,'Servo','Screw')
% SGTregisterframes(A,B,{'Servo03','Servo05','Servo07'},{'Screw02','Screw07','Screw05'})
%
% See also: SGTsetofRL
%
%
% Copyright 2020-2021 Tim C. Lueth

SGTsetofRL(SG,RL,N,minmaxR,minmaxW)- creates frames from radial contour of a surface

SGTsetofRL(SG,RL,N,minmaxR,minmaxW)% SGTsetofRL(SG,RL,N,minmaxR,minmaxW) - creates frames from radial contour of a surface
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-04 as class: KINEMATICS AND FRAMES)
%
% could be improved in future to be more robust in accepting errors in
% design (Status of: 2020-12-10)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGTregisterframes
%
% SG=SGTsetofRL([SG,RL,N,minmaxR,minmaxW])
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% RL: Optional Radial Contour list (CVLdimensioning) - [cx cy cz Nr deg R
% vx vy vz]
% N: Starting Letter for Frames; default is "Hole"
% minmaxR: mimimal and maximal radius to consider default is [1.25 10]
% minmaxW: minimal & maxium circum angle to consider; default is [40 360]
%
% === OUTPUT RESULTS ======
% SG: New Solid with additional Frames
%
% EXAMPLE:
% load Yannick_robot.mat
% SGTsetofRL(YKShoulder,'','Servo'); A=ans
% SGTsetofRL(YKShoulderServo,'','Screw'); B=ans
% SGTregisterframes(A,'Servo',B,'Screw')
%
% See also: SGTregisterframes
%
%
% Copyright 2020-2021 Tim C. Lueth

cell2strlines(tab,nl,sing)- convertes a cell list fo string tinto a single string line

cell2strlines(tab,nl,sing)% cell2strlines(tab,nl,sing) - convertes a cell list fo string tinto a single string line
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-03 as class: AUXILIARY PROCEDURES)
%
% Needs to be changed (Status of: 2020-12-06)
%
% Introduced first in SolidGeometry 5.0
%
% See also: splitlines, ismemberincell
%
% outstr=cell2strlines(tab,[nl,sing])
% === INPUT PARAMETERS ===
% tab: cell list of string
% nl: number of elements per line; default is 10000
% sing: separate string by separation char such as """ or ''
% === OUTPUT RESULTS ======
% outstr: outstring
%
% EXAMPLE:
% cell2strlines({'A','B','C'})
% cell2strlines({'A','B','C'},6)
% cell2strlines({'A','B','C'},6,true)
% cell2strlines({'A','B','C'},6,'"')
%
% See also: splitlines, ismemberincell
%
%
% Copyright 2020-2021 Tim C. Lueth

SGlinkchain(L1,D,M)- returns a foldable link chain

SGlinkchain(L1,D,M)% SGlinkchain(L1,D,M) - returns a foldable link chain
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-02 as class: MODELING PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGManipulatorLink
%
% [SGA,SGB]=SGlinkchain([L1,D,M])
% === INPUT PARAMETERS ===
% L1: Lenght; default is 120mm for LCL
% D: Diameter; default is 12mm for LCL
% M: DIN912/985; default is [3 8] for M3 x 8 DIN912
% === OUTPUT RESULTS ======
% SGA: Long leg or {Part A, PartB}
% SGB: Short leg
%
% EXAMPLE:
% SGlinkchain
% SGlinkchain(120,12,[3 8]);
%
% See also: SGManipulatorLink
%
%
% Copyright 2020 Tim C. Lueth

SGDIN7991head(M,L)- countersunk screw DIN 7991

SGDIN7991head(M,L)% SGDIN7991head(M,L) - countersunk screw DIN 7991
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-02 as class: MODELING PROCEDURES)
%
% countersunk screw (Status of: 2020-12-03)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGDIN433, SGDIN464, SGDIN912, SGDIN912head, SGDIN965,
% SGDIN965, SGDIN965head, SGDIN985
%
% [SG,l]=SGDIN7991head([M,L])
% === INPUT PARAMETERS ===
% M: metric treat diameter
% L: if true; the dimensions are ISO conform not DIN; default is DIN
% === OUTPUT RESULTS ======
% SG: countersunk screw head Geometry
% l: length of the head
%
% EXAMPLE:
% SGDIN7991head(3)
% SGDIN7991head(3,8)
%
%
% See also: SGDIN433, SGDIN464, SGDIN912, SGDIN912head, SGDIN965,
% SGDIN965, SGDIN965head, SGDIN985
%
%
% Copyright 2020 Tim C. Lueth

SGTcheckSTLwrite (A)- A simple test fnct to double check the writing of frames into STL files

SGTcheckSTLwrite (A)% SGTcheckSTLwrite (A) - A simple test fnct to double check the writing of frames into STL files
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-02 as class: FILE HANDLING)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGT2SGN, SGN2SGT, SGwriteSTL, SGreadSTL
%
% SGTcheckSTLwrite([A])
% === INPUT PARAMETERS ===
% A: Solid to be checked
%
% EXAMPLE:
% load JACO_robot.mat; A=JCF;
% SGTcheckSTLwrite(A)
%
% See also: SGT2SGN, SGN2SGT, SGwriteSTL, SGreadSTL
%
%
% Copyright 2020 Tim C. Lueth

PLinbus(D,n)- similar as PLcircle but uses the wrench size

PLinbus(D,n)% PLinbus(D,n) - similar as PLcircle but uses the wrench size
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-01 as class: CLOSED POLYGON LISTS)
%
% Introduced first in SolidGeometry 5.0
%
% See also: PLhexalobular, PLcircle, PLcircseg, PLevolvente, PLgearDIN,
% PLhelix, PLkidney, PLrand, PLspiral, PLsquare, PLstar, PLcircleoval,
% PLtubbing, PLarrow, CPLcirclesofPL
%
% PL=PLinbus([D,n])
% === INPUT PARAMETERS ===
% D: DIAMETER NOT RADIUS! default is 1/4 Inch
% n: number of faces; default is 6
% === OUTPUT RESULTS ======
% PL: Point list
%
% EXAMPLE:
% PLinbus(10)
%
% See also: PLhexalobular, PLcircle, PLcircseg, PLevolvente, PLgearDIN,
% PLhelix, PLkidney, PLrand, PLspiral, PLsquare, PLstar, PLcircleoval,
% PLtubbing, PLarrow, CPLcirclesofPL
%
%
% Copyright 2020-2021 Tim C. Lueth

DIN7991(M,)- returns the DIN965/ISO7046 table for a metric threads

DIN7991(M,)% DIN7991(M,) - returns the DIN965/ISO7046 table for a metric threads
% (by Tim Lueth, VLFL-Lib, 2020-DEZ-01 as class: MECHANICAL PROCEDURES)
%
% countersunk screw DIN7991
% (Status of: 2020-12-03)
%
% Introduced first in SolidGeometry 5.0
%
% See also: DIN13, DIN20273, DIN336, DIN433, DIN464, DIN4AMfitting,
% DIN912, DIN913, DIN934, DIN965, DIN985, DINfindinTab, DINhelp,
% DINthreadtorque
%
% [M,TL,Taborder]=DIN7991(M,[])
% === INPUT PARAMETERS ===
% M: metric treat diameter
% === OUTPUT RESULTS ======
% M: M that was used for the table entry
% TL: Table entry for M
% Taborder: Names of entries
%
% EXAMPLE:
% DIN965;
% [M,TL]=DIN965(2.5)
% Wegertseder('DIN-965')
%
% See also: DIN13, DIN20273, DIN336, DIN433, DIN464, DIN4AMfitting,
% DIN912, DIN913, DIN934, DIN965, DIN985, DINfindinTab, DINhelp,
% DINthreadtorque
%
%
% Copyright 2020 Tim C. Lueth

SGtransTui(A,TA,TB)- interactive fnct to fix a surface to the ground or another solid's surface

SGtransTui(A,TA,TB)% SGtransTui(A,TA,TB) - interactive fnct to fix a surface to the ground or another solid's surface
% (by Tim Lueth, VLFL-Lib, 2020-NOV-30 as class: KINEMATICS AND FRAMES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGtransT
%
% A=SGtransTui(A,[TA,TB])
% === INPUT PARAMETERS ===
% A: Frame A
% TA: Frame to attach; default is empty
% TB: Frame to attach to or Solid B; default is eye(4)
% === OUTPUT RESULTS ======
% A: Solid attached to x/y plane or to another frame
%
% See also: SGtransT
%
%
% Copyright 2020 Tim C. Lueth

LCLYK1_create- Script to collect different STL files to create a cell list of solids

LCLYK1_create% LCLYK1_create - Script to collect different STL files to create a cell list of solids
% (by Tim Lueth, VLFL-Lib, 2020-NOV-30 as class: MODELING PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: JACOmodel
%
% LCLYK1_create
%
% EXAMPLE:
% LCLYK1_create
%
%
% See also: JACOmodel
%
%
% Copyright 2020 Tim C. Lueth

parts2single(e,m)- creates a single float from a int exponent (0 255) and a 24 Bit integer mantisse

parts2single(e,m)% parts2single(e,m) - creates a single float from a int exponent (0 255) and a 24 Bit integer mantisse
% (by Tim Lueth, HT-Lib, 2020-NOV-29 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: code3Byte2single, single2parts
%
% k=parts2single(e,m)
% === INPUT PARAMETERS ===
% e: exponent/code
% m: 24 Bit integer
% === OUTPUT RESULTS ======
% k: single precision float
%
% EXAMPLE:
% parts2single(110,1234)
% [a,b]=single2parts(parts2single(110,1234))
%
% See also: code3Byte2single, single2parts
%
%
% Copyright 2020 Tim C. Lueth

code3Byte2single(e,u)- converts 3 Bytes plus 8 Bit code into a single

code3Byte2single(e,u)% code3Byte2single(e,u) - converts 3 Bytes plus 8 Bit code into a single
% (by Tim Lueth, VLFL-Lib, 2020-NOV-29 as class: AUXILIARY PROCEDURES)
%
% There is a warning if exp/code 0 126 or 127 is used. This is reserver
% for 0 and 0.5 to (Status of: 2020-11-29)
%
% Introduced first in SolidGeometry 5.0
%
% See also: parts2single, single2parts
%
% k=code3Byte2single(e,u)
% === INPUT PARAMETERS ===
% e: code/exponent (no 0, 126, 127)
% u: 3 Bytes uint8
% === OUTPUT RESULTS ======
% k: single precision 4 Bytes coded
%
% EXAMPLE:
% code3Byte2single(33,'456')
% [a,b,c,d]=single2parts(code3Byte2single(33,'456')), char(d)
%
% See also: parts2single, single2parts
%
%
% Copyright 2020 Tim C. Lueth

single2parts(k)- returns the parts of a 32 Bit float

single2parts(k)% single2parts(k) - returns the parts of a 32 Bit float
% (by Tim Lueth, VLFL-Lib, 2020-NOV-29 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: parts2single, code3Byte2single
%
% [e,m,s,ub]=single2parts(k)
% === INPUT PARAMETERS ===
% k: single precision number
% === OUTPUT RESULTS ======
% e: 8 Bit Exponent mantisse (>1 ==128..255, <1 == 0..128)
% m: 23 Bit fraction mantisse
% s: sign; 0==1positive 1==negative
% ub: 3 uint8 Bytes (sign plus mantisse, 24 Bit)
%
% EXAMPLE:
% [a,b,c,d]=single2parts(1e-4)
%
% See also: parts2single, code3Byte2single
%
%
% Copyright 2020 Tim C. Lueth

SGMacBookPlate- just plots a stand for a keyboard ontop of a 13" McBook

SGMacBookPlate% SGMacBookPlate - just plots a stand for a keyboard ontop of a 13" McBook
% (by Tim Lueth, VLFL-Lib, 2020-NOV-29 as class: MODELING PROCEDURES)
%
% In case of the defect keyboards of McBooks it is easier to buy a new
% keyboard and put it ontop of the Mac instead of sending the computer in
% to repair.
% Printing time 4 h or 9 h depending on the orientation on a anycubic
% Predator (Status of: 2020-11-29)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGmakitaadapter
%
% A=SGMacBookPlate
% === OUTPUT RESULTS ======
% A: Solid Geometry
%
% EXAMPLE:
% SGMacBookPlate % Printing time 4h09 min on Anycubic Predator
%
% See also: SGmakitaadapter
%
%
% Copyright 2020 Tim C. Lueth

uintdecodesingle(k,lim)- returns an unsigned int created from the mantisse of a 32 bit float

uintdecodesingle(k,lim)% uintdecodesingle(k,lim) - returns an unsigned int created from the mantisse of a 32 bit float
% (by Tim Lueth, VLFL-Lib, 2020-NOV-28 as class: AUXILIARY PROCEDURES)
%
% =======================================================================
% OBSOLETE (2020-12-02) - USE 'single2parts' INSTEAD
% =======================================================================
%
% numbers can be coded using a binary exponent
% code3Byte2single, parts2single, single2parts (Status of: 2020-12-02)
%
% Introduced first in SolidGeometry 5.0
%
% See also: [ single2parts ] ; uintdecodesingle, uintcodeassingle
%
% u=uintdecodesingle(k,[lim])
% === INPUT PARAMETERS ===
% k: single float
% lim: limit for exponent; default is 1e-4
% === OUTPUT RESULTS ======
% u: unsigned integer
%
% EXAMPLE:
% uintdecodesingle(1e-5)
% uintcodeassingle(ans)
%
%
% See also: [ single2parts ] ; uintdecodesingle, uintcodeassingle
%
%
% Copyright 2020 Tim C. Lueth

uintcodeassingle(u,lim)- returns an unsigned int as mantisse of a 32 bit float

uintcodeassingle(u,lim)% uintcodeassingle(u,lim) - returns an unsigned int as mantisse of a 32 bit float
% (by Tim Lueth, VLFL-Lib, 2020-NOV-28 as class: AUXILIARY PROCEDURES)
%
% =======================================================================
% OBSOLETE (2020-12-02) - USE 'parts2single' INSTEAD
% =======================================================================
%
% numbers can be coded using a binary exponent
% code3Byte2single, parts2single, single2parts (Status of: 2020-12-02)
%
% Introduced first in SolidGeometry 5.0
%
% See also: [ parts2single ] ; uintdecodesingle
%
% k=uintcodeassingle(u,[lim])
% === INPUT PARAMETERS ===
% u: unsigned int
% lim: limit for exponent; default is 1e-4
% === OUTPUT RESULTS ======
% k: single precision float smaller than 2 times lim
%
% EXAMPLE:
% uintcodeassingle(12345)
% uintdecodesingle(ans)
%
% See also: [ parts2single ] ; uintdecodesingle
%
%
% Copyright 2020 Tim C. Lueth

SGframecode2str(k)- returns a 3 char string from a single

SGframecode2str(k)% SGframecode2str(k) - returns a 3 char string from a single
% (by Tim Lueth, VLFL-Lib, 2020-NOV-25 as class: AUXILIARY PROCEDURES)
%
% =======================================================================
% OBSOLETE (2020-12-02) - USE 'single2parts' INSTEAD
% =======================================================================
%
% Better use SGT2SGN, SGN2SGT directly (Status of: 2020-12-02)
%
% Introduced first in SolidGeometry 5.0
%
% See also: [ single2parts ] ; SGTdecodeframes, SGTcodingframes,
% str2SGframecode
%
% str=SGframecode2str(k)
% === INPUT PARAMETERS ===
% k: single float
% === OUTPUT RESULTS ======
% str: string
%
% EXAMPLE:
% SGframecode2str( 7.963726e-06)
% str2SGframecode(' '); k=ans, SGframecode2str(k)
% str2SGframecode('A'); k=ans, SGframecode2str(k)
% str2SGframecode('TCL'); k=ans, SGframecode2str(k)
% str2SGframecode('TCLTCL'); k=ans, SGframecode2str(k)
%
% See also: [ single2parts ] ; SGTdecodeframes, SGTcodingframes,
% str2SGframecode
%
%
% Copyright 2020 Tim C. Lueth

str2SGframecode(Name,codmet)- returns a length limited string into a double

str2SGframecode(Name,codmet)% str2SGframecode(Name,codmet) - returns a length limited string into a double
% (by Tim Lueth, VLFL-Lib, 2020-NOV-25 as class: AUXILIARY PROCEDURES)
%
% =======================================================================
% OBSOLETE (2020-12-02) - USE 'code3Byte2single' INSTEAD
% =======================================================================
%
% Introduced first in SolidGeometry 5.0
%
% See also: [ code3Byte2single ] ; SGTdecodeframes, SGTcodingframes,
% SGframecode2str
%
% k=str2SGframecode(Name,[codmet])
% === INPUT PARAMETERS ===
% Name: string
% codmet: coding method; default is step
% === OUTPUT RESULTS ======
% k: float
%
% EXAMPLE:
% str2SGframecode(' '); k=ans, SGframecode2str(k)
% str2SGframecode('A'); k=ans, SGframecode2str(k)
% str2SGframecode('TCL'); k=ans, SGframecode2str(k)
% str2SGframecode('TCLTCL'); k=ans, SGframecode2str(k)
%
% See also: [ code3Byte2single ] ; SGTdecodeframes, SGTcodingframes,
% SGframecode2str
%
%
% Copyright 2020 Tim C. Lueth

SGT2SGN(SGT)- inserts frame information into the vertices and facets of a SG and removes the frame structures

SGT2SGN(SGT)% SGT2SGN(SGT) - inserts frame information into the vertices and facets of a SG and removes the frame structures
% (by Tim Lueth, VLFL-Lib, 2020-NOV-24 as class: KINEMATICS AND FRAMES)
%
% concept by Tim Lueth to hide information of different types in STL
% files without the need for XML (Status of: 2020-12-01)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGN2SGT, SGreadSTL, SGwriteSTL
%
% SG=SGT2SGN([SGT])
% === INPUT PARAMETERS ===
% SGT: Solid Geometry with Frames
% === OUTPUT RESULTS ======
% SG: Solid Geometry with coded frames and a normal vector list
%
% EXAMPLE:
% SGTset(SGbox,'TCL',TofP([0 0 25])); SG=ans;
% SGT2SGN(SG); A=ans
% SGN2SGT(A); B=ans;
% SGfigure(-30,30); SGTplotalpha(B);
%
% SGT2SGN(SG); A=ans; SGwriteSTL(A,'Codingtest');
% A=SGreadSTL('/Users/lueth/Desktop/Codingtest.STL'); SGN2SGT(A); B=ans
%
% See also: SGN2SGT, SGreadSTL, SGwriteSTL
%
%
% Copyright 2020 Tim C. Lueth

SGN2SGT(SG,del)- finds hidden coded frames in a SG and creates frames for the solid

SGN2SGT(SG,del)% SGN2SGT(SG,del) - finds hidden coded frames in a SG and creates frames for the solid
% (by Tim Lueth, VLFL-Lib, 2020-NOV-24 as class: KINEMATICS AND FRAMES)
%
% concept by Tim Lueth to hide information of different types in STL
% files without the need for XML (Status of: 2020-12-01)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGT2SGN, SGreadSTL, SGwriteSTL
%
% SGT=SGN2SGT(SG,[del])
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% del: if true; the coded facets are removed; default is true;
% === OUTPUT RESULTS ======
% SGT: Solid Geometry including frames
%
% EXAMPLE:
% SGTset(SGbox,'TCL',TofP([0 0 25])); SG=ans;
% SGT2SGN(SG); A=ans
% SGN2SGT(A); B=ans;
% SGfigure(-30,30); SGTplotalpha(B);
%
% SGT2SGN(SG); A=ans; fname=SGwriteSTL(A,'Codingtest');
% A=SGreadSTL(fname); SGN2SGT(A); B=ans
%
% See also: SGT2SGN, SGreadSTL, SGwriteSTL
%
%
% Copyright 2020 Tim C. Lueth

SGFilamentHolderFixation(M,D)- returns a plate to fixate the distance of two independent filament holder stands type OTOTEC

SGFilamentHolderFixation(M,D)% SGFilamentHolderFixation(M,D) - returns a plate to fixate the distance of two independent filament holder stands type OTOTEC
% (by Tim Lueth, VLFL-Lib, 2020-NOV-23 as class: MODELING PROCEDURES)
%
% M2.5 screws would work. The distance within the slot of one filamet
% roller is 70mmm
% Distance of Filamentroller for Amazon Basic PLA 1.0kg = 72.0mm
% Distance of Filamentroller for BASF Ultrafuse PLA 2.5kg = 97.5mm
% (Status of: 2020-11-23)
%
% Introduced first in SolidGeometry 5.0
%
% See also: https://www.amazon.de/gp/product/B08LD3ZNJH
%
% SG=SGFilamentHolderFixation([M,D])
% === INPUT PARAMETERS ===
% M: Screw Diameter; default is 2.5
% D: Distance between Roller and Distance in a slot; default is [97.5 70]
% === OUTPUT RESULTS ======
% SG: SG for 3D Print
%
% EXAMPLE:
% SGFilamentHolderFixation
% SGFilamentHolderFixation(2.5,72.0) % Distance for Amazon 1kg
% SGFilamentHolderFixation(2.5,97.5) % Distance for Amazon 1kg
% SGFilamentHolderFixation(2.5,[97.5 20]) % Slim version Distance for Amazon 1kg
%
% See also: https://www.amazon.de/gp/product/B08LD3ZNJH
%
%
% Copyright 2020 Tim C. Lueth

SGDIN965(M,L,iso,typ)- returns the DIN965/ISO7046 table for a metric threads

SGDIN965(M,L,iso,typ)% SGDIN965(M,L,iso,typ) - returns the DIN965/ISO7046 table for a metric threads
% (by Tim Lueth, VLFL-Lib, 2020-NOV-23 as class: MODELING PROCEDURES)
%
% countersunk screw .The table DIN985/ISO4762 has the following columns.
% All values are given in millimeter
% There is a difference in ISO and DIN. (Status of: 2020-11-24)
%
% Introduced first in SolidGeometry 5.0
%
% See also: DIN13, DIN336, DIN464, DIN912, DIN913, DIN985, DINfindinTab,
% DINhelp, DINthreadtorque
%
% [SG,l]=SGDIN965([M,L,iso,typ])
% === INPUT PARAMETERS ===
% M: metric treat diameter
% L: Length of the screw including head
% iso: if true; the dimensions are ISO conform not DIN; default is DIN
% typ: fine, middle or coarse if subtraction solid for drilling hole
% === OUTPUT RESULTS ======
% SG: countersunk screw head Geometry
% l: length of the head
%
% EXAMPLE:
% SGDIN965head(2.5)
% SGDIN965(3,6)
%
% See also: DIN13, DIN336, DIN464, DIN912, DIN913, DIN985, DINfindinTab,
% DINhelp, DINthreadtorque
%
%
% Copyright 2020 Tim C. Lueth

SGDIN965(M,L,iso)- returns the DIN965/ISO7046 table for a metric threads

SGDIN965(M,L,iso)% SGDIN965(M,L,iso) - returns the DIN965/ISO7046 table for a metric threads
% (by Tim Lueth, VLFL-Lib, 2020-NOV-22 as class: MODELING PROCEDURES)
%
% countersunk screw .The table DIN985/ISO4762 has the following columns.
% All values are given in millimeter
% There is a difference in ISO and DIN. (Status of: 2020-11-22)
%
% Introduced first in SolidGeometry 5.0
%
% See also: DIN13, DIN336, DIN464, DIN912, DIN913, DIN985, DINfindinTab,
% DINhelp, DINthreadtorque
%
% [SG,l]=SGDIN965([M,L,iso])
% === INPUT PARAMETERS ===
% M: metric treat diameter
% L: Length of the screw including head
% iso: if true; the dimensions are ISO conform not DIN; default is DIN
% === OUTPUT RESULTS ======
% SG: countersunk screw head Geometry
% l: length of the head
%
% EXAMPLE:
% SGDIN965head(2.5)
% SGDIN965(3,6)
%
% See also: DIN13, DIN336, DIN464, DIN912, DIN913, DIN985, DINfindinTab,
% DINhelp, DINthreadtorque
%
%
% Copyright 2020 Tim C. Lueth

DIN20273(M,typ)- Diameter of drilling holes wrt to DIN EN 20273

DIN20273(M,typ)% DIN20273(M,typ) - Diameter of drilling holes wrt to DIN EN 20273
% (by Marie Lueth & Tim Lueth, VLFL-Lib, 2020-NOV-22 as class: AUXILIARY
% PROCEDURES)
%
% fine is the same as the inner diameter of a washer wrt DIN 433 (Status
% of: 2020-12-03)
%
% Introduced first in SolidGeometry 5.0
%
% See also: DIN13, DIN336, DIN433, DIN464, DIN4AMfitting, DIN7991,
% DIN912, DIN913, DIN934, DIN965, DIN985, DINfindinTab, DINhelp,
% DINthreadtorque
%
% [M,TL,c]=DIN20273(M,[typ])
% === INPUT PARAMETERS ===
% M: 0 for table or M for line
% typ: fine, middle or coarse as optionl default is empty
% === OUTPUT RESULTS ======
% M: Used metric Diameter
% TL: Table of Washers diameter
% c: recommendation for play
%
% EXAMPLE:
% DIN20273
% DIN20273(0)
% [a,b]=DIN20273(2.5)
%
% See also: DIN13, DIN336, DIN433, DIN464, DIN4AMfitting, DIN7991,
% DIN912, DIN913, DIN934, DIN965, DIN985, DINfindinTab, DINhelp,
% DINthreadtorque
%
%
% Copyright 2020 Tim C. Lueth

SGDIN965head(M,iso,ch)- returns the DIN965/ISO7046 table for a metric threads

SGDIN965head(M,iso,ch)% SGDIN965head(M,iso,ch) - returns the DIN965/ISO7046 table for a metric threads
% (by Tim Lueth, VLFL-Lib, 2020-NOV-22 as class: MODELING PROCEDURES)
%
% countersunk screw .The table DIN985/ISO4762 has the following columns.
% All values are given in millimeter
% There is a difference in ISO and DIN. (Status of: 2020-11-22)
%
% Introduced first in SolidGeometry 5.0
%
% See also: DIN13, DIN336, DIN464, DIN912, DIN913, DIN985, DINfindinTab,
% DINhelp, DINthreadtorque
%
% [SG,l]=SGDIN965head([M,iso,ch])
% === INPUT PARAMETERS ===
% M: metric treat diameter
% iso: if true; the dimensions are ISO conform not DIN; default is DIN
% ch:
% === OUTPUT RESULTS ======
% SG: countersunk screw head Geometry
% l: length of the head
%
% EXAMPLE:
% SGDIN965head(2.5)
%
% See also: DIN13, DIN336, DIN464, DIN912, DIN913, DIN985, DINfindinTab,
% DINhelp, DINthreadtorque
%
%
% Copyright 2020 Tim C. Lueth

DIN965(M,)- returns the DIN965/ISO7046 table for a metric threads

DIN965(M,)% DIN965(M,) - returns the DIN965/ISO7046 table for a metric threads
% (by Tim Lueth, VLFL-Lib, 2020-NOV-22 as class: MECHANICAL PROCEDURES)
%
% countersunk screw
% The table DIN985/ISO4762 has the following columns. All values are
% given in millimeter
% 'M','No_thread','Hight_Head_DIN','Hight_Head_ISO','D_Head_DIN','D_Head_
% ISO'
% (Status of: 2020-12-03)
%
% Introduced first in SolidGeometry 5.0
%
% See also: DIN13, DIN20273, DIN336, DIN433, DIN464, DIN4AMfitting,
% DIN7991, DIN912, DIN913, DIN934, DIN985, DINfindinTab, DINhelp,
% DINthreadtorque
%
% [M,TL,Taborder]=DIN965(M,[])
% === INPUT PARAMETERS ===
% M: metric treat diameter
% === OUTPUT RESULTS ======
% M: M that was used for the table entry
% TL: Table entry for M
% Taborder: Names of entries
%
% EXAMPLE:
% DIN965;
% [M,TL]=DIN965(2.5)
% Wegertseder('DIN-965')
%
% See also: DIN13, DIN20273, DIN336, DIN433, DIN464, DIN4AMfitting,
% DIN7991, DIN912, DIN913, DIN934, DIN985, DINfindinTab, DINhelp,
% DINthreadtorque
%
%
% Copyright 2020 Tim C. Lueth

SGprofilesurfacedimension(SG,fi,sw)- creates a drawing of the touched surface

SGprofilesurfacedimension(SG,fi,sw)% SGprofilesurfacedimension(SG,fi,sw) - creates a drawing of the touched surface
% (by Tim Lueth, VLFL-Lib, 2020-NOV-21 as class: CHECKING PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGprofiledepthdimension
%
% [PL,RL,fi]=SGprofilesurfacedimension([SG,fi,sw])
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% fi: optional facet index
% sw: Definde contour levels
% === OUTPUT RESULTS ======
% PL: Point list
% RL: Radii list
% fi: facet index
%
% EXAMPLE:
% loadweb JACO_robot.mat
% SGprofilesurfacedimension(JC2)
% SGprofilesurfacedimension(JC2,6)
%
% See also: SGprofiledepthdimension
%
%
% Copyright 2020 Tim C. Lueth

SGprofiledepthdimension(SG,fi,sw)- interactive funtion that returns the distance between surfaces

SGprofiledepthdimension(SG,fi,sw)% SGprofiledepthdimension(SG,fi,sw) - interactive funtion that returns the distance between surfaces
% (by Tim Lueth, VLFL-Lib, 2020-NOV-20 as class: CHECKING PROCEDURES)
%
% extracted from exp_2020_11_20_Profile (Status of: 2020-11-22)
%
% Introduced first in SolidGeometry 5.0
%
% See also: fiofselect3d, pofselect3D, crosspointVLFL,
% SGprofilesurfacedimension
%
% [dl,fi]=SGprofiledepthdimension([SG,fi,sw])
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% fi: facet index
% sw: single wall; if true only the touched surface is returned
% === OUTPUT RESULTS ======
% dl: list of wall thickness along the line
% fi: touched facet index
%
% EXAMPLE:
% loadweb JACO_robot.mat
% SGprofiledepthdimension(JC2)
% SGprofiledepthdimension(JC2,2451)
%
%
% See also: fiofselect3d, pofselect3D, crosspointVLFL,
% SGprofilesurfacedimension
%
%
% Copyright 2020 Tim C. Lueth

fiofselect3d(SG,pfi,alp,mbf,Text)- Select interactively FS, surface, and complete solids

fiofselect3d(SG,pfi,alp,mbf,Text)% fiofselect3d(SG,pfi,alp,mbf,Text) - Select interactively FS, surface, and complete solids
% (by Tim Lueth, VLFL-Lib, 2020-NOV-20 as class: EXPERIMENTS)
%
% identical to SGselect3Dsurface, but different return values
% 1 = left mouse button = feature surface
% 3 = right mouse button = complete surface
% 2 = middle mouse button/wheel = solid geometry that belongs to object
% (Status of: 2021-03-13)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGselect3d, SGselect3dPL, select3d, SGselect3Dsurface
%
% [fi,fil,T,pp]=fiofselect3d([SG,pfi,alp,mbf,Text])
% === INPUT PARAMETERS ===
% SG: Solid Geometry; if empty SGofgca is used
% pfi: optional already preselected facet index
% alp: angle to select faces
% mbf: force button mode 1, 2, 3
% Text: Optional text for the header of the windows
% === OUTPUT RESULTS ======
% fi: touched facet index
% fil: Facet index list that belongs to touched graphics object
% T: Frame of FS
% pp:
%
% EXAMPLE:
% loadweb JACO_robot.mat
% fiofselect3d(JC0)
%
% See also: SGselect3d, SGselect3dPL, select3d, SGselect3Dsurface
%
%
% Copyright 2020-2021 Tim C. Lueth

SGsupportFS(SG,fi,wt,in)- STL processing fnct to increase or reduce the wall thick by material support

SGsupportFS(SG,fi,wt,in)% SGsupportFS(SG,fi,wt,in) - STL processing fnct to increase or reduce the wall thick by material support
% (by Tim Lueth, VLFL-Lib, 2020-NOV-20 as class: MODELING PROCEDURES)
%
% This fnctn is used to increase the wallthickss of FS by simply adding
% an additional material support ontop
% extracted from exp_2020_11_20_FSgrow (Status of: 2020-11-20)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGsurfacecutoutncover, SGgrowoutsideFS, SGofSurface,
% VLFLofSGTsurface, SGofSGTsurface, SGsurfaceselect
%
% SG=SGsupportFS([SG,fi,wt,in])
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% fi: list of indices of different FS
% wt: wall thickness; default is 2.5mm can also be negative
% in: intrusion; default is -0.05 == 50µm
% === OUTPUT RESULTS ======
% SG: Concat Geometry
%
% EXAMPLE:
% SGsupportFS(SGbox,[4 6]) % create supprting walls
%
% See also: SGsurfacecutoutncover, SGgrowoutsideFS, SGofSurface,
% VLFLofSGTsurface, SGofSGTsurface, SGsurfaceselect
%
%
% Copyright 2020 Tim C. Lueth

SGsurfacecutoutncover(SG,delta,VLC)- cuts out a contour and create a CONVEX solid to cover the cavity

SGsurfacecutoutncover(SG,delta,VLC)% SGsurfacecutoutncover(SG,delta,VLC) - cuts out a contour and create a CONVEX solid to cover the cavity
% (by Tim Lueth, VLFL-Lib, 2020-NOV-15 as class: MODELING PROCEDURES)
%
% extracted from exp_2020_11_11_close
% Mainly and interactive fnctn to fill in opening in solids before
% creating new holes for connectors or integrated mechanisms in solids.
% It can be used to close drilling holes for screws, opening for
% electrical connectors, remove surface text both engraved letters and
% relief letters. (Status of: 2020-11-20)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGsupportFS
%
% [SG,B]=SGsurfacecutoutncover([SG,delta,VLC])
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% delta: depth to cut
% VLC: convex point list for cutting
% === OUTPUT RESULTS ======
% SG: Solid geometry with removed contour
% B: Cover plate to close the removed contour
%
% See also: SGsupportFS
%
%
% Copyright 2020 Tim C. Lueth

SGsample4APredator- Creates the SG for the Anycubic Z-Level testing solid

SGsample4APredator% SGsample4APredator - Creates the SG for the Anycubic Z-Level testing solid
% (by Tim Lueth, VLFL-Lib, 2020-NOV-08 as class: MODELING PROCEDURES)
%
% The original Anycubic Z-Level testing solid for the
% Predator/Delta-robot ist available only as gcode
% contains
% SGwriteSTL(SG,'SGsample4APredator');
% (Status of: 2020-11-08)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGsample
%
% SG=SGsample4APredator
% === OUTPUT RESULTS ======
% SG: Solid Geometry
%
% EXAMPLE: Simply type
% SGsample4APredator
%
%
% See also: SGsample
%
%
% Copyright 2020 Tim C. Lueth

clear4lectures(text)- Auxiliary fnct for Tim Lueth to record lectures using Matlab and OBS

clear4lectures(text)% clear4lectures(text) - Auxiliary fnct for Tim Lueth to record lectures using Matlab and OBS
% (by Tim Lueth, VLFL-Lib, 2020-NOV-02 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: clcl, clcd
%
% clear4lectures([text])
% === INPUT PARAMETERS ===
% text: 'reset' will set 13 points, 'set will set to 20 point
%
% See also: clcl, clcd
%
%
% Copyright 2020 Tim C. Lueth

SGveribor120- returns the shape of a 120 mm Veribor

SGveribor120% SGveribor120 - returns the shape of a 120 mm Veribor
% (by Tim Lueth, VLFL-Lib, 2020-NOV-01 as class: MODELING PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGmakitaadapter, SGveribor210, SGveribor120yannick
%
% SG=SGveribor120
% === OUTPUT RESULTS ======
% SG: Solid Geometry of a Veribor 120
%
% EXAMPLE:
% SGveribor120; SG=ans;
%
% See also: SGmakitaadapter, SGveribor210, SGveribor120yannick
%
%
% Copyright 2020 Tim C. Lueth

openinmatlabeditor (fname,ln)- same as opentoline but creates a file if not existing

openinmatlabeditor (fname,ln)% openinmatlabeditor (fname,ln) - same as opentoline but creates a file if not existing
% (by Tim Lueth, VLFL-Lib, 2020-OKT-29 as class: FILE HANDLING)
%
% Introduced first in SolidGeometry 5.0
%
% See also: opentoline
%
% openinmatlabeditor(fname,[ln])
% === INPUT PARAMETERS ===
% fname: file name
% ln: line for cursor
%
% EXAMPLE:
% openinmatlabeditor('test.txt',4)
%
% See also: opentoline
%
%
% Copyright 2020 Tim C. Lueth

AWG2mm(awg,len,Ucc,Isc)- converts American Wire Gauge to Wire Diameter

AWG2mm(awg,len,Ucc,Isc)% AWG2mm(awg,len,Ucc,Isc) - converts American Wire Gauge to Wire Diameter
% (by Tim Lueth, VLFL-Lib, 2020-OKT-26 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: French2mm, mm2inch, Charriere2mm, Gauge2mm, SGcablewinch,
% PS2KW, KW2PS, Fahrenheit2Celsius
%
% dmm=AWG2mm([awg,len,Ucc,Isc])
% === INPUT PARAMETERS ===
% awg: AWG
% len: optional cable length in METER
% Ucc: optional cable voltage
% Isc: optional cable current
% === OUTPUT RESULTS ======
% dmm: Wire diameter
%
% EXAMPLE:
% AWG2mm(23,0.2)
%
% See also: French2mm, mm2inch, Charriere2mm, Gauge2mm, SGcablewinch,
% PS2KW, KW2PS, Fahrenheit2Celsius
%
%
% Copyright 2020 Tim C. Lueth

SGexplainfilefind(typ)- returns the files with names of type 'SGexplain_*.txt' in different return formats

SGexplainfilefind(typ)% SGexplainfilefind(typ) - returns the files with names of type 'SGexplain_*.txt' in different return formats
% (by Tim Lueth, VLFL-Lib, 2020-OKT-25 as class: USER INTERFACE)
%
% It is used for SGexplain fnctns (Status of: 2020-10-29)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGexplain
%
% b=SGexplainfilefind([typ])
% === INPUT PARAMETERS ===
% typ: 'file','string','comma','hyper'; default is 'string'
% === OUTPUT RESULTS ======
% b: list of files
%
% EXAMPLE:
% SGexplainfilefind('string') % String cell list
% SGexplainfilefind('hyper') % Hyperlink cell list
% SGexplainfilefind('commna') % comma separated string list
% SGexplainfilefind('file') % File name cell list
%
% See also: SGexplain
%
%
% Copyright 2020 Tim C. Lueth

KW2PS(kw)- returns Horse Power from KW

KW2PS(kw)% KW2PS(kw) - returns Horse Power from KW
% (by Tim Lueth, VLFL-Lib, 2020-OKT-25 as class: AUXILIARY PROCEDURES)
%
% more an more robots or electric drivern machines or batteries are used,
% and it is important to get a feeling for the power: ps=kw*1.36
% (Status of: 2020-10-30)
%
% Introduced first in SolidGeometry 5.0
%
% See also: PS2KW, Fahrenheit2Celsius, French2mm, mm2inch, Charriere2mm,
% Gauge2mm, AWG2mm
%
% ps=KW2PS(kw)
% === INPUT PARAMETERS ===
% kw: SI unit for power in KW
% === OUTPUT RESULTS ======
% ps: horse power value
%
% EXAMPLE:
% KW2PS(1) % A 1000W stove plate consumes more power than a horse, humans maximum 360W
%
% See also: PS2KW, Fahrenheit2Celsius, French2mm, mm2inch, Charriere2mm,
% Gauge2mm, AWG2mm
%
%
% Copyright 2020 Tim C. Lueth

PS2KW(ps)- returns KW from Horse Power

PS2KW(ps)% PS2KW(ps) - returns KW from Horse Power
% (by Tim Lueth, VLFL-Lib, 2020-OKT-25 as class: AUXILIARY PROCEDURES)
%
% more an more robots or electric drivern machines or batteries are used,
% and it is important to get a feeling for the power : kw=ps/1.36
% (Status of: 2020-10-30)
%
% Introduced first in SolidGeometry 5.0
%
% See also: PS2KW, KW2PS, Fahrenheit2Celsius, French2mm, mm2inch,
% Charriere2mm, Gauge2mm, AWG2mm
%
% kw=PS2KW(ps)
% === INPUT PARAMETERS ===
% ps: horse power value
% === OUTPUT RESULTS ======
% kw: SI unit for power in KW
%
% EXAMPLE:
% PS2KW(1) % A 1000W stove plate consumes more power than a horse, humans maximum 360W
%
% See also: PS2KW, KW2PS, Fahrenheit2Celsius, French2mm, mm2inch,
% Charriere2mm, Gauge2mm, AWG2mm
%
%
% Copyright 2020 Tim C. Lueth

SGmakitaadapter- returns the Solid Geometry of an Makita 14V-18V Akku adapter

SGmakitaadapter% SGmakitaadapter - returns the Solid Geometry of an Makita 14V-18V Akku adapter
% (by Tim Lueth, VLFL-Lib, 2020-OKT-25 as class: PARAMETRIC DESIGN)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGveribor120, SGveribor210
%
% SGP=SGmakitaadapter
% === OUTPUT RESULTS ======
% SGP: Geoemtrie for printing or integration
%
% EXAMPLE:
% SGmakitaadapter
%
% See also: SGveribor120, SGveribor210
%
%
% Copyright 2020 Tim C. Lueth

Fahrenheit2Celsius(fh)- converts temperature values from Fahrenheit to Celsius

Fahrenheit2Celsius(fh)% Fahrenheit2Celsius(fh) - converts temperature values from Fahrenheit to Celsius
% (by Tim Lueth, VLFL-Lib, 2020-OKT-22 as class: AUXILIARY PROCEDURES)
%
% Fahrenheit was a German physicist from Danzig 1686-1736. Human body
% temperature is 98 Fahrenheit
% cel=(fh-32)/1.80 (Status of: 2020-10-29)
%
% Introduced first in SolidGeometry 5.0
%
% See also: PS2KW, KW2PS, French2mm, mm2inch, Charriere2mm, Gauge2mm,
% AWG2mm
%
% cel=Fahrenheit2Celsius(fh)
% === INPUT PARAMETERS ===
% fh: temperature in Fahrenheit
% === OUTPUT RESULTS ======
% cel: temperature in Celsius/Kelvin
%
% EXAMPLE:
% Fahrenheit2Celsius(0) % Minimum liquid water temperature in 18th century
% Fahrenheit2Celsius(98) % Body Temeprature
% Fahrenheit2Celsius(250) % Steam Sterilization
%
% See also: PS2KW, KW2PS, French2mm, mm2inch, Charriere2mm, Gauge2mm,
% AWG2mm
%
%
% Copyright 2020 Tim C. Lueth

exp_2020_10_18_360degree (t)- shows and creates a movie of two robot arm segments that are limited to 360 degree movements

exp_2020_10_18_360degree (t)% exp_2020_10_18_360degree (t) - shows and creates a movie of two robot arm segments that are limited to 360 degree movements
% (by Tim Lueth, VLFL-Lib, 2020-OKT-18 as class: EXPERIMENTS)
%
% Introduced first in SolidGeometry 5.0
%
% exp_2020_10_18_360degree([t])
% === INPUT PARAMETERS ===
% t: time for video length
%
%
% Copyright 2020 Tim C. Lueth

SGisinternalframe(SG,T,)- returns weather a frame is an internal frame of a solid

SGisinternalframe(SG,T,)% SGisinternalframe(SG,T,) - returns weather a frame is an internal frame of a solid
% (by Tim Lueth, VLFL-Lib, 2020-OKT-18 as class: KINEMATICS AND FRAMES)
%
% Will be improved
% SGissurfaceframe - finds frames without feature surface list that are
% near a surface
% SGisinternalframe - finds frames without feature surface list that are
% inside a solid (Status of: 2020-10-18)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGisInterior, SGissurfaceframe
%
% VIL=SGisinternalframe(SG,T,[])
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% T: 4x4 Frame
% === OUTPUT RESULTS ======
% VIL: 1 internal, 0 = external
%
% EXAMPLE:
% load ADAM_Aframes.mat; SG=ADAM_Aframes
% SGTcut(SG,'KL',0.1); X=ans
% SGisinternalframe(X,SGTget(SG,'KL')) % KL is outward frame for one solid
% SGisinternalframe(X,SGTget(SG,'AL')) % AL is an internal frame
%
% See also: SGisInterior, SGissurfaceframe
%
%
% Copyright 2020 Tim C. Lueth

evalhyperlinktab(tab,text)- evaluates an hyperlink text input from a table

evalhyperlinktab(tab,text)% evalhyperlinktab(tab,text) - evaluates an hyperlink text input from a table
% (by Tim Lueth, VLFL-Lib, 2020-OKT-18 as class: AUXILIARY PROCEDURES)
%
% does support the style
% {'text', 'http://....'}
% {'text', '@google '}
% {'text', '@wiki '}
% {'text', '@open '}
% {'text', '@open '}
% {'text', '@matlab '}
% 'force1st'
% 'forcesort' (Status of: 2020-10-18)
%
% Introduced first in SolidGeometry 5.0
%
% See also: strhyperlink, sprintfhyperlinktab, SGexplain
%
% evalhyperlinktab([tab,text])
% === INPUT PARAMETERS ===
% tab: hyperlink table
% text: list of words including optional string forcewww for executing
% 1st entry
%
% === PROPERTY NAMES =====
% 'forcewww' : if used; the 1st link is called anyway
% 'unsort' : if used; the tab stays unsorted
%
% EXAMPLE:
% tab={'www','https://www.mw.tum.de/mimed'
% 'Gleitlager ohne Bund ab 1.5 mm','https://www.igus.de/product/1';
% 'Gleitlager 1.0 mm','https://www.igus.de/iglidur/gleitlager?sort=3&inch=false&presetindustry=1&premaxtermtemp=1&prelowtermtemp=1&presetsurpre=1&maxshaftdiam=1';};
%
% evalhyperlinktab(tab)
% evalhyperlinktab(tab,'forcewww')
% evalhyperlinktab(tab,'Gleitlager')
% evalhyperlinktab(tab,'Gleier')
% evalhyperlinktab(tab,'Gleier','forcewww')
%
% See also: strhyperlink, sprintfhyperlinktab, SGexplain
%
%
% Copyright 2020 Tim C. Lueth

AM_3DPrinting(text)- just opens the website of this company

AM_3DPrinting(text)% AM_3DPrinting(text) - just opens the website of this company
% (by Tim Lueth, VLFL-Lib, 2020-OKT-18 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 by evalhyperlinktab. These
% fnctns may be will not be part of the SG-Lib finally. (Status of:
% 2020-10-18)
%
% Introduced first in SolidGeometry 5.0
%
% See also: evalhyperlinktab, SGexplain
%
% AM_3DPrinting([text])
% === INPUT PARAMETERS ===
% text: string for search
%
% EXAMPLE:
% AM_3DPrinting
%
% See also: evalhyperlinktab, SGexplain
%
%
% Copyright 2020 Tim C. Lueth

SGTcopysurfaceframesout(SGA,SGB)- copies all frames from one solid to another solid if the frames are outward frames

SGTcopysurfaceframesout(SGA,SGB)% SGTcopysurfaceframesout(SGA,SGB) - copies all frames from one solid to another solid if the frames are outward frames
% (by Tim Lueth, VLFL-Lib, 2020-OKT-17 as class: KINEMATICS AND FRAMES)
%
% This fnctn is required in addition to SGTcopyinteralframes for SGTcut
% (Status of: 2020-10-18)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGTcopy, SGTcopynames, SGTcopyinteralframes, SGTcut
%
% SGN=SGTcopysurfaceframesout(SGA,SGB)
% === INPUT PARAMETERS ===
% SGA: Solid to copy frames to
% SGB: Solid to copy frames from
% === OUTPUT RESULTS ======
% SGN: Solid to copy frames to
%
% EXAMPLE:
% load ADAM_Aframes.mat; SG=ADAM_Aframes
%
% See also: SGTcopy, SGTcopynames, SGTcopyinteralframes, SGTcut
%
%
% Copyright 2020 Tim C. Lueth

SGissurfaceframe(SG,T,d)- returns weather a frame is an outword or inward frame for a solid

SGissurfaceframe(SG,T,d)% SGissurfaceframe(SG,T,d) - returns weather a frame is an outword or inward frame for a solid
% (by Tim Lueth, VLFL-Lib, 2020-OKT-17 as class: KINEMATICS AND FRAMES)
%
% Will be improved
% SGissurfaceframe - finds frames without feature surface list that are
% near a surface
% SGisinternalframe - finds frames without feature surface list that are
% inside a solid (Status of: 2020-10-18)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGisInterior
%
% VIL=SGissurfaceframe(SG,T,[d])
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% T: 4x4 Frame
% d: tolerance; default is 1
% === OUTPUT RESULTS ======
% VIL: 1 outward, -1=inward, 0 = neither nor
%
% EXAMPLE:
% load ADAM_Aframes.mat; SG=ADAM_Aframes
% SGTcut(SG,'KL',0.1); X=ans
% SGissurfaceframe(X,SGTget(SG,'KL')) % KL is outward frame for one solid
% SGissurfaceframe(X,SGTget(SG,'AL')) % AL is an internal frame
%
% See also: SGisInterior
%
%
% Copyright 2020 Tim C. Lueth

mimedserver2webdisk(url)- Creates a mwn webdisc link for a file or folder

mimedserver2webdisk(url)% mimedserver2webdisk(url) - Creates a mwn webdisc link for a file or folder
% (by Tim Lueth, VLFL-Lib, 2020-OKT-17 as class: USER INTERFACE)
%
% Fnctn is for staff of Professor Tim Lueth's Lab at TU Munich only.
% It opens by samba protocol directories using the server by the browser
% Shows also the link to the corresponding webdisc access
% An active VPN connection is required (Status of: 2020-10-17)
%
% Introduced first in SolidGeometry 5.0
%
% See also: loadweb, SGexplain, mimedserver
%
% wdb=mimedserver2webdisk(url)
% === INPUT PARAMETERS ===
% url: abbreviation or keyword for the call
% === OUTPUT RESULTS ======
% wdb: webdisk link to open MWN weblink; if nargout==0 webdisk is accessed
%
% EXAMPLE:
% mimedserver % to get some directories
% mimedserver doc % open the document database directory
%
% See also: loadweb, SGexplain, mimedserver
%
%
% Copyright 2020 Tim C. Lueth

AVRarduinoMega(text)- just opens the website of this company

AVRarduinoMega(text)% AVRarduinoMega(text) - just opens the website of this company
% (by Tim Lueth, VLFL-Lib, 2020-OKT-17 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: 2020-10-18)
%
% Introduced first in SolidGeometry 5.0
%
% See also: firmen, evalhyperlinktab
%
% AVRarduinoMega([text])
% === INPUT PARAMETERS ===
% text: string for search
%
% EXAMPLE:
% AVRarduinoMega
%
% See also: firmen, evalhyperlinktab
%
%
% Copyright 2020 Tim C. Lueth

SGTcut(SG,FN,d)- cuts a solid a an internal frame into separated pieced by a blade

SGTcut(SG,FN,d)% SGTcut(SG,FN,d) - cuts a solid a an internal frame into separated pieced by a blade
% (by Tim Lueth, VLFL-Lib, 2020-OKT-15 as class: KINEMATICS AND FRAMES)
%
% In contrast to SGcutT, the body is not divided by an infinitely large
% and infinitely thin cutting plane, but a cutting plate (blade) is
% created at the position of the frame, which only cuts through the
% frame. (Status of: 2020-10-17)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGcutT
%
% A=SGTcut(SG,FN,[d])
% === INPUT PARAMETERS ===
% SG: Solid Geometry with internal Frames
% FN: Frame Name
% d: [Thickness of cutting slice, buffer of CPL] default is [0.1 1]
% === OUTPUT RESULTS ======
% A: List of Surfaces
%
% EXAMPLE:
% load ADAM_Aframes.mat; SG=ADAM_Aframes
% SGTcut(SG,'VL',0.05)
% SGTcut(SG,'KL',0.1); X=ans
% SGTcut(SG,'KR',0.1); X=ans
%
% See also: SGcutT
%
%
% Copyright 2020 Tim C. Lueth

SGTcopyinteralframes(SGA,SGB)- copies frames of a solid which are located into the goal solid

SGTcopyinteralframes(SGA,SGB)% SGTcopyinteralframes(SGA,SGB) - copies frames of a solid which are located into the goal solid
% (by Tim Lueth, VLFL-Lib, 2020-OKT-15 as class: KINEMATICS AND FRAMES)
%
% This fnctn is required after cutting a solid into two pieces to find
% the corresponding frames for each piece (Status of: 2020-10-15)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGTcopy, SGTcopynames, SGTcopyinteralframes
%
%
% SGN=SGTcopyinteralframes(SGA,SGB)
% === INPUT PARAMETERS ===
% SGA: Solid to add the frames to
% SGB: Solid to copy the frames from
% === OUTPUT RESULTS ======
% SGN: Final Solid including the frames ot the Origina
%
% EXAMPLE:
% load ADAM_Aframes.mat; SG=ADAM_Aframes
% CPLofSGcutT(SG,SGTget(SG,'VL'),[0 0]); CPL=ans;
% SGofCPLz(CPLbuffer(CPL,1),[-0.5 0.5],SGTget(SG,'VL')); SGX=ans;
% A=SGsubtract(SG,SGX)
% SGsurfaces(A); A=ans; B=A{2}; C=A{1};
%
%
% See also: SGTcopy, SGTcopynames, SGTcopyinteralframes
%
%
%
% Copyright 2020 Tim C. Lueth

SGTgetframeinfo(SG,T)- returns some basic information about a frame inside a solid

SGTgetframeinfo(SG,T)% SGTgetframeinfo(SG,T) - returns some basic information about a frame inside a solid
% (by Tim Lueth, VLFL-Lib, 2020-OKT-11 as class: KINEMATICS AND FRAMES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGTsetinternalframe
%
% [cinf,CPL,VLC]=SGTgetframeinfo(SG,T)
% === INPUT PARAMETERS ===
% SG: Solid Geometru
% T: Frame
% === OUTPUT RESULTS ======
% cinf: crossing information
% CPL: crossing contour
% VLC:
%
% See also: SGTsetinternalframe
%
%
% Copyright 2020 Tim C. Lueth

SGTsetinternalframe(SG,FN,Nr)- records coordinate frames based on optional user interaction

SGTsetinternalframe(SG,FN,Nr)% SGTsetinternalframe(SG,FN,Nr) - records coordinate frames based on optional user interaction
% (by Tim Lueth, VLFL-Lib, 2020-OKT-11 as class: KINEMATICS AND FRAMES)
%
% The input based on mouse clicks on
% LEFT = CORONAL-Line of sight
% MIDDLE = AXIAL-vertical from top
% RIGHT = SAGITTAL-horizontal from right (Status of: 2020-10-11)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGTsetsurfaceframe, SGTsetofFS, SGTset
%
% SG=SGTsetinternalframe([SG,FN,Nr])
% === INPUT PARAMETERS ===
% SG: Solid Geometriy to add frames by mouse click
% FN: String for Framenames
% Nr: Number of Frames to enter; default is inf
% === OUTPUT RESULTS ======
% SG: Solid Geometry with new frames
%
% EXAMPLE:
% load ADAM_Amono.mat; SGfigure(0,0); SG=ADAM_Amono; hSG=SGplotalpha(SG,'',0.5); % just show the SG
% SGTsetinternalframe (SG) % Call as Solid
% SGTsetinternalframe (hSG) % Call as graphcis object handle
% SGTsetinternalframe (SG,'Frame',2) % Enter exact 2 Frames called "Frame01', 'Frame02'
%
%
%
% See also: SGTsetsurfaceframe, SGTsetofFS, SGTset
%
%
% Copyright 2020 Tim C. Lueth

plotannotationdelete- delete plot annotation

plotannotationdelete% plotannotationdelete - delete plot annotation
% (by Tim Lueth, VLFL-Lib, 2020-OKT-10 as class: USER INTERFACE)
%
% Since the textboxes are children of groot is is difficult to delete
% them (Status of: 2020-10-10)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGfigureannotation, SGhelptext, plotannotation,
% plotannotationtopleft, titleofcaller, annotation
%
% h=plotannotationdelete
% === OUTPUT RESULTS ======
% h: handle to deleted textboxes
%
% EXAMPLE:
% plotannotationtopleft ('A'), plotannotation('B'); shg; pause, plotannotationdelete;
%
% See also: SGfigureannotation, SGhelptext, plotannotation,
% plotannotationtopleft, titleofcaller, annotation
%
%
% Copyright 2020 Tim C. Lueth

MIMED_LCL_Control- is an "ino" file to create a robot control shell for the LCL Robot

MIMED_LCL_Control// MIMED_LCL_Control - is an "ino" file to create a robot control shell for the LCL Robot
// (by Krieger Rzepka Schiele Rehekampff, LCL-ARDUINO, 2020-OKT-10)
//
// This c file can be compiled and upload by using the arduino IDE which
// can be downloaded from www.arduino.cc for Windows, OSX, Linux.
// The description, parts list, sources, and 3D printable geometry can be
// created by the matlab toolbox SG-Lib which can be download from
// www.sg-lib.org (or from matlab central or github)
// The complete arduino IDE environment for the LCL robot can be installed
// using the SG-Lib REl 5.0 by the matlab command SGrobotarduinoIDE. This
// environment is independent from the matlab toolbox/hardware extension
// for the arduino (Status of: 2020-10-11)
//
// See also: SGrobotarduinoIDE
//
// MIMED_LCL_Control
//
// EXAMPLE:
// just open this file in the arduino IDE, select board and port, compile and upload, set the monitor baudrate to 112500 and type info to get the commands of the robot controller
//
// See also: SGrobotarduinoIDE
//
//

SGrobotarduinoIDE(sources)- downloads and installs the arduino IDE for programming the LCL robot of TUM/MIMED

SGrobotarduinoIDE(sources)% SGrobotarduinoIDE(sources) - downloads and installs the arduino IDE for programming the LCL robot of TUM/MIMED
% (by Tim Lueth, VLFL-Lib, 2020-OKT-09 as class: APPLICATION)
%
% The LCL-Robot-YK1 from the TUM-MIMED of the TU Munich uses servo motors
% with a serial RS485 BUS and an Arduino microcontroller. If you want to
% further develop the controller of the LCL-Robot-YK1, you have to
% install the development environment for it. Robot and interface was
% realized at the MIMED by Yannick Krieger and Korbinian Rzepka in
% August-September 2020, the interface by Simon Schiele and Christoph
% Rehekampff in October 2020. Dominik Rumschoettel introduced the RS485
% motors at MIMED.
% The Matlab-Toolbox/Hardware-Extension for Arduino is currently NOT
% required! You need for the development depending on the platform for
% PC/Windows or Mac/OSX:
% 1) an LCL robot or at least an Arduino MEGA 2560 (part of LCL).
% 2) a zip file with the necessary sources for programming
% 3) The original IDE from the WWW site of Arduino.
% (Status of: 2020-10-10)
%
% Introduced first in SolidGeometry 5.0
%
% See also: MIMED_LCL_Control.ino
%
% SGrobotarduinoIDE([sources])
% === INPUT PARAMETERS ===
% sources: if true; the web pages are opened to the original sources
%
% EXAMPLE:
% SGrobotarduinoIDE % Installs all required files if not existing already
% SGrobotarduinoIDE sources % Show the internet source pages for the software
%
% See also: MIMED_LCL_Control.ino
%
%
% Copyright 2020 Tim C. Lueth

getkeyboardcharpause(chrset)- fnct getkey for figures if rotate3d is on - and the callbacks are blocked

getkeyboardcharpause(chrset)% getkeyboardcharpause(chrset) - fnct getkey for figures if rotate3d is on - and the callbacks are blocked
% (by Tim Lueth, VLFL-Lib, 2020-OKT-08 as class: USER INTERFACE)
%
% In Matlab there are different possibilities to get a char from the
% keyboard if a figure is open. The method depends on the rotate3d mode.
% If rotate3d is on, mouse buttons and keyboard are blocked for
% callbacks ==> The pause command must be used in combination with
% get(gcf,'CurrentCharacter'). If rotate3d is on, a callback fnctn can be
% used to detect mouse buttons and keyboard chars. Also ginput(1) can be
% used (Status of: 2021-08-11)
%
% Introduced first in SolidGeometry 5.0
%
% See also: ginput, getkeyboardchar, waitforfigurekeyboardchar,
% getkeyboardchartimer
%
% c=getkeyboardcharpause([chrset])
% === INPUT PARAMETERS ===
% chrset: set of allowed character; default is 1:255
% === OUTPUT RESULTS ======
% c: uint8 of char pressed during pause command and rotate3d was on
%
% EXAMPLE:
% getkeyboardcharpause % returns the pressed key
%
% See also: ginput, getkeyboardchar, waitforfigurekeyboardchar,
% getkeyboardchartimer
%
%
% Copyright 2020-2021 Tim C. Lueth

materialparameters(text)- Hyperlink fnct to call up material parameters WWW pages in the browser

materialparameters(text)% materialparameters(text) - Hyperlink fnct to call up material parameters WWW pages in the browser
% (by Tim Lueth, VLFL-Lib, 2020-OKT-08 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: sofbendinggirder, V2A
%
% materialparameters([text])
% === INPUT PARAMETERS ===
% text: keywords
%
% EXAMPLE:
% materialparameters
% materialparameters Thermo-Plastics
% materialparameters FDA
%
% See also: sofbendinggirder, V2A
%
%
% Copyright 2020 Tim C. Lueth

V2A (d,v,Rm)- returns a set of strength calculation for a steel bending girder

V2A (d,v,Rm)% V2A (d,v,Rm) - returns a set of strength calculation for a steel bending girder
% (by Tim Lueth, VLFL-Lib, 2020-OKT-06 as class: AUXILIARY PROCEDURES)
%
% This fnctn is used to estimate some basic strength calculations for
% standard parts made of V2A steel.
% In this fnctn, shear strength is 80% of tensile strength.
% It makes more sense to use the 2% elastic limit for the load limit than
% the maximum stress at the beginning of constriction Rm. The elastic
% limit is about 30% to 40% of the maximum stress and is reached by the
% safety factor 2.5 or 3.5. Wird der Sicherheitsfaktor auf 1 gesetzt,
% kann direkt R2% statt Rm verwendet werden.
% Rm PA12
% Rm V2A (Status of: 2020-10-08)
%
% Introduced first in SolidGeometry 5.0
%
% See also: materialparameters, sofbendinggirder
%
% V2A([d,v,Rm])
% === INPUT PARAMETERS ===
% d: Diameter of the steel rod
% v: Safety factor; default is 3.5
% Rm: Tensile Load in N/mm^2 (MPa) as material constant; default is 520
% (V2A)
%
% EXAMPLE:
% V2A(2.5,520,3.5); % Use of maximum tensile load with safety factor 3.5
% V2A(2.5,190,1); % Direct use Tensile load at the yield point without safety factor
%
% See also: materialparameters, sofbendinggirder
%
%
% Copyright 2020 Tim C. Lueth

mimedserver(text)- Access to the TUM MIMED Server through samba and mwn webdisc

mimedserver(text)% mimedserver(text) - Access to the TUM MIMED Server through samba and mwn webdisc
% (by Tim Lueth, VLFL-Lib, 2020-OKT-05 as class: USER INTERFACE)
%
% Fnctn is for staff of Professor Tim Lueth's Lab at TU Munich only.
% It opens by samba protocol directories using the server by the browser
% Shows also the link to the corresponding webdisc access
% An active VPN connection is required (Status of: 2020-10-17)
%
% Introduced first in SolidGeometry 5.0
%
% See also: loadweb, SGexplain, mimedserver2webdisk
%
% mimedserver([text])
% === INPUT PARAMETERS ===
% text: abbreviation or keyword for the call
%
% EXAMPLE:
% mimedserver % to get some directories
% mimedserver doc % open the document database directory
%
% See also: loadweb, SGexplain, mimedserver2webdisk
%
%
% Copyright 2020 Tim C. Lueth

plotannotationtopleft(str,vargs)- shows an annotation in the left side of the axis

plotannotationtopleft(str,vargs)% plotannotationtopleft(str,vargs) - shows an annotation in the left side of the axis
% (by Tim Lueth, VLFL-Lib, 2020-OKT-05 as class: USER INTERFACE)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGfigureannotation, SGhelptext, plotannotation,
% plotannotationdelete, titleofcaller, annotation
%
% t=plotannotationtopleft([str,vargs])
% === INPUT PARAMETERS ===
% str: string
% vargs: list of optional parameters for annotation
% === OUTPUT RESULTS ======
% t: handle to textbox
%
% EXAMPLE:
% plotannotationdelete; plotannotationtopleft ('Hello world\nthe quick brows'); shg
%
% See also: SGfigureannotation, SGhelptext, plotannotation,
% plotannotationdelete, titleofcaller, annotation
%
%
% Copyright 2020 Tim C. Lueth

exp_2020_10_03_KinTree- EXPERIMENT to learn how to set joint in an interactive mode

exp_2020_10_03_KinTree% exp_2020_10_03_KinTree - EXPERIMENT to learn how to set joint in an interactive mode
% (by Tim Lueth, VLFL-Lib, 2020-OKT-04 as class: EXPERIMENTS)
%
% Final fnctn is named SGTsetinternalframe
%
% Angle LA & RA
% Knee LK & RK
% Hip LH & RH
% Vertebra Lumbar VL
% Vertebra Neck VN
% Shoulder LS & RS
% Ellbow LE & RE
% Wrist LW & RW (Status of: 2020-10-11)
%
% Introduced first in SolidGeometry 5.0
%
% See also: getkeyboardcharpause, SGTsetinternalframe
%
% exp_2020_10_03_KinTree
%
% See also: getkeyboardcharpause, SGTsetinternalframe
%
%
% Copyright 2020 Tim C. Lueth

SGdummyRjoint(R,H,w,T)- creates a simple geometry to better imagine a rotating joint

SGdummyRjoint(R,H,w,T)% SGdummyRjoint(R,H,w,T) - creates a simple geometry to better imagine a rotating joint
% (by Tim Lueth, VLFL-Lib, 2020-OKT-04 as class: MODELING PROCEDURES)
%
% For w==0, frame C corresponds to eye(4) or T (Status of: 2020-10-05)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGdesignDIN912DIN985
%
% SG=SGdummyRjoint([R,H,w,T])
% === INPUT PARAMETERS ===
% R: [Ro Ri]
% H: [Hi Ho]
% w: rotation angle; default is 0
% T: Transformation matrix; default is eye(4)
% === OUTPUT RESULTS ======
% SG: SOlid Geometry of a dummy revolute joint
%
% EXAMPLE:
% SGdummyRjoint
%
% See also: SGdesignDIN912DIN985
%
%
% Copyright 2020 Tim C. Lueth

CPLselectbyP(CPL,PL);- returns an index list to select enclosing CPLs

CPLselectbyP(CPL,PL);% CPLselectbyP(CPL,PL); - returns an index list to select enclosing CPLs
% (by Tim Lueth, VLFL-Lib, 2020-OKT-04 as class: CLOSED POLYGON LISTS)
%
% Introduced first in SolidGeometry 5.0
%
% See also: crosstest, insideCPL, insideCPS, isInteriorofCPL, insideC
%
% ind=CPLselectbyP(CPL,PL);
% === INPUT PARAMETERS ===
% CPL: CPL
% PL: Single point to check
% === OUTPUT RESULTS ======
% ind: index list
%
% EXAMPLE:
% CPLselectbyP(CPLsample(14),[0 0 0])
% CPLselectbyP(CPLsample(14),[5 0 0])
% CPLselectbyP(CPLsample(14),[5 0 ;10 -3])
%
% See also: crosstest, insideCPL, insideCPS, isInteriorofCPL, insideC
%
%
% Copyright 2020 Tim C. Lueth

SGofgo(go)- returns handle and surface arrays of a graphics objects

SGofgo(go)% SGofgo(go) - returns handle and surface arrays of a graphics objects
% (by Tim Lueth, VLFL-Lib, 2020-OKT-04 as class: USER INTERFACE)
%
% This fnctn is used to interactively decompose solids into multiple
% bodies. The handles of the solids are recorded. (Status of: 2020-10-04)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGofgca
%
% [SG,h]=SGofgo(go)
% === INPUT PARAMETERS ===
% go: graphics object
% === OUTPUT RESULTS ======
% SG: Cell list of Solids
% h: array of handles
%
% EXAMPLE:
% SGsurfaces(SGcolorsample); pause(1); SGofgo(gca) % Colored and separated surfaces
% SGcolorsample; pause(1); SGofgo(gca) % Colored by a single surface handle
%
% See also: SGofgca
%
%
% Copyright 2020 Tim C. Lueth

waitforfigurekeyboardchar(charsel)- waits for an keyboardinput

waitforfigurekeyboardchar(charsel)% waitforfigurekeyboardchar(charsel) - waits for an keyboardinput
% (by Tim Lueth, VLFL-Lib, 2020-OKT-04 as class: USER INTERFACE)
%
% =======================================================================
% OBSOLETE (2021-08-11) - USE 'getkeyboardcharpause' INSTEAD
% =======================================================================
%
% Introduced first in SolidGeometry 5.0
%
% See also: [ getkeyboardcharpause ] ; ginput, getkeyboardcharpause,
% getkeyboardchar, getkeyboardchartimer
%
% c=waitforfigurekeyboardchar([charsel])
% === INPUT PARAMETERS ===
% charsel: character set
% === OUTPUT RESULTS ======
% c: char
%
% See also: [ getkeyboardcharpause ] ; ginput, getkeyboardcharpause,
% getkeyboardchar, getkeyboardchartimer
%
%
% Copyright 2020-2021 Tim C. Lueth

VLofSGnotreferenced(SG)- returns the logical index of vertices that are not referenced in a triangualtion

VLofSGnotreferenced(SG)% VLofSGnotreferenced(SG) - returns the logical index of vertices that are not referenced in a triangualtion
% (by Tim Lueth, VLFL-Lib, 2020-OKT-03 as class: SURFACES)
%
% This fnctn is important to adjust surfaces created by delaunay or
% alphashape (Status of: 2020-10-03)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGofVLdelaunay, SGofVLalphaShape, triangulation,
% delaunayTriangulation, alphaShape, alphaTriangulation
%
% vi=VLofSGnotreferenced([SG])
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% === OUTPUT RESULTS ======
% vi: logical index of not referenced vertices
%
%
% EXAMPLE:
% loadweb JACO_robot.mat
% SGsurfaces(JC6); SGC=ans;
% SGofVLdelaunay(SGC{3}.VL); SG=ans
% VLofSGnotreferenced(SG)
%
% See also: SGofVLdelaunay, SGofVLalphaShape, triangulation,
% delaunayTriangulation, alphaShape, alphaTriangulation
%
%
% Copyright 2020 Tim C. Lueth

SGrobot(phi)- returns the geometry and kinematic model of the MIMED-LCL Robot

SGrobot(phi)% SGrobot(phi) - returns the geometry and kinematic model of the MIMED-LCL Robot
% (by Simon Schiele & Yannick Krieger, VLFL-Lib, 2020-OKT-02 as class:
% MODELING PROCEDURES)
%
% The Geometry has been designed by Yannick Krieger (Status of:
% 2020-10-02)
%
% See also: SGTchain, LCL_robot.mat
%
% SG=SGrobot([phi])
% === INPUT PARAMETERS ===
% phi: list of angles in rad; default is [0 0 0 0]
% === OUTPUT RESULTS ======
% SG: Cell list of 5 solids
%
% EXAMPLE:
% SGrobot([-pi/6 pi/6 pi/6])
% SGrobot([pi/6 pi/6 pi/6])
%
% See also: SGTchain, LCL_robot.mat
%

exp_2020_09_30_slidingbearing- EXPERIMENT TO test the size of the IGUS sliding bearings

exp_2020_09_30_slidingbearing% exp_2020_09_30_slidingbearing - EXPERIMENT TO test the size of the IGUS sliding bearings
% (by Tim Lueth, VLFL-Lib, 2020-SEP-30 as class: EXPERIMENTS)
%
% Cylindric hole with fits "transition" (Status of: 2020-09-30)
%
% Introduced first in SolidGeometry 5.0
%
% exp_2020_09_30_slidingbearing
%
% EXAMPLE:
% exp_2020_09_30_slidingbearing
%
%
% Copyright 2020 Tim C. Lueth

DIN934(M)- returns the DIN934 table for a metric threads

DIN934(M)% DIN934(M) - returns the DIN934 table for a metric threads
% (by Tim Lueth, VLFL-Lib, 2020-SEP-29 as class: MECHANICAL PROCEDURES)
%
% The table DIN934 has the following columns. All values are given in
% millimeter
% M NutHeight InbusWrench (Status of: 2020-09-29)
%
% Introduced first in SolidGeometry 5.0
%
% See also: DIN13, DIN336, DIN464, DIN912, DIN913, DIN985, DINfindinTab,
% DINhelp, DINthreadtorque
%
% [M,TL]=DIN934(M)
% === INPUT PARAMETERS ===
% M: metric treat diameter
% === OUTPUT RESULTS ======
% M: M that was used for the table entry
% TL: Table entry for M
%
% EXAMPLE:
% DIN934;
% [M,TL]=DIN934(2.5)
% Wegertseder(934)
%
% See also: DIN13, DIN336, DIN464, DIN912, DIN913, DIN985, DINfindinTab,
% DINhelp, DINthreadtorque
%
%
% Copyright 2020 Tim C. Lueth

SGruler(L)- creates a ruler in dimensions that can be so small that it cannot be manufactured but displayed

SGruler(L)% SGruler(L) - creates a ruler in dimensions that can be so small that it cannot be manufactured but displayed
% (by Tim Lueth, VLFL-Lib, 2020-SEP-29 as class: MODELING PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGdimensioning, SGplotruler
%
% SGR=SGruler([L])
% === INPUT PARAMETERS ===
% L: length of ruler; default is 7mm
% === OUTPUT RESULTS ======
% SGR: Solid Geometry of a Ruler of length L and width L/5
%
% EXAMPLE:
% SGruler(7)
% SGruler(1.2)
% SGruler(0.7)
% SGruler(sofBB(axis))
%
% See also: SGdimensioning, SGplotruler
%
%
% Copyright 2020 Tim C. Lueth

Gauge2mm(gau)- returns the outer diameter in mm of a Cather in Gauge scale

Gauge2mm(gau)% Gauge2mm(gau) - returns the outer diameter in mm of a Cather in Gauge scale
% (by Tim Lueth, VLFL-Lib, 2020-SEP-28 as class: AUXILIARY PROCEDURES)
%
% EN ISO 9626
% https://de.wikipedia.org/wiki/Kanüle#Übersichts-_und_Vergleichs-Tabelle
% _für_die_Farbcodierungen,_Maße_und_Größen_von_Kanülen
% Tubes for balloon catheters used in cardiology, urology and angiology
% are manufactured in various dimensions. For polyurethane 95 Shore A,
% the spectrum ranges from an inner diameter of at least 2 mm to a
% maximum of 10 mm. The wall thickness starts at 0.08 mm, the length is
% 300 mm. For polyurethane 80 Shore A, inner diameters of 1.25 mm up to
% 3.0 mm are possible. The wall thickness is specified as 0.18 to 0.3 mm,
% whereby the sections have a length of 1000 mm. The minimum possible
% wall thickness increases analogous to the outer diameter. Here the
% flexibility as well as the compressive strength of the balloon is very
% important. A balloon catheter is a plastic catheter that carries a
% balloon at its tip that can be inflated with compressed air or liquid
% (occlusion balloon). An occlusion balloon is the inflatable part of a
% catheter with which the lumen of an anatomical structure can be closed
% or expanded. The balloon is inflated briefly at high pressure and
% deflated again. (Status of: 2020-09-29)
%
% Introduced first in SolidGeometry 5.0
%
% See also: mm2inch, Charriere2mm, French2mm
%
% mm=Gauge2mm(gau)
% === INPUT PARAMETERS ===
% gau: Gauge Value
% === OUTPUT RESULTS ======
% mm: Outer diamter in mm
%
% EXAMPLE:
% Gauge2mm(18)
%
% See also: mm2inch, Charriere2mm, French2mm
%
%
% Copyright 2020 Tim C. Lueth

mm2inch (mm)- returns mm in inch

mm2inch (mm)% mm2inch (mm) - returns mm in inch
% (by Tim Lueth, VLFL-Lib, 2020-SEP-28 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: mm2inch, Charriere2mm, French2mm, Gauge2mm
%
% mm2inch(mm)
% === INPUT PARAMETERS ===
% mm: mm
%
% EXAMPLE:
% mm2inch(19)
%
% See also: mm2inch, Charriere2mm, French2mm, Gauge2mm
%
%
% Copyright 2020 Tim C. Lueth

French2mm(cha)- returns the outer diameter in mm of a cather in the Charriere scale

French2mm(cha)% French2mm(cha) - returns the outer diameter in mm of a cather in the Charriere scale
% (by Tim Lueth, VLFL-Lib, 2020-SEP-28 as class: AUXILIARY PROCEDURES)
%
% Tubes for balloon catheters used in cardiology, urology and angiology
% are manufactured in various dimensions. For polyurethane 95 Shore A,
% the spectrum ranges from an inner diameter of at least 2 mm to a
% maximum of 10 mm. The wall thickness starts at 0.08 mm, the length is
% 300 mm. For polyurethane 80 Shore A, inner diameters of 1.25 mm up to
% 3.0 mm are possible. The wall thickness is specified as 0.18 to 0.3 mm,
% whereby the sections have a length of 1000 mm. The minimum possible
% wall thickness increases analogous to the outer diameter. Here the
% flexibility as well as the compressive strength of the balloon is very
% important. A balloon catheter is a plastic catheter that carries a
% balloon at its tip that can be inflated with compressed air or liquid
% (occlusion balloon). An occlusion balloon is the inflatable part of a
% catheter with which the lumen of an anatomical structure can be closed
% or expanded. The balloon is inflated briefly at high pressure and
% deflated again. (Status of: 2020-09-29)
%
% Introduced first in SolidGeometry 5.0
%
% See also: mm2inch, Charriere2mm, Gauge2mm
%
% mm=French2mm(cha)
% === INPUT PARAMETERS ===
% cha: Catheter size in Charriere
% === OUTPUT RESULTS ======
% mm: Outer diameter in mm
%
% EXAMPLE:
% Charriere2mm(26)
%
% See also: mm2inch, Charriere2mm, Gauge2mm
%
%
% Copyright 2020 Tim C. Lueth

Charriere2mm(cha)- returns the outer diameter in mm of a cather in the Charriere scale

Charriere2mm(cha)% Charriere2mm(cha) - returns the outer diameter in mm of a cather in the Charriere scale
% (by Tim Lueth, VLFL-Lib, 2020-SEP-28 as class: AUXILIARY PROCEDURES)
%
% Tubes for balloon catheters used in cardiology, urology and angiology
% are manufactured in various dimensions. For polyurethane 95 Shore A,
% the spectrum ranges from an inner diameter of at least 2 mm to a
% maximum of 10 mm. The wall thickness starts at 0.08 mm, the length is
% 300 mm. For polyurethane 80 Shore A, inner diameters of 1.25 mm up to
% 3.0 mm are possible. The wall thickness is specified as 0.18 to 0.3 mm,
% whereby the sections have a length of 1000 mm. The minimum possible
% wall thickness increases analogous to the outer diameter. Here the
% flexibility as well as the compressive strength of the balloon is very
% important. A balloon catheter is a plastic catheter that carries a
% balloon at its tip that can be inflated with compressed air or liquid
% (occlusion balloon). An occlusion balloon is the inflatable part of a
% catheter with which the lumen of an anatomical structure can be closed
% or expanded. The balloon is inflated briefly at high pressure and
% deflated again. (Status of: 2020-09-28)
%
% Introduced first in SolidGeometry 5.0
%
% See also: mm2inch, French2mm, Gauge2mm
%
% mm=Charriere2mm(cha)
% === INPUT PARAMETERS ===
% cha: Catheter size in Charriere
% === OUTPUT RESULTS ======
% mm: Outer diameter in mm
%
% EXAMPLE:
% Charriere2mm(26)
%
% See also: mm2inch, French2mm, Gauge2mm
%
%
% Copyright 2020 Tim C. Lueth

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

amazon(text)% amazon(text) - just opens the website of this company
% (by Tim Lueth, VLFL-Lib, 2020-SEP-28 as class: AUXILIARY PROCEDURES)
%
% entry point for searching for components (Status of: 2020-09-28)
%
% Introduced first in SolidGeometry 5.0
%
% See also: firmen, SGexplain, Notiz
%
% amazon([text])
% === INPUT PARAMETERS ===
% text: string for search
%
% EXAMPLE:
% amazon
% amazon Motor N20
%
% See also: firmen, SGexplain, Notiz
%
%
% Copyright 2020 Tim C. Lueth

alibaba(text)- just opens the website of this company

alibaba(text)% alibaba(text) - just opens the website of this company
% (by Tim Lueth, VLFL-Lib, 2020-SEP-28 as class: AUXILIARY PROCEDURES)
%
% entry point for searching for components (Status of: 2020-09-28)
%
% Introduced first in SolidGeometry 5.0
%
% See also: firmen, SGexplain, Notiz
%
% alibaba([text])
% === INPUT PARAMETERS ===
% text: string for search
%
% EXAMPLE:
% alibaba
% alibaba Motor N20
%
% See also: firmen, SGexplain, Notiz
%
%
% Copyright 2020 Tim C. Lueth

VLFL_EXP49- Tutorial to understand different types of transmission gears

VLFL_EXP49% VLFL_EXP49 - Tutorial to understand different types of transmission gears
% (by Yannick Krieger & Sebastian Baumgartner, VLFL-Lib, 2020-SEP-28 as
% class: EXPERIMENTS)
%
% This tutorial explains the fnctns for the design of non-circular gear
% pairs.
% The fnctns are based on the semester thesis of Sebastian Baumgartner
% from 2020.
% Starting with several simple examples explaining the use of the four
% fnctns for the design of non-circular gears, the speed control of a
% four-bar linkage is shown at the end.This tutorial explains the fnctns
% for the design of non-circular gear pairs.
% (Status of: 2020-09-30)
%
% See also: SGgearpair, SGgearSpur, SGgearInternal, SGgearRack,
% SGgearBevel, SGgearCrownwheel, SGgearandrackDIN, SGgearmwormDIN,
% SGgearrackDIN, SGgearpairDIN, SGgearDIN, PLgearDIN, PLgearrackDIN
%
% VLFL_EXP49
%
% See also: SGgearpair, SGgearSpur, SGgearInternal, SGgearRack,
% SGgearBevel, SGgearCrownwheel, SGgearandrackDIN, SGgearmwormDIN,
% SGgearrackDIN, SGgearpairDIN, SGgearDIN, PLgearDIN, PLgearrackDIN
%

gcasnapshot(cax,fname)- saves the current figure as JPG-File on the user desktop

gcasnapshot(cax,fname)% gcasnapshot(cax,fname) - saves the current figure as JPG-File on the user desktop
% (by Tim Lueth, VLFL-Lib, 2020-SEP-28 as class: VISUALIZATION)
%
% Introduced first in SolidGeometry 5.0
%
% See also: gcasnapshot, copyplot, copyfig, snapplot, PRplot, snapnow,
% drawnow, smbdrawnow
%
% fname=gcasnapshot([cax,fname])
% === INPUT PARAMETERS ===
% cax: axis to snap, default is gca
% fname: optional file name; default is desktopdir(expname) .png
% === OUTPUT RESULTS ======
% fname: file name
%
% EXAMPLE:
% SGliblogo(5)
% gcasnapshot(gca)
%
% See also: gcasnapshot, copyplot, copyfig, snapplot, PRplot, snapnow,
% drawnow, smbdrawnow
%
%
% Copyright 2020 Tim C. Lueth

exp_2020_09_27_Scharniere()- creates an experiment to check the desing of hinges

exp_2020_09_27_Scharniere()% exp_2020_09_27_Scharniere() - creates an experiment to check the desing of hinges
% (by Tim Lueth, VLFL-Lib, 2020-SEP-27 as class: EXPERIMENTS)
%
% Introduced first in SolidGeometry 5.0
%
% exp_2020_09_27_Scharniere([])
%
%
% Copyright 2020 Tim C. Lueth

exp_2020_09_27_Goldschienen-

exp_2020_09_27_Goldschienen% exp_2020_09_27_Goldschienen -
% (by Tim Lueth, VLFL-Lib, 2020-SEP-27 as class: EXPERIMENTS)
%
% With this fnctn I want to test if I can use gold pins 0.9mm as hinge
% joints. These 0.9mm pins can be shortened with any side cutter and
% would be suitable as a cheap joint. Especially if a four joint is used.
% It should be taken into account that the play caused by production has
% an increasing influence on the tilting stability and therefore the
% hinges must be very long or at least two hinge joints should be in one
% axis or a spherical axis.
%
% (Status of: 2020-09-27)
%
% Introduced first in SolidGeometry 5.0
%
% exp_2020_09_27_Goldschienen
%
%
% Copyright 2020 Tim C. Lueth

CVLzcheckprinting(CVLz,dmelt,minw,warn)- checks for glued parts and missing walls

CVLzcheckprinting(CVLz,dmelt,minw,warn)% CVLzcheckprinting(CVLz,dmelt,minw,warn) - checks for glued parts and missing walls
% (by Tim Lueth, VLFL-Lib, 2020-SEP-24 as class: CHECKING PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGcheckfacedist
%
% CVLz=CVLzcheckprinting(CVLz,[dmelt,minw,warn])
% === INPUT PARAMETERS ===
% CVLz: CVLz or SG to slice in mm distance
% dmelt: minimal distance to avoid melting; default is 0.45
% minw: minimal wall thickness to avoid collaps; ; default is 0.7
% warn:
% === OUTPUT RESULTS ======
% CVLz: CVLz that estimates printing result
%
% EXAMPLE:
% load ADAM_Amono.mat
% SG=ADAM_Amono; SG=SGshrinktofit(SG,50)
% CVLzcheckprinting(SG)
%
% See also: SGcheckfacedist
%
%
% Copyright 2020 Tim C. Lueth

SGfigtrans0(cax)- moves all parts of the current axis into the first octand

SGfigtrans0(cax)% SGfigtrans0(cax) - moves all parts of the current axis into the first octand
% (by Tim Lueth, VLFL-Lib, 2020-SEP-24 as class: USER INTERFACE)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGtrans0
%
% SGfigtrans0([cax])
% === INPUT PARAMETERS ===
% cax: default is gca
%
% EXAMPLE:
% SGjacohand, axis on
% SGfigtrans0
%
% See also: SGtrans0
%
%
% Copyright 2020 Tim C. Lueth

select3dofcam- creates all selectin information for the

select3dofcam% select3dofcam - creates all selectin information for the
% (by Tim Lueth, VLFL-Lib, 2020-SEP-23 as class: VISUALIZATION)
%
% same as select3d but uses the center line of the current view (Status
% of: 2020-09-23)
%
% Introduced first in SolidGeometry 5.0
%
% See also: gcoofT, select3d, vertexpicker, getpixelposition,
% pixelofaxis, SGfigure, selectV3d
%
% [pout,vout,viout,facevout,faceiout,handle]=select3dofcam
% === OUTPUT RESULTS ======
% pout: point
% vout: next vertex
% viout: vertex list index
% facevout: touched facet
% faceiout: facet list index
% handle: handle to graphics object
%
% EXAMPLE:
% SGsurfaces(SGcolorsample); % just plot something on the screen
% select3dofcam
%
% See also: gcoofT, select3d, vertexpicker, getpixelposition,
% pixelofaxis, SGfigure, selectV3d
%
%
% Copyright 2020 Tim C. Lueth

gcoofT(cax,T,allh)- returns the crossing points in the current set of graphics objects

gcoofT(cax,T,allh)% gcoofT(cax,T,allh) - returns the crossing points in the current set of graphics objects
% (by Tim Lueth, VLFL-Lib, 2020-SEP-23 as class: USER INTERFACE)
%
% This fnctn replaces ginput(1) called before select3D (Status of:
% 2020-09-23)
%
% Introduced first in SolidGeometry 5.0
%
% See also: select3D
%
% [gcoT,cpa,dta]=gcoofT([cax,T,allh])
% === INPUT PARAMETERS ===
% cax: current axes; default is gca
% T: Frame of View direction; default is Tofcam
% allh: if true all crossed objects are returned
% === OUTPUT RESULTS ======
% gcoT: gra[hics object handle, sorted by distance from T
% cpa: crossing point (list)
% dta: distance point (list)
%
% EXAMPLE:
% SGsurfaces(SGcolorsample); % just plot something on the screen
% gcoofT('','',true)
% SGsurfaces(SGcolorsample); % just plot something on the screen
% gcoofT('','')
% SGsurfaces(SGcolorsample); % just plot something on the screen
% [h,cp]=gcoofT;
% select3d(h,cp) % call select3d by a crossing point
%
% See also: select3D
%
%
% Copyright 2020 Tim C. Lueth

sprintfhyperlinktab(tab,nl,sort)- creates a hyperlink text string from a table

sprintfhyperlinktab(tab,nl,sort)% sprintfhyperlinktab(tab,nl,sort) - creates a hyperlink text string from a table
% (by Tim Lueth, VLFL-Lib, 2020-SEP-21 as class: AUXILIARY PROCEDURES)
%
% does support the style
% {'text', 'http://....'}
% {'text', '@google '}
% {'text', '@wiki '}
% {'text', '@open '}
% {'text', '@open '}
% {'text', '@matlab '} (Status of: 2020-10-18)
%
% Introduced first in SolidGeometry 5.0
%
% See also: strhyperlink, SGexplain, evalhyperlinktab
%
% [outstr,tab]=sprintfhyperlinktab(tab,[nl,sort])
% === INPUT PARAMETERS ===
% tab: hyperlink table
% nl: maximum chars of per line; default is 120
% sort: if true the items are sorted in alphabetic order; default is true
% === OUTPUT RESULTS ======
% outstr: hyperlink string
% tab: table with replace macros such as '@google'
%
% EXAMPLE:
% tab={'Gleitlager ohne Bund ab 1.5 mm','https://www.igus.de/product/1';
% 'Gleitlager 1.0 mm','https://www.igus.de/iglidur/gleitlager?sort=3&inch=false&presetindustry=1&premaxtermtemp=1&prelowtermtemp=1&presetsurpre=1&maxshaftdiam=1';};
%
% sprintfhyperlinktab(tab)
%
% See also: strhyperlink, SGexplain, evalhyperlinktab
%
%
% Copyright 2020 Tim C. Lueth

ticksofBB(bb,dis,res)- sets the ticks using ticks of minmax of a BB

ticksofBB(bb,dis,res)% ticksofBB(bb,dis,res) - sets the ticks using ticks of minmax of a BB
% (by Tim Lueth, VLFL-Lib, 2020-SEP-21 as class: VISUALIZATION)
%
% Introduced first in SolidGeometry 5.0
%
% See also: ticksofminmax
%
% ticksofBB([bb,dis,res])
% === INPUT PARAMETERS ===
% bb: bb of Solid or SG
% dis: distance between ticks
% res: resolution default is .1
%
% EXAMPLE:
% ticksofBB
%
% See also: ticksofminmax
%
%
% Copyright 2020 Tim C. Lueth

ticksofminmax(bb,res,det)- returns a list of unique increasing values between bb(1) and bb(2)

ticksofminmax(bb,res,det)% ticksofminmax(bb,res,det) - returns a list of unique increasing values between bb(1) and bb(2)
% (by Tim Lueth, VLFL-Lib, 2020-SEP-21 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: ticksofBB
%
% tck=ticksofminmax(bb,[res,det])
% === INPUT PARAMETERS ===
% bb: [min max]
% res: distance between ticks
% det: resolution default is .1
% === OUTPUT RESULTS ======
% tck: unique increasing values between bb(1) and bb(2)
%
% EXAMPLE:
% ticksofminmax([-pi +pi],1,.01)
%
% See also: ticksofBB
%
%
% Copyright 2020 Tim C. Lueth

PLmirroratline(PL,p1,p2)- mirrors a PL or CPL

PLmirroratline(PL,p1,p2)% PLmirroratline(PL,p1,p2) - mirrors a PL or CPL
% (by Tim Lueth, VLFL-Lib, 2020-SEP-20 as class: ANALYTICAL GEOMETRY)
%
% Introduced first in SolidGeometry 5.0
%
% See also: mirroringatline, mirroringatline3D
%
% MPL=PLmirroratline(PL,[p1,p2])
% === INPUT PARAMETERS ===
% PL: PL or CPL
% p1: point 1 on line
% p2: point 2 on line
% === OUTPUT RESULTS ======
% MPL: Mirrored PL
%
% EXAMPLE:
% PLmirroratline(CPLsample(30));
%
% See also: mirroringatline, mirroringatline3D
%
%
% Copyright 2020 Tim C. Lueth

cell2cellarray(A)- creates a cell list that contains all elements of a cell within one cell array

cell2cellarray(A)% cell2cellarray(A) - creates a cell list that contains all elements of a cell within one cell array
% (by Tim Lueth, VLFL-Lib, 2020-SEP-20 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGofSG, SGconcat
%
% X=cell2cellarray(A)
% === INPUT PARAMETERS ===
% A: Hieraarchical cells
% === OUTPUT RESULTS ======
% X: [1 x n] cell array
%
% EXAMPLE:
% S=SGbearing
% cell2cellarray({S,S,{S;S}})
%
% See also: SGofSG, SGconcat
%
%
% Copyright 2020 Tim C. Lueth

SGmicroscopetable- creates a part to connect a xy-table with an microscope stand of USB-Microsscope

SGmicroscopetable% SGmicroscopetable - creates a part to connect a xy-table with an microscope stand of USB-Microsscope
% (by Tim Lueth, VLFL-Lib, 2020-SEP-20 as class: MODELING PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGmicroscopeclamp,
% https://www.amazon.de/gp/product/B007LBF46Q,
% https://www.amazon.de/gp/product/B07HP4PCCR
%
% SGA=SGmicroscopetable
% === OUTPUT RESULTS ======
% SGA: Solid Geometry
%
% EXAMPLE: just type:
% SGmicroscopetable
%
% See also: SGmicroscopeclamp,
% https://www.amazon.de/gp/product/B007LBF46Q,
% https://www.amazon.de/gp/product/B07HP4PCCR
%
%
% Copyright 2020 Tim C. Lueth

SGdesignfaceconnectingrod(SG,f,elo,Rv,CPL)- creates a connecting rod between two faces of a solid

SGdesignfaceconnectingrod(SG,f,elo,Rv,CPL)% SGdesignfaceconnectingrod(SG,f,elo,Rv,CPL) - creates a connecting rod between two faces of a solid
% (by Tim Lueth, VLFL-Lib, 2020-SEP-20 as class: AUTOMATIC DESIGN)
%
% supports also interactive mode (Status of: 2020-09-21)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGof2T
%
% [SGP,f,SGN]=SGdesignfaceconnectingrod([SG,f,elo,Rv,CPL])
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% f: [face #1 face #2]
% elo: elongation into SG; default is 1
% Rv: Radius for curves; default is 2.5mm
% CPL: Cross sectton contour; default is PLcircle(Rv)
% === OUTPUT RESULTS ======
% SGP: Solid of the rod
% f: facets in case of interactive mode
% SGN: Solid with additional rod (SGunion)
%
% EXAMPLE:
% [~,A,B]=SGmicroscopeclamp; SG=SGconcat(A,B)
% SGdesignfaceconnectingrod(SG,[422,2377])
% X=SGbox;
% [~,~,X]=SGdesignfaceconnectingrod(X,[6 9],'',10,3); % defined faces
% [~,~,X]=SGdesignfaceconnectingrod(X,[6 3],'',10,3); % defined faces
% [~,~,X]=SGdesignfaceconnectingrod(X,[0 0],'',10,3); % interactive mode
% [~,~,X]=SGdesignfaceconnectingrod(X,[0 0],'',10,3); % interactive mode
% [~,~,X]=SGdesignfaceconnectingrod(X,[0 0],'',10,PLsquare(3));
% SGbox; [~,~,X]=SGdesignfaceconnectingrod('','','',10,PLstar(3)); % SGofgca and interactive mode
%
% See also: SGof2T
%
%
% Copyright 2020 Tim C. Lueth

SGselect3Dsurface(SG,pfi,alp,mbf,Text)- EXPERIMENT how to select interactively FS, surface, and complete solids

SGselect3Dsurface(SG,pfi,alp,mbf,Text)% SGselect3Dsurface(SG,pfi,alp,mbf,Text) - EXPERIMENT how to select interactively FS, surface, and complete solids
% (by Tim Lueth, VLFL-Lib, 2020-SEP-19 as class: EXPERIMENTS)
%
% 1 = left mouse button = feature surface
% 3 = right mouse button = complete surface
% 2 = middle mouse button/wheel = solid geometry that belongs to object
% (Status of: 2021-02-17)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGselect3d, SGselect3dPL, select3d, fiofselect3d
%
% [fil,VL,FL,hp,fi,pp]=SGselect3Dsurface([SG,pfi,alp,mbf,Text])
% === INPUT PARAMETERS ===
% SG: Solid Geometry; if empty SGofgca is used
% pfi: optional already preselected facet index
% alp: angle to select faces
% mbf: force button mode 1, 2, 3 - only in interactive mode
% Text:
% === OUTPUT RESULTS ======
% fil: Vertex list that belongs to touched graphics object
% VL: Facet list that belongs to touched graphics object
% FL: logical facet index list of selection
% hp: touched graphics object from select3d
% fi: touched facet index
% pp:
%
% EXAMPLE:
% SGselect3Dsurface(SGbox,1)
% SGselect3Dsurface(SGbox,'','','','Free Selection by using different mouse buttons')
% SGselect3Dsurface(SGbox,'','',2,'Forced selection of a complete surface')
% SGselect3Dsurface(SGbox,'','',3,'Forced selection of a complete solid')
%
% See also: SGselect3d, SGselect3dPL, select3d, fiofselect3d
%
%
% Copyright 2020-2021 Tim C. Lueth

CurrentPointofgcaBB(p)- returns for a given coordinate and the current camera position the CurrentPoint result of a virtual mouse click

CurrentPointofgcaBB(p)% CurrentPointofgcaBB(p) - returns for a given coordinate and the current camera position the CurrentPoint result of a virtual mouse click
% (by Tim Lueth, VLFL-Lib, 2020-SEP-19 as class: USER INTERFACE)
%
% get(gca,'CurrentPoint') returns in fact the start point and the end
% point of a beam from the camera position along the mouse postion
% crossing the bounding box of the axis. In case that a 3D point is known
% in the scene, sometimes we need the result similar to
% get(gca,'CurrentPoint') despite that not the cross hair but a given 3D
% point defines the point of interest.
% This fnctn CurrentPointofgcaBB emulates for a known Point in 3D
% coordinate the same concept and returns for a given point the netry
% point and the exit point of a beam from the camera through the figevn
% point crossing the bounding box of gca.
% It is used for a modification of select3D (Status of: 2020-09-19)
%
% Introduced first in SolidGeometry 5.0
%
% See also: select3D
%
% pc=CurrentPointofgcaBB(p)
% === INPUT PARAMETERS ===
% p: point in 3D that is inspected from the current camera position
% === OUTPUT RESULTS ======
% pc: [cp1; cp2] entry point of BB and exit point of bb from camera beam
% through p
%
% EXAMPLE:
% SGcolorsample; % now rotate the boxes for testing
% CurrentPoint([250 0 0]) %
%
% See also: select3D
%
%
% Copyright 2020 Tim C. Lueth

FLofVLFLficurved(VL,FL,fi,al,ms)- returns the facets that are attached to the known facets

FLofVLFLficurved(VL,FL,fi,al,ms)% FLofVLFLficurved(VL,FL,fi,al,ms) - returns the facets that are attached to the known facets
% (by Tim Lueth, VLFL-Lib, 2020-SEP-19 as class: SURFACES)
%
% will be fused most probably with FLofVLFLfi (Status of: 2020-09-19)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGisInteriorofBB, FLofVLFLvi, FLofVLFLfi, FSofSGfacet
%
% cfi=FLofVLFLficurved(VL,FL,fi,[al,ms])
% === INPUT PARAMETERS ===
% VL: Vertex list
% FL: Facet list
% fi: facet indices that are know to belong to the surface
% al: limiting angle
% ms: monotonic increasing; default is true;
% === OUTPUT RESULTS ======
% cfi: connected facet index
%
% EXAMPLE:
% SG=SGmicroscopeclamp; fi=2621;
% FLofVLFLficurved(SG.VL,SG.FL,fi,pi/3); view(-130,30)
%
% See also: SGisInteriorofBB, FLofVLFLvi, FLofVLFLfi, FSofSGfacet
%
%
% Copyright 2020 Tim C. Lueth

exp_2020_09_19_select3Dsurface(alp,mbf)- EXPERIMENT how to select interactively FS, surface, and complete solids

exp_2020_09_19_select3Dsurface(alp,mbf)% exp_2020_09_19_select3Dsurface(alp,mbf) - EXPERIMENT how to select interactively FS, surface, and complete solids
% (by Tim Lueth, VLFL-Lib, 2020-SEP-19 as class: EXPERIMENTS)
%
% 1 = left mouse button = feature surface
% 3 = right mouse button = complete surface
% 2 = middle mouse button/wheel = solid geometry that belongs to object
% (Status of: 2020-09-19)
%
% Introduced first in SolidGeometry 5.0
%
% [VL,FL,fil,hp]=exp_2020_09_19_select3Dsurface([alp,mbf])
% === INPUT PARAMETERS ===
% alp: angle to select faces
% mbf: force button mode 1, 2, 3
% === OUTPUT RESULTS ======
% VL: Vertex list that belongs to touched graphics object
% FL: Facet list that belongs to touched graphics object
% fil: logical facet index list of selection
% hp: touched graphics object from select3d
%
%
% Copyright 2020 Tim C. Lueth

SGmicroscopeclamp(DH)- delivers a spare part for a typical USB microscope camera in 2020

SGmicroscopeclamp(DH)% SGmicroscopeclamp(DH) - delivers a spare part for a typical USB microscope camera in 2020
% (by Tim Lueth, VLFL-Lib, 2020-SEP-18 as class: USB INTERFACE)
%
% The ring has an inner diameter of 31mm, as well as an inner
% circumferential pin ring with an inner diameter of 28mm. The ring is
% closed up to an inner diameter of 24mm and has a height of 2.5mm. The
% outer ring has a height of 15mm. The outer ring has a wall thickness of
% 1.5mm. The ball with a radius of 5mm is located at a distance of 10mm
% from the ring.
% SGmicroscopeclamp_org is an exact copy of the sold structure while this
% fnctn designs automatically a beded rod for changing the distance
% between camera and table (Status of: 2020-09-21)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGmicroscopetable, SGmicroscopeclamp_org,
% SGdesignfaceconnectingrod
%
% [SG,SGM,SGB]=SGmicroscopeclamp([DH])
% === INPUT PARAMETERS ===
% DH: Difference height; default is 0;
% === OUTPUT RESULTS ======
% SG: Solid Geometry to print
% SGM: Solid of the Ring
% SGB: Solid of the Ball
%
% EXAMPLE:
% SGmicroscopeclamp(40);
%
% See also: SGmicroscopetable, SGmicroscopeclamp_org,
% SGdesignfaceconnectingrod
%
%
% Copyright 2020 Tim C. Lueth

SGdesignDIN912DIN985axradbearing(sdl,ins,tpl,W,abb,rbb)- creates subtraction solids for a screw fixation and a axial bearing at a specific frame position of a solid

SGdesignDIN912DIN985axradbearing(sdl,ins,tpl,W,abb,rbb)% SGdesignDIN912DIN985axradbearing(sdl,ins,tpl,W,abb,rbb) - creates subtraction solids for a screw fixation and a axial bearing at a specific frame position of a solid
% (by Tim Lueth, VLFL-Lib, 2020-SEP-17 as class: AUTOMATIC DESIGN)
%
% This fnctn is based on a design/technical drawing of Simon Laudahn.
% THIS FNCTN USES FITTINGS by fnctn slfit und DIN4AMfitting
% If two elements should be connected using a DIN912 Screw and a DIN985
% Nut, this fnctn helps to create the subtraction solids to achive a
% fnctnal connection using standard machine elements. (Status of:
% 2020-09-20)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGDIN912, SGDIN985, SGdesignDIN912DIN985, SGbearingaxial,
% SGdesignSupplement
%
% [H,N,S,mt,parts]=SGdesignDIN912DIN985axradbearing([sdl,ins,tpl,W,abb,rb
% b])
% === INPUT PARAMETERS ===
% sdl: [M L d] = Metrix Length and delta in nut for screw connection
% ins: Characters for "T"unnel or "P"ocket; default is 'TP' for [HEAD NUT]
% tpl: Length of Insertion T/P for [HEAD NUT]; default is 10 10
% W: Rotation angle for Pocket if required; default is 0;
% abb: size of axial bearing; default is [3 6 3.5 3.2 5.8]
% rbb: size of radial bearing; default is [2.5 6 1.8]
% === OUTPUT RESULTS ======
% H: Subtraction Solid for Head side including frame 'C'
% N: Subtraction Solid for Nut side including frame 'C'
% S: Srew and Nut for Visualziation including frame 'C'
% mt: final wall thickness between head and bearing
% parts: parts list for assembly of one connection
%
% EXAMPLE:
% [H,N,S,mt]=SGdesignDIN912DIN985axradbearing([2.5 10 -1],'TT','','',[3 6 3.5 3.2 5.8],[2.5 6 1.8]);
% SGdesignSupplement(S)
% SGManipulatorLink; A=ans;
% SGsubtract(A,H,'alignT',{'C','F'});A=ans;
% SGsubtract(A,N,'alignT',{'C','B'});A=ans;
% SGfigure(-30,30); SGTplotalpha(A,'w',0.9);
%
% See also: SGDIN912, SGDIN985, SGdesignDIN912DIN985, SGbearingaxial,
% SGdesignSupplement
%
%
% Copyright 2020-2022 Tim C. Lueth

VLFL_EXP48- This is a Tutorial to understand different types of transmission gears

VLFL_EXP48% VLFL_EXP48 - This is a Tutorial to understand different types of transmission gears
% (by Yannick Krieger, VLFL-Lib, 2020-SEP-16 as class: EXPERIMENTS)
%
% Yannick Krieger's motivation: Based on my semester thesis written 2013,
% I tried to implement a fnctn for the design of gear pairs. Basic input
% is the distance and angle between the axis and the gear ratio. The
% fnctn uses the subfnctns for the geometric design of spur gears,
% internal gears, bevel gears, crown wheels and gear racks.
% (Status of: 2020-09-16)
%
% See also: SGgearpair, SGgearSpur, SGgearInternal, SGgearRack,
% SGgearBevel, SGgearCrownwheel, SGgearandrackDIN, SGgearmwormDIN,
% SGgearrackDIN, SGgearpairDIN, SGgearDIN, PLgearDIN, PLgearrackDIN
%
% VLFL_EXP48
%
% See also: SGgearpair, SGgearSpur, SGgearInternal, SGgearRack,
% SGgearBevel, SGgearCrownwheel, SGgearandrackDIN, SGgearmwormDIN,
% SGgearrackDIN, SGgearpairDIN, SGgearDIN, PLgearDIN, PLgearrackDIN
%

SGgearCrownwheel(M,Z,H,Di,T,AlphaN,hac,ma)- Returns the vertex/facet list of a crown wheel with involute teeth

SGgearCrownwheel(M,Z,H,Di,T,AlphaN,hac,ma)% SGgearCrownwheel(M,Z,H,Di,T,AlphaN,hac,ma) - Returns the vertex/facet list of a crown wheel with involute teeth
% (by Yannick Krieger & Mattias Traeger, VLFL-Lib, 2020-SEP-16 as class:
% PARAMETRIC DESIGN)
% First created on 2012-SEP-06 this fnctn has been added now to the SG-Lib
%
% This fnctn generates a gear with involute teeth and a bore. (Status of:
% 2020-09-16)
%
% See also: VLFL_EXP48, SGgearpair, SGgearSpur, SGgearInternal,
% SGgearRack, SGgearBevel, SGgearandrackDIN, SGgearmwormDIN,
% SGgearrackDIN, SGgearpairDIN, SGgearDIN, PLgearDIN, PLgearrackDIN
%
% [SG,da]=SGgearCrownwheel([M,Z,H,Di,T,AlphaN,hac,ma])
% === INPUT PARAMETERS ===
% M: Module, default is 1 [mm]
% Z: Number of teeth, default is 20
% H: Height of involute gear, default is 2 [mm]
% Di:
% T: Heigth of base body [mm]
% AlphaN: Pressure angle of the paired spur gear, default according to
% DIN 867 is 20 [degree].
% hac: addendum factor [-], default is 1
% ma: Machine accurracy [mm], default is 0.1 [mm] corresponding to EOS
% Formiga P100
% === OUTPUT RESULTS ======
% SG: SG of crown wheel
% da: Diameter of the center of the tooth flank
%
% EXAMPLE: Simply call with default values (There are many more parameters)
%
%
% See also: VLFL_EXP48, SGgearpair, SGgearSpur, SGgearInternal,
% SGgearRack, SGgearBevel, SGgearandrackDIN, SGgearmwormDIN,
% SGgearrackDIN, SGgearpairDIN, SGgearDIN, PLgearDIN, PLgearrackDIN
%

SGgearpair(A,i,sigma,h,di,type)- returns a combination of two gears

SGgearpair(A,i,sigma,h,di,type)% SGgearpair(A,i,sigma,h,di,type) - returns a combination of two gears
% (by Yannick Krieger, VLFL-Lib, 2020-SEP-16 as class: PARAMETRIC DESIGN)
% First created on 2020-SEP-10 this fnctn has been added now to the SG-Lib
%
% This fnctn creates single stage gear. The fnctn contains spur gears,
% internal gears, bevel gears and crownwheels. The smaller gear is
% defined with 14 teeth to avoid undercuts due to gear motion. (Status
% of: 2020-09-16)
%
% See also: VLFL_EXP48, SGgearSpur, SGgearInternal, SGgearRack,
% SGgearBevel, SGgearCrownwheel, SGgearandrackDIN, SGgearmwormDIN,
% SGgearrackDIN, SGgearpairDIN, SGgearDIN, PLgearDIN, PLgearrackDIN
%
% [SGgp,SGg1,SGg2]=SGgearpair([A,i,sigma,h,di,type])
% === INPUT PARAMETERS ===
% A: Shaft center distance as sum of the two radii, default is 20 [mm];
% Give positive value for spur gear pair and negative value for gear pair
% with one internal gear
% i: Gear ratio, default is 2.5 []; Has to be divisible by 0.5! Negative
% value defines a combination of spur gear and gear rack
% sigma: Angle between the axis, default is 0 [°]; A value of -90
% defines a crownwheel
% h: Heigth of the gears, default is 3 [mm]
% di: Diameter of an inner bore hole, default is 0 [mm]
% type: Flag for the design of helical ('h') or herring bone ('v') teeth,
% default is '' ['string]
% === OUTPUT RESULTS ======
% SGgp: Pair of gears for the gear stage [SGT]
% SGg1: First gear of the pair as single SGT [SGT]
% SGg2: Second gear of the pair as single SGT [SGT]
%
% EXAMPLE:
% SGgearpair(20,2.5,0,3,0,'') %spur gears stage
% SGgearpair(-20,2.5,0,3,0,'') %internal gear stage
% SGgearpair(20,2.5,90,5,2,'v') %bevel gear stage
% SGgearpair(20,2.5,-90) %gear stage with crown wheel
% SGgearpair(20,-1.5,0,3,0,'h') %gear rack with spur gear
%
% See also: VLFL_EXP48, SGgearSpur, SGgearInternal, SGgearRack,
% SGgearBevel, SGgearCrownwheel, SGgearandrackDIN, SGgearmwormDIN,
% SGgearrackDIN, SGgearpairDIN, SGgearDIN, PLgearDIN, PLgearrackDIN
%

SGgearRack(M,Z,H,Di,Beta,Alpha,BetaV,hac);- Returns the vertex/facet list of a gear with involute teeth

SGgearRack(M,Z,H,Di,Beta,Alpha,BetaV,hac);% SGgearRack(M,Z,H,Di,Beta,Alpha,BetaV,hac); - Returns the vertex/facet list of a gear with involute teeth
% (by Yannick Krieger & Mattias Traeger, VLFL-Lib, 2020-SEP-16 as class:
% PARAMETRIC DESIGN)
% First created on 2012-SEP-06 this fnctn has been added now to the SG-Lib
%
% This fnctn generates a gear rack with involute teeth. Furthermore
% helical gears as well as herringbone gears are possible. (Status of:
% 2020-09-16)
%
% See also: VLFL_EXP48, SGgearpair, SGgearSpur, SGgearInternal,
% SGgearBevel, SGgearCrownwheel, SGgearandrackDIN, SGgearmwormDIN,
% SGgearrackDIN, SGgearpairDIN, SGgearDIN, PLgearDIN, PLgearrackDIN
%
% SG=SGgearRack([M,Z,H,Di,Beta,Alpha,BetaV,hac]);
% === INPUT PARAMETERS ===
% M: Normal module, default is 1 [mm]
% Z: Number of teeth, default is 18
% H: Height of involute gear, default is 2 [mm]
% Di: Defines Thicknes of the rack base , default is 2 [mm]
% Beta: Angle for helical gearing, default is 0 [degree]
% Alpha: Normal pressure angle, default according to DIN 867 is 20
% [degree]
% BetaV: Helical angle for herring bone gearing, default is 0 [degree]
% hac: Addendum factor [-], default is 1
% === OUTPUT RESULTS ======
% SG: Solid Geometry
%
% EXAMPLE: Simply call with default values (There are many more parameters)
%
%
% See also: VLFL_EXP48, SGgearpair, SGgearSpur, SGgearInternal,
% SGgearBevel, SGgearCrownwheel, SGgearandrackDIN, SGgearmwormDIN,
% SGgearrackDIN, SGgearpairDIN, SGgearDIN, PLgearDIN, PLgearrackDIN
%

SGgearInternal(M,Z,H,Di,Beta,Alpha,SW,BetaV)- returns the vertex/facet list of a gear with internal involute teeth

SGgearInternal(M,Z,H,Di,Beta,Alpha,SW,BetaV)% SGgearInternal(M,Z,H,Di,Beta,Alpha,SW,BetaV) - returns the vertex/facet list of a gear with internal involute teeth
% (by Yannick Krieger & Mattias Traeger, VLFL-Lib, 2020-SEP-16 as class:
% PARAMETRIC DESIGN)
% First created on 2013-OKT-10 this fnctn has been added now to the SG-Lib
%
% This fnctn generates a gear with internal involute teeth. Furthermore
% helical gears as well as herringbone gears are possible.
% (Status of: 2020-09-16)
%
% See also: VLFL_EXP48, SGgearpair, SGgearSpur, SGgearRack, SGgearBevel,
% SGgearCrownwheel, SGgearandrackDIN, SGgearmwormDIN, SGgearrackDIN,
% SGgearpairDIN, SGgearDIN, PLgearDIN, PLgearrackDIN
%
% SG=SGgearInternal([M,Z,H,Di,Beta,Alpha,SW,BetaV])
% === INPUT PARAMETERS ===
% M: Normal module, default is 1 [mm]
% Z: Number of teeth, default is -20
% H: Height of involute gear, default is 2 [mm]
% Di: Distance between df and outer diameter, default is 2 [mm]
% Beta: Angle for helical gearing, default is 0 [degree]
% Alpha: Normal pressure angle, default according to DIN 867 is 20
% [degree]
% SW: Step-Width for resolution of the gear's contour, default is 0.1 [mm]
% BetaV: Helical angle for herring bone gearing, default is 0 [degree]
% === OUTPUT RESULTS ======
% SG: Solid Geometry
%
% EXAMPLE: Simply call with default values (There are many more parameters)
%
%
% See also: VLFL_EXP48, SGgearpair, SGgearSpur, SGgearRack, SGgearBevel,
% SGgearCrownwheel, SGgearandrackDIN, SGgearmwormDIN, SGgearrackDIN,
% SGgearpairDIN, SGgearDIN, PLgearDIN, PLgearrackDIN
%

SGgearSpur(M,Z,H,Di,Beta,Alpha,SW,BetaV)- Returns the vertex/facet list of a gear with involute teeth

SGgearSpur(M,Z,H,Di,Beta,Alpha,SW,BetaV)% SGgearSpur(M,Z,H,Di,Beta,Alpha,SW,BetaV) - Returns the vertex/facet list of a gear with involute teeth
% (by Yannick Krieger, VLFL-Lib, 2020-SEP-16 as class: PARAMETRIC DESIGN)
% First created on 2013-OKT-23 this fnctn has been added now to the SG-Lib
%
% This fnctn generates a spur gear with involute teeth and a bore.
% Furthermore helical gears as well as herringbone gears are possible.
% (Status of: 2020-09-16)
%
% See also: VLFL_EXP48, SGgearpair, SGgearInternal, SGgearRack,
% SGgearBevel, SGgearCrownwheel, SGgearandrackDIN, SGgearmwormDIN,
% SGgearrackDIN, SGgearpairDIN, SGgearDIN, PLgearDIN, PLgearrackDIN
%
% SG=SGgearSpur([M,Z,H,Di,Beta,Alpha,SW,BetaV])
% === INPUT PARAMETERS ===
% M: Normal module, default is 1 [mm]
% Z: Number of teeth, default is 18
% H: Height of involute gear, default is 2 [mm]
% Di: Diameter of the bore, default is 0 [mm]
% Beta: Angle for helical gearing, default is 0 [degree]
% Alpha: Normal pressure angle, default according to DIN 867 is 20
% [degree]
% SW: Step-Width for resolution of the gear's contour, default is
% 0.075[mm]
% BetaV: Helical angle for herring bone gearing, default is 0 [degree]
% === OUTPUT RESULTS ======
% SG: Solid Geometry
%
% EXAMPLE: Simply call with default values (There are many more parameters)
%
% See also: VLFL_EXP48, SGgearpair, SGgearInternal, SGgearRack,
% SGgearBevel, SGgearCrownwheel, SGgearandrackDIN, SGgearmwormDIN,
% SGgearrackDIN, SGgearpairDIN, SGgearDIN, PLgearDIN, PLgearrackDIN
%

SGgearBevel(M,Z,H,Di,Beta,Alpha,SW,BetaV)- Returns the vertex/facet list of a bevel gear with involute teeth

SGgearBevel(M,Z,H,Di,Beta,Alpha,SW,BetaV)% SGgearBevel(M,Z,H,Di,Beta,Alpha,SW,BetaV) - Returns the vertex/facet list of a bevel gear with involute teeth
% (by Yannick Krieger & Mattias Traeger, VLFL-Lib, 2020-SEP-16 as class:
% PARAMETRIC DESIGN)
% First created on 2013-JUN-26 this fnctn has been added now to the SG-Lib
%
% This fnctn generates a bevel gear with involute teeth and a bore.
% Furthermore helical and herringbone gears are possible.
% (Status of: 2020-09-16)
%
% See also: VLFL_EXP48, SGgearpair, SGgearSpur, SGgearInternal,
% SGgearRack, SGgearCrownwheel, SGgearandrackDIN, SGgearmwormDIN,
% SGgearrackDIN, SGgearpairDIN, SGgearDIN, PLgearDIN, PLgearrackDIN
%
% [SG,tz]=SGgearBevel([M,Z,H,Di,Beta,Alpha,SW,BetaV])
% === INPUT PARAMETERS ===
% M: Module, default is 1 [mm]
% Z: Number of teeth, default is 20
% H: Height of involute gear, default is 2 [mm]
% Di: Diameter of the bore, default is 0 [mm]
% Beta: Angle for helical gearing, default is 0 [degree]
% Alpha: Pressure angle, default according to DIN 867 is 20 [degree]. It
% is Alpha<=acosd(1-(2.25/Z))
% SW: Step-Width for resolution of the gear's contour, default is 0.5 [mm]
% BetaV: Helical angle for herring bone gearing, default is 0 [degree]
% === OUTPUT RESULTS ======
% SG: SG of bevel gear
% tz: Offset in z-direction [mm]
%
% EXAMPLE: Simply call with default values (There are many more parameters)
% SGgearBevel
%
% See also: VLFL_EXP48, SGgearpair, SGgearSpur, SGgearInternal,
% SGgearRack, SGgearCrownwheel, SGgearandrackDIN, SGgearmwormDIN,
% SGgearrackDIN, SGgearpairDIN, SGgearDIN, PLgearDIN, PLgearrackDIN
%

SGdesignDIN912DIN985axialbearing(sdl,ins,tpl,W,abb)- creates subtraction solids for a screw fixation and a axial bearing at a specific frame position of a solid

SGdesignDIN912DIN985axialbearing(sdl,ins,tpl,W,abb)% SGdesignDIN912DIN985axialbearing(sdl,ins,tpl,W,abb) - creates subtraction solids for a screw fixation and a axial bearing at a specific frame position of a solid
% (by Tim Lueth, VLFL-Lib, 2020-SEP-16 as class: AUTOMATIC DESIGN)
%
% This fnctn is based on discussion with Simon Laudahn and Franz Irlinger.
% THIS FNCTN USES FITTINGS by fnctn slfit und DIN4AMfitting
% If two elements should be connected using a DIN912 Screw and a DIN985
% Nut, this fnctn helps to create the subtraction solids to achive a
% fnctnal connection using standard machine elements. (Status of:
% 2020-09-20)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGDIN912, SGDIN985, SGdesignDIN912DIN985, SGbearingaxial,
% SGdesignSupplement
%
% [H,N,S,mt,parts]=SGdesignDIN912DIN985axialbearing([sdl,ins,tpl,W,abb])
% === INPUT PARAMETERS ===
% sdl: [M L d] = Metrix Length and delta in nut for screw connection
% ins: Characters for "T"unnel or "P"ocket; default is 'TP' for [HEAD NUT]
% tpl: Length of Insertion T/P for [HEAD NUT]; default is 10 10
% W: Rotation angle for Pocket if required; default is 0;
% abb: size of axial bearing; default is [3 6 3.5 3.2 5.8]
% === OUTPUT RESULTS ======
% H: Subtraction Solid for Head side including frame 'C'
% N: Subtraction Solid for Nut side including frame 'C'
% S: Srew and Nut for Visualziation including frame 'C'
% mt: final wall thickness between head and bearing
% parts: parts list for assembly of one connection
%
% EXAMPLE:
% [H,N,S,mt]=SGdesignDIN912DIN985axialbearing([2.5 10 -1],'TT','','',[3 6 3.5 3.2 5.8]);
% SGdesignSupplement(S)
% SGManipulatorLink; A=ans;
% SGsubtract(A,H,'alignT',{'C','F'});A=ans;
% SGsubtract(A,N,'alignT',{'C','B'});A=ans;
% SGfigure(-30,30); SGTplotalpha(A,'w',0.9);
%
% See also: SGDIN912, SGDIN985, SGdesignDIN912DIN985, SGbearingaxial,
% SGdesignSupplement
%
%
% Copyright 2020-2022 Tim C. Lueth

CPLdecompose(CPL,da,mix)- returns a list of contour segments that belong to the same angle segment

CPLdecompose(CPL,da,mix)% CPLdecompose(CPL,da,mix) - returns a list of contour segments that belong to the same angle segment
% (by Tim Lueth, VLFL-Lib, 2020-SEP-15 as class: CLOSED POLYGON LISTS)
%
% still weak for contours with no auxiliary points (Status of: 2020-09-15)
%
% Introduced first in SolidGeometry 5.0
%
% See also: PLdecompose, isconvexPL, PLconvexseg, CPLconvexseg
%
% SIL=CPLdecompose(CPL,[da,mix])
% === INPUT PARAMETERS ===
% CPL: CPL
% da: angle; default si pi/3
% mix: if true; minxy is used to start with segment 1
% === OUTPUT RESULTS ======
% SIL: Separation Index List
%
% EXAMPLE:
% CPLdecompose(CPLaddauxpoints(CPLsample(14),1),pi);
% CPLdecompose(CPLaddauxpoints(CPLsample(6),0.1),pi/2)
%
% See also: PLdecompose, isconvexPL, PLconvexseg, CPLconvexseg
%
%
% Copyright 2020-2021 Tim C. Lueth

PLdecompose(CPL,da,mix)- returns a list of contour segments that belong to the same angle segment

PLdecompose(CPL,da,mix)% PLdecompose(CPL,da,mix) - returns a list of contour segments that belong to the same angle segment
% (by Tim Lueth, VLFL-Lib, 2020-SEP-15 as class: CLOSED POLYGON LISTS)
%
% still weak for contours with no auxiliary points (Status of: 2021-04-15)
%
% Introduced first in SolidGeometry 5.0
%
% See also: CPLdecompose, isconvexPL, PLconvexseg, CPLconvexseg
%
% SIL=PLdecompose(CPL,[da,mix])
% === INPUT PARAMETERS ===
% CPL: SINGLE CONTOUR
% da: angle; default si pi/6
% mix: if true; minxy is used to start with segment 1; default is false;
% === OUTPUT RESULTS ======
% SIL: Separation Index List
%
% EXAMPLE:
% PLdecompose(CPLaddauxpoints(CPLsample(17),0.1),pi/10)
% PLdecompose(CPLaddauxpoints(CPLsample(2),0.1),pi/10)
%
% See also: CPLdecompose, isconvexPL, PLconvexseg, CPLconvexseg
%
%
% Copyright 2020-2021 Tim C. Lueth

PLminxy(PL,maxX)- returns the point with minimal x and y values

PLminxy(PL,maxX)% PLminxy(PL,maxX) - returns the point with minimal x and y values
% (by Tim Lueth, VLFL-Lib, 2020-SEP-15 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: PLminangle, PLminyx
%
% [P,k]=PLminxy(PL,[maxX])
% === INPUT PARAMETERS ===
% PL: Point Liste
% maxX: if true; we search for maximum y and maximum x
% === OUTPUT RESULTS ======
% P: Point with minimal y and minimal x
% k: find index in PL
%
% EXAMPLE:
% CPLB=CPLspiral(10,20,8*pi);
% PLminxy(CPLB)
% PLminxy(CPLB,true)
% [~,k]=PLminxy(CPLB); CPLB=circshift(CPLB,-k);
%
% See also: PLminangle, PLminyx
%
%
% Copyright 2020-2021 Tim C. Lueth

TofCVL(CVL,ez)- returns for curved contours the mean transformation matrix

TofCVL(CVL,ez)% TofCVL(CVL,ez) - returns for curved contours the mean transformation matrix
% (by Tim Lueth, VLFL-Lib, 2020-SEP-14 as class: CLOSED POLYGON LISTS)
%
% In some cases, the fnctn TofVL calculates an undesired transformation
% for curved surfaces, since TofVL is based on the Eigenvalues of the
% convex hull. TofCVL is based on the edge normals and is required for
% curved surfaces. In case of planar surfaces, TofCVL will fail and
% automatically return TofVL as result.
% IN SG-LIB 5.0 we have to following concepts:
% - (2010) - T3P: T - right hand system from 3 Point. Origin is p1
% - (2012) - TofVL: T - Eigenvalues and Center of convexhull of VL
% - (2015) - PLofVL: T - ex is the longest distance of mean(VL)
% - (2016) - TofPez: T - ey has no x dimension or ex=[0 0 1]
% - (2019) - TofVLFL:T - ez is calucated from the face normals, o=mean(VL)
% - (2020) - VLeigenvect - same as TofVL but no convex hull and faster
% - (2020) - TofCVL: T - ez is calucated from the edge normals, o=mean(VL)
% (Status of: 2021-03-14)
%
% Introduced first in SolidGeometry 5.0
%
% See also: TofVLFL, VLeigenvect, TofVL, T3P, TofPez, PLofVL, VLFL_EXP60
%
% T=TofCVL(CVL,[ez])
% === INPUT PARAMETERS ===
% CVL: CVL - curved - for planar use TofVL
% ez: if not empty ez of result T is forced into direction of ez
% === OUTPUT RESULTS ======
% T: Transformation matrix
%
% EXAMPLE:
% TofCVL(CVLofCPLbendsinus(CPLaddauxpoints(CPLsample(37),1),'x',0.5,10)) % Correct to BB correct for surface
% TofCVL(CVLofCPLbendsinus(CPLaddauxpoints(CPLsample(37),1),'x',0.5,30)) % Correct to BB correct for surface
% TofVL(CVLofCPLbendsinus(CPLaddauxpoints(CPLsample(37),1),'x',0.5,10)) % Correct to BB correct for surface
% TofVL(CVLofCPLbendsinus(CPLaddauxpoints(CPLsample(37),1),'x',0.5,30)) % Correct to BB wrong for surface
%
% See also: TofVLFL, VLeigenvect, TofVL, T3P, TofPez, PLofVL, VLFL_EXP60
%
%
% Copyright 2020-2022 Tim C. Lueth

CVLedgecenter(CVL)- Calculates the center/middle point between two edge points

CVLedgecenter(CVL)% CVLedgecenter(CVL) - Calculates the center/middle point between two edge points
% (by Tim Lueth, VLFL-Lib, 2020-SEP-14 as class: CLOSED POLYGON LISTS)
%
% Introduced first in SolidGeometry 5.0
%
% See also: CVLedgeNormal
%
% MVL=CVLedgecenter(CVL)
% === INPUT PARAMETERS ===
% CVL: contour vertex list
% === OUTPUT RESULTS ======
% MVL: Middle-point-of-edge vertex list
%
% EXAMPLE:
% CVLedgecenter(VLofCVL(CVLsample(31))) % Open CVL creates the right middle points
% CVLedgecenter(CVLsample(31)) % Creates an additional point at the end
%
% See also: CVLedgeNormal
%
%
% Copyright 2020 Tim C. Lueth

CVLedgeNormal(CVL)- Calculates normal vectors for curved closed contours

CVLedgeNormal(CVL)% CVLedgeNormal(CVL) - Calculates normal vectors for curved closed contours
% (by Tim Lueth, VLFL-Lib, 2020-SEP-14 as class: CLOSED POLYGON LISTS)
%
% CVL version of VLedgeNormal
% (Status of: 2020-09-14)
%
% Introduced first in SolidGeometry 5.0
%
% See also: CVLedgecenter, VLedgeNormal, CPLedgeNormal
%
% [NL,OL]=CVLedgeNormal(CVL)
% === INPUT PARAMETERS ===
% CVL: CVL
% === OUTPUT RESULTS ======
% NL: Normal vector list for each vertex
% OL: Orthogonal inplane vector list for each vertex
%
% EXAMPLE:
% CVLedgeNormal(CVLsample(31))
% CVLedgeNormal(CVLsample(32))
%
% See also: CVLedgecenter, VLedgeNormal, CPLedgeNormal
%
%
% Copyright 2020 Tim C. Lueth

CVLofCPLbendsinus(CPL,dim,hwv,scl)- returns a wave-shape-bended CVL from a CPL

CVLofCPLbendsinus(CPL,dim,hwv,scl)% CVLofCPLbendsinus(CPL,dim,hwv,scl) - returns a wave-shape-bended CVL from a CPL
% (by Tim Lueth, VLFL-Lib, 2020-SEP-14 as class: CLOSED POLYGON LISTS)
%
% Introduced first in SolidGeometry 5.0
%
% See also: VLaddz, CPLaddauxpoints, PLFLofCPLdelaunayGrid,
% CVLofCPLbendspherical, SGbending
%
% CVL=CVLofCPLbendsinus(CPL,[dim,hwv,scl])
% === INPUT PARAMETERS ===
% CPL: CPL
% dim: wave dimension; default is 'x'
% hwv: number of sin waves; default is 1
% scl: default is sofCPL/10
% === OUTPUT RESULTS ======
% CVL: Final CVL
%
% EXAMPLE:
% CVLofCPLbendsinus(CPLaddauxpoints(CPLsample(37),1),'',1);
% CVLofCPLbendsinus(CPLaddauxpoints(CPLsample(37),1),'x',.5,50); % strong bending
%
% See also: VLaddz, CPLaddauxpoints, PLFLofCPLdelaunayGrid,
% CVLofCPLbendspherical, SGbending
%
%
% Copyright 2020 Tim C. Lueth

VLFL_EXP60- This is a Tutorial to understand different types of transformation and surfaces

VLFL_EXP60% VLFL_EXP60 - This is a Tutorial to understand different types of transformation and surfaces
% (by Tim Lueth, VLFL-Lib, 2020-SEP-14 as class: EXPERIMENTS)
%
% There are many different reasons and thus use cases to transform a set
% of points from 3D space to 2D space. There are also different ways of
% looking at a contour, for example as an edge contour of a 2D surface or
% as an edge contour of a 3D body. In my eyes, this is somewhat related
% to the optical perceptions that we see, for example, in pictures that
% we, as viewers, interpret as two different figures, or to the ambiguity
% of wire models or even shaded surface models with respect to their
% actual geometry, for instance peg instead of groove.
% I would like to introduce into the understanding of these different
% views in order to be able to present problems of Delaunay triangulation
% and geometry generation in a more understandable way. (Status of:
% 2020-09-14)
%
% Introduced first in SolidGeometry 5.0
%
% VLFL_EXP60
%
%
% Copyright 2020 Tim C. Lueth

bugexp_2020_09_13_PLofVL(VL,FL)- This is definitely not a Matlab bug but a SG-Lib bug

bugexp_2020_09_13_PLofVL(VL,FL)% bugexp_2020_09_13_PLofVL(VL,FL) - This is definitely not a Matlab bug but a SG-Lib bug
% (by Tim Lueth, VLFL-Lib, 2020-SEP-13 as class: EXPERIMENTS)
%
% 8:00 It seems that the 3D to 2D projection in the fnctn FLofDelaunay
% sometimes trasforms the point set by 90 degrees wrongly to 2D and thus
% also triangulates/tessellates the 3D surfaces in 2D wrongly. So far I
% thought that Matlab accidentally makes a 3D transformation from 2D but
% it seems to be a TofVL problem.
% 9:00 YES - THERE WAS A BIG MISTAKE OVER YEARS -
% 9:15 ANYWAY IT WILL TAKE SOME TIME TO CLEAN SG-LIB
% - If a planar 2D surface in space should be analyzed/triangulated in
% 2D, the 3D coordinates have to be transformed using condeig(cov(VL)) -
% this is calculated in TofVL and creates a coordinate system for
% transformation of the surface in 2D
% - If a curved 2D surface in space should be analyzed/triangulated in
% 2D, the 3D coordinates have to be transformed by the mean normal vector
% and the mean coordinates - this is calculated in TofVLFL and creates a
% coordinate system for projecting the surface to 2D
%
% Finally it becomes clear that this bug appears especially if a surface
% with a 90 degree angle and a small coronar surface area is processed.
% in many cases TofVL and TofVLFL seem to be similar but in the mentioned
% case, TofVL turns into the most unsuitable orientation (Status of:
% 2020-09-14)
%
% Introduced first in SolidGeometry 5.0
%
% See also: BUGREPORT_FLofDelaunay, BUGREPORT_PLofVL
%
% bugexp_2020_09_13_PLofVL([VL,FL])
% === INPUT PARAMETERS ===
% VL: vertex list if this fnctn should test your VLFL problem
% FL: facet list if this fnctn should test your VLFL problem
%
% EXAMPLE: Just call
% BUGREPORT_PLofVL
%
% See also: BUGREPORT_FLofDelaunay, BUGREPORT_PLofVL
%
%
% Copyright 2020-2021 Tim C. Lueth

CVLaddauxpoints(CVL,a,e)- inserts auxilary points and removes near points in CVLs

CVLaddauxpoints(CVL,a,e)% CVLaddauxpoints(CVL,a,e) - inserts auxilary points and removes near points in CVLs
% (by Tim Lueth, VLFL-Lib, 2020-SEP-12 as class: CLOSED POLYGON LISTS)
%
% Introduced first in SolidGeometry 5.0
%
% See also: CPLaddauxpoints
%
% CVLN=CVLaddauxpoints(CVL,[a,e])
% === INPUT PARAMETERS ===
% CVL: Original CVL
% a: auxiliary point maximum distance; default is 1
% e: minimal distance to remove points; default is -1;
% === OUTPUT RESULTS ======
% CVLN: New CVL
%
% EXAMPLE:
% CVLaddauxpoints(CVLsample(19),2);
%
% See also: CPLaddauxpoints
%
%
% Copyright 2020 Tim C. Lueth

VLplotdelaunay(VL,c,al)- simple inspection fnct

VLplotdelaunay(VL,c,al)% VLplotdelaunay(VL,c,al) - simple inspection fnct
% (by Tim Lueth, VLFL-Lib, 2020-SEP-12 as class: VISUALIZATION)
%
% Introduced first in SolidGeometry 5.0
%
% VLplotdelaunay(VL,[c,al])
% === INPUT PARAMETERS ===
% VL: Vertex list
% c: color of solid; default is 'y'
% al: alpha of solid; default is 1
%
% EXAMPLE:
% VL=VLsample(25); VLplotdelaunay(VL);
%
%
% Copyright 2020 Tim C. Lueth

dbexit- instead of pause just abort / exit the progamm

dbexit% dbexit - instead of pause just abort / exit the progamm
% (by Tim Lueth, VLFL-Lib, 2020-SEP-12 as class: AUXILIARY PROCEDURES)
%
% =======================================================================
% OBSOLETE (2021-12-23) - USE 'dbreturn' INSTEAD
% =======================================================================
%
% some fnctns for fast and old style debugging (Status of: 2021-11-02)
%
% Introduced first in SolidGeometry 5.0
%
% See also: [ dbreturn ] ; dbprintf, dbreturn, dbsave, dbprintmode
%
% dbexit
%
% EXAMPLE:
% dbexit - stops the excution
%
% See also: [ dbreturn ] ; dbprintf, dbreturn, dbsave, dbprintmode
%
%
% Copyright 2020-2021 Tim C. Lueth

VLFLremoveFacet(VL,FL,fi)- removes a single facet from a surface

VLFLremoveFacet(VL,FL,fi)% VLFLremoveFacet(VL,FL,fi) - removes a single facet from a surface
% (by Tim Lueth, VLFL-Lib, 2020-SEP-11 as class: SURFACES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: VLFLofVLELdelaunay3D, VLFLplotfi
%
% FLN=VLFLremoveFacet(VL,FL,fi)
% === INPUT PARAMETERS ===
% VL: Vertex list
% FL: Facet list
% fi: face index to be removed
% === OUTPUT RESULTS ======
% FLN: New Facet list
%
% EXAMPLE:
% SGsphere(5); X=ans % Create a shpere
% VLFLplotfi(X.VL,X.FL,616);
% VLFLremoveFacet(X.VL,X.FL,616);
%
% See also: VLFLofVLELdelaunay3D, VLFLplotfi
%
%
% Copyright 2020 Tim C. Lueth

VLFLplotfi (VL,FL,fi);- plots the scenery around some vertices in unequal scale

VLFLplotfi (VL,FL,fi);% VLFLplotfi (VL,FL,fi); - plots the scenery around some vertices in unequal scale
% (by Tim Lueth, VLFL-Lib, 2020-SEP-11 as class: VISUALIZATION)
%
% Is not a plotting fnctn more a inspection fnctn
% better would be
% VLFLshowvi
% VLFLinspectvi (Status of: 2020-09-11)
%
% Introduced first in SolidGeometry 5.0
%
% See also: VLFLofVLELdelaunay3D, VLFLremoveFacet
%
% VLFLplotfi(VL,FL,fi);
% === INPUT PARAMETERS ===
% VL: Vertex list
% FL: Facet list
% fi: facet index
%
% EXAMPLE:
% SGsphere(5); X=ans % Create a shpere
% VLFLplotfi(X.VL,X.FL,616);
%
%
% See also: VLFLofVLELdelaunay3D, VLFLremoveFacet
%
%
% Copyright 2020 Tim C. Lueth

SGcutTbladeangle(SG,T,ct,R)- returns the mean center angle of the cutting blades

SGcutTbladeangle(SG,T,ct,R)% SGcutTbladeangle(SG,T,ct,R) - returns the mean center angle of the cutting blades
% (by Tim Lueth, VLFL-Lib, 2020-SEP-06 as class: ANALYTICAL GEOMETRY)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGcutTcylindricblade
%
% w=SGcutTbladeangle(SG,T,[ct,R])
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% T: Cutting Frame
% ct: Cutting orientation; default is 'a'
% R: Radius to be used
% === OUTPUT RESULTS ======
% w: mean angle of cylindric blade (Starting angle would be w-pi/2)
%
% EXAMPLE:
% SGcutTbladeangle(A{1},T,'s');
%
% See also: SGcutTcylindricblade
%
%
% Copyright 2020 Tim C. Lueth

SGseparatebyPez(SGorg,p,ez,FN)- searches infront and behind a ez vector for surfaces

SGseparatebyPez(SGorg,p,ez,FN)% SGseparatebyPez(SGorg,p,ez,FN) - searches infront and behind a ez vector for surfaces
% (by Tim Lueth, VLFL-Lib, 2020-SEP-06 as class: SURFACES)
%
% This fnctn is useful to classify solids as infront or behind a cutting
% plane or cutting blades
% In contrast to SGseparatebyT, this fnctn is beam touched surface based
% SGTframerot
% (Status of: 2020-09-06)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGTframerot, SGsurfaces, SGcutT, SGcutTcrossblade,
% SGcutTcylindricblade, SGseparatebyT
%
% SGout=SGseparatebyPez(SGorg,p,[ez,FN])
% === INPUT PARAMETERS ===
% SGorg: Original Solid Geometry
% p: center point
% ez: ez beam to find surface
% FN: optional frame name; default is 'C'
% === OUTPUT RESULTS ======
% SGout: {behind-ez surface, infront-ez surface, untouched surface}
%
% EXAMPLE:
% [A,B]=SGcutT(SGbox,eye(4),'',0.1); % distance is required!
% SGseparatebyPez(SGofSG({A,B}),[0 0 0],[0 0 1])
%
% See also: SGTframerot, SGsurfaces, SGcutT, SGcutTcrossblade,
% SGcutTcylindricblade, SGseparatebyT
%
%
% Copyright 2020-2022 Tim C. Lueth

SGcell2array(SGC)- converts a cell list of solids into a struct array of solids

SGcell2array(SGC)% SGcell2array(SGC) - converts a cell list of solids into a struct array of solids
% (by Tim Lueth, VLFL-Lib, 2020-SEP-06 as class: SURFACES)
%
% this fnctn was more or less written since is was at this time unclear
% wether a cell list - that can make some trouble as varargin - is better
% or worse than a struct array
% In contrast to a cell list, an array of struct requires the same struct
% fields for all structs (Status of: 2020-09-06)
%
% Introduced first in SolidGeometry 5.0
%
% See also: isSG
%
% SGN=SGcell2array([SGC])
% === INPUT PARAMETERS ===
% SGC: Cell of Solids
% === OUTPUT RESULTS ======
% SGN: Array of Solids - requires the same struct fields for all structs
%
% EXAMPLE:
% loadweb JACO_robot.mat; A=JACO
% B=SGbox
% loadweb ADAM_C.mat; C=ADAM_C
% FN=SGfieldnames({A,B,C})
% SGaddfields({A,B,C},FN)
% SGcell2array({{A,B,C}})
%
% See also: isSG
%
%
% Copyright 2020 Tim C. Lueth

SGTtransR(SG,FN,R,p)- rotates a selected frame of a solid

SGTtransR(SG,FN,R,p)% SGTtransR(SG,FN,R,p) - rotates a selected frame of a solid
% (by Tim Lueth, VLFL-Lib, 2020-SEP-06 as class: KINEMATICS AND FRAMES)
%
% helpful after cutting procedures (Status of: 2020-09-06)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGTset, SGTget, SGTsetofFS, SGTframeplot
%
% SG=SGTtransR(SG,FN,R,[p])
% === INPUT PARAMETERS ===
% SG: Solid geometry
% FN: Frame name
% R: Rotation matrix
% p: translation vector
% === OUTPUT RESULTS ======
% SG: SG with modified Frame
%
% EXAMPLE:
% SGTtransR(SGbox,'F',[0 pi/6 0])
%
% See also: SGTset, SGTget, SGTsetofFS, SGTframeplot
%
%
% Copyright 2020 Tim C. Lueth

SGTrename(SG,Norg,Nnew,rm);- renames a frame of a solid geometry

SGTrename(SG,Norg,Nnew,rm);% SGTrename(SG,Norg,Nnew,rm); - renames a frame of a solid geometry
% (by Tim Lueth, VLFL-Lib, 2020-SEP-06 as class: KINEMATICS AND FRAMES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGTremove, SGTset, SGTget, SGTsetofFS
%
% SG=SGTrename(SG,Norg,Nnew,[rm]);
% === INPUT PARAMETERS ===
% SG: Solid geometry
% Norg: Original name
% Nnew: New name
% rm: if true; existing frame Nnew is deleted first; default is false
% === OUTPUT RESULTS ======
% SG: Solid geometry with changed frame name
%
% EXAMPLE:
% B=SGbox
% B=SGTrename(B,'B','C')
% B=SGTrename(B,'C','B')
% B=SGTrename(B,'B','F')
% B=SGTrename(B,'B','F',true)
%
% See also: SGTremove, SGTset, SGTget, SGTsetofFS
%
%
% Copyright 2020 Tim C. Lueth

SGaddfields(SG,FNN)- adds field of a field name list to all elements of a solid geometry

SGaddfields(SG,FNN)% SGaddfields(SG,FNN) - adds field of a field name list to all elements of a solid geometry
% (by Tim Lueth, VLFL-Lib, 2020-SEP-06 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGaddfields, SGfieldnames, SGcell2array
%
% SGN=SGaddfields(SG,FNN)
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% FNN: cell list of all field names similar to fieldnames
% === OUTPUT RESULTS ======
% SGN: New solid with all elements have the
%
% EXAMPLE:
% loadweb JACO_robot.mat; A=JACO
% B=SGbox
% loadweb ADAM_C.mat; C=ADAM_C
% FN=SGfieldnames({A,B,C})
% SGaddfields({A,B,C},FN)
%
% See also: SGaddfields, SGfieldnames, SGcell2array
%
%
% Copyright 2020 Tim C. Lueth

SGfieldnames(SG)- collects all field names in different Solid Geometries

SGfieldnames(SG)% SGfieldnames(SG) - collects all field names in different Solid Geometries
% (by Tim Lueth, VLFL-Lib, 2020-SEP-06 as class: AUXILIARY PROCEDURES)
%
% This fnctn is used to prepare struct arrays from cell arrays
% A cell list of structs can only be transformed into a array of structs
% if all fields name exist in all cell elements.
% Fnctn SGfieldnamessearches for all field names.
% Fnctn SGaddfields adds the missing fields to all elements of a solid
% Fnctn SGcell2array converts the cell list into an array
% (Status of: 2020-09-06)
%
% Introduced first in SolidGeometry 5.0
%
% See also: fieldnames, SGaddfields, SGcell2array
%
% FN=SGfieldnames([SG])
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% === OUTPUT RESULTS ======
% FN: Names of fields of the different SG structs and cells
%
% EXAMPLE:
% loadweb JACO_robot.mat; A=JACO
% B=SGbox
% loadweb ADAM_C.mat; C=ADAM_C
% FN=SGfieldnames({A,B,C})
% SGaddfields({A,B,C},FN)
%
% See also: fieldnames, SGaddfields, SGcell2array
%
%
% Copyright 2020 Tim C. Lueth

TflipR(T)- turns the current right hand system into an inverted left hand system

TflipR(T)% TflipR(T) - turns the current right hand system into an inverted left hand system
% (by Tim Lueth, VLFL-Lib, 2020-SEP-05 as class: ANALYTICAL GEOMETRY)
%
% T(1:3,1:3)=-T(1:3,1:3); (Status of: 2020-09-05)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGswap, SGflip
%
% T=TflipR(T)
% === INPUT PARAMETERS ===
% T: Right hand frame
% === OUTPUT RESULTS ======
% T: Left hand frame
%
% EXAMPLE:
% SGmeshlab(SGtransT(SGflip(SGbox),TflipR(eye(4))))
%
% See also: SGswap, SGflip
%
%
% Copyright 2020 Tim C. Lueth

SGflip(SG)- returns a SG with inverted facets - same fnct as 2014-11-30

SGflip(SG)% SGflip(SG) - returns a SG with inverted facets - same fnct as 2014-11-30
% (by Tim Lueth, VLFL-Lib, 2020-SEP-05 as class: SURFACES)
%
% similar to FLswap, but for solids (Status of: 2020-09-05)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGswap, TflipR
%
% SG=SGflip(SG)
% === INPUT PARAMETERS ===
% SG: Solid geometry
% === OUTPUT RESULTS ======
% SG: Solid geometry with inverted facets
%
% EXAMPLE:
% SGmeshlab(SGtransT(SGflip(SGbox),TflipR(eye(4))))
%
% See also: SGswap, TflipR
%
%
% Copyright 2020 Tim C. Lueth

VLFL_EXP59- Publishable tutorial how to use the fnct SGcutTcylindricblade

VLFL_EXP59% VLFL_EXP59 - Publishable tutorial how to use the fnct SGcutTcylindricblade
% (by Tim Lueth, VLFL-Lib, 2020-SEP-04 as class: EXPERIMENTS)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGcutTcylindricblade
%
% VLFL_EXP59
%
% EXAMPLE:
% publishTL('VLFL_EXP59')
%
% See also: SGcutTcylindricblade
%
%
% Copyright 2020 Tim C. Lueth

VLofgcalines- creates a list of vertex points used in

VLofgcalines% VLofgcalines - creates a list of vertex points used in
% (by Tim Lueth, VLFL-Lib, 2020-SEP-04 as class: VISUALIZATION)
%
% Introduced first in SolidGeometry 5.0
%
% See also: VLofgca
%
% VL=VLofgcalines
% === OUTPUT RESULTS ======
% VL:
%
% EXAMPLE:
% VL=[20.4365 0.0045 7.4322
% 20.1242 0.0055 4.1943
% 20.3669 0.0056 4.1475
% 20.3660 0.0056 4.1477
% 20.3792 0.0063 1.7431]
% SGfigure; CVLplots(VL); zoomVL(VLofgcalines); axis normal
%
%
% See also: VLofgca
%
%
% Copyright 2020 Tim C. Lueth

exp_2020_09_03_link- Experiment to cut a solid into two pieces and to design a screw connection between both parts

exp_2020_09_03_link% exp_2020_09_03_link - Experiment to cut a solid into two pieces and to design a screw connection between both parts
% (by Tim Lueth, VLFL-Lib, 2020-SEP-03 as class: EXPERIMENTS)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGcutTsweptCPL, SGdesignDIN912DIN985, SGdesignSupplement,
% SGManipulatorLink
%
% exp_2020_09_03_link
%
% EXAMPLE:
% exp_2020_09_03_link
%
% See also: SGcutTsweptCPL, SGdesignDIN912DIN985, SGdesignSupplement,
% SGManipulatorLink
%
%
% Copyright 2020 Tim C. Lueth

SGcutTcylindricblade(SG,T,ct,R,H)- uses a cylindric blade to create joint as part of a solid

SGcutTcylindricblade(SG,T,ct,R,H)% SGcutTcylindricblade(SG,T,ct,R,H) - uses a cylindric blade to create joint as part of a solid
% (by Tim Lueth, VLFL-Lib, 2020-SEP-02 as class: SURFACES)
%
% very powerful and complex fnctn (Status of: 2020-09-05)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGcutT, SGcutTcrossblade, SGseparatebyT
%
% [SGN,T2,SGBB]=SGcutTcylindricblade([SG,T,ct,R,H])
% === INPUT PARAMETERS ===
% SG: Solid geometry
% T: Cutting plane x/y or empty for interactive selection
% ct: turn of cutting plane 'a', 's', 'c'
% R: [Radius blade-tickness starting angle]; default is [7 0.3 0]
% H: Height of cylindric blades and plate blade default is [10 0.08]
% === OUTPUT RESULTS ======
% SGN: {Lower Part (Green) and Upper Part (Red)}
% T2: Frame T2
% SGBB: Cutting Blade for visualization
%
% EXAMPLE:
% SGManipulatorLink; SG=ans; T=TofP([20 0 3]); tplot(T,20);
% loadweb ADAM_A.mat; SGsurfaces(ADAM_A); A=ans; % Separate STL into limbs
% SGcutTcylindricblade(SGManipulatorLink,'','a',10)
% SGcutTcylindricblade(SGManipulatorLink,'','c',10)
% SGcutTcylindricblade(SGManipulatorLink,'','s',10)
%
% See also: SGcutT, SGcutTcrossblade, SGseparatebyT
%
%
% Copyright 2020 Tim C. Lueth

SGTframerot(B,N,R)- returns a frame of a solid

SGTframerot(B,N,R)% SGTframerot(B,N,R) - returns a frame of a solid
% (by Sophie Lueth & Tim Lueth, VLFL-Lib, 2020-SEP-01 as class:
% KINEMATICS AND FRAMES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGTrotate
%
% B=SGTframerot(B,N,R)
% === INPUT PARAMETERS ===
% B: Solid Geometry
% N: Frame name
% R: Rotation Matrix
% === OUTPUT RESULTS ======
% B: Solid with rotate frame
%
% EXAMPLE:
% SGTframerot(SGbox,'F',rot(0,0,pi/7))
% SGTframerot(SGbox,'F',[0,0,pi/7])
% SGTframerot(SGbox,'F',pi/7)
%
%
% See also: SGTrotate
%
%
% Copyright 2020 Tim C. Lueth

Trotate(T,ax,val)- returns a HT matrix rotated by

Trotate(T,ax,val)% Trotate(T,ax,val) - returns a HT matrix rotated by
% (by Tim Lueth, VLFL-Lib, 2020-AUG-31 as class: KINEMATICS AND FRAMES)
%
% Introduced first in SolidGeometry 5.0
%
% See also: SGrotate, TofTrel, TofT
%
% NT=Trotate(T,[ax,val])
% === INPUT PARAMETERS ===
% T: Transformation matrix
% ax: rotation axis 'x,'y','z' or axial, coronal, sagittal
% val: value; default is p/2
% === OUTPUT RESULTS ======
% NT: New Transformation matrix
%
% EXAMPLE:
% Trotate(eye(4),'s')
%
% See also: SGrotate, TofTrel, TofT
%
%
% Copyright 2020 Tim C. Lueth
RapidWeaver Icon

Last Change Oct 2023 for SG-Lib 5.3