Last change of this documentation page: 2024-11-09 of SolidGeometry 5.4
SGraamboTCPgearwheeldiskTL(DHM,"STL")- returns the gearwheeldisk of the Raambo robot as designed by Tim Lueth

SGraamboTCPgearwheeldiskTL(DHM,% SGraamboTCPgearwheeldiskTL(DHM,"STL") - returns the gearwheeldisk of the Raambo robot as designed by Tim Lueth
% (by Tim Lueth, VLFL-Lib, 2024-OKT-24 as class: PARAMETRIC DESIGN)
%
% Instead of a gear wheel this is a axial torque limiting magnet holded
% clutch (Status of: 2024-10-24)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGraamboTCPknurledgearcover, SGraamboTCPgearwheeldisk
%
% [SGP,SGScr,SG2]=SGraamboTCPgearwheeldiskTL([DHM,"STL"])
% === INPUT PARAMETERS ===
% DHM: [Magnet-Diameter Magnet Height]; default is [15 4]
% "STL": if used an STL folder is written in the desktopdir
% === OUTPUT RESULTS ======
% SGP: SG of gear wheel disk for the FeeTech 60 motor
% SGScr: SG, height 15mm, comparable to the height of
% SGraamboTCPMagnetM22TL or SGraamboTCPMagnetM22
% SG2: Too,l height 15mm, to move the wheel inside a 15mm knureld
% gearwheel ring
%
% Additional Hyperlinks:
% D15x4 Magnet
%
% EXAMPLE:
% SGraamboTCPgearwheeldiskTL('stl')
%
% See also: SGraamboTCPknurledgearcover, SGraamboTCPgearwheeldisk
%
%
% Copyright 2024 Tim C. Lueth

SGraamboTCPknurledgearcoverTL(LK,"STL")- returns a torque limited knurled tube TCP cover for Raambo

SGraamboTCPknurledgearcoverTL(LK,% SGraamboTCPknurledgearcoverTL(LK,"STL") - returns a torque limited knurled tube TCP cover for Raambo
% (by Tim Lueth, VLFL-Lib, 2024-OKT-24 as class: AUTOMATIC DESIGN)
%
% based on the TCP Cover of Erik Löwe (ERGOSURG GmbH
% It is the same as SGraamboTCPknurledgearcover but has no m1N19 gear but
% a torque limited instead (Status of: 2024-10-28)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGraamboTCPMagnetM22, SGraamboTCPtoolM16ofCPL,
% SGraamboTCPknurledgearcover
%
% SGall=SGraamboTCPknurledgearcoverTL([LK,"STL"])
% === INPUT PARAMETERS ===
% LK:
% "STL":
% === OUTPUT RESULTS ======
% SGall:
%
% EXAMPLE:
% SGraamboTCPknurledgearcoverTL('STL')
%
% See also: SGraamboTCPMagnetM22, SGraamboTCPtoolM16ofCPL,
% SGraamboTCPknurledgearcover
%
%
% Copyright 2024 Tim C. Lueth

SGraamboTCPMagnetM22torquelimit(,"STL")- creates gear wheel with torque limiter for the 6th axis of Raambo

SGraamboTCPMagnetM22torquelimit(,% SGraamboTCPMagnetM22torquelimit(,"STL") - creates gear wheel with torque limiter for the 6th axis of Raambo
% (by Tim Lueth, VLFL-Lib, 2024-OKT-08 as class: AUTOMATIC DESIGN)
%
% This fnctn creates a magnetic adapter for the Raambo 2024_V4/5/6
% designed by Erik Löwe:
% m=1, n=19, h=5 with a strong magnet D18x5 and a T30 disassembly cavity
% In addition to SGraamboTCPMagnetM22, this fnctn also contains a torque
% limiter with an D15x8 Magnet to avoid damages during replay of recorded
% movements after inserting a new tool. All parts should be printed with
% 80% infill (Status of: 2024-10-15)
%
% Introduced first in SolidGeometry 5.4
%
% See also: exp_2024_07_20_Frame85, SGmotorFeeTech40flange,
% SGraamboTCPMagnetM20, SGraamboTCPtoolM16ofCPL, SGraamboTCPMagnetM22
%
% [SGNut,SGScrew,SGTLU,SGTLO]=SGraamboTCPMagnetM22torquelimit([,"STL"])
% "STL": height of the inlay; default is 5
% === OUTPUT RESULTS ======
% SGNut: Gear-wheel-cap for the TCP motor of Raambo holding a magnet M18
% SGScrew: Gear-wheel-cap screw for the TCP motor of Raambo M22 with
% inlay for magnet M15
% SGTLU: torque limit plate with outer thread M22 for SGNut
% SGTLO: torque limit plate with inner thread M22 for SGScrew and Magnet
% cavity for M15
%
% EXAMPLE:
% SGraamboTCPMagnetM22torquelimit % is usually called by other SGraambo functs
% SGraamboTCPMagnetM22torquelimit('stl') % is usually called by other SGraambo functs
%
% See also: exp_2024_07_20_Frame85, SGmotorFeeTech40flange,
% SGraamboTCPMagnetM20, SGraamboTCPtoolM16ofCPL, SGraamboTCPMagnetM22
%
%
% Copyright 2024 Tim C. Lueth

SGconvexHullsliced(SG,ra,Dcl,"debug")- creates a high resultion fittin convex contour in xy and a sliced on in z

SGconvexHullsliced(SG,ra,Dcl,% SGconvexHullsliced(SG,ra,Dcl,"debug") - creates a high resultion fittin convex contour in xy and a sliced on in z
% (by Tim Lueth, VLFL-Lib, 2024-AUG-21 as class: SURFACES)
%
% Slow fnctn that requires appropriate parameters!
% This is the 3rd try (and 1st working version) to create such a fnctn
% SGofCVLslices introduced 2017-MAI-26
% SGconvexsolidofSG introduced in 2020-AUG-15
% SGwatertightofSG introduced in 2020-AUG-28 (is not a convec shape based
% on voxels)
% SGconvexHullsliced tries to finish 2024-AUG-21
% In fact the fnctn CPLconvexhulloutline (2021) seems to make it possible
% (Status of: 2024-08-23)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGwatertightofSG, SGreduceVLFL, CPLconvexhulloutline,
% SGofCVLslices, SGconvexsolidofSG
%
% [SGN,FLW,FLA,FLB]=SGconvexHullsliced(SG,[ra,Dcl,"debug"])
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% ra: z resolution and auxiliary point distance; default is [s/50 1]
% Dcl: Diameter of small holes in the contour to be closed; default is 3
% for M3;
% "debug": if used the creation process is shown
% === OUTPUT RESULTS ======
% SGN: Convex solid [FL=[FLA;FLB;FLW]
% FLW: facet list of wall
% FLA: facet list of floor
% FLB: facet list of cover
%
% EXAMPLE:
% SGA=SGreadSTL('/Volumes/LUETH-WIN/RAAMBO/Raambo stls/Platte 1/2024-02-22 Kappe Motor 5.stl','','axisalign','rotx',pi,'transP',[-25 14.5 0]);
% SGconvexHullsliced(SGA,[1 1],5);
% SGconvexHullsliced(SGsample(5))
% SGconvexHullsliced(SGsample(22))
%
%
% See also: SGwatertightofSG, SGreduceVLFL, CPLconvexhulloutline,
% SGofCVLslices, SGconvexsolidofSG
%
%
% Copyright 2024 Tim C. Lueth

SGunioncomplete(SGA,SGB,spatialrel,"debug")- Adds to a solid the part of a nother solid which is outside the convex hull

SGunioncomplete(SGA,SGB,spatialrel,% SGunioncomplete(SGA,SGB,spatialrel,"debug") - Adds to a solid the part of a nother solid which is outside the convex hull
% (by Tim Lueth, VLFL-Lib, 2024-AUG-21 as class: SURFACES)
%
% may be later called SGunionoutside
% slow fnctn because of boolean and (Status of: 2024-08-21)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGunion, SGunionreplace, SGconvexHullsliced
%
% SGN=SGunioncomplete(SGA,SGB,[spatialrel,"debug"])
% === INPUT PARAMETERS ===
% SGA: Solid to be completed
% SGB: Solid whos parts outside of SGA should be added to SGA
% spatialrel: spatial relation such for SGransrelSG
% "debug": if ised the creation is shown.
% === OUTPUT RESULTS ======
% SGN: New combined Solid
%
% EXAMPLE:
% SGA=SGreadSTL('/Volumes/LUETH-WIN/RAAMBO/Raambo stls/Platte 1/2024-02-22 Kappe Motor 5.stl','','axisalign','rotx',pi,'transP',[-25 14.5 0]);
% SGunioncomplete(SGA,SGofCPLz(PLcircle(31/2),[-35 -10]),'alignbottom')
%
% See also: SGunion, SGunionreplace, SGconvexHullsliced
%
%
% Copyright 2024 Tim C. Lueth

SGmieleTwinDosadapter- returns a Adapter for Miele TwinDos detergent cartridges (print with 80%)

SGmieleTwinDosadapter% SGmieleTwinDosadapter - returns a Adapter for Miele TwinDos detergent cartridges (print with 80%)
% (by Tim Lueth, VLFL-Lib, 2024-AUG-16 as class: PARAMETRIC DESIGN)
%
% Miele has washing machines in Germany on the market that dispense
% detergent from two detergent cartridges under the TwinDos brand. The
% detergent in these cartridges is considerably more expensive than
% detergent from the drugstore. While the cartridges were still largely
% self-emptying in 2016, there is now a new type of cartridge in which
% 5-10% of the detergent remains unused and is thrown away. The detergent
% is considered harmful to health and environment. This
% SGmieleTwinDosadapter makes it possible to transfer the remaining
% detergent from an “almost empty” cartridge into an “almost full”
% cartridge with little skin contact, by decanting the residual liquid.
% Since September 2024, Bambulab printers can print horizontal overhangs
% without support structures! (Status of: 2024-08-19)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGhook4railsquared, SGhook4rail
%
% SGall=SGmieleTwinDosadapter
% === OUTPUT RESULTS ======
% SGall: SG of tube and tube with funnel
%
% EXAMPLE:
% SGmieleTwinDosadapter
%
% See also: SGhook4railsquared, SGhook4rail
%
%
% Copyright 2024 Tim C. Lueth

SGmagnetcap(MDH,CDH,SDH)- returns a closed magnet adapter cap for M22

SGmagnetcap(MDH,CDH,SDH)% SGmagnetcap(MDH,CDH,SDH) - returns a closed magnet adapter cap for M22
% (by Tim Lueth, VLFL-Lib, 2024-AUG-16 as class: PARAMETRIC DESIGN)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGraamboTCPmagnetpull
%
% SGall=SGmagnetcap([MDH,CDH,SDH])
% === INPUT PARAMETERS ===
% MDH: Magnet Diameter and height; default is [15 4]
% CDH: Cap Diameter and Height and Wall; default is [24.8 5 0.4]
% SDH: Screw Diameter and height and Matric; default is [24.8 5 0]; 0=
% Automatic Screw diameter
% === OUTPUT RESULTS ======
% SGall: ={SGNut,SGScr}
%
% EXAMPLE:
% SGmagnetcap([18 5],[24 5 0.4],[24 5 22]); SGwriteMultipleSTL(ans)
%
% See also: SGraamboTCPmagnetpull
%
%
% Copyright 2024 Tim C. Lueth

rofCPLsmalldist(CPL,)- returns the smallest distance between two contours in CPL

rofCPLsmalldist(CPL,)% rofCPLsmalldist(CPL,) - returns the smallest distance between two contours in CPL
% (by Tim Lueth, VLFL-Lib, 2024-AUG-15 as class: CLOSED POLYGON LISTS)
%
% In contrast to CPLdistancewall, this fnctn is a linear search fnctn,
% that call several times CPLfindsmalldist. It is may be slow, but
% helpful for automatic design based on existing STLs (Status of:
% 2024-08-16)
%
% Introduced first in SolidGeometry 5.4
%
% See also: CPLdistancewall
%
% rmin=rofCPLsmalldist(CPL,[])
% === INPUT PARAMETERS ===
% CPL: Contour
% === OUTPUT RESULTS ======
% rmin: smallest distance between contours in CPL
%
% EXAMPLE:
% rofCPLsmalldist(PLcircle(4))
%
%
% See also: CPLdistancewall
%
%
% Copyright 2024 Tim C. Lueth

SGofCPLzradialedge(CPL,z,rh,shape,style)- similar to SGofCPLzchamfer

SGofCPLzradialedge(CPL,z,rh,shape,style)% SGofCPLzradialedge(CPL,z,rh,shape,style) - similar to SGofCPLzchamfer
% (by Tim Lueth, VLFL-Lib, 2024-AUG-15 as class: SURFACES)
%
% extracted from SGhook4railsquared (Status of: 2024-08-16)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGofCPLzchamfer, SGofCPLz, SGofCPLzgrow, SGofCPLzgrid
%
% SG=SGofCPLzradialedge([CPL,z,rh,shape,style])
% === INPUT PARAMETERS ===
% CPL: Contour to extrude
% z: height or [zmin zmax]
% rh: [radius and height]
% shape: 'mattheck', 'bezier', 'circ', 'line'; default is mattheck
% style:
% === OUTPUT RESULTS ======
% SG: Extruded solid with round edges on bottom and top
%
% EXAMPLE:
% SGofCPLzradialedge(CPLsample(12))
% SGofCPLzradialedge(CPLsample(12)/6,[-10 10],[1 1],'circ')
% SGofCPLzradialedge(CPLsample(12),[-10 10],[1 1],'bezier')
% SGofCPLzradialedge(CPLsample(12),[-10 10],[3 3],'line')
% SGofCPLzradialedge(CPLsample(12),[-10 10],[3 3],'mattheck')
%
% See also: SGofCPLzchamfer, SGofCPLz, SGofCPLzgrow, SGofCPLzgrid
%
%
% Copyright 2024 Tim C. Lueth

SGraamboTCProtatingrodM16(LL,"STL")- returns a simple rod with magnet coupling and an M16 internal thread

SGraamboTCProtatingrodM16(LL,% SGraamboTCProtatingrodM16(LL,"STL") - returns a simple rod with magnet coupling and an M16 internal thread
% (by Tim Lueth, VLFL-Lib, 2024-AUG-14 as class: PARAMETRIC DESIGN)
%
% Uses SGraamboTCPMagnetM22 and the tool holder can be prepared with
% SGraamboTCPtoolM16ofCPL in combination with SGraamboTCPtoolM16extension.
% (Status of: 2024-08-15)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGraamboTCPtoolM16ofCPL, SGraamboTCPMagnetM22,
% SGraamboTCPtoolM16extension
%
% SGall=SGraamboTCProtatingrodM16([LL,"STL"])
% === INPUT PARAMETERS ===
% LL: Length; default standard is 50
% "STL": if used an STL folder will be written
% === OUTPUT RESULTS ======
% SGall: Cell arrary with Rod and Magnet screw nut
%
% EXAMPLE:
% SGraamboTCProtatingrodM16
%
% See also: SGraamboTCPtoolM16ofCPL, SGraamboTCPMagnetM22,
% SGraamboTCPtoolM16extension
%
%
% Copyright 2024 Tim C. Lueth

SGtransrel(SG,);- returns a spatial transformed solid using SGtransrelSG

SGtransrel(SG,);% SGtransrel(SG,); - returns a spatial transformed solid using SGtransrelSG
% (by Tim Lueth, VLFL-Lib, 2024-AUG-14 as class: ANALYTICAL GEOMETRY)
%
% same as SGN=SGtransrelSG (SG,'',varargin{:})
% The relative movements is with respect to the origin (Status of:
% 2024-08-14)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGtransrelSG
%
% SGN=SGtransrel(SG,[]);
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% === OUTPUT RESULTS ======
% SGN: Spatially transformed solid
%
% EXAMPLE:
% SGtransrel(SGbox,'ontop','rotx',pi/3)
%
% See also: SGtransrelSG
%
%
% Copyright 2024 Tim C. Lueth

SGofgca2subplots(hgca)- takes the current gca and creates a cell list of solids/patches

SGofgca2subplots(hgca)% SGofgca2subplots(hgca) - takes the current gca and creates a cell list of solids/patches
% (by Tim Lueth, VLFL-Lib, 2024-AUG-14 as class: VISUALIZATION)
%
% if nargout==0; the solids are plotted insubplot (Status of: 2024-08-14)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGofgca, VLFLofgca, VLofgca, PSofgca, SGplotmultiple
%
% [SG,l]=SGofgca2subplots([hgca])
% === INPUT PARAMETERS ===
% hgca: axis to use; default is gca
% === OUTPUT RESULTS ======
% SG: cell array of solids
% l: patches in the given axis
%
% EXAMPLE:
% SGraamboTCPtoolM16translation
% SGofgca2subplots
%
% See also: SGofgca, VLFLofgca, VLofgca, PSofgca, SGplotmultiple
%
%
% Copyright 2024 Tim C. Lueth

SGraamboTCPstraightmoveM16(,"STL")- returns a push-pull TCP for M16x10x5 threads

SGraamboTCPstraightmoveM16(,% SGraamboTCPstraightmoveM16(,"STL") - returns a push-pull TCP for M16x10x5 threads
% (by Tim Lueth, VLFL-Lib, 2024-AUG-13 as class: AUTOMATIC DESIGN)
%
% extracted from exp_2024_08_06_Frame85 and exp_2024_07_20_Frame85
% (Status of: 2024-08-14)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGraamboTCPcreatefulltoolset
%
% SGall=SGraamboTCPstraightmoveM16([,"STL"])
% "STL": if used a STL folder is written
% === OUTPUT RESULTS ======
% SGall: collection of a required components for Raambo
%
% EXAMPLE:
% SGraamboTCPstraightmoveM16
%
% See also: SGraamboTCPcreatefulltoolset
%
%
% Copyright 2024 Tim C. Lueth

SGraamboTCPcreatefulltoolset- this is a fnct the creates one after another all required parts for RaamboTCP tools

SGraamboTCPcreatefulltoolset% SGraamboTCPcreatefulltoolset - this is a fnct the creates one after another all required parts for RaamboTCP tools
% (by Tim Lueth, VLFL-Lib, 2024-AUG-13 as class: AUTOMATIC DESIGN)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGraamboTCPtoolstand, SGraamboTCPbagcutter,
% SGraamboTCPknurledgearcover, SGraamboTCPgearwheeldisk,
% SGraamboTCPtoolM16ofCPL, SGraamboTCPtoolM16extension,
% SGgearwheelsocketspanner, SGraamboTCPtoolM16translation
%
% SGraamboTCPcreatefulltoolset
%
% EXAMPLE:
% SGraamboTCPcreatefulltoolset
%
% See also: SGraamboTCPtoolstand, SGraamboTCPbagcutter,
% SGraamboTCPknurledgearcover, SGraamboTCPgearwheeldisk,
% SGraamboTCPtoolM16ofCPL, SGraamboTCPtoolM16extension,
% SGgearwheelsocketspanner, SGraamboTCPtoolM16translation
%
%
% Copyright 2024 Tim C. Lueth

SGofCPLTL(CPLC,TL)- extrudes a contour along a path given by TL

SGofCPLTL(CPLC,TL)% SGofCPLTL(CPLC,TL) - extrudes a contour along a path given by TL
% (by Tim Lueth, VLFL-Lib, 2024-AUG-11 as class: SURFACES)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGofCPLz, SGofCPLzgrow, SGofCPLzgrid, TLofCVL
%
% [SGN,NFW,FLA,FLB]=SGofCPLTL(CPLC,TL)
% === INPUT PARAMETERS ===
% CPLC: Contour to extrude along TL
% TL: array [4,4,n] of the path
% === OUTPUT RESULTS ======
% SGN: Final Solid including VL, FL
% NFW: just FL of the walls
% FLA: just FL of the floor
% FLB: just FL of the ceiling
%
% EXAMPLE: CPLC=PLsquare([60 40]);
% CPLC=[CPLC;nan nan;CPLbuffer(CPLC,-5)];
%
% PL=[0 0; 0 80; 80 80; 80 40; 160 0];
% PL=VLaddz(PL); PL(end,3)=80;
% Ro=rofcirclearoundCPL(CPLC);
% TL=TLofCVL(PL,Ro*1.1,'','','rad',false);
%
% SGofCPLTL(CPLC,TL)
%
% See also: SGofCPLz, SGofCPLzgrow, SGofCPLzgrid, TLofCVL
%
%
% Copyright 2024 Tim C. Lueth

SGraamboTCPtoolstand- returns a tool stand for a designers desktop

SGraamboTCPtoolstand% SGraamboTCPtoolstand - returns a tool stand for a designers desktop
% (by Tim Lueth, VLFL-Lib, 2024-AUG-11 as class: PARAMETRIC DESIGN)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGraamboTCPmagnetpull, SGraamboTCPmagnetpush,
% SGgearwheelsocketspanner, SGraamboTCPbagcutter, SGraamboTCPMagnetM22,
% SGraamboTCPknurledgearcover, SGraamboTCPgearwheeldisk
%
% SGall=SGraamboTCPtoolstand
% === OUTPUT RESULTS ======
% SGall: Final solid for the desktop
%
% EXAMPLE:
% SGraamboTCPtoolstand
%
% See also: SGraamboTCPmagnetpull, SGraamboTCPmagnetpush,
% SGgearwheelsocketspanner, SGraamboTCPbagcutter, SGraamboTCPMagnetM22,
% SGraamboTCPknurledgearcover, SGraamboTCPgearwheeldisk
%
%
% Copyright 2024 Tim C. Lueth

SGraamboTCPmagnetpull(,"STL")- returns a magnet releasing tool for the Raambo robot

SGraamboTCPmagnetpull(,% SGraamboTCPmagnetpull(,"STL") - returns a magnet releasing tool for the Raambo robot
% (by Tim Lueth, VLFL-Lib, 2024-AUG-11 as class: PARAMETRIC DESIGN)
%
% This TCP components are used to pull back a tool such as a magnet
% 2024-08-11 by Tim Lueth von 0300 - 0400. This design has the
% disadvantage that the magnet sticks to the target and the two threads
% come loose when it is pulled back. For this reason, there will be a
% second design with only one type of thread. (Status of: 2024-08-19)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGraamboTCPMagnetM22, SGraamboTCPknurledgearcover,
% SGraamboTCPmagnetpush
%
% SGraamboTCPmagnetpull([,"STL"])
% "STL": if used an STL folder will be written including XX comments
%
% EXAMPLE:
% SGraamboTCPmagnetpull(40)
%
% See also: SGraamboTCPMagnetM22, SGraamboTCPknurledgearcover,
% SGraamboTCPmagnetpush
%
%
% Copyright 2024 Tim C. Lueth

humidityoftemp(th,t2)- calculates the humidity at temperature change

humidityoftemp(th,t2)% humidityoftemp(th,t2) - calculates the humidity at temperature change
% (by Tim Lueth, VLFL-Lib, 2024-AUG-11 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.4
%
% See also: Gauge2mm, mm2inch, Charriere2mm, French2mm
%
% h2=humidityoftemp([th,t2])
% === INPUT PARAMETERS ===
% th: [temperatur humidity] at the moment
% t2: [new temperatur]
% === OUTPUT RESULTS ======
% h2: humidity of t2 is reached and there is no water change
%
% EXAMPLE:
% humidityoftemp([27.6 56],25.8)
%
% See also: Gauge2mm, mm2inch, Charriere2mm, French2mm
%
%
% Copyright 2024 Tim C. Lueth

SGnamedset(Solids)- creates a textfield to understand the parameters of the solid

SGnamedset(Solids)% SGnamedset(Solids) - creates a textfield to understand the parameters of the solid
% (by Tim Lueth, VLFL-Lib, 2024-AUG-11 as class: AUXILIARY PROCEDURES)
%
% This fnctn is used before SGwriteMultipleSTL to make sure that some
% information at least the variable name in fnctn is known. The fnctn
% does not allow the use of calculated solids, only solids by variable
% name
% (Status of: 2024-08-11)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGwriteMultipleSTL, SGstampname
%
% SGall=SGnamedset([Solids])
% === INPUT PARAMETERS ===
% Solids: Solid Geometries as varargin separated by comma
% === OUTPUT RESULTS ======
% SGall: SG cell list including stampnames and stampdates
%
%
% EXAMPLE: A=SGbox, B=SGbox
%
% SGall=SGnamedset(A,B,A,B)
%
% See also: SGwriteMultipleSTL, SGstampname
%
%
% Copyright 2024 Tim C. Lueth

SGgearwheelsocketspanner(mnw,H,HN,"STL")- This is a socket spanner mit clearance fitting for screws

SGgearwheelsocketspanner(mnw,H,HN,% SGgearwheelsocketspanner(mnw,H,HN,"STL") - This is a socket spanner mit clearance fitting for screws
% (by Tim Lueth, VLFL-Lib, 2024-AUG-11 as class: PARAMETRIC DESIGN)
%
% Introduced first in SolidGeometry 5.4
%
% See also: PLwrench, SGwrenchsocketspanner
%
% [SG,CPLC]=SGgearwheelsocketspanner([mnw,H,HN,"STL"])
% === INPUT PARAMETERS ===
% mnw: [module, n-teeth, reduction from feet-diameter]; default is [1 19
% 0]
% H: Height of gear; default is 15
% HN: [Length Width Height height adapter] of handle; default is [30 5 10
% 10]
% "STL": if used, an STL folder will be written
% === OUTPUT RESULTS ======
% SG: Solid Geometry of Wrench socket spanner
% CPLC: Contour used
%
% EXAMPLE:
% SGgearwheelsocketspanner([1 32 -5])
%
% See also: PLwrench, SGwrenchsocketspanner
%
%
% Copyright 2024 Tim C. Lueth

SGprinterstand- creates posts or stands for furniture or in this case hp laser printer

SGprinterstand% SGprinterstand - creates posts or stands for furniture or in this case hp laser printer
% (by Tim Lueth, VLFL-Lib, 2024-AUG-09 as class: PARAMETRIC DESIGN)
%
% 90 x 90 x 90 takes 3.5h per box on the bambu-lab (Status of: 2024-08-10)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGbarcelonaspacer, SGfurniturespacer
%
% SGprinterstand
%
% EXAMPLE:
% SGprinterstand
%
% See also: SGbarcelonaspacer, SGfurniturespacer
%
%
% Copyright 2024 Tim C. Lueth

XXprintmode(md)- switches on the possibility to reach code lines when using dbprintf fnct

XXprintmode(md)% XXprintmode(md) - switches on the possibility to reach code lines when using dbprintf fnct
% (by Tim Lueth, VLFL-Lib, 2024-AUG-09 as class: LANGUAGE PROCEDURES)
%
% In SGLib 5.4, the concept of executed comments has been introduced.
% This fnctn allows to switch on and off the comments on the screen
% output in addition to the file comment protocol (Status of: 2024-08-09)
%
% Introduced first in SolidGeometry 5.4
%
% See also: XX, XXreadcomment
%
% XXmode=XXprintmode([md])
% === INPUT PARAMETERS ===
% md: true or false; default is true;
% === OUTPUT RESULTS ======
% XXmode: true or false
%
% EXAMPLE: % can be tested only within functns that uses the XX comment concept
%
% XXprintmode on
% XXprintmode off
%
%
% See also: XX, XXreadcomment
%
%
% Copyright 2024 Tim C. Lueth

SGraamboTCPtoolM16extension(PL)- creates a tool extension for different geometries with a M16x10x5 Screw and Nut

SGraamboTCPtoolM16extension(PL)% SGraamboTCPtoolM16extension(PL) - creates a tool extension for different geometries with a M16x10x5 Screw and Nut
% (by Tim Lueth, VLFL-Lib, 2024-AUG-04 as class: PARAMETRIC DESIGN)
%
% used in combination with SGraamboTCPtoolM16ofCPL (Status of: 2024-08-11)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGraamboTCPtoolM16ofCPL
%
% SGN=SGraamboTCPtoolM16extension([PL])
% === INPUT PARAMETERS ===
% PL: Point list; default is PL=[0 -1; 0 15; 30 15] ;
% === OUTPUT RESULTS ======
% SGN: Solid with Screw and Nut
%
% EXAMPLE:
% Rr=15; PL=[0 -1; 0 Rr; 2*Rr Rr] ;
%
% See also: SGraamboTCPtoolM16ofCPL
%
%
% Copyright 2024 Tim C. Lueth

exp_2024_08_04_DIN13(t,p,a)- returns a screw and a nut for an arbitrary steep thread for testing different thread geometries

exp_2024_08_04_DIN13(t,p,a)% exp_2024_08_04_DIN13(t,p,a) - returns a screw and a nut for an arbitrary steep thread for testing different thread geometries
% (by Tim Lueth, VLFL-Lib, 2024-AUG-04 as class: EXPERIMENTS)
%
% Fnctn SGDIN13 has some hidded features for designing steep thread
% geometries not only by scaling the thread geometry. Neverheless, those
% modified thread geometries require exact calcuation of fits and thread
% geometries
% The most important thing is that a steep thread loses its self-locking
% effect and therefore a translational movement can also be converted
% into a rotational movement (Status of: 2024-08-04)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGDIN13, slpitch
%
% exp_2024_08_04_DIN13([t,p,a])
% === INPUT PARAMETERS ===
% t: Type "A" or "B" or "C" or "D" - not all are correctly implemented
% p: pitch; 0 => DIN13
% a: 's' screw, or 'n' nut or 'b' both; default is both
%
% EXAMPLE:
% exp_2024_08_04_DIN13('B',20)
%
% See also: SGDIN13, slpitch
%
%
% Copyright 2024 Tim C. Lueth

slpitch(D,p)- returns the required fit dimension for steep screw thread

slpitch(D,p)% slpitch(D,p) - returns the required fit dimension for steep screw thread
% (by Tim Lueth, VLFL-Lib, 2024-AUG-04 as class: KINEMATICS AND FRAMES)
%
% The DIN13 thread is designed for a clearance fit during screw movement.
% For this reason, the screw nut must have a shrink of slfit('c')
% ("clearance fit") so that a printed screw can be moved in the screw
% nut. In the case of a steep thread, however, the unexpected pitch
% causes jamming. This fnctn calculates the necessary clearance for a
% steep thread. The normal pitch angle for DIN13 is 28.5 degrees and the
% necessary clearance is 0.24. For steep threads, the fit must be
% increased.
% slpitch is required if the original thread geometry is maintained; Type
% "B" or Type "C" (Status of: 2024-08-04)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGDIN13, PLthreadDIN, exp_2024_08_04_DIN13
%
% slp=slpitch([D,p])
% === INPUT PARAMETERS ===
% D: Diameter in mm
% p: pitch; default is pitch of DIN13
% === OUTPUT RESULTS ======
% slp: required distance for steep screw threads
%
% EXAMPLE:
% SGDIN13(-16,40,8,PLcircle(24/2),slpitch(16,8),'Type','B') % NUT for Steep thread type B
% SGDIN13(+16,40,8,PLwrench(6+slfit('c'),6),0,'Type','B') % SCREW for Steep thread type B
%
% See also: SGDIN13, PLthreadDIN, exp_2024_08_04_DIN13
%
%
% Copyright 2024 Tim C. Lueth

SGraamboTCPbagcutter(,"STL")- returns a solid that can cut a sterile bag in combination mit the knurled gear cover of Raambo robot

SGraamboTCPbagcutter(,% SGraamboTCPbagcutter(,"STL") - returns a solid that can cut a sterile bag in combination mit the knurled gear cover of Raambo robot
% (by Tim Lueth, VLFL-Lib, 2024-AUG-03 as class: PARAMETRIC DESIGN)
%
% creates three design for a bag cutting plug into the knurled tube
% (Status of: 2024-08-04)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGraamboTCPknurledgearcover, SGraamboTCPgearwheeldisk
%
% [SGC,SGG,SGH]=SGraamboTCPbagcutter([,"STL"])
% "STL": if used, an STL folder will be written
% === OUTPUT RESULTS ======
% SGC: dumb plug
% SGG: plug with small straight and then tampered open tip
% SGH: plug with tampered open tip
%
% See also: SGraamboTCPknurledgearcover, SGraamboTCPgearwheeldisk
%
%
% Copyright 2024 Tim C. Lueth

SGraamboTCPgearwheeldisk(,"STL")- returns the gearwheeldisk of the Raambo robot as designed by Erik Löwe

SGraamboTCPgearwheeldisk(,% SGraamboTCPgearwheeldisk(,"STL") - returns the gearwheeldisk as designed by Erik Löwe
% (by Tim Lueth, VLFL-Lib, 2024-AUG-03 as class: PARAMETRIC DESIGN)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGraamboTCPknurledgearcover
%
% SGP=SGraamboTCPgearwheeldisk([,"STL"])
% "STL": if used an SATL folder is written in the desktopdir
% === OUTPUT RESULTS ======
% SGP: SG of gear wheel disk
%
% EXAMPLE:
% SGraamboTCPgearwheeldisk('stl')
%
% See also: SGraamboTCPknurledgearcover
%
%
% Copyright 2024 Tim C. Lueth

SGhook4railsquared(DR,d,"shape")- creates a hook for squared shaped rails

SGhook4railsquared(DR,d,% SGhook4railsquared(DR,d,"shape") - creates a hook for squared shaped rails
% (by Tim Lueth, VLFL-Lib, 2024-AUG-03 as class: PARAMETRIC DESIGN)
%
% EXPERIMENT to create a new SGofCPLzchamfer fnctn
% The SGofCPLzchamfer fnctn fails and suffers from the fact that
% top/bottom faces are missing or not filled correctly
% In addition the varity of different edges such as from PLchamfer are
% not used.
% (Status of: 2024-08-03)
%
% Introduced first in SolidGeometry 5.4
%
% See also: PLchamfer, SGhook4rail
%
% SG=SGhook4railsquared([DR,d,"shape"])
% === INPUT PARAMETERS ===
% DR: polyline small fnctn; default is 31
% d: thickness of the hook
% "shape": fnctn works with 'line','bezier','circ','mattheck'; default is
% 'mattheck'
% === OUTPUT RESULTS ======
% SG: Final solid geometry
%
% EXAMPLE:
% SGhook4railsquared(31,4,'shape','circ')
%
% See also: PLchamfer, SGhook4rail
%
%
% Copyright 2024 Tim C. Lueth

SGraamboTCPknurledgearcover- returns a knurled tube TCP cover for Raambo robot

SGraamboTCPknurledgearcover% SGraamboTCPknurledgearcover - returns a knurled tube TCP cover for Raambo
% (by Tim Lueth, VLFL-Lib, 2024-JUL-31 as class: AUTOMATIC DESIGN)
%
% based on the TCP Cover of Erik Löwe (ERGOSURG GmbH) (Status of:
% 2024-08-01)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGraamboTCPMagnetM22, SGraamboTCPtoolM16ofCPL
%
% SGraamboTCPknurledgearcover
%
% See also: SGraamboTCPMagnetM22, SGraamboTCPtoolM16ofCPL
%
%
% Copyright 2024 Tim C. Lueth

SGraamboTCPtoolM16ofCPL(CPLP,"STL")- returns a tool holder for an M16x10 5mm pitch for the Raambo robot

SGraamboTCPtoolM16ofCPL(CPLP,% SGraamboTCPtoolM16ofCPL(CPLP,"STL") - returns a tool holder for an M16x10 5mm pitch for the Raambo robot
% (by Tim Lueth, VLFL-Lib, 2024-JUL-28 as class: SERIAL-ROBOTICS)
%
% Introduced first in SolidGeometry 5.4
%
% See also: exp_2024_07_20_Frame85, SGmotorFeeTech40flange,
% SGraamboTCPMagnetM22, SGraamboTCPknurledgearcover
%
% SGPG=SGraamboTCPtoolM16ofCPL([CPLP,"STL"])
% === INPUT PARAMETERS ===
% CPLP: Cross section of object to hold
% "STL": if used an STL folder is written
% === OUTPUT RESULTS ======
% SGPG: Solid of probe guide with M16x10 pitch 5mm
%
% EXAMPLE:
% SGraamboTCPtoolM16ofCPL(PLcircle(5+slfit('c'))); %% uniball eye fine
% SGraamboTCPtoolM16ofCPL(PLsquare([6.3,11.9])+2*slfit('t')); %% Stammberger hand pice 6.3 x 11.9
%
% See also: exp_2024_07_20_Frame85, SGmotorFeeTech40flange,
% SGraamboTCPMagnetM22, SGraamboTCPknurledgearcover
%
%
% Copyright 2024 Tim C. Lueth

PLdiamond(dim,al)- returns a diamond shape optonal als convex hull for a CPL

PLdiamond(dim,al)% PLdiamond(dim,al) - returns a diamond shape optonal als convex hull for a CPL
% (by Tim Lueth, VLFL-Lib, 2024-JUL-28 as class: CLOSED POLYGON LISTS)
%
% Introduced first in SolidGeometry 5.4
%
% See also: PLknurled, PLcircle, PLcircseg, PLevolvente, PLgearDIN,
% PLhelix, PLkidney, PLrand, PLspiral, PLsquare
%
% PL=PLdiamond([dim,al])
% === INPUT PARAMETERS ===
% dim: [width height] or CPL
% al: angle, currently unsused, i.e. 45 deg
% === OUTPUT RESULTS ======
% PL: CPL of a diamond in dim or that is a hull for the CPL
%
% EXAMPLE:
% PLdiamond([10 20]) % PLdiamond with size dimension
% PLdiamond(PLstar(8)) % PLdiamond with a shape
%
%
% See also: PLknurled, PLcircle, PLcircseg, PLevolvente, PLgearDIN,
% PLhelix, PLkidney, PLrand, PLspiral, PLsquare
%
%
% Copyright 2024 Tim C. Lueth

SGaxisalignment(SG)- aligns large planar surfaces of a solids to the main axis

SGaxisalignment(SG)% SGaxisalignment(SG) - aligns large planar surfaces of a solids to the main axis
% (by Tim Lueth, VLFL-Lib, 2024-JUL-28 as class: SURFACES)
%
% If STL files are generated from STEP or IGES files that are created
% with CAD programs such as CATIA or SolidWorks and then exported, the
% bodies are sometimes slightly rotated. This fnctn then aligns the body
% to the main axes without changing the position of the body.
% It became also available in "SGtransrelSG" als "axisalign". (Status of:
% 2024-07-28)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGreadSTL, SGtransrelSG
%
% SG=SGaxisalignment(SG)
% === INPUT PARAMETERS ===
% SG: Original Solid
% === OUTPUT RESULTS ======
% SG: Solid aligned to main axis
%
% EXAMPLE:
% SGreadSTL('/Volumes/LUETH-WIN/RAAMBO/Raambo stls/Platte 1/2024-07-17 Raambo V4 alle aktuellen Druckteile.stl'); SG=ans;
% SGaxisalignment(SG)
% SGreadSTL('/Volumes/LUETH-WIN/RAAMBO/Raambo stls/Platte 1/2024-07-17 Raambo V4 alle aktuellen Druckteile.stl','','axisalign');
%
% See also: SGreadSTL, SGtransrelSG
%
%
% Copyright 2024 Tim C. Lueth

SGraamboTCPMagnetM22(CPLu,hcpl,"STL")- creates gear wheel for the 6th axis of Raambo

SGraamboTCPMagnetM22(CPLu,hcpl,% SGraamboTCPMagnetM22(CPLu,hcpl,"STL") - creates gear wheel for the 6th axis of Raambo
% (by Tim Lueth, VLFL-Lib, 2024-JUL-27 as class: AUTOMATIC DESIGN)
%
% This fnctn creates a magnetic adapter for the Raambo 2024_V4/5/6
% designed by Erik Löwe:
% m=1, n=19, h=5 with a strong magnet D18x5 and a T30 disassembly cavity
% (Status of: 2024-10-15)
%
% Introduced first in SolidGeometry 5.4
%
% See also: exp_2024_07_20_Frame85, SGmotorFeeTech40flange,
% SGraamboTCPMagnetM20, SGraamboTCPtoolM16ofCPL,
% SGraamboTCPMagnetM22torquelimit
%
% [SGNut,SGScr]=SGraamboTCPMagnetM22([CPLu,hcpl,"STL"])
% === INPUT PARAMETERS ===
% CPLu: Contour of an inlay
% hcpl: height of the inlay; default is 5
% "STL": if used an STL File of both parts are written
% === OUTPUT RESULTS ======
% SGNut: Gear-wheel-cap for the TCP motor of Raambo holding a magnet
% SGScr: Gear-wheel-cap screw for the TCP motor of Raambo M22
%
% EXAMPLE:
% SGraamboTCPMagnetM22 % is usually called by other SGraambo functs
% SGraamboTCPMagnetM22('stl') % is usually called by other SGraambo functs
%
% See also: exp_2024_07_20_Frame85, SGmotorFeeTech40flange,
% SGraamboTCPMagnetM20, SGraamboTCPtoolM16ofCPL,
% SGraamboTCPMagnetM22torquelimit
%
%
% Copyright 2024 Tim C. Lueth

SGtrialerror- generates an error message indicating a new attempt

SGtrialerror% SGtrialerror - generates an error message indicating a new attempt
% (by Tim Lueth, VLFL-Lib, 2024-JUL-27 as class: LANGUAGE PROCEDURES)
%
% Some routines such as the boolean operation of surface models are not
% numerically stable, which is why random changes are made to the
% coordinates. Nevertheless, it is not always possible to calculate a
% result. This is not always a problem for the design. For example, if a
% labelling is not engraved, then only the labelling is missing, but the
% mechanical fnctn is fulfilled. However, there are cases in which a
% failed subtraction, for example, renders further design steps
% pointless. In this case, the only option is to call the fnctn again in
% the hope that the numerics will then work better. Trail and error
% (Status of: 2024-07-27)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGisidentical, dbreturn, lastwarn
%
% SGtrialerror
%
% EXAMPLE:
% if SGisidentical(SGTL,SGTL1); SGtrialerror; end;
%
% SGAN=SGsubtract(SGA,SGvaryfrom(SGX)); if startsWith(lastwarn,'"SGsubtract'); SGtrialerror; end;
%
%
%
% See also: SGisidentical, dbreturn, lastwarn
%
%
% Copyright 2024 Tim C. Lueth

SGmotorFeeTech40flange ()- robot servo motor flange

SGmotorFeeTech40flange ()% SGmotorFeeTech40flange () - robot servo motor flange
% (by Tim Lueth, VLFL-Lib, 2024-JUL-25 as class: SERIAL-ROBOTICS)
%
% One problem with connecting shafts to metal servo motor output gears is
% that the screw connection is axial. The metal output gear is placed
% directly on the pinion shaft via internal gearing and screwed centrally
% with a screw. If we now want to screw our own gear onto the output gear
% in the axial direction, the screw heads will reach the outer edge of
% the output gear and therefore a printed output gear is only possible if
% the diameter of the base circle is larger than the diameter of the
% gear. If the outer diameter of the tooth circle is to be as large as
% the diameter of the output gear, a different solution with an axial
% torque coupling is required.
% The design that Tim Lueth invented for the servo motor already exists
% in a very similar form under the name guide pot with detent disc from
% the company Ganternorm. It can also be used with a spring element
% between the detent discs for coupling if no magnet is used. In contrast
% to Ganternorm, however, the routine can design any size.
%
% This construction consist of a
% a) guide pot (Führungstopf GN187,1)
% b) Locking plates (Rastscheibe GN187.4)
% c) Locking plates (Rastscheibe GN187.4)
% d) Standard gearing (module 1, 19 teeth) (Status of: 2024-07-27)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGraamboTCPMagnetM20
%
% SGmotorFeeTech40flange([])
%
% Additional Hyperlinks:
% Ganter Norm, Ganter Norm (US), Elesa & Ganter
%
% EXAMPLE:
% SGmotorFeeTech40flange(10,[15 3],'stl') % Returns two parts for an SM40BL motor m1n19 Gear
%
% See also: SGraamboTCPMagnetM20
%
%
% Copyright 2024 Tim C. Lueth

SGofCPLzscrew(CPL,z,M,ht,z0,"STL")- Extrudes a CPL in z with an internal scew to print the part separately as FDM

SGofCPLzscrew(CPL,z,M,ht,z0,% SGofCPLzscrew(CPL,z,M,ht,z0,"STL") - Extrudes a CPL in z with an internal scew to print the part separately as FDM
% (by Tim Lueth, VLFL-Lib, 2024-JUL-24 as class: AUTOMATIC DESIGN)
%
% Took 45 minutes from idea to documented fnctn including testing on a
% Bambuu X1C (Status of: 2024-07-24)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGofCPLz
%
% [SGScr,SGNut]=SGofCPLzscrew(CPL,[z,M,ht,z0,"STL"])
% === INPUT PARAMETERS ===
% CPL: Conotur to extrude
% z: z or [zmin zmax]
% M: metric diameter of a screw; default is automatic
% ht: height and minimal wall thickness of the thread; default is [5 1.2]
% z0: cutting position; default is the middle
% "STL": if used an STL folder is written
% === OUTPUT RESULTS ======
% SGScr: Lower part with the screw
% SGNut: Upper part containing nut and cap
%
% EXAMPLE:
% SGofCPLzscrew(PLsquare(8),[-10 10])
% SGofCPLzscrew(PLstar(8),[-10 10])
%
% See also: SGofCPLz
%
%
% Copyright 2024 Tim C. Lueth

SGmotorFeeTech40(,"STL")- returns a model of an SM40BL that can be printed and moved passively

SGmotorFeeTech40(,% SGmotorFeeTech40(,"STL") - returns a model of an SM40BL that can be printed and moved passively
% (by Tim Lueth, VLFL-Lib, 2024-JUL-24 as class: MODELING PROCEDURES)
%
% This is a STL model that is able to move (Status of: 2024-07-24)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGmotorFeeTech
%
% SGall=SGmotorFeeTech40([,"STL"])
% "STL": if used the parts are written into an STL folder
% === OUTPUT RESULTS ======
% SGall: Screw, Nut and Box
%
% Additional Hyperlinks:
% Specification SM40BL, Specification SM85CL, Specification SM120BL
%
% EXAMPLE:
% SGmotorFeeTech40
%
% See also: SGmotorFeeTech
%
%
% Copyright 2024 Tim C. Lueth

CPLraamboTCPgearnut(,"STL")- returns the CPL of the Raambo-Robot TCP gear wheel

CPLraamboTCPgearnut(,% CPLraamboTCPgearnut(,"STL") - returns the CPL of the Raambo-Robot TCP gear wheel
% (by Tim Lueth, VLFL-Lib, 2024-JUL-24 as class: PARAMETRIC DESIGN)
%
% Currently only available from Tim Lueth if 1st parameter is requested
% The gear wheel is module 1 and has 19 teeth and outer diameter of 24.8
% Motoro SM40BL alle Schrauben M3x5 or M3x3 (Status of: 2024-07-24)
%
% Introduced first in SolidGeometry 5.4
%
% See also: PLgearDIN, SGraamboTCPMagnetM20
%
% [CPLO,CPLi,CPLo]=CPLraamboTCPgearnut([,"STL"])
% "STL": if used, test solds are written to folder
% === OUTPUT RESULTS ======
% CPLO: Outer contour designed by EL
% CPLi: Inner contour as DIN13 using slfit('t')
% CPLo: outer contour as DIN13 using slfit('t') and D=24.8
%
% EXAMPLE:
% CPLraamboTCPgearnut
%
%
% See also: PLgearDIN, SGraamboTCPMagnetM20
%
%
% Copyright 2024 Tim C. Lueth

CPLofSGFSselect(SG,FSselectors)- returns the CPL of a SG by FS selection

CPLofSGFSselect(SG,FSselectors)% CPLofSGFSselect(SG,FSselectors) - returns the CPL of a SG by FS selection
% (by Tim Lueth, VLFL-Lib, 2024-JUL-24 as class: CLOSED POLYGON LISTS)
%
% Powerful sequential use of FSselect(SG,'array',..) and CPLofFS
% used first time in SGdesignTongueGrooveAxial
% (Status of: 2024-07-24)
%
% Introduced first in SolidGeometry 5.4
%
% See also: CPLofSGhull, FSselect, CPLofFS
%
% [CPLC,T]=CPLofSGFSselect(SG,[FSselectors])
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% FSselectors: FS selector sequence
% === OUTPUT RESULTS ======
% CPLC: Contour
% T: Koordinate System to move the CPL in space - Different to T in SGLib
% 5.3
%
% EXAMPLE:
% FSselect(SGsample(40),[0 -1 0],'array','front',-1,1:2)
% CPLofSGFSselect(SGsample(40),[0 -1 0],'array','front',-1,1:2)
% CPLofSGFSselect(SGsample(40),[0 +1 0],'array','front',-1)
%
% See also: CPLofSGhull, FSselect, CPLofFS
%
%
% Copyright 2024 Tim C. Lueth

SGofCPLzbellows(CPL,z,wave,"STL")- create a stright bellows based on a CPL

SGofCPLzbellows(CPL,z,wave,% SGofCPLzbellows(CPL,z,wave,"STL") - create a stright bellows based on a CPL
% (by Tim Lueth, VLFL-Lib, 2024-JUL-22 as class: PARAMETRIC DESIGN)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGofCPLz, SGofCPLzgrow
%
% SG=SGofCPLzbellows([CPL,z,wave,"STL"])
% === INPUT PARAMETERS ===
% CPL: Contour
% z: z or [zmin zmax]
% wave: [widht-wave height-wafe start-end straight resolution]
% "STL": if used a folder will be written
% === OUTPUT RESULTS ======
% SG: Solid Geometry
%
% EXAMPLE:
% CPL=PLsquare([60 40]); CPL=[CPLbuffer(CPL,.8);nan nan;CPL]; dbplot(CPL)
% SGofCPLzbellows(CPL,100)
% SGofCPLzbellows(CPL,[-30 4],[2.5 10 0]);
%
% See also: SGofCPLz, SGofCPLzgrow
%
%
% Copyright 2024 Tim C. Lueth

exp_2024_07_20_Frame85(,"STL")- Experiment to convert rotating movement into a translation movement

exp_2024_07_20_Frame85(,% exp_2024_07_20_Frame85(,"STL") - Experiment to convert rotating movement into a translation movement
% (by Tim Lueth, VLFL-Lib, 2024-JUL-20 as class: EXPERIMENTS)
%
% This design is for the 85 motor
% The design that Tim Lueth invented for the servo motor already exists
% in a very similar form under the name guide pot with detent disc from
% the company Ganternorm. It can also be used with a spring element
% between the detent discs for coupling if no magnet is used.
% 80% infill instead of 15% just takes 5% more time. (Status of:
% 2024-07-31)
%
% Introduced first in SolidGeometry 5.4
%
% See also: exp_2024_07_25_mount, SGraamboTCPknurledgearcover,
% SGraamboTCPMagnetM22
%
% exp_2024_07_20_Frame85([,"STL"])
% "STL": if used an STL folder is written
%
% Additional Hyperlinks:
% elesa, ganternorm
%
% See also: exp_2024_07_25_mount, SGraamboTCPknurledgearcover,
% SGraamboTCPMagnetM22
%
%
% Copyright 2024 Tim C. Lueth

SGclosurecapFDM(SG,CPLU,hh)- creates a top cover for FDM Printing

SGclosurecapFDM(SG,CPLU,hh)% SGclosurecapFDM(SG,CPLU,hh) - creates a top cover for FDM Printing
% (by Tim Lueth, VLFL-Lib, 2024-JUL-18 as class: AUTOMATIC DESIGN)
%
% For FDM printer it is difficult to create a plane ceiling without
% support structure. Nevertheless, it is not always necessary to (Status
% of: 2024-07-18)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGclosurecapofFS
%
% [SGC,SGO,h]=SGclosurecapFDM(SG,[CPLU,hh])
% === INPUT PARAMETERS ===
% SG: Solid geometry to be closed at the top
% CPLU: Optional CPL of an inlay; default is [];
% hh: optonal [height and border] for an inlay; default is [0 1.2]
% === OUTPUT RESULTS ======
% SGC: Solid Geometry of cap AddSG
% SGO: Solid Geometry of post ADDplug
% h: height of plug
%
% EXAMPLE:
% SGDIN13(-20,10,'',PLcircle(12)); SG=ans;
% SGclosurecapFDM(SG); SGC=ans;
% SGclosurecapFDM(SG,PLcircle(4)); SGC=ans; % Opening of 8 mm
% SGclosurecapFDM(SG,PLcircle(4),2); SGC=ans; % Inlay 8mm x 2mm
%
% See also: SGclosurecapofFS
%
%
% Copyright 2024 Tim C. Lueth

SGofFSCPLextrude(SG,dz,"OLAP","STL")- creates a solid be extrudsion of the feature surface selection

SGofFSCPLextrude(SG,dz,% SGofFSCPLextrude(SG,dz,"OLAP","STL") - creates a solid be extrudsion of the feature surface selection
% (by Tim Lueth, VLFL-Lib, 2024-JUL-17 as class: AUTOMATIC DESIGN)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGofCPLzchamfer, FSselect
%
% [SGN,SGNN,CPL,T]=SGofFSCPLextrude(SG,[dz,"OLAP","STL"])
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% dz: elongation
% "OLAP": if used with a value > 0 ; instead of the Feature Surface a cut
% projektion (mm) is used
% "STL": if used, an STL file is written
% === OUTPUT RESULTS ======
% SGN: Extrusion s
% SGNN: Final Solid
% CPL: Used Contour
% T: Transformation matrix
%
% EXAMPLE:
% SGofCPLzchamfer(PLcircle([40 30]),10,2); SG=ans; % Solid with chamfered edges
% SGofFSCPLextrude(SG,10,[0 0 1],'front',-3) % 10 mm extension to FS in [0 0 1] by FS extrusion
% SGofFSCPLextrude(SG,10,[0 0 1],'front',-3,'olap',2) % 10 mm with 2mm overlap for chamfered edge
%
% See also: SGofCPLzchamfer, FSselect
%
%
% Copyright 2024 Tim C. Lueth

mfile2mlxfile4markup(fname,,"force")- Converts an Markup or publishable M file into an mlx live script

mfile2mlxfile4markup(fname,,% mfile2mlxfile4markup(fname,,"force") - Converts an Markup or publishable M file into an mlx live script
% (by Tim Lueth, VLFL-Lib, 2024-JUL-16 as class: AUXILIARY PROCEDURES)
%
% The documentation database on Filemaker is able to create markup-scipts
% for documentation puposes. Thodr m-file scipts can be automatically
% transformed into mlx files and exported as html files for the the
% documentation system of matlab.
% Unoftunaltely at the current status (2024a) is is not possible to
% create the graphical output by running the mlx script. therefor, this
% fnctn is currently a 2 step fnctn.
% 1) Call the fnctn mfile2mlxfile4markup to create the live script
% 2) push MANNUALLY the run button.
% 3) Call the fnctn mfile2mlxfile4markup again to create the html file
% with output (Status of: 2024-07-16)
%
% Introduced first in SolidGeometry 5.4
%
% See also: builddocsearchdb, SGcreate_helptoc_xml_File,
% SGcreate_demos_xml_File
%
% mfile2mlxfile4markup(fname,[,"force"])
% === INPUT PARAMETERS ===
% fname: matlab m-file within the search path
% "force": if used, the mlx file will be overwritten anyway
%
% EXAMPLE:
% mfile2mlxfile4markup('testmtomlxconversion') % 1st call for creating the mlx file
% mfile2mlxfile4markup('testmtomlxconversion') % 2nd call to create the html file
%
% See also: builddocsearchdb, SGcreate_helptoc_xml_File,
% SGcreate_demos_xml_File
%
%
% Copyright 2024 Tim C. Lueth

stamp- creates a text line for publishable code with currenct OSX version | Matlab Version | SGlib version

stamp% stamp - creates a text line for publishable code with currenct OSX version | Matlab Version | SGlib version
% (by Tim Lueth, VLFL-Lib, 2024-JUL-15 as class: AUXILIARY PROCEDURES)
%
%
% use it as last line to mlx files or publishabe files (Status of:
% 2024-08-04)
%
% Introduced first in SolidGeometry 5.4
%
% See also: stamp, osx, verOSX, verML, verSG
%
% stamp
%
% EXAMPLE:
% stamp
%
% See also: stamp, osx, verOSX, verML, verSG
%
%
% Copyright 2024 Tim C. Lueth

image2strbase64(fname,width)- creates an base64 string to integrate images direcdtly into html files

image2strbase64(fname,width)% image2strbase64(fname,width) - creates an base64 string to integrate images direcdtly into html files
% (by Tim Lueth, VLFL-Lib, 2024-JUL-14 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.4
%
% See also: str2codelines, hexstr2str, hexstr2uint8,
% hexstrtodoublebinvect, str2hexsstr, strdecoder, strencoder,
% mfile2mlxfile4markup
%
% str=image2strbase64(fname,[width])
% === INPUT PARAMETERS ===
% fname: filename, weblink oder image array
% width: desired with for rescale/resize
% === OUTPUT RESULTS ======
% str: base64 string
%
% EXAMPLE:
% image2strbase64("https://www.mec.ed.tum.de/fileadmin/w00cbp/mimed/Matlab_Toolboxes/SGPIC/SGPIC_4027.JPG",320) % call using an url to an image
% image2strbase64("/Volumes/LUETH-WIN/WIN AIM Matlab Libraries/WIN AIM Matlab Datenbank Lueth PICS/SGPIC_3919.JPG") % call using a file
% I=webread("https://www.mec.ed.tum.de/fileadmin/w00cbp/mimed/Matlab_Toolboxes/SGPIC/SGPIC_4027.JPG");
% image2strbase64(I,640) % call using an image
%
% See also: str2codelines, hexstr2str, hexstr2uint8,
% hexstrtodoublebinvect, str2hexsstr, strdecoder, strencoder,
% mfile2mlxfile4markup
%
%
% Copyright 2024 Tim C. Lueth

SGofT(T)- generates an infinitely small cube (1e-17) at T

SGofT(T)% SGofT(T) - generates an infinitely small cube (1e-17) at T
% (by Tim Lueth, VLFL-Lib, 2024-JUL-12 as class: VISUALIZATION)
%
% makes life easier if Solids instead of frames are required (Status of:
% 2024-07-12)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGseedcube, zofBB
%
% SG=SGofT(T)
% === INPUT PARAMETERS ===
% T: HT matrix 4x4
% === OUTPUT RESULTS ======
% SG: infinitely small cube (1e-17) at T
%
% EXAMPLE:
% SGofT(eye(4))
%
% See also: SGseedcube, zofBB
%
%
% Copyright 2024 Tim C. Lueth

CPLof2CPLzheuristic(CPLA,CPLB,z)- returns the projection of a solid the would be created by SGof2CPLzheurist

CPLof2CPLzheuristic(CPLA,CPLB,z)% CPLof2CPLzheuristic(CPLA,CPLB,z) - returns the projection of a solid the would be created by SGof2CPLzheurist
% (by Tim Lueth, VLFL-Lib, 2024-JUL-09 as class: CLOSED POLYGON LISTS)
%
% If a convex and a concave connotur are extruded in direction z to a
% solid geometry, to larger contour could be replaced by the z-projection
% of the final contour. This is the purpose of this fnctn (Status of:
% 2024-07-10)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGof2CPLzheurist, CPLofSGhull, CPLaddauxpoints, CPLunion
%
% CPL=CPLof2CPLzheuristic(CPLA,CPLB,z)
% === INPUT PARAMETERS ===
% CPLA: Base Contour
% CPLB: Top contour
% z: extrusion height (has an effect)
% === OUTPUT RESULTS ======
% CPL: proection contour
%
% EXAMPLE:
% CPLof2CPLzheuristic(CPLofPL(PLsquare(100)),CPLofPL(PLcircle(50))+14,10); CPL=ans;
% SGof2CPLzheurist(CPL,CPLofPL(PLcircle(50)+14,1),100); % Not enough points
% SGof2CPLzheurist(CPLaddauxpoints(CPL,1),CPLaddauxpoints(CPLofPL(PLcircle(50))+14,1),100) % Desired
%
% See also: SGof2CPLzheurist, CPLofSGhull, CPLaddauxpoints, CPLunion
%
%
% Copyright 2024 Tim C. Lueth

hostname(datetag)- SAME AS USERNAME BUT CHANGED OUTPUT returns user name and host name using JAVA

hostname(datetag)% hostname(datetag) - SAME AS USERNAME BUT CHANGED OUTPUT returns user name and host name using JAVA
% (by Daniel Shub, VLFL-Lib, 2024-JUL-09 as class: AUXILIARY PROCEDURES)
%
% ..found in the internet..November 2018 (Status of: 2024-07-10)
%
% See also: expname, smbFilename, smbPSLibname, username
%
% [host,user]=hostname([datetag])
% === INPUT PARAMETERS ===
% datetag:
% === OUTPUT RESULTS ======
% host: host name
% user: user name
%
% EXAMPLE:
% [,h]=hostname
%
% See also: expname, smbFilename, smbPSLibname, username
%

TofFSoutlinecenter(SG,fi,"debug")- returns the HT Matrix fo the center of the FS

TofFSoutlinecenter(SG,fi,% TofFSoutlinecenter(SG,fi,"debug") - returns the HT Matrix fo the center of the FS
% (by Tim Lueth, VLFL-Lib, 2024-JUL-06 as class: KINEMATICS AND FRAMES)
%
% In contrast to TofFS this fnctn is returning the center of the outline
% econtour, which is useful if the FS has bore holes that move the mean
% value of the vertices outside the real center (Status of: 2024-07-07)
%
% Introduced first in SolidGeometry 5.4
%
% See also: FSselect, TofFS
%
% [T,CPLA,fi]=TofFSoutlinecenter(SG,[fi,"debug"])
% === INPUT PARAMETERS ===
% SG: SOlid Geometry
% fi: list of indices ot list of features identical to FSselect
% "debug": if used the ctreation is shown
% === OUTPUT RESULTS ======
% T: Center frame of the surface
% CPLA: Outer conotur in the eye(4) CS
% fi: faces index list
%
% EXAMPLE:
% SGmotorFeeTech; SGM=ans;SGM=SGrotate(SGM,'y',-pi/2); SGfigure(SGM)
% TofFSoutlinecenter(SGM,[+1 0 0],'front',-100,'areadescend',1)
% TofFSoutlinecenter(SGM,{[1 2]})
% TofFSoutlinecenter(SGM,[-1 0 0],'front',-100,'areadescend',1,'debug')
% [T,CPLA]=TofFSoutlinecenter(SGM,[0 0 1],'front',-100,'areadescend'); SGfigure(SGM); CVLplot(VLtransT(CPLA,T),'b-',3); tplot(T,40);
% [T,CPLA]=TofFSoutlinecenter(SGM,[0 0 -1],'front',-100,'areadescend'); SGfigure(SGM); CVLplot(VLtransT(CPLA,T),'b-',3); tplot(T,40);
% [T,CPLA]=TofFSoutlinecenter(SGM,[0 0 -1],'front',-100,'areadescend'); SGfigure(SGM); CVLplot(VLtransT(CPLA,T),'b-',3); tplot(T,40);
%
%
% See also: FSselect, TofFS
%
%
% Copyright 2024 Tim C. Lueth

SGcenterFS(SG,fi,"rot","debug")- directly centers the desired feature surface

SGcenterFS(SG,fi,% SGcenterFS(SG,fi,"rot","debug") - directly centers the desired feature surface
% (by Tim Lueth, VLFL-Lib, 2024-JUL-05 as class: KINEMATICS AND FRAMES)
%
% Introduced first in SolidGeometry 5.4
%
% See also: FSselect, TofFS, TofFSoutlinecenter
%
% [SGN,T,fi]=SGcenterFS(SG,[fi,"rot","debug"])
% === INPUT PARAMETERS ===
% SG: Solid geomety
% fi: cell list of facet index or
% "rot": optional rotation angles
% "debug": if used the debug fnctn will be activated
% === OUTPUT RESULTS ======
% SGN: Solid with new center
% T: Original coordinate frame of FS
% fi: facet index of FS
%
% EXAMPLE:
% SGmotorFeeTech; SGM=ans;SGM=SGrotate(SGM,'y',-pi/2); SGfigure(SGM)
% [a,b,c]=SGcenterFS(SGM,{[1 2]},'rot',[0 pi/3 pi/10]); SGfigure(-30,30); SGplotalpha(a); SSS=SGtransT(SGM,inv(b)); SGplotalpha(SSS,'r',0.5);
%
% See also: FSselect, TofFS, TofFSoutlinecenter
%
%
% Copyright 2024 Tim C. Lueth

CPLremauxpoints(CPL,dist,glob)- removes points from a CPL or a PL that

CPLremauxpoints(CPL,dist,glob)% CPLremauxpoints(CPL,dist,glob) - removes points from a CPL or a PL that
% (by Tim Lueth, VLFL-Lib, 2024-JUL-04 as class: CLOSED POLYGON LISTS)
%
% JUST A COPY OF CPLremdensity to find it using whichSG auxpoint (Status
% of: 2024-07-07)
%
% Introduced first in SolidGeometry 5.4
%
% See also: PLonCPLcontour, CPLremdensity, CPLremstraight,
% CPLremstraightAmin
%
% PL=CPLremauxpoints(CPL,[dist,glob])
% === INPUT PARAMETERS ===
% CPL: CPL or PL
% dist: minimal distance between original points
% glob: if true; All points are considered as point cloud not as CPL
% === OUTPUT RESULTS ======
% PL: CPL with minimal distances or PL in case of a cloud
%
% EXAMPLE:
% CPLremdensity(CPLsample(29),1,true)
% CPLremdensity(CPLsample(29),1)
% CPLremdensity(CPLaddauxpoints(CPLsample(29),1),1)
%
% See also: PLonCPLcontour, CPLremdensity, CPLremstraight,
% CPLremstraightAmin
%
%
% Copyright 2024 Tim C. Lueth

SGwheelspiral(R,H,n,A,shf,"DIN433","STL")- returns a solid of a involute spoked wheel which limit a torque jump or spike

SGwheelspiral(R,H,n,A,shf,% SGwheelspiral(R,H,n,A,shf,"DIN433","STL") - returns a solid of a involute spoked wheel
% (by Tim Lueth, VLFL-Lib, 2024-JUL-02 as class: PARAMETRIC DESIGN)
%
% This wheel should store overtorque energy in the involute spokes
% will be improved by using a kerbkonus and a DIN 912 etc.
% For a shaft slfit('t') is used for an axle slfit('c') is used (Status
% of: 2024-07-02)
%
% Introduced first in SolidGeometry 5.4
%
% See also: CPLofspokedPL, SGcylinder
%
% [SG,CPL]=SGwheelspiral([R,H,n,A,shf,"DIN433","STL"])
% === INPUT PARAMETERS ===
% R: [Ro Ro2 Ri]; default 15
% H: Heightand width of the spokes; default is [5 2]
% n: number of spokes; if n<0 the spokes are ccw
% A: 'T30' if there is a need for a torx axle; Can also be a CPL
% shf: shaft==true [slfit('t')], axle=false [slfit('c')]; default is true
% "DIN433": if used a pinring whaser of a DIN433 size is added
% "STL": if used an STL file is written
% === OUTPUT RESULTS ======
% SG: Solid Geometry
% CPL: CPL that was extruded
%
% EXAMPLE:
% SGwheelspiral(15,[3 2],3)
% SGwheelspiral(15,[3 2],-3)
% SGwheelspiral(15,[3 .8],-3,PLcircle(3),'DIN433')
% SGwheelspiral(15,[3 2],3,'T30') % String for Torx
% SGwheelspiral(20,'','',PLwrench(6.4,6),true, 'stl','DIN433'); % For shafts
% SGwheelspiral(20,'','',PLwrench(6.4,6),false, 'stl','DIN433'); % For axes
%
% See also: CPLofspokedPL, SGcylinder
%
%
% Copyright 2024 Tim C. Lueth

SGmotorFeeTech- slow fnct that creates solids with text

SGmotorFeeTech% SGmotorFeeTech - slow fnct that creates solids with text
% (by Tim Lueth, VLFL-Lib, 2024-JUL-01 as class: PARAMETRIC DESIGN)
%
% It is still a miracle, why on Apple silicon the text subtract works
% while on Apple intel subtraction of the text fails
% It creates the SM120BL FeeTech as solid (Status of: 2024-07-07)
%
% Introduced first in SolidGeometry 5.4
%
% See also: TofFSoutlinecenter, SGdesignrobotlink
%
% SG=SGmotorFeeTech
% === OUTPUT RESULTS ======
% SG: SOlid Geometry of the Motor
%
% EXAMPLE:
% SGmotorFeeTech; SGM=ans;
% TofFSoutlinecenter(SGM,'debug',[1 0 0],'front',-100,'areadescend',1)
%
% See also: TofFSoutlinecenter, SGdesignrobotlink
%
%
% Copyright 2024 Tim C. Lueth

verSG- systematic names for versions - use osx for all

verSG% verSG - systematic names for versions - use osx for all
% (by Tim Lueth, VLFL-Lib, 2024-JUN-26 as class: AUXILIARY PROCEDURES)
%
%
% % verML returns Matlab version
% % SGver returns SG-Lib Version
% % verOSX returns OSX version (Status of: 2024-08-04)
%
% Introduced first in SolidGeometry 5.4
%
% See also: stamp, osx, verosx, verML
%
% t=verSG
% === OUTPUT RESULTS ======
% t: name of SG-Lib version
%
% EXAMPLE:
% verSG, verML, verosx
%
% See also: stamp, osx, verosx, verML
%
%
% Copyright 2024 Tim C. Lueth

repmatfill(line,n,val)- fills an array with values or shortens the array

repmatfill(line,n,val)% repmatfill(line,n,val) - fills an array with values or shortens the array
% (by Tim Lueth, VLFL-Lib, 2024-JUN-25 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.4
%
% See also: repmatfill
%
% line=repmatfill(line,n,[val])
% === INPUT PARAMETERS ===
% line: [1 x m] array with values
% n: desired length
% val: value for fill up; default is line (end)
% === OUTPUT RESULTS ======
% line: resulting line with length n
%
% EXAMPLE:
% repmatfill([1 2 3 4],3,0) % Shorten to length n
% repmatfill([1 2 3 4],10) % Fill with last value to length n
% repmatfill([1 2 3 4],10,0) % Fill with zeros to length n
%
% See also: repmatfill
%
%
% Copyright 2024 Tim C. Lueth

VLmostdistanceNeighborN(VL,dim)- return a list of n points ou of a points list that have the maximum distance sum

VLmostdistanceNeighborN(VL,dim)% VLmostdistanceNeighborN(VL,dim) - return a list of n points ou of a points list that have the maximum distance sum
% (by Tim Lueth, VLFL-Lib, 2024-JUN-21 as class: ANALYTICAL GEOMETRY)
%
% BE CAREFUL WITH THE LONG LIST become slow easily
% Think about using CVLremstraightAmin first
% MUST BE ONE CONTOUR, NOT A POINT CLOUD. BUGGY FOR POINTS CLOUDS SINCE
% ORDER IS UNKNOWN
% (Status of: 2024-06-23)
%
% Introduced first in SolidGeometry 5.4
%
% See also: VLnearestNeighbor, VLnearestNeighborN, CVLremstraightAmin
%
% [nn,ll]=VLmostdistanceNeighborN(VL,[dim])
% === INPUT PARAMETERS ===
% VL: Vertex list
% dim: number of points required
% === OUTPUT RESULTS ======
% nn: full list of combiations
% ll: full list of distances
%
% EXAMPLE:
% VLmostdistanceNeighborN(CPLsample(3),4)
% VLmostdistanceNeighborN(CPLsample(23),3);
% VLmostdistanceNeighborN(CPLsample(41),3); %BUGGY FOR POINTS CLOUDS SINCE ORDER IS UNKNOWN
% VLmostdistanceNeighborN(CPLsample(17),3);
% VLmostdistanceNeighborN(CPLsample(17),4);
% VLmostdistanceNeighborN(CPLsample(17),5);
%
% See also: VLnearestNeighbor, VLnearestNeighborN, CVLremstraightAmin
%
%
% Copyright 2024 Tim C. Lueth

CPLcontourslots(CPL,dlw,nsl)%createsslotalongacontour- creates slot contours to connect two solid by simple plug sockets

CPLcontourslots(CPL,dlw,nsl)%createsslotalongacontour% CPLcontourslots(CPL,dlw,nsl)%createsslotalongacontour - creates slot contours to connect two solid by simple plug sockets
% (by Tim Lueth, VLFL-Lib, 2024-JUN-21 as class: CLOSED POLYGON LISTS)
%
% different solution wrt CPLradialslots (Status of: 2024-06-22)
%
% Introduced first in SolidGeometry 5.4
%
% See also: CPLradialslots
%
% CPLN=CPLcontourslots([CPL,dlw,nsl])%createsslotalongacontour
% === INPUT PARAMETERS ===
% CPL: Outer Contur
% dlw: length width distance
% nsl: number of slots
% === OUTPUT RESULTS ======
% CPLN: Final slot contour
%
% EXAMPLE:
% CPLcontourslots(CPLsample(3)*2,5,3)
% CPLcontourslots(CPLsample(3)*2,5,4)
% CPLcontourslots(CPLsample(3)*2,5,5)
% CPLcontourslots(CPLsample(4)*2,5,4)
% CPLcontourslots(CPLsample(6)*2,5,4)
% CPLcontourslots(CPLsample(7)*2,5,4)
% testfunctTL('CPLcontourslots(CPLsample(#1)*3,5,#2);',2:8,[3 4 10]);
%
% See also: CPLradialslots
%
%
% Copyright 2024 Tim C. Lueth

VLseparate(VL,rr,dim)- wish to solve boolean opeartion problems

VLseparate(VL,rr,dim)% VLseparate(VL,rr,dim) - wish to solve boolean opeartion problems
% (by Tim Lueth, VLFL-Lib, 2024-JUN-19 as class: ANALYTICAL GEOMETRY)
%
% again implemented VLvaryfrom (Status of: 2024-06-23)
%
% Introduced first in SolidGeometry 5.4
%
% See also: VLELroundunique, VLof2VLnonmanifold, VLmindist, VLmindxyz,
% VLvertexfusion, VLvaryfrom, PLvaryfrom, TLvaryfrom, SGvaryfrom
%
% VL=VLseparate([VL,rr,dim])
% === INPUT PARAMETERS ===
% VL: Vertex list
% rr: random increasement
% dim: default is [1 2 3]
% === OUTPUT RESULTS ======
% VL: Vertex list with unique vertices
%
% EXAMPLE:
% SGbox('noframes'); A=ans;
% SGvaryfrom(A); ans.VL % Use SGvaryfrom
% VLseparate(A,1e-3); ans.VL % Use VLseparate
%
% See also: VLELroundunique, VLof2VLnonmanifold, VLmindist, VLmindxyz,
% VLvertexfusion, VLvaryfrom, PLvaryfrom, TLvaryfrom, SGvaryfrom
%
%
% Copyright 2024 Tim C. Lueth

SGstamptextFDM(SG,ez,txt,siz,"debug","relief")- creates an imprint or an relief if allowed

SGstamptextFDM(SG,ez,txt,siz,% SGstamptextFDM(SG,ez,txt,siz,"debug","relief") - creates an imprint or an relief if allowed
% (by Tim Lueth, VLFL-Lib, 2024-JUN-19 as class: AUTOMATIC DESIGN)
%
% more automatic fnctn than SGtextstamp, SGtextstamp2 (Status of:
% 2024-06-22)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGtextstamp, SGtextstamp2, SGgearstamp
%
% SG=SGstamptextFDM([SG,ez,txt,siz,"debug","relief"])
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% ez: surface direction of text
% txt: text
% siz: maximum size; default is 20
% "debug": if used, the design is shown
% "relief": if used insted of an imprint also a relief is allowed
% === OUTPUT RESULTS ======
% SG: Modified SG
%
% EXAMPLE:
% SGstamptextFDM(SGbox([40 40 50]*5,10),[0 0 1],'27','debug')
% SGstamptextFDM(SGbox([40 40 50]*5,10),[1 0 0],'27')
% SGstamptextFDM(SGbox([40 40 50]),[0 -1 0],'27','debug')
%
% See also: SGtextstamp, SGtextstamp2, SGgearstamp
%
%
% Copyright 2024 Tim C. Lueth

SGdesignTongueGrooveRadial(CPLu,T,h,wi)- creates a radial tongue and groove connection for a contour or an opening in a 2.5D structure

SGdesignTongueGrooveRadial(CPLu,T,h,wi)% SGdesignTongueGrooveRadial(CPLu,T,h,wi) - creates a radial tongue and groove connection for a contour or an opening in a 2.5D structure
% (by Tim Lueth, VLFL-Lib, 2024-JUN-17 as class: AUTOMATIC DESIGN)
%
% ONLY THE OUTPUT HAST TO BE DEFINED FOR FUTURE FNCTNS
% THE SOLID IS BEHIND THE EZ Vector (Status of: 2024-06-22)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGofCPLzgrow, exp_2024_06_16_CPLtonguegroove
%
% [Hsub,Nsub,S,Hadd,Nadd,T]=SGdesignTongueGrooveRadial([CPLu,T,h,wi])
% === INPUT PARAMETERS ===
% CPLu: Contour of an opening in a solid (CPLofFS) | OR a SG solid
% T: Transformation of CPLu (CPLofFS); default is eye(4) | Or an ez
% vector
% h: [h-Upper h-Lower]; default os [3 5]
% wi: [wall-inside wall-outside] default is [0.8 0]
% === OUTPUT RESULTS ======
% Hsub: Subtraction solid
% Nsub: not used yet
% S: not used yet
% Hadd: not used yet
% Nadd: Lower Contour
% T: Coordinate frame that has been used if ez was input parameter
%
% EXAMPLE:
% SGofCPLz(PLcircle([20 24],4),5); SG=ans;
% CPLofFS(SG,FSselect(SG,[0 0 -1],'front',-0.2));
% [CPL,T]=CPLofFS(SG,FSselect(SG,[0 0 -1],'front',-0.2)); % Take the floor lower surface
% CPL=CPLselectinout(CPL,1); % Select the bore hole
% SGdesignTongueGrooveRadial(CPL,T,[5 10],[0 5])
%
%
% See also: SGofCPLzgrow, exp_2024_06_16_CPLtonguegroove
%
%
% Copyright 2024 Tim C. Lueth

SGofCPLzgrow(CPL,zz,dr,"style")- creates solids with radial changing contours

SGofCPLzgrow(CPL,zz,dr,% SGofCPLzgrow(CPL,zz,dr,"style") - creates solids with radial changing contours
% (by Tim Lueth, VLFL-Lib, 2024-JUN-16 as class: SURFACES)
%
% used for circumferential tongue-and-groove fittings (Status of:
% 2024-06-16)
%
% Introduced first in SolidGeometry 5.4
%
% See also: CPLgrow, SGofCPLzgrid, CPLgrow, SGofCPL
%
% [SG,nva,FLW,FLU,FLO]=SGofCPLzgrow(CPL,[zz,dr,"style"])
% === INPUT PARAMETERS ===
% CPL: Closed Contour
% zz: list of z values
% dr: list of corresponding buffer/grow values for CPLgrow (not CPLbuffer)
% "style": used in CPLgrow "norm","outw","hole", "fitt" default is 'hole'
% === OUTPUT RESULTS ======
% SG: Solid Geometry
% nva: list of points per z value
% FLW: Faces of wall
% FLU: Faces of floor
% FLO: Faces of cover
%
% EXAMPLE:
% SGofCPLzgrow(CPLsample(12),[0 10 11 12 13 14],[0 0 1 0])
%
% See also: CPLgrow, SGofCPLzgrid, CPLgrow, SGofCPL
%
%
% Copyright 2024 Tim C. Lueth

exp_2024_06_16_CPLtonguegroove- EXPERIMENT THAT BECAME LATER SGdesignTongueGrooveRadial

exp_2024_06_16_CPLtonguegroove% exp_2024_06_16_CPLtonguegroove - EXPERIMENT THAT BECAME LATER SGdesignTongueGrooveRadial
% (by Tim Lueth, VLFL-Lib, 2024-JUN-16 as class: EXPERIMENTS)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGdesignTongueGrooveRadial
%
% exp_2024_06_16_CPLtonguegroove
%
% EXAMPLE:
% exp_2024_06_16_CPLtonguegroove
%
% See also: SGdesignTongueGrooveRadial
%
%
% Copyright 2024 Tim C. Lueth

SGradialhooks(RRR,nmax)- Creates hooks for a rotating bayonet catch

SGradialhooks(RRR,nmax)% SGradialhooks(RRR,nmax) - Creates hooks for a rotating bayonet catch
% (by Tim Lueth, VLFL-Lib, 2024-JUN-15 as class: PARAMETRIC DESIGN)
%
% Slot of slfit('c') ==> loos, Slot of slfit('t') ==> tight
%
% The hooks need a width of 2mm and a height of at least 1.2mm
% The slot should be widened sls, but the increase should only be slt.
% It should be printed without a support structure so that the hooks
% remain undamaged (Status of: 2024-06-16)
%
% Introduced first in SolidGeometry 5.4
%
% See also: CPLradialslots
%
% [SGN,CPLh]=SGradialhooks([RRR,nmax])
% === INPUT PARAMETERS ===
% RRR: [Inner-Radius Length Slot-Height Hook-Height optional-tube]
% default is [20 10 2 5 2 0]
% nmax: maximum numbers of Hooks; default is 5
% === OUTPUT RESULTS ======
% SGN: Solid Geometry of Radial Hooks
% CPLh: Exact contour without fittinhs
%
% EXAMPLE:
% SGradialhooks([40 10 2 1 3 10],99) % allowed maximum of 99 reduced to 4 possible Hooks
% SGradialhooks([40 10 2 1 3 10],5) % reduced to maximum of 3
% SGradialhooks([40 10 2 1 3 10],2) % reduced to maximum of 2
%
% See also: CPLradialslots
%
%
% Copyright 2024 Tim C. Lueth

exp_2024_06_15_Hookplate- Bayonet catch with radial hooks

exp_2024_06_15_Hookplate% exp_2024_06_15_Hookplate - Bayonet catch with radial hooks
% (by Tim Lueth, VLFL-Lib, 2024-JUN-15 as class: EXPERIMENTS)
%
% Tested using exp_2024_06_15_Hookplate (Status of: 2024-06-15)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGradialhooks, CPLradialslots
%
% exp_2024_06_15_Hookplate
%
% EXAMPLE:
% exp_2024_06_15_Hookplate
%
%
% See also: SGradialhooks, CPLradialslots
%
%
% Copyright 2024 Tim C. Lueth

CPLradialslots(Riw,ls,nmax,off)- creates rotating circle segment contour for socket connectors

CPLradialslots(Riw,ls,nmax,off)% CPLradialslots(Riw,ls,nmax,off) - creates rotating circle segment contour for socket connectors
% (by Tim Lueth, VLFL-Lib, 2024-JUN-13 as class: CLOSED POLYGON LISTS)
%
% Introduced first in SolidGeometry 5.4
%
% See also: CPLcopyunionradial
%
% [CPLN,CPL,nn]=CPLradialslots([Riw,ls,nmax,off])
% === INPUT PARAMETERS ===
% Riw: [Ri Ro]
% ls: length of the slot
% nmax: maximum number of slots
% off: offset angle
% === OUTPUT RESULTS ======
% CPLN: Complete Conotur
% CPL: 1st Segment
% nn:
%
% EXAMPLE:
% CPLradialslots([28 29],10,5),1)
%
% See also: CPLcopyunionradial
%
%
% Copyright 2024 Tim C. Lueth

SGofCPLzgrid(CPL,zz,dx,dy)- creates a Contour by extrusion using a z coordinate list

SGofCPLzgrid(CPL,zz,dx,dy)% SGofCPLzgrid(CPL,zz,dx,dy) - creates a Contour by extrusion using a z coordinate list
% (by Tim Lueth, VLFL-Lib, 2024-JUN-13 as class: SURFACES)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGofCPLz, SGofCPLzgrow
%
% [SG,nva,FLW,FLU,FLO]=SGofCPLzgrid(CPL,[zz,dx,dy])
% === INPUT PARAMETERS ===
% CPL: Contour
% zz: list of z values
% dx: list of corresponding x deviation
% dy: list of corresponding y deviation
% === OUTPUT RESULTS ======
% SG: SOlid Geometry
% nva: number of vertices per plane
% FLW: Only the walls
% FLU: Only the floor
% FLO: Only the cover
%
% EXAMPLE:
% SGofCPLzgrid(CPLsample(6),-3:1:10)
% SGofCPLzgrid(CPLsample(6),0:1:10,0:6,0:6)
% SGofCPLzgrid(PLcircle(3)+[10 0],0:10,10*cos(0:pi/3/10:pi/3),10*sin(0:pi/3/10:pi/3))
% SGofCPLzgrid(PLcircle(3),0:10,0,10*sin(0:pi/3/10:pi/3))
% SGofCPLzgrid(PLcircle(3),0:10,10*cos(0:pi/3/10:pi/3),0)
%
% SGofCPLzgrid(CPLradialslots(20,1.2))
%
% See also: SGofCPLz, SGofCPLzgrow
%
%
% Copyright 2024 Tim C. Lueth

SGgearstamp(SG,zz)- Marks gear wheels with numbers or text

SGgearstamp(SG,zz)% SGgearstamp(SG,zz) - Marks gear wheels with numbers or text
% (by Tim Lueth, VLFL-Lib, 2024-JUN-12 as class: KINEMATICS AND FRAMES)
%
% When designing gearboxes, gears are produced with similar but different
% numbers of teeth, which are difficult to distinguish by eye during
% assembly. A marking with at least the position in the gear sequence is
% helpful (Status of: 2024-06-12)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGplotgears
%
% SG=SGgearstamp(SG,[zz])
% === INPUT PARAMETERS ===
% SG: Cell list of gear wheels without a number
% zz: optional other text; not used yet
% === OUTPUT RESULTS ======
% SG: Cell list of gears with engraved position within the gear sequence
%
% EXAMPLE:
% zz=SGgearratio(15,3,[12 45]), [SG,m,f]=SGgearchainwindup(1,zz,'stack')
% SGgearstamp(SG)
%
%
% See also: SGplotgears
%
%
% Copyright 2024 Tim C. Lueth

SGplotgears(SG,cols,al,f)- plot a gear i predefined colors from blue(1st) to orange (last)

SGplotgears(SG,cols,al,f)% SGplotgears(SG,cols,al,f) - plot a gear i predefined colors from blue(1st) to orange (last)
% (by Tim Lueth, VLFL-Lib, 2024-JUN-11 as class: VISUALIZATION)
%
% The fnctn is different to SGplotcell (surfaces) or SGplotcellmultiple
% (subplots)
% The color
% blue is used for the 1st wheel
% orange is used for the last wheel
% the colors algea, purple (Status of: 2024-06-12)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGplotalpha, Videoquickanimatego, SGgearratio,
% SGgearchainwindup
%
% h=SGplotgears(SG,[cols,al,f])
% === INPUT PARAMETERS ===
% SG: cell list of gear solids
% cols: colorstring or color cells; default is 'bcgmo'
% al: transparency default is 1
% f: gear ratio f calculated by SGgearchainwindup
% === OUTPUT RESULTS ======
% h: handle as cell list to be used for Videoquickanimatego
%
% EXAMPLE:
% zz=SGgearratio(15,3,[12 45]), [SG,m,f]=SGgearchainwindup(1,zz,'stack')
% SGfigure(-30,30); SGplotgears(SG,'',0.9); % clear gears
% SGfigure(-30,30); SGplotgears(SG,'',0.5,f); % using gear ration f => animation
%
% See also: SGplotalpha, Videoquickanimatego, SGgearratio,
% SGgearchainwindup
%
%
% Copyright 2024 Tim C. Lueth

exp_2024_06_09_gearboxhousing(rat,dax,hh,AX,"STL","convex","freewheel")%Testincodeofmatlabtrip- creates a complete gear box including housing

exp_2024_06_09_gearboxhousing(rat,dax,hh,AX,% exp_2024_06_09_gearboxhousing(rat,dax,hh,AX,"STL","convex","freewheel")%Testincodeofmatlabtrip - creates a complete gear box including housing
% (by Tim Lueth, VLFL-Lib, 2024-JUN-09 as class: EXPERIMENTS)
%
% This fnctn (currently an experiment) is used to generate the smallest
% possible gearbox for an arbitrary transmission/reduction ratio. Either
% with an exactly enclosing housing or with a convex enclosing housing.
% No bearings are currently planned for the axle and the gears. The
% diameter and shape of the axle and shaft can be selected. The axles are
% prepared with a clearance fit and the shaft with an interference fit
% (Status of: 2024-06-11)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGgearratio, SGgearchainwindup, SGgearboxhousing,
% SGwrenchsocketspanner, SGfreewheel
%
% SGall=exp_2024_06_09_gearboxhousing([rat,dax,hh,AX,"STL","convex","free
% wheel"])%Testincodeofmatlabtrip
% === INPUT PARAMETERS ===
% rat: gear ratio; default is 30
% dax: distance of the axes; default is 25
% hh: height of the gear wheels; default is 5
% AX: [shaft-wrench shaft-edges axis-diameter axis edges
% "STL": if used the gear box ist written as STL directory
% "convex": if used the gear box housing ist convex hull shaped
% "freewheel": contains the parameter for a freewheel and replaces the
% shaft by an axis for the 1st wheel
% === OUTPUT RESULTS ======
% SGall: Cell array with all solids
%
% EXAMPLE:
% exp_2024_06_09_gearboxhousing(145,30)
%
% See also: SGgearratio, SGgearchainwindup, SGgearboxhousing,
% SGwrenchsocketspanner, SGfreewheel
%
%
% Copyright 2024 Tim C. Lueth

CPLunionsorted(A,B,sr)- For 2.5D Design in Mechanical Engineering, there is a different CPLunion requireed

CPLunionsorted(A,B,sr)% CPLunionsorted(A,B,sr) - For 2.5D Design in Mechanical Engineering, there is a different CPLunion requireed
% (by Tim Lueth, VLFL-Lib, 2024-JUN-07 as class: CLOSED POLYGON LISTS)
%
% Introduced first in SolidGeometry 5.4
%
% See also: CPLunion, CPLsubtract, CPLtransrelCPL, CPLofSGgears
%
% CPLU=CPLunionsorted(A,B,[sr])
% === INPUT PARAMETERS ===
% A: Contour A describing crossections
% B: Contour B describing crossections
% sr: spatial relation like for CPLtransrelCPL
% === OUTPUT RESULTS ======
% CPLU: Final Contour with separated union and subtract
%
% EXAMPLE:
% CPLunionsorted(CPLsample(27),CPLsample(12),'transx',30);
% CPLunionsorted(CPLsample(27),CPLsample(12),'transx',30,'transy',5);
%
% See also: CPLunion, CPLsubtract, CPLtransrelCPL, CPLofSGgears
%
%
% Copyright 2024 Tim C. Lueth

SGgearboxhousing(SG,w,"convex","flooradd","floorsub")- creates a housing for a gear box

SGgearboxhousing(SG,w,% SGgearboxhousing(SG,w,"convex","flooradd","floorsub") - creates a housing for a gear box
% (by Tim Lueth, VLFL-Lib, 2024-JUN-07 as class: AUTOMATIC DESIGN)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGgearchainwindup, CPLofSGgears
%
% [SGB,CPLi,CPLo]=SGgearboxhousing(SG,[w,"convex","flooradd","floorsub"])
% === INPUT PARAMETERS ===
% SG: Cell array of gears created by SGgearchainwindup etc.
% w: [wall floor cover lid] thickness; default is [1.2 1.2 1.2 0.8]
% "convex": if used the shape is a convex hull
% "flooradd": this contours are added to the floor in addition (freewheel)
% "floorsub": this contours are subtracted from the floor in addition
% (freewheel)
% === OUTPUT RESULTS ======
% SGB: {Wall, Floor, Lid}
% CPLi: Inner axes contour used for the housing
% CPLo: Outer box contour used for the housing
%
% EXAMPLE:
% SGgearchainwindup([1 5 2],[45 9 34 10 20 20 40 40 ],'stack','shaft',PLwrench(6.4,6)); SGC=ans;
% SGgearboxhousing(SGC)
% SGgearboxhousing(SGC,'convex')
% SGgearboxhousing(SGC,[1.2 1 0 0], 'convex')
% SGgearboxhousing(SGC,[1.2 1 0 0], 'convex','flooradd',CPLcopypatternPL(PLcircle([10,8])+[30 0],PLsquare(50)),'floorsub',PLcircle(15))
%
%
% See also: SGgearchainwindup, CPLofSGgears
%
%
% Copyright 2024 Tim C. Lueth

CPLofSGgears(SG)- provides the 2D envelope for a planar gearbox

CPLofSGgears(SG)% CPLofSGgears(SG) - provides the 2D envelope for a planar gearbox
% (by Tim Lueth, VLFL-Lib, 2024-JUN-07 as class: KINEMATICS AND FRAMES)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGgearchainwindup, SGgearboxhousing, CPLunionsorted
%
% CPLN=CPLofSGgears(SG)
% === INPUT PARAMETERS ===
% SG: Cell array of gears comming from SGgearchainwindup etc.
% === OUTPUT RESULTS ======
% CPLN: Contour the is required for the housing and the axes bore
%
% EXAMPLE:
% SGgearchainwindup('stack'); CPLofSGgears(ans);
%
% See also: SGgearchainwindup, SGgearboxhousing, CPLunionsorted
%
%
% Copyright 2024 Tim C. Lueth

CPLspringSpiral(RP,d,D,CPLC,cc)- creates just the pathe and basic contour for a windup motor spring spiral

CPLspringSpiral(RP,d,D,CPLC,cc)% CPLspringSpiral(RP,d,D,CPLC,cc) - creates just the pathe and basic contour for a windup motor spring spiral
% (by Tim Lueth, VLFL-Lib, 2024-JUN-04 as class: CLOSED POLYGON LISTS)
%
% ATTENTION - THIS IS NOT THE BEST SPRING LOAD VERSION! The best spring
% is a simple spiral spring as an involute with a constant space between
% the tracks as with a PLevolute. If such a spring is inserted into a
% smaller housing already preloaded, the tracks are closer together on
% the outside. The spring has a more constant torque output. However, as
% a plastic spring shows material creep after just 24 hours, such a
% spring will relax. It would make more sense to use a thicker involute
% coil, perhaps with several arms. (See examples using SGspringSpiral)
%
% This fnctn create a spring contour that is different to a PLevolvente
% spring. It looks more like a commercial feather steel spring (see
% SGspringSpiralbolt).
% This fnctn is used in SGspringSpiral (Status of: 2024-06-05)
%
% Introduced first in SolidGeometry 5.4
%
% See also: PLevolvente, PLgrowline, SGspringSpiral, SGspringSpiralbolt
%
% [CPLN,PLN]=CPLspringSpiral([RP,d,D,CPLC,cc])
% === INPUT PARAMETERS ===
% RP: [radius distance]; default is [30 0]. Outer radius of the spring;
% In case of D(1)>1 this is the distance to the axis
% d: Thickness of the spring contour; default is 1.2
% D: Diameter and circular angle for the end; default is [0 1.7]
% CPLC: Optinal middle contour to be integrated for shaft
% cc: [Outer-spring-rounds Inner=Spring-Round; default is [2 3]
% === OUTPUT RESULTS ======
% CPLN: Contour of the spring for SGofCPLz
% PLN: Point list for the path
%
% EXAMPLE:
% CPLspringSpiral(30,2); % 2mm spring contour 30mm
% CPLspringSpiral(30,2,4); % 2mm spring contour for 4mm axis in 30mm
%
% CPLspringSpiral(30,2,4,[PLcircle(5);nan nan; PLwrench(6.4,6)]); % turn by a 1/4 inch shaft
% CPLspringSpiral([30 40],2,4,[PLcircle(5);nan nan; PLwrench(6.4,6)]); % turn by a 1/4 inch shaft in 40mm
%
% SGspringSpiral('simple'); A=ans; SGrotate(A,'z',pi);B=ans % 2 arm spring coil
% SGspringSpiral('simple'); A=ans; SGrotate(A,'z',2*pi/3);B=ans; SGrotate(B,'z',2*pi/3); C=ans; SGplotalpha(A); % 3 arm coil
%
% See also: PLevolvente, PLgrowline, SGspringSpiral, SGspringSpiralbolt
%
%
% Copyright 2024 Tim C. Lueth

SGshaftaxis(LENS,CPLS,"rad")- creates shaft axis combinations

SGshaftaxis(LENS,CPLS,% SGshaftaxis(LENS,CPLS,"rad") - creates shaft axis combinations
% (by Tim Lueth, VLFL-Lib, 2024-JUN-03 as class: PARAMETRIC DESIGN)
%
% Tim Lueth, written in the home office of Greg Hager, Springfield, VA
% (Status of: 2024-06-03)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGfreewheel, SGgearchainwindup
%
% SGL=SGshaftaxis([LENS,CPLS,"rad"])
% === INPUT PARAMETERS ===
% LENS: cell array of length and transition such as {[10 1],[10 1],[10 1]}
% CPLS: cell array of contours such as{5,PLwrench(6.4,6),3)
% "rad": if rad is used, not the conturs but circle contours are fused
% === OUTPUT RESULTS ======
% SGL: Final Shaft-Axis solid
%
% EXAMPLE:
% SGshaftaxis({10 10 10},{PLcircle(5),PLwrench(6.4,6),PLcircle(3)})
%
% See also: SGfreewheel, SGgearchainwindup
%
%
% Copyright 2024 Tim C. Lueth

dircrd()- same as dir but returns the creation date instead of the modification date

dircrd()% dircrd() - same as dir but returns the creation date instead of the modification date
% (by Tim Lueth, VLFL-Lib, 2024-JUN-02 as class: FILE HANDLING)
%
% Too slow for practical use (Status of: 2024-06-02)
%
% Introduced first in SolidGeometry 5.4
%
% See also: dir, ls, fcreationdate
%
% xx=dircrd([])
% === OUTPUT RESULTS ======
% xx: result if dir
%
% EXAMPLE:
% dir db*.m
% dircrd db*.m
% ans.date
%
% See also: dir, ls, fcreationdate
%
%
% Copyright 2024 Tim C. Lueth

SGcylhinge(R,L,P,"STL")- Creates a piano hinge as a joint

SGcylhinge(R,L,P,% SGcylhinge(R,L,P,"STL") - Creates a piano hinge as a joint
% (by Tim Lueth, VLFL-Lib, 2024-MAI-28 as class: AUTOMATIC DESIGN)
%
% Tested on bambulab X1C in May 2024 with R=1.5 and R=1 and R=0.8
% The current fnctn supports 1.5mm and 1.2mm but not yet 1 mm or 0.8mm
% Radius < 1mm require an automatic change of the angle.
% The nozzel ist still most 0.4mm. 0.6~D=1.2 mm are just 3 layers
% =====================
% Diese Funktion und auch das Konzept von Drehgelenken ist sehr mächtig,
% aber ohne Beispiele nur sehr schwer verständlich, da die Scharniere
% verspannt werden müssen.
% (Status of: 2024-05-30)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGsimpleHinge, SGbladeofpincone, SGpincountersink
%
% SGall=SGcylhinge([R,L,P,"STL"])
% === INPUT PARAMETERS ===
% R: [Radius height-of-pin angle-of-pin]; default is [2 1.5 pi/4]
% L: Length of the hinge; default is 40
% P: [plate-width plate-height bridge-size; default is [10 0 0.1];
% "STL": if used an STL file is written
% === OUTPUT RESULTS ======
% SGall: All Parts
%
% EXAMPLE:
% SGcylhinge(1,30,'stl')
%
% See also: SGsimpleHinge, SGbladeofpincone, SGpincountersink
%
%
% Copyright 2024 Tim C. Lueth

SGrackofSGshaftaxis(SGC,h,zz)- design automatically racks for rotating shafts and axis

SGrackofSGshaftaxis(SGC,h,zz)% SGrackofSGshaftaxis(SGC,h,zz) - design automatically racks for rotating shafts and axis
% (by Tim Lueth, VLFL-Lib, 2024-MAI-25 as class: AUTOMATIC DESIGN)
%
% Introduced first in SolidGeometry 5.4
%
% See also: circlearoundPL, CPLofSGprojection, CPLoutercontour,
% SGrackbars, CPLrack4PL, CPLrackPLdelaunay
%
% [SGS,CPLR]=SGrackofSGshaftaxis(SGC,[h,zz])
% === INPUT PARAMETERS ===
% SGC: cell list of shafts/axis in z direction
% h: desired height and width of rack
% zz: list of z values for the racks; default is [-inf inf]
% === OUTPUT RESULTS ======
% SGS: cell array of racks
% CPLR: cell array of rack contours
%
% EXAMPLE:
% SGofCPLz(PLcircle(5)+[20 20],40); A=ans;
% SGofCPLz(PLcircle(6.4,6)+[0 0],[-3 42]); B=ans;
% SGrackofSGshaftaxis({A,B})
% SGrackofSGshaftaxis({A,B},[5 30])
%
% See also: circlearoundPL, CPLofSGprojection, CPLoutercontour,
% SGrackbars, CPLrack4PL, CPLrackPLdelaunay
%
%
% Copyright 2024 Tim C. Lueth

toggleviewprojection- toggle view projection between "orthographic" and "perspective"

toggleviewprojection% toggleviewprojection - toggle view projection between "orthographic" and "perspective"
% (by Tim Lueth, VLFL-Lib, 2024-MAI-22 as class: VISUALIZATION)
%
% During design of technical components the orthographic makes more sense
% for view(0,0), view(0,90) etc. (Status of: 2024-05-26)
%
% Introduced first in SolidGeometry 5.4
%
% See also: app_2012_11_09, view
%
% toggleviewprojection
%
% EXAMPLE:
% SGbox
% toggleviewprojection
% toggleviewprojection
%
% See also: app_2012_11_09, view
%
%
% Copyright 2024 Tim C. Lueth

SGspringSpiralbolt(Db,FA,LA,HS,"STL","ccw")- creates the shaft-axis combination for a commercial windup motor spring (80% fillin)

SGspringSpiralbolt(Db,FA,LA,HS,% SGspringSpiralbolt(Db,FA,LA,HS,"STL","ccw") - creates the shaft-axis combination for a commercial windup motor spring (80% fillin)
% (by Tim Lueth, VLFL-Lib, 2024-MAI-19 as class: PARAMETRIC DESIGN)
%
% Really usefull with 80% fillin. Ugly code for an commercial coil spring
% but very powerful for windup motors with free wheel. In general it is
% possible to print also a coil spring using SGspringSpiral. Nevertheless
% a commercial coil spring from spring steel (60Si2Mn) is much better.
% Try also ">> productcode spring"
% In case of overload at 80% infill the slot works like a spring and will
% let the socket wrench jump. In case of 20% infill the bold will be
% destroyed (Status of: 2024-06-13)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGmotorwindup, SGfreewheel, SGspringSpiral, productcode,
% CPLspringSpiral
%
% [SGall,CPLN,CPLB,CPLS,CPLA]=SGspringSpiralbolt([Db,FA,LA,HS,"STL","ccw"
% ])
% === INPUT PARAMETERS ===
% Db: [center height strength; default is [12 6 0.7]
% FA: [Wrench size; edges; axis diameter edges]; default is [6.4 6 4.5 0]
% LA: shaft-below-spring shaft-above-spring axis above upper shaft];
% default is 10 5 25]
% HS: [x-size y-size hook-size distance hook-to center; default is [41 37
% 6 19]] for 35mm coil
% "STL": if used, the bolt is written as STL file
% "ccw": if used the housing is for ccw spring loading
% === OUTPUT RESULTS ======
% SGall: {Bolt Housing Spring} print bolt with 80% infill
% CPLN: Inner Contour of Housing
% CPLB: Contour of Bolt to fix the hook
% CPLS: Contour of shaft to remove
% CPLA: contour of axis to remove
%
% Additional Hyperlinks:
% Windup motor spring 35 x 6 x 0,7 mm, Windup motor spring 54 x 8 x 0.8 mm, Windup motor spring 40 x 8 x 0.8 mm
%
% EXAMPLE:
% productcode spring
% SGspringSpiralbolt([12 6 0.7],'',[10 5 25],'stl')
%
% See also: SGmotorwindup, SGfreewheel, SGspringSpiral, productcode,
% CPLspringSpiral
%
%
% Copyright 2024 Tim C. Lueth

SGblockundertable(LBH,"STL")- Simply a block when tables wobble on uneven surfaces

SGblockundertable(LBH,% SGblockundertable(LBH,"STL") - Simply a block when tables wobble on uneven surfaces
% (by Tim Lueth, VLFL-Lib, 2024-MAI-19 as class: PARAMETRIC DESIGN)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGcompass, SGboxMacmini, SGBAUHAUSdeskcylinder, SGBAUHAUSbox,
% SGjuicermachineclip, SGwebcamcover
%
% SGblockundertable([LBH,"STL"])
% === INPUT PARAMETERS ===
% LBH: [length width height wall-thickness height-x height-y; default is
% [40 25 4.5 2.4 10 2]
% "STL": if used, and STL file is written
%
% EXAMPLE:
% SGblockundertable
%
% See also: SGcompass, SGboxMacmini, SGBAUHAUSdeskcylinder, SGBAUHAUSbox,
% SGjuicermachineclip, SGwebcamcover
%
%
% Copyright 2024 Tim C. Lueth

SGgearchainstraight(SG,f)- brings all the axes of a gear chain in a straight line

SGgearchainstraight(SG,f)% SGgearchainstraight(SG,f) - brings all the axes of a gear chain in a straight line
% (by Tim Lueth, VLFL-Lib, 2024-MAI-17 as class: KINEMATICS AND FRAMES)
%
% Opposite of SGgearchainrotate
% written during ICRA 2024 Yokohama (Status of: 2024-05-17)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGgearchain, SGgearchainwindup, SGgearchainrotate
%
% SG=SGgearchainstraight(SG,f)
% === INPUT PARAMETERS ===
% SG: Cell list of gear wheel with base frames 'B'
% f: array of gear ration with respect to the 1st one f(1)==1
% === OUTPUT RESULTS ======
% SG: cell array of gears with modified position and rotation
%
% EXAMPLE:
% SGgearchain(1,[9 13 17 21],'',0); [SG,TL,f,SGR]=SGgearchain(1,[9 13 17 21],'','',0); % a gear chain
% SGgearchainrotate(SG,f,[pi/2]); SHN=ans;
% SGgearchainstraight(SGN,f)
%
% See also: SGgearchain, SGgearchainwindup, SGgearchainrotate
%
%
% Copyright 2024 Tim C. Lueth

SGgearchainrotate(SG,f,W,SGA)- rotates the axes of a gear chain

SGgearchainrotate(SG,f,W,SGA)% SGgearchainrotate(SG,f,W,SGA) - rotates the axes of a gear chain
% (by Tim Lueth, VLFL-Lib, 2024-MAI-17 as class: KINEMATICS AND FRAMES)
%
% The challange ist to turn the center of the wheels with the rotation of
% each predecessor axis rotation which will lead to a consequent
% rotatation of the following wheels to.
% written during ICRA 2024 Yokohama (Status of: 2024-05-18)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGgearchain, SGgearchainwindup, SGgearchainstraight
%
% [SG,SGA]=SGgearchainrotate(SG,f,W,[SGA])
% === INPUT PARAMETERS ===
% SG: Cell list of gear wheel with base frames 'B'
% f: array of gear ration with respect to the 1st one f(1)==1
% W: array of desired rotatation of the following axis
% SGA: cell array of correspponding wahser or axes to be moved with the
% gears
% === OUTPUT RESULTS ======
% SG: cell array of gears with modified position and rotation
% SGA: cell array of correspponding wahser or axes
%
% EXAMPLE:
% SGgearchain(1,[9 13 17 21],'',0); [SG,TL,f,SGR]=SGgearchain(1,[9 13 17 21],'','',0); % a gear chain
% SGgearchainrotate(SG,f,[pi/2]); SHN=ans;
% SGgearchainstraight(SGN,f)
%
% [SG,m,f,SGW]=SGgearchainwindup(1,[39 11 39 11 39 11],'stack'); view(0,0)
% SGgearchainrotate(SG,f,[pi/6],SGW)
%
% See also: SGgearchain, SGgearchainwindup, SGgearchainstraight
%
%
% Copyright 2024 Tim C. Lueth

SGgearchainwindup(mhr,z,"stack","shaft","debug","anime","backlash")- returns a gear chain for a windup motor or a minimal size gear box - use SGgearstamp afterwards

SGgearchainwindup(mhr,z,% SGgearchainwindup(mhr,z,"stack","shaft","debug","anime","backlash") - returns a gear chain for a windup motor or a minimal size gear box - use SGgearstamp afterwards
% (by Tim Lueth, VLFL-Lib, 2024-MAI-12 as class: KINEMATICS AND FRAMES)
%
% ..written in the plane to Yokohama (ICRA 2024) and during the ICRA 2024
% In contrast to SGgearchain, this fnctn has been reimplemented,
% especially to windup motors or the use of only two fixed axis, which
% could require the adjustment of the gear module in each gear pairing.
%
% module
% height of gear
% radius of axle == ATTENTION THERE IS THIS RADIUS AND "SHAFT" is
% ONLY FOR Gear #1
% height of rack
% (Status of: 2024-06-12)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGgearratio, CPLrack4PL, SGgearDINrot, SGgearchain,
% SGgearchainrotate, SGgearchainstraight, SGspringSpiralbolt,
% SGplotgears, SGgearstamp
%
% [SG,m,f,SGW,CPLW]=SGgearchainwindup([mhr,z,"stack","shaft","debug","ani
% me","backlash"])
% === INPUT PARAMETERS ===
% mhr: [m h r hr] of gear; default is [1 5 1.25 0]
% z: array of number of teeth
% "stack": if used the gears will be stacked as desired
% "shaft": if used this radius or CPL will be used for 1st and last
% "debug": if used the design will me shown
% "anime": if used the gearbox will be animated
% "backlash": if used the module is reduced to achieve a slot with the
% given value
% === OUTPUT RESULTS ======
% SG: cell list of gears
% m: array of modules used
% f: ratio factor of the gears
% SGW: cell list of washer or spacer for the gears in SG
% CPLW: Contour of the shaft spacer SGW
%
% EXAMPLE:
% SGgearchainwindup([1 5],[45 9 34 10]); % Linear Chain
% SGgearchainwindup([1 5],[45 9 34 10],'stack'); % Gear Box
%
% [SG,m,f,SGW]=SGgearchainwindup(1,[39 11 39 11 39 11],'stack'); view(0,0)
% SGgearchainrotate(SG,f,[pi/6],SGW)
%
% SGW=SGW(~isemptycell(SGW))
%
% See also: SGgearratio, CPLrack4PL, SGgearDINrot, SGgearchain,
% SGgearchainrotate, SGgearchainstraight, SGspringSpiralbolt,
% SGplotgears, SGgearstamp
%
%
% Copyright 2024 Tim C. Lueth

plotannotationtext(NAME,VALU)- create quick an efficient text to be used in combination with plotannotation

plotannotationtext(NAME,VALU)% plotannotationtext(NAME,VALU) - create quick an efficient text to be used in combination with plotannotation
% (by Tim Lueth, VLFL-Lib, 2024-MAI-08 as class: AUXILIARY PROCEDURES)
%
% annotating figures should be used more efficiently (Status of:
% 2024-06-11)
%
% Introduced first in SolidGeometry 5.4
%
% See also: plotannotation, plotannotatecolors, plotannotationdelete,
% plotannotationtopleft
%
% txt=plotannotationtext([NAME,VALU])
% === INPUT PARAMETERS ===
% NAME: 1st and each second are the names of variables
% VALU: 2nd and each second are values of variables
% === OUTPUT RESULTS ======
% txt: char array
%
% EXAMPLE:
% plotannotationtext('CYAN','Spring','YELLOW','Cage','GREEN','Lid (optional)','RED',0.03,'BLUE',1.23e9)
% txt=ans;
% figure; plotannotation(txt);
%
% See also: plotannotation, plotannotatecolors, plotannotationdelete,
% plotannotationtopleft
%
%
% Copyright 2024 Tim C. Lueth

CPLcopyunionradial(CPL,ofs,n)- creates radial copies and unifies

CPLcopyunionradial(CPL,ofs,n)% CPLcopyunionradial(CPL,ofs,n) - creates radial copies and unifies
% (by Tim Lueth, VLFL-Lib, 2024-MAI-08 as class: CLOSED POLYGON LISTS)
%
% Does rotate the contour (Status of: 2024-05-08)
%
% Introduced first in SolidGeometry 5.4
%
% See also: CPLcopypattern, CPLcopypatternPL, CPLcopyradial
%
% CPLN=CPLcopyunionradial([CPL,ofs,n])
% === INPUT PARAMETERS ===
% CPL: Contour to copy; default is PLsquare (2 10)
% ofs: Radius; offset in [x and y] default is [0 8]
% n: radius segments; default is 16
% === OUTPUT RESULTS ======
% CPLN: Final contour
%
% EXAMPLE:
% CPLcopyunionradial(PLsquare([2 10]),[0 8],16)
% CPLcopyunionradial(PLsquare([2 10]),[3 8],16)
%
% See also: CPLcopypattern, CPLcopypatternPL, CPLcopyradial
%
%
% Copyright 2024 Tim C. Lueth

PLwedgeoncircle(R,h,w)- Design a wedge for a circular movement

PLwedgeoncircle(R,h,w)% PLwedgeoncircle(R,h,w) - Design a wedge for a circular movement
% (by Tim Lueth, VLFL-Lib, 2024-MAI-08 as class: CLOSED POLYGON LISTS)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGfreewheel
%
% PL=PLwedgeoncircle([R,h,w])
% === INPUT PARAMETERS ===
% R: Radius; default is 20
% h: [wedge-height-above wedge-below-circle]
% w: angle segment of wedge; default is 2*pi / 16
% === OUTPUT RESULTS ======
% PL: Wedge contour
%
% EXAMPLE:
% PLwedgeoncircle(5,[1 .3],2*pi/16)
%
% See also: SGfreewheel
%
%
% Copyright 2024 Tim C. Lueth

SGfreewheel(Do,SS,"STL","ccw")- Creates a freewheel for a wind up motor

SGfreewheel(Do,SS,% SGfreewheel(Do,SS,"STL","ccw") - Creates a freewheel for a wind up motor
% (by Tim Lueth, VLFL-Lib, 2024-MAI-07 as class: AUTOMATIC DESIGN)
%
% This fnctn creates a freewheel consisting of two elements. An outer
% ring, which is later connected to a gear wheel, and an inner ring,
% which is fixed to the driven shaft. The fnctn can be coupled with the
% SGspringSpiral and is part of the SGmotorwindup fnctn
% In combination with SGspringSpiral, the usage of "ccw" must be the same
% for both: SGspringSpiral, and SGfreewheel (Status of: 2024-05-26)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGmotorwindup, SGspringSpiral, SGspringSpiralbolt
%
% SG=SGfreewheel([Do,SS,"STL","ccw"])
% === INPUT PARAMETERS ===
% Do: [% Diameter Height Thickness fixed hooks cavitiesperhook spring
% thickness] default is [30 5 3 1.2 3 8 1]
% SS: Shaft description ; please add transition fitting values
% "STL": if used; all STL files are written into a folder
% "ccw": if used, the freewheel (winding) is in the counter-clockwise
% direction - Not really required
% === OUTPUT RESULTS ======
% SG: {Inner Ring, Outer Ring}
%
% EXAMPLE:
% SGfreewheel([30 10 3 1.2 6 4])
%
% See also: SGmotorwindup, SGspringSpiral, SGspringSpiralbolt
%
%
% Copyright 2024 Tim C. Lueth

SGmotorwindup(SP,AX,fgns,"nocage","axis4","frontw","STL","anime","P")- creates wind up motor with a 3d printed spring

SGmotorwindup(SP,AX,fgns,% SGmotorwindup(SP,AX,fgns,"nocage","axis4","frontw","STL","anime","P") - creates wind up motor with a 3d printed spring
% (by Tim Lueth, VLFL-Lib, 2024-MAI-07 as class: PARAMETRIC DESIGN)
%
% windup with the socketspanner is in cw direction on the cage side
% there is also "debug" if used the construction will be shown in steps
% (Status of: 2024-06-06)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGwrenchsocketspanner, SGspringSpiral, SGspringSpiralbolt
%
% SGall=SGmotorwindup([SP,AX,fgns,"nocage","axis4","frontw","STL","anime"
% ,"Gmotorwindup"])
% === INPUT PARAMETERS ===
% SP: Springparameter as in SGspringSpiral; default is [30,5,0.8,5]
% AX: Axis description such as last parameter in SGspringSpiral; default
% is [6.4 6 5 0]
% fgns: gear ratio and stack level; default is [0 3]; 0 stands for
% default values
% "nocage": if used the gears are not covered by the rack
% "axis4": if used and value <>0 a 4th axis is integrated into the
% housing with shaft geometry
% "frontw": if used in combination with axis4 it has front wheel drive
% "STL": if used a directory with all parts is written to desktopdir
% "anime": if used without STL it animates the motor
% === OUTPUT RESULTS ======
% SGall: Cell list of parts
%
% EXAMPLE:
% SGmotorwindup(30,'stl','nocage'); % design a minimum size motor
% SGmotorwindup(30,'anime'); % animate the gear movemebts
% SGmotorwindup(30,'axis4',50); % this is now a car not only a motor
% SGmotorwindup(30,'axis4',50,'nocage'); % now the gear is not covered
%
% SGmotorwindup(30,'',[25 3],'axis4',50,'nocage'); % ration 25 on 3 levels
%
% See also: SGwrenchsocketspanner, SGspringSpiral, SGspringSpiralbolt
%
%
% Copyright 2024 Tim C. Lueth

SGofCPLreinforcement(CPL,f)- creates edge reinforcements based on a CPL

SGofCPLreinforcement(CPL,f)% SGofCPLreinforcement(CPL,f) - creates edge reinforcements based on a CPL
% (by Tim Lueth, VLFL-Lib, 2024-MAI-07 as class: SURFACES)
%
% Extracted from SGBAUHAUSbox
% The values for depth and radius can be negative numbers too (Status of:
% 2024-05-07)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGBAUHAUSbox
%
% F=SGofCPLreinforcement(CPL,[f])
% === INPUT PARAMETERS ===
% CPL: Edge contour (inner CPL for positive dept, outer CPL for negative
% depth)
% f: [depth heigh radius]; default is [5 5 0]
% === OUTPUT RESULTS ======
% F: Solid edge reinforcement
%
% EXAMPLE:
% CPLi=CPLsample(36)*5; SGofCPLz([CPLbuffer(CPLi,1);nan nan;CPLi],5); SG=ans;
% SGofCPLreinforcement(CPLi,[2 2 0]); SGplotalpha(SG,'g',0.5) % sharp edges
% SGofCPLreinforcement(CPLbuffer(CPLi,1),[-2 2 0]); SGplotalpha(SG,'g',0.5) % Outer contour
% SGofCPLreinforcement(CPLi,[2 2 1]); SGplotalpha(SG,'g',0.5) % radial edges
%
% SGofCPLreinforcement(CPLsample(30),[1 1])
%
% See also: SGBAUHAUSbox
%
%
% Copyright 2024 Tim C. Lueth

SGwrenchsocketspanner(Dnw,H,HN)- This is a socket spanner mit clearance fitting for screws

SGwrenchsocketspanner(Dnw,H,HN)% SGwrenchsocketspanner(Dnw,H,HN) - This is a socket spanner mit clearance fitting for screws
% (by Tim Lueth, VLFL-Lib, 2024-MAI-07 as class: PARAMETRIC DESIGN)
%
% Alternatively, a solid can be transferred directly instead of the
% parameters for an inner bus, the contour of which is then transferred
% to a handle (Status of: 2024-10-24)
%
% Introduced first in SolidGeometry 5.4
%
% See also: PLwrench, SGspringSpiral
%
% SG=SGwrenchsocketspanner([Dnw,H,HN])
% === INPUT PARAMETERS ===
% Dnw: [wrench-diameter, n-edges, wall]; default is [6.4 6 2.4] OR solid
% H: Height of Tube; default is 30
% HN: [Length Width Height] of handle; default is [30 5 10]
% === OUTPUT RESULTS ======
% SG: Solid Geometry of Wrench socket spanner
%
% EXAMPLE:
% SGwrenchsocketspanner('',15); SG=ans % Short spanner
% SGtorquelimiteraxial([25 15]/2, 12,5,1,'sin'); SG=SGrotate(ans,'x',pi);
% SGwrenchsocketspanner(SG,15); SGN=ans % Short spanner
%
%
% See also: PLwrench, SGspringSpiral
%
%
% Copyright 2024 Tim C. Lueth

SGcreatebin2mfile (binfile)- reads any file, and writes a matlab fnct that can create a copy of this file

SGcreatebin2mfile (binfile)% SGcreatebin2mfile (binfile) - reads any file, and writes a matlab fnct that can create a copy of this file
% (by Tim Lueth, VLFL-Lib, 2024-APR-21 as class: FILE HANDLING)
%
% reads in any file from disk and converts the binary code into hexcode.
% This hexcode is automatically written with some additional code lines
% into an executable m-file with the same name.
%
% If the m file is executed a copy of the binary file is created by the m
% file in the desktopdir.
%
% This fnctn was written to create on deman different 3mf files in
% different folder formats for different purposes without knowing exactly
% the structure of the 3mf (zip) archive
%
% An earlier concept for ascii code was convertCode2String,
% smbPSLibCreateBlock, smbPSLibCompile, smbPSLibInstall for the simscape
% multi body simulation (Status of: 2024-05-09)
%
% Introduced first in SolidGeometry 5.4
%
% See also: str2hexsstr, hexstr2str, smbPSLibCreateBlock,
% smbPSLibCompile, convertCode2String, smbPSLibInstall
%
% SGcreatebin2mfile(binfile)
% === INPUT PARAMETERS ===
% binfile: name of a binay file on disk
%
% EXAMPLE:
% SGcreatebin2mfile('/Volumes/LUETH-WIN/WIN AIM Matlab Libraries/SolidGeometry-Code/Bambu.3mf')
%
% See also: str2hexsstr, hexstr2str, smbPSLibCreateBlock,
% smbPSLibCompile, convertCode2String, smbPSLibInstall
%
%
% Copyright 2024 Tim C. Lueth

SGmakerworld()- Simply opens the WWW-page of grabcad.com in the system browser

SGmakerworld()% SGmakerworld() - Simply opens the WWW-page of grabcad.com in the system browser
% (by Tim Lueth, VLFL-Lib, 2024-APR-20 as class: AUXILIARY PROCEDURES)
%
% Use "CAD Exchanger" to convert IGES to STEP to STL
% While GrabCAD shows objects that cannot be printed, MAKERWORLD is
% created for printable STL files
% There are 7 years delay between GrabCAD and MAKERWORLD to learn that
% only printable CAD models make sense (Status of: 2024-04-20)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGgrabcad, SG_DBconnectors.mat, SG_Patientknee.mat, DeepL
%
% SGmakerworld([])
%
% EXAMPLE:
% SGmakerworld
% SGmakerworld('servo') % Searches for STL Files of Servo
%
% See also: SGgrabcad, SG_DBconnectors.mat, SG_Patientknee.mat, DeepL
%
%
% Copyright 2024 Tim C. Lueth

FTSCScmdfindserial(btab)- Searches for an URT-1 Board, tries different baud rates and searches for connected motors

FTSCScmdfindserial(btab)% FTSCScmdfindserial(btab) - Searches for an URT-1 Board, tries different baud rates and searches for connected motors
% (by Tim Lueth, VLFL-Lib, 2024-APR-09 as class: SERIAL-ROBOTICS)
%
% Introduced first in SolidGeometry 5.4
%
% See also: FTSCScmd, FTSCSdata, FTSCSmotorlist
%
% [ID,COM1]=FTSCScmdfindserial([btab])
% === INPUT PARAMETERS ===
% btab: list of baudrates; default is [1000000, 500000, 250000, 128000,
% 115200, 76800, 57600, 38400]
% === OUTPUT RESULTS ======
% ID: ID of the connected motors
% COM1: open serial port if motors were found
%
% EXAMPLE:
% global COM1, clear COM1
% [ID,COM1]=FTSCScmdfindserial
%
% See also: FTSCScmd, FTSCSdata, FTSCSmotorlist
%
%
% Copyright 2024 Tim C. Lueth

FTSCSmotorlist(COM1)- Searches for Motor ID connected to the FeeTEch URT-1 Board after opening the serial port

FTSCSmotorlist(COM1)% FTSCSmotorlist(COM1) - Searches for Motor ID connected to the FeeTEch URT-1 Board
% (by Tim Lueth, VLFL-Lib, 2024-APR-09 as class: SERIAL-ROBOTICS)
%
% This fnctn simple pings the motor IDs 0:250 to find connected motors.
% This fnctn is used in FTSCScmdfindserial
% (Status of: 2024-04-09)
%
% Introduced first in SolidGeometry 5.4
%
% See also: FTSCScmd, FTSCSdata, FTSCScmdfindserial
%
% ID=FTSCSmotorlist(COM1)
% === INPUT PARAMETERS ===
% COM1: Already Open Serial Port
% === OUTPUT RESULTS ======
% ID: array of IDs
%
% EXAMPLE:
% COM1=serialport("/dev/cu.usbserial-840",115200)
% ID=FTSCSmotorlist(COM1)
%
%
% See also: FTSCScmd, FTSCSdata, FTSCScmdfindserial
%
%
% Copyright 2024 Tim C. Lueth

FTSCSdata(datarec,typ)- converts read data from the URT-1 board into the data format

FTSCSdata(datarec,typ)% FTSCSdata(datarec,typ) - converts read data from the URT-1 board into the data format
% (by Tim Lueth, VLFL-Lib, 2024-APR-03 as class: SERIAL-ROBOTICS)
%
% Introduced first in SolidGeometry 5.4
%
% See also: FTSCScmd, read, write
%
% data=FTSCSdata(datarec,[typ])
% === INPUT PARAMETERS ===
% datarec: data received from the URT-1 board by the read fnctn; cell
% array if there are several answers
% typ: data type such 'unit8' or 'uint16', default is 'uint8'
% === OUTPUT RESULTS ======
% data: data in the type format
%
% EXAMPLE:
% COM1=serialport("/dev/cu.usbserial-840",115200)
% [a,b]=FTSCScmd(1,21,'',2,3) % read 3 data sets for PID of motor 1
% write(COM1,a,'uint8'); % 'unit8' is mandatory for URT-1 Board
% zz=read(COM1,COM1.NumBytesAvailable,'uint8') % 'unit8' is mandatory for URT-1 Board
% FTSCSdata(zz,'unit8') % some parameters are uint8 some are uint16
%
% See also: FTSCScmd, read, write
%
%
% Copyright 2024 Tim C. Lueth

FTSCScmd(servoID,MemAddr,data,Fun,getd)- returns the command sequence for the FeeTech SCS RSC 485 Protocol of the URT-1 Board

FTSCScmd(servoID,MemAddr,data,Fun,getd)% FTSCScmd(servoID,MemAddr,data,Fun,getd) - returns the command sequence for the FeeTech SCS RSC 485 Protocol of the URT-1 Board
% (by Tim Lueth, VLFL-Lib, 2024-APR-03 as class: SERIAL-ROBOTICS)
%
% Support by Sebastian Heininger of ERGOSURG GmbH Ismaning
% Fnctn table
% 1 = PING
% 2 = READ
% 3 = WRITE
% 4 = REG WRITE
% 5 = ACTION
% 6 = RESET
% 10 = ANGLE RESET
% 131= SYNC Write
% (Status of: 2024-04-05)
%
% Introduced first in SolidGeometry 5.4
%
% See also: FTSCSdata
%
% [cmd,str]=FTSCScmd([servoID,MemAddr,data,Fun,getd])
% === INPUT PARAMETERS ===
% servoID: ServoID; default is 1
% MemAddr: Memory Address; default is 42
% data: uint16 data to write; default is empty
% Fun: default is 3 for write
% getd: number of uint16 to read
% === OUTPUT RESULTS ======
% cmd: uint8 data array to send using write
% str: Hex string for documentation
%
% EXAMPLE:
% COM1=serialport("/dev/cu.usbserial-840",115200)
% [a,b]=FTSCScmd(1,21,'',2,3) % read 3 data sets for PID of motor 1
% write(COM1,a,'uint8'); % 'unit8' is mandatory for URT-1 Board
% zz=read(COM1,COM1.NumBytesAvailable,'uint8') % 'unit8' is mandatory for URT-1 Board
% FTSCSdata(zz,'unit8') % some parameters are uint8 some are uint16
%
% See also: FTSCSdata
%
%
% Copyright 2024 Tim C. Lueth

hexstr2uint8(STR)- converts a hexadecimal string into a uint8 array

hexstr2uint8(STR)% hexstr2uint8(STR) - converts a hexadecimal string into a uint8 array
% (by Tim Lueth, VLFL-Lib, 2024-APR-03 as class: AUXILIARY PROCEDURES)
%
% used for the communication with the FeeTech URT-1 Board SCS-Protocoll
% (Status of: 2024-04-03)
%
% Introduced first in SolidGeometry 5.4
%
% See also: hexstr2str, str2hexsstr, dec2hex
%
% [U8,CSHex]=hexstr2uint8(STR)
% === INPUT PARAMETERS ===
% STR: string or char array with ot without spaces
% === OUTPUT RESULTS ======
% U8: Uint8 array of the hex data
% CSHex: Checksum in Hexadecimal
%
% EXAMPLE:
% hexstr2uint8("FFFF0105032A0010")
% hexstr2uint8("FF FF 01 05 03 2A 00 10")
% [a,b]=hexstr2uint8('FF FF 01 05 03 2A 00 10'), c=reshape(dec2hex(a)',[],1)'
%
% See also: hexstr2str, str2hexsstr, dec2hex
%
%
% Copyright 2024 Tim C. Lueth

raamboGET(cmd)- Same as raamboSET but without setting values

raamboGET(cmd)% raamboGET(cmd) - Same as raamboSET but without setting values
% (by Tim Lueth, VLFL-Lib, 2024-MÄR-10 as class: SERIAL-ROBOTICS)
%
% =======================================================================
% REMOVED FROM LIBRARY (2024-04-05) - WILL NOT BE PART OF FINAL RELEASE
% =======================================================================
%
% Introduced first in SolidGeometry 5.4
%
% See also: raamboSET
%
% x=raamboGET([cmd])
% === INPUT PARAMETERS ===
% cmd: command list same as raamboSET
% === OUTPUT RESULTS ======
% x: result devlivered by the raambo firmware
%
% See also: raamboSET
%
%
% Copyright 2024 Tim C. Lueth

raambostartup(pose)- sets important parameter for experiments with the Raambo Robot

raambostartup(pose)% raambostartup(pose) - sets important parameter for experiments with the Raambo Robot
% (by Tim Lueth, VLFL-Lib, 2024-MÄR-10 as class: SERIAL-ROBOTICS)
%
% uses the fnctn raamboSET for setting different useful parameters first
% and move the robot into a sepcified pose (Status of: 2024-04-05)
%
% Introduced first in SolidGeometry 5.4
%
% See also: raambocommandline, raamboscreen, raamboSET, raamboGET
%
% raambostartup([pose])
% === INPUT PARAMETERS ===
% pose: 'straight', 'sleep', array of encoder goal positions
%
% EXAMPLE:
% global RAPORT; RAPORT=serialport('/dev/tty.usbmodem21201',230400);
% raambostartup
% raambostartup('straight')
% raambostartup('sleep')
% raambostartup([2000 2000 2000 2000])
%
% See also: raambocommandline, raamboscreen, raamboSET, raamboGET
%
%
% Copyright 2024 Tim C. Lueth

raamboSET(cmd,val,mot)- sends robot cmommands throught the global RAPORT to a Raambo-Robot

raamboSET(cmd,val,mot)% raamboSET(cmd,val,mot) - sends robot cmommands throught the global RAPORT to a Raambo-Robot
% (by Tim Lueth, VLFL-Lib, 2024-MÄR-10 as class: SERIAL-ROBOTICS)
%
% this is to avoid using raambocommandline or raamboscreen
% Raambo Arduino Firmware based communication
% On Mac/OSX use /dev/tty.usb* for Arduino (Modem DCD) and /dev/cu.usb*
% for URT-1 communication (Status of: 2024-04-04)
%
% Introduced first in SolidGeometry 5.4
%
% See also: raambostartup, raambocommandline, raamboscreen, raamboGET
%
% x=raamboSET([cmd,val,mot])
% === INPUT PARAMETERS ===
% cmd: cmd such as "?", or speed, goal, pos
% val: value for all or one motor
% mot: selection of motors to be addressed
% === OUTPUT RESULTS ======
% x: result devlivered by the raambo firmware
%
% EXAMPLE:
% global RAPORT; RAPORT=serialport('/dev/tty.usbmodem21201',230400);
% raamboSET('I',0), raamboSET('D',0), raamboSET('torque',300), raamboSET('speed',10)
% raamboSET('goal',2000) % Straight up
% raamboSET('goal',1800) % Straight up
% raamboSET('goal',2200) % Straight up
%
%
%
% See also: raambostartup, raambocommandline, raamboscreen, raamboGET
%
%
% Copyright 2024 Tim C. Lueth

SGmusicstandextension(L,"STL")- supplies extension elements for an orchestra music stand

SGmusicstandextension(L,% SGmusicstandextension(L,"STL") - supplies extension elements for an orchestra music stand
% (by Tim Lueth, VLFL-Lib, 2024-MÄR-08 as class: PARAMETRIC DESIGN)
%
% A very popular music stand comes from the company Thomann. It is
% possible to open A4 music books and use them on the music stand.
% However, if you want to use sheet music from 4 A4 sheets next to each
% other, the music stand is not wide enough. The extension pieces for
% this fnctn fit into the grid of holes in the back plate and can be
% attached or removed by turning them 90 degrees. (Status of:
% 2024-03-09)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGmultisocketclamp, SGadapterHandrailold
%
% SGmusicstandextension([L,"STL"])
% === INPUT PARAMETERS ===
% L: Length of the extension default is 240 => 240-70 = 17cm extension on
% the left and right
% "STL": if used, an STL file is written on desk
%
% Additional Hyperlinks:
% Thomann Orchesterpult Deluxe
%
% See also: SGmultisocketclamp, SGadapterHandrailold
%
%
% Copyright 2024 Tim C. Lueth

raamboscreen(PORT)- implements a character based communication to a Raambo®-Robot via serial link (USB)

raamboscreen(PORT)% raamboscreen(PORT) - implements a character based communication to a Raambo®-Robot via serial link (USB)
% (by Tim Lueth, VLFL-Lib, 2024-MÄR-02 as class: SERIAL-ROBOTICS)
%
% does not complety work like screen, but the most possible terminal in
% Matlab (Status of: 2024-03-03)
%
% Introduced first in SolidGeometry 5.4
%
% See also: serialport, raambocommandlines, readkeyboardchar
%
% raamboscreen(PORT)
% === INPUT PARAMETERS ===
% PORT: already opened PORT such as COM1 or /dev/tty.usb11001
%
% EXAMPLE: %% Unplug and plugin cable to the robot on robot side first
% COM1=serialport('/dev/tty.usbmodem21201',230400);
% raamboscreen(COM1);
%
% See also: serialport, raambocommandlines, readkeyboardchar
%
%
% Copyright 2024 Tim C. Lueth

raambocommandlines(PORT)- implements a command line based communication to a Raambo®-Robot via serial link (USB)

raambocommandlines(PORT)% raambocommandlines(PORT) - implements a command line based communication to a Raambo®-Robot via serial link (USB)
% (by Tim Lueth, VLFL-Lib, 2024-MÄR-02 as class: SERIAL-ROBOTICS)
%
% fnctn
% 1st reads out text from the serial link and prints it using printf
% 2nd reads in a text line using matlabs input(,'s') command
% 3rd sends it to the robot via serial link
% 4th reads out text from the serial link and prints it using printf
% (Status of: 2024-03-03)
%
% Introduced first in SolidGeometry 5.4
%
% See also: serialport, raamboscreen
%
% raambocommandlines(PORT)
% === INPUT PARAMETERS ===
% PORT: already opened PORT such as COM1 or /dev/tty.usb11001
%
% EXAMPLE: %% Unplug and plugin cable to the robot on robot side first
% COM1=serialport('/dev/tty.usbmodem21201',230400);
% raambocommandlines(COM1);
%
%
% See also: serialport, raamboscreen
%
%
% Copyright 2024 Tim C. Lueth

readkeyboardchar(cmdarray)- reads a single keyboard key or returns empty

readkeyboardchar(cmdarray)% readkeyboardchar(cmdarray) - reads a single keyboard key or returns empty
% (by Tim Lueth, VLFL-Lib, 2024-MÄR-02 as class: USER INTERFACE)
%
% THIS fnctn readkeyboardchar is used for the serial robotics terminal
% communication.
% In contrast to getkeyboardchar, this fnctn does not wait.
% A problem is, that the key is plotted in the command window. (Status
% of: 2024-03-03)
%
% Introduced first in SolidGeometry 5.4
%
% See also: getkeyboardchar
%
% [cc,cmdarray]=readkeyboardchar(cmdarray)
% === INPUT PARAMETERS ===
% cmdarray: optional keyboard buffer to extend OR false for delete
% keyboard buffer
% === OUTPUT RESULTS ======
% cc: last char or empty
% cmdarray: keyboard including last char
%
% EXAMPLE:
% [a,b]=readkeyboardchar(false); while ~isequal(a,char(13)); [a,b]=readkeyboardchar(b);end; b, uint8(b)
%
% See also: getkeyboardchar
%
%
% Copyright 2024 Tim C. Lueth

SGaddsurfpoints(SG,alpha,ds,dx,dy)- adds gridpoints at surfaces and edges at all surfaces

SGaddsurfpoints(SG,alpha,ds,dx,dy)% SGaddsurfpoints(SG,alpha,ds,dx,dy) - adds gridpoints at surfaces and edges at all surfaces
% (by Tim Lueth, VLFL-Lib, 2024-FEB-18 as class: SURFACES)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGremsurfpoints, SGalphaShape, SGremsurfedgepoints,
% SGremedgepoints
%
% SGN=SGaddsurfpoints(SG,[alpha,ds,dx,dy])
% === INPUT PARAMETERS ===
% SG: Solid geometry
% alpha: angle for surface differentiation; default is 0.01
% ds: distance on edges; default is
% dx: distance in x; default is 1
% dy: distance in y; default is dx
% === OUTPUT RESULTS ======
% SGN: Solid geometry with additional points on edges and surfaces
%
% EXAMPLE:
% XXX=SGaddsurfpoints(SGsample(16),'',1,1,1); dbplot(XXX);
%
% XXX=SGaddsurfpoints(SGsample(16),'',[1 2 1]); dbplot(XXX);
%
% See also: SGremsurfpoints, SGalphaShape, SGremsurfedgepoints,
% SGremedgepoints
%
%
% Copyright 2024 Tim C. Lueth

VLisonCVL(CVL,PL,tol)- returns wether a point is on a segment of a CVL or CPL

VLisonCVL(CVL,PL,tol)% VLisonCVL(CVL,PL,tol) - returns wether a point is on a segment of a CVL or CPL
% (by Tim Lueth, VLFL-Lib, 2024-FEB-15 as class: CLOSED POLYGON LISTS)
%
% MUST DISTINGUISH between open and closed lines
% exists also as distanceVLtoVLEL 2018-MÄR-11 with tolerances
% (Status of: 2024-02-18)
%
% Introduced first in SolidGeometry 5.4
%
% See also: CPLinsideCPL, insideCPS, insidePLEL, distanceVLtoVLEL
%
% [ci,tp]=VLisonCVL([CVL,PL,tol])
% === INPUT PARAMETERS ===
% CVL: CPL or CVL
% PL: PL or VL
% tol: if tol > 0; fnctn distanceVLtoVLEL is used; default is 0; much
% faster with 0
% === OUTPUT RESULTS ======
% ci: index of PL
% tp: matrix of PL and segment list of CVL
%
% EXAMPLE:
% CVL=CVLsample(17); [a,b]=VLisonCVL(CVL,CVL([1 28 38],:)), VLisonCVL(CVL,CVL([1 28 38],:));
% VLisonCVL(CVL,[4 4 4]);
% CVL=CVLsample(17); VLisonCVL(CVL,CVL([1 28 39],:)+0.01,0.1); [a,b]=VLisonCVL(CVL,CVL([1 28 38],:)+0.01,0.1)
%
% See also: CPLinsideCPL, insideCPS, insidePLEL, distanceVLtoVLEL
%
%
% Copyright 2024 Tim C. Lueth

SGrescBox(s,"STL")- Creates for the iMedCap Rescue Robotics Project a 1:10 Model of the Patient Box

SGrescBox(s,% SGrescBox(s,"STL") - Creates for the iMedCap Rescue Robotics Project a 1:10 Model of the Patient Box
% (by Tim Lueth, VLFL-Lib, 2024-FEB-14 as class: PARAMETRIC DESIGN)
%
% Uses SGcutTinsertpins to make the model printable as FDM (Status of:
% 2024-02-15)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGcutTinsertpins
%
% SG=SGrescBox([s,"STL"])
% === INPUT PARAMETERS ===
% s: [length width height ramp profile]; default is [220 70 75 70 4] or so
% "STL": if used, the box is separated writen to an STL-Directory
% === OUTPUT RESULTS ======
% SG: Cell list of Solids {front-red, back-green}
%
% EXAMPLE:
% SGrescBox; dbplot(ans);
%
% See also: SGcutTinsertpins
%
%
% Copyright 2024 Tim C. Lueth

XPSrulechecker(ops)- checks XPS rules for easy human errors during rule definition

XPSrulechecker(ops)% XPSrulechecker(ops) - checks XPS rules for easy human errors during rule definition
% (by Tim Lueth, VLFL-Lib, 2024-JAN-28 as class: ARTIFICIAL INTELLIGENCE)
%
% under constant development (Status of: 2024-02-03)
%
% Introduced first in SolidGeometry 5.4
%
% See also: XPSblocksworldequation, XPSlawcase, XPSblocksworld,
% XPSslidingpuzzle
%
% XPSrulechecker(ops)
% === INPUT PARAMETERS ===
% ops: STRIPS rules [Action, Condition-List, Add-list, Delete-list,
% NOT-Condition-List]
%
% See also: XPSblocksworldequation, XPSlawcase, XPSblocksworld,
% XPSslidingpuzzle
%
%
% Copyright 2024 Tim C. Lueth

XPSslidingpuzzle- Expert System implementing the first General Problem Solver (AI Programm)

XPSslidingpuzzle% XPSslidingpuzzle - Expert System implementing the first General Problem Solver (AI Programm)
% (by Tim Lueth, VLFL-Lib, 2024-JAN-08 as class: ARTIFICIAL INTELLIGENCE)
%
% This creates simple the test data for the GPS=AI with respect to to
% Peter Norvig (1991) similar to XPSblocksworld
% Please test also uncomplete goal conditions such as "space on 4"
% (Status of: 2024-01-10)
%
% Introduced first in SolidGeometry 5.4
%
% See also: XPSGPS, XPSEQS, XPSblocksworld
%
% LITERATURE:
% - Norvig, Peter (1991): Paradigms of Artificial Intelligence
% Programming, Morgan Kaufmann Publisher, San Mateo, CA, USA
% - Korf, R., and Schultze, P. 2005. Large-scale parallel breadth-first
% search. In Proceedings of the 20th National Conference on Artificial
% Intelligence (AAAI-05), 1380–1385.
%
% [ops,start,goal]=XPSslidingpuzzle
% === OUTPUT RESULTS ======
% ops: cell list [n x 4] describing action-name, precondition, add-state,
% diff-state
% start: string array describing the start state
% goal: string array describing the final state
%
% EXAMPLE:
% [ops,start,goal]=XPSslidingpuzzle % Example efinitions of operators start-state and goal-state
% XPSEQS(ops,start, goal, 'debug') % takes very very long
% XPSEQS(ops,start, ["space on 6"], 'debug');
% [a,b,c,d]=XPSEQS(ops,start, ["space on 6"], 'debug','first'); % 4 seconds
% tic; [a,b,c,d]=XPSEQS(ops,start, ["space on 6" "A on 4"], 'first'); toc % 90 seconds
%
% See also: XPSGPS, XPSEQS, XPSblocksworld
%
%
% Copyright 2024 Tim C. Lueth

CPLbox(sze,txt)- create a CPL of a square including text

CPLbox(sze,txt)% CPLbox(sze,txt) - create a CPL of a square including text
% (by Tim Lueth, VLFL-Lib, 2023-DEZ-23 as class: CLOSED POLYGON LISTS)
%
% Useful for the box world domain. Slow fnctn because of CPLoftext
% (Status of: 2023-12-29)
%
% Introduced first in SolidGeometry 5.4
%
% See also: PLsquare, CPLoftext, CPLfitsinCPL
%
% CPL=CPLbox([sze,txt])
% === INPUT PARAMETERS ===
% sze: [x y]; default is 10
% txt: chars for labeling
% === OUTPUT RESULTS ======
% CPL: CPL of Contour
%
% EXAMPLE:
% CPL=CPLbox(10,'A'); SGfigure(0,90); CPSplot(CPL);
% CPLbox([30 20],'test')
% CPLbox([300 20],'Table');
%
%
% See also: PLsquare, CPLoftext, CPLfitsinCPL
%
%
% Copyright 2023 Tim C. Lueth

exp_2023_12_21block- EXPERIMENT TO CREATE AND DETECT SITUATONS IN BLOCK WORLD PROBLEMS

exp_2023_12_21block% exp_2023_12_21block - EXPERIMENT TO CREATE AND DETECT SITUATONS IN BLOCK WORLD PROBLEMS
% (by Tim Lueth, VLFL-Lib, 2023-DEZ-21 as class: EXPERIMENTS)
%
% Introduced first in SolidGeometry 5.4
%
% exp_2023_12_21block
%
%
% Copyright 2023 Tim C. Lueth

CPLobjects2cells(CPL)- returns CPL as cell list of CPLs separated by not-overlapping outer-border CPLs

CPLobjects2cells(CPL)% CPLobjects2cells(CPL) - returns CPL as cell list of CPLs separated by not-overlapping outer-border CPLs
% (by Tim Lueth, VLFL-Lib, 2023-DEZ-20 as class: CLOSED POLYGON LISTS)
%
% reverse fnctn is: CPLcell2NaN
% (Status of: 2023-12-20)
%
% Introduced first in SolidGeometry 5.4
%
% See also: CPLsortinout, CPLregions, PSregions, CPLcellobjects,
% CPLcell2NaN, CPLregions2cell
%
% CPLN=CPLobjects2cells(CPL)
% === INPUT PARAMETERS ===
% CPL: NaN separated CPL
% === OUTPUT RESULTS ======
% CPLN: cell list of CPLs separated by not-overlapping outer-border CPLs
%
% EXAMPLE: CPLbox('','A'); A=ans; CPLbox('','B'); B=ans; CPLbox('','C'); C=ans; CPLbox('','D'); D=ans;
% CPLbox([70 5],'table'); T=ans;
% CPLarrange({A,B,C,D},T,'ontop',1,'add'); CPL=ans; SGfigure; CPSplot(CPL);
% CPLobjects2cells(CPL), CPLN=ans;
%
% See also: CPLsortinout, CPLregions, PSregions, CPLcellobjects,
% CPLcell2NaN, CPLregions2cell
%
%
% Copyright 2023 Tim C. Lueth

CPLselectspatial(CPL,rel,"object")- selects parts of CPL based on spatial or other relations

CPLselectspatial(CPL,rel,% CPLselectspatial(CPL,rel,"object") - selects parts of CPL based on spatial or other relations
% (by Tim Lueth, VLFL-Lib, 2023-DEZ-20 as class: ARTIFICIAL INTELLIGENCE)
%
% Very powerful and comprehension-enhancing fnctn. This fnctn is under
% continous development
% Try maxy, miny, maxx, minx, equal, inout, areaascend, areadescend,
% equalobj, under, underobj, overobj,
% debug, ??? (Status of: 2023-12-29)
%
% Introduced first in SolidGeometry 5.4
%
% See also: selectNaN, CPLselectbynearestP, CPLselectbyP
%
% CPLA=CPLselectspatial(CPL,[rel,"object"])
% === INPUT PARAMETERS ===
% CPL: Closed Polygon List
% rel: spatial or other relation
% "object": if used objects instead of CPLs are used in general
% === OUTPUT RESULTS ======
% CPLA: Selected CPL
%
% EXAMPLE:
% CPLbox('','A'); A=ans; CPLbox('','B'); B=ans; CPLbox('','C'); C=ans; CPLbox('','D'); D=ans;
% CPLbox([10 3],'space'); S=ans; CPLbox([70 5],'table'); T=ans;
% CPLarrange({A,B,C,S},T,'ontop',1,'add'); CPL=ans; SGfigure; CPSplot(CPL);
% CPLselectspatial(CPL,'top','left',2)
% CPLselectspatial(CPL,'object','top','left',2)
% CPLselectspatial(CPL,'equalobj',C)
% CPLselectspatial(CPL,'object','overobj',T,'equalobj',A); % Gibt es ein Object A oberhalb von Table
% CPLselectspatial(CPL,'object','overobj',T,'left',2);
% CPLselectspatial(CPL,'overobj',T,'left',2);
% CPLselectspatial(CPL,'overobj',T,'left',2:200,'top',1);
% CPLselectspatial(CPL,'object','overobj',T,'equalobj',A); XXX=ans; CPLN=CPLsubtract(CPL,XXX); SGfigure; CPSplot(CPLN)
% YYY=CPLtransrelCPL(A,CPLselectspatial(CPL,'object','equalobj',B),'center','ontop',1); CPLunion(CPLN,YYY); CPLM=ans;
% SG=SGofCPLextrude(CPLM,10,'y'); SGfigure(SG);
%
% See also: selectNaN, CPLselectbynearestP, CPLselectbyP
%
%
% Copyright 2023-2024 Tim C. Lueth

CPLregions2cell(ps)- returns CPL as cell list of CPLs separated by not-overlapping outer-border CPLs

CPLregions2cell(ps)% CPLregions2cell(ps) - returns CPL as cell list of CPLs separated by not-overlapping outer-border CPLs
% (by Tim Lueth, VLFL-Lib, 2023-DEZ-20 as class: CLOSED POLYGON LISTS)
%
% reverse fnctn is: CPLcell2NaN
% (Status of: 2023-12-29)
%
% Introduced first in SolidGeometry 5.4
%
% See also: CPLsortinout, CPLregions, PSregions, CPLcellobjects,
% CPLcell2NaN
%
% CPL=CPLregions2cell(ps)
% === INPUT PARAMETERS ===
% ps: NaN separated CPL
% === OUTPUT RESULTS ======
% CPL: cell list of CPLs separated by not-overlapping outer-border CPLs
%
% EXAMPLE: CPLbox('','A'); A=ans; CPLbox('','B'); B=ans; CPLbox('','C'); C=ans; CPLbox('','D'); D=ans;
% CPLbox([70 5],'table'); T=ans;
% CPLarrange({A,B,C,D},T,'ontop',1,'add'); CPL=ans; SGfigure; CPSplot(CPL);
% CPLregions2cell(CPL), CPLN=ans;
%
% See also: CPLsortinout, CPLregions, PSregions, CPLcellobjects,
% CPLcell2NaN
%
%
% Copyright 2023 Tim C. Lueth

CPLisidenticalregistered(CPLA,CPLB,tol)- Compares two CPLS in the same orientation and size

CPLisidenticalregistered(CPLA,CPLB,tol)% CPLisidenticalregistered(CPLA,CPLB,tol) - Compares two CPLS in the same orientation and size
% (by Tim Lueth, VLFL-Lib, 2023-DEZ-20 as class: CLOSED POLYGON LISTS)
%
% Introduced first in SolidGeometry 5.4
%
% See also: TregisterConvexHull, CPLisidenticalcontour
%
% [b,A]=CPLisidenticalregistered(CPLA,CPLB,[tol])
% === INPUT PARAMETERS ===
% CPLA: 1st CPL
% CPLB: 2nd CPL
% tol: tolerance in relative difference area; default is 0.1
% === OUTPUT RESULTS ======
% b: logical information
% A: difference in area
%
% EXAMPLE:
% CPL=CPLbox(10,'A');
% CPLisidenticalregistered(CPL,PLtransP(CPL,[10 10]))
% CPLisidenticalregistered(CPL,PLtransP(CPLbox(10),[10 10]))
%
%
% See also: TregisterConvexHull, CPLisidenticalcontour
%
%
% Copyright 2023 Tim C. Lueth

CPLcell2NaN(CPL)- concatenates a cell list of CPLs into one single CPL

CPLcell2NaN(CPL)% CPLcell2NaN(CPL) - concatenates a cell list of CPLs into one single CPL
% (by Tim Lueth, VLFL-Lib, 2023-DEZ-20 as class: CLOSED POLYGON LISTS)
%
% the opposite fnctns are:
% CPLobjects2cells
% CPLregions2cell (Status of: 2023-12-29)
%
% Introduced first in SolidGeometry 5.4
%
% See also: CPLobjects2cells, CPLregions2cell, CPLbox
%
% CPLN=CPLcell2NaN(CPL)
% === INPUT PARAMETERS ===
% CPL: Cell list of CPLs
% === OUTPUT RESULTS ======
% CPLN: CPL that is a simple concatenation of all contours in CPL
%
% EXAMPLE:
% if ~exist('A') || ~exist('B') || ~exist('C') || ~exist('D') || ~exist('S') || ~exist('T')
% CPLbox('','A'); A=ans; CPLbox('','B'); B=anCPLs; CPLbox('','C'); C=ans; CPLbox('','D'); D=ans;
% CPLbox([10 5],'space'); S=ans; CPLbox([70 5],'table'); T=ans;
% end
% CPLarrange({A,B,C,S},T,'ontop',1,'add'); CPL=ans; SGfigure; CPSplot(CPL);
% CPLC=CPLobjects2cells(CPL)
% CPLcell2NaN(CPLC)
%
%
% See also: CPLobjects2cells, CPLregions2cell, CPLbox
%
%
% Copyright 2023 Tim C. Lueth

CPLarrange(CPLC,CPL2)- Arranges a set of CPLS to be as widw as another one in x dimension

CPLarrange(CPLC,CPL2)% CPLarrange(CPLC,CPL2) - Arranges a set of CPLS to be as widw as another one in x dimension
% (by Tim Lueth, VLFL-Lib, 2023-DEZ-20 as class: CLOSED POLYGON LISTS)
%
% will be extended in future (Status of: 2023-12-29)
%
% Introduced first in SolidGeometry 5.4
%
% See also: CPLcopypattern, CPLcopyradial
%
% CPLC=CPLarrange(CPLC,[CPL2])
% === INPUT PARAMETERS ===
% CPLC: is a cell list of CPLs
% CPL2: is the dimension defining contour
% === OUTPUT RESULTS ======
% CPLC: Is an NAN separated CPL
%
% EXAMPLE:
% CPLarrange({PLcircle(4,4), PLcircle(4,3), PLcircle(4)}, PLsquare([40 5]))
%
% See also: CPLcopypattern, CPLcopyradial
%
%
% Copyright 2023 Tim C. Lueth

wordfind(txt,word,sep)- finds words in a string (charchain)

wordfind(txt,word,sep)% wordfind(txt,word,sep) - finds words in a string (charchain)
% (by Tim Lueth, VLFL-Lib, 2023-DEZ-18 as class: ARTIFICIAL INTELLIGENCE)
%
% Introduced first in SolidGeometry 5.4
%
% See also: strfind, ismember, split, join
%
% [pp,ccc]=wordfind(txt,word,[sep])
% === INPUT PARAMETERS ===
% txt: charchain to search in
% word: word to look for
% sep: separators; default is {',',' ',';'}
% === OUTPUT RESULTS ======
% pp: array of hits
% ccc: separated words
%
% EXAMPLE:
% wordfind ('Introduced first in SolidGeometry 5.4', 'intro') % Not found
% wordfind ('Introduced first in SolidGeometry 5.4', 'in') % 3rd word
% wordfind ('Introduced first in SolidGeometry 5.4 in text', 'in') % two words
%
% See also: strfind, ismember, split, join
%
%
% Copyright 2023 Tim C. Lueth

XPSruleswrite(ops,fname)- writes rules into an excel sheet

XPSruleswrite(ops,fname)% XPSruleswrite(ops,fname) - writes rules into an excel sheet
% (by Tim Lueth, VLFL-Lib, 2023-DEZ-14 as class: ARTIFICIAL INTELLIGENCE)
%
% The format of the rules will may change over Time (Status of:
% 2023-12-14)
%
% Introduced first in SolidGeometry 5.4
%
% See also: XPSrulesread
%
% rname=XPSruleswrite(ops,[fname])
% === INPUT PARAMETERS ===
% ops: operators
% fname: filename
% === OUTPUT RESULTS ======
% rname: rules full file name
%
% EXAMPLE:
% [ops,start, goal]=XPSblocksworld; XPSruleswrite(ops,'TEST.XLS')
%
% See also: XPSrulesread
%
%
% Copyright 2023 Tim C. Lueth

XPSrulesread(fname)- reades rules from an excel sheet

XPSrulesread(fname)% XPSrulesread(fname) - reades rules from an excel sheet
% (by Tim Lueth, VLFL-Lib, 2023-DEZ-14 as class: ARTIFICIAL INTELLIGENCE)
%
% The format of the rules will may change over Time (Status of:
% 2023-12-20)
%
% Introduced first in SolidGeometry 5.4
%
% See also: XPSruleswrite
%
% T=XPSrulesread([fname])
% === INPUT PARAMETERS ===
% fname: filename to read from
% === OUTPUT RESULTS ======
% T: rules list
%
% EXAMPLE:
% [ops,start, goal]=XPSblocksworld; XPSruleswrite(ops,'TEST.XLS')
% XPSrulesread(rname); ops=ans
%
% See also: XPSruleswrite
%
%
% Copyright 2023 Tim C. Lueth

char2strarr(chr,splt)- converts a list of string inside a char chain into a string array

char2strarr(chr,splt)% char2strarr(chr,splt) - converts a list of string inside a char chain into a string array
% (by Tim Lueth, VLFL-Lib, 2023-DEZ-13 as class: ARTIFICIAL INTELLIGENCE)
%
% RESULT IS LIKE: ["space on a" "a on table" "space on b" "b on table"]
% (Status of: 2023-12-13)
%
% Introduced first in SolidGeometry 5.4
%
% See also: strarr2char
%
% strarr=char2strarr(chr,[splt])
% === INPUT PARAMETERS ===
% chr: char chain with quation mark separated strings
% splt: splitchar default is '"'
% === OUTPUT RESULTS ======
% strarr: string array
%
% EXAMPLE:
% x= '"START" "move a from b to table" "move b from c to a" "move c from table to b" "FINISH"'
% y=char2strarr(x)
% u=strarr2char(y)
% x='space on $A, space on $B, $A on $B'
% char2strarr(x,',')
%
% See also: strarr2char
%
%
% Copyright 2023 Tim C. Lueth

strarr2char(strarr)- convertes a single row or single col string array into a char chain - no matrix

strarr2char(strarr)% strarr2char(strarr) - convertes a single row or single col string array into a char chain - no matrix
% (by Tim Lueth, VLFL-Lib, 2023-DEZ-13 as class: ARTIFICIAL INTELLIGENCE)
%
% RESULT IS LIKE: '"space on a" "a on table" "space on b" "b on table"'
% (Status of: 2023-12-13)
%
% Introduced first in SolidGeometry 5.4
%
% See also: char2strarr
%
% chr=strarr2char(strarr)
% === INPUT PARAMETERS ===
% strarr: string array
% === OUTPUT RESULTS ======
% chr: char chain that containts a string array
%
% EXAMPLE:
% x=[ "START" "move a from b to table" "move b from c to a" "move c from table to b" "FINISH"]
% y=strarr2char(x)
% u=char2strarr(y)
%
%
% See also: char2strarr
%
%
% Copyright 2023 Tim C. Lueth

charcell2stringcellarray(chrc)- converts xps cell list of string arrays into cell list of charchains

charcell2stringcellarray(chrc)% charcell2stringcellarray(chrc) - converts xps cell list of string arrays into cell list of charchains
% (by Tim Lueth, VLFL-Lib, 2023-DEZ-11 as class: ARTIFICIAL INTELLIGENCE)
%
% RESULT IS LIKE: {["space on a" "space on c" "a on b" ]}
%
% the current XPS format is a cell lits of string arrays that cannot be
% written in a n excel file without problems. Thid fnctn converts the
% cell list of string arrays into a cell list of charchains (Status of:
% 2023-12-13)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGwritetable, array2tableTL, stringcellarray2charcell
%
% strac=charcell2stringcellarray(chrc)
% === INPUT PARAMETERS ===
% chrc: cell array of char chains with quotation marks
% === OUTPUT RESULTS ======
% strac: cell array of string arrays
%
% EXAMPLE:
% [ops,start, goal]=XPSblocksworld
% stringcellarray2charcell(ops); xlscell=ans
% SGwritetable('test.xls',array2tableTL(xlscell,'ACTION','CONDITION','ADD_LIST','DEL_LIST'))
% [T,N,c]=SGreadtable('test.xls'), charcell2stringcellarray(T)
% T=readtable('test.xls'), X=table2cell(T); charcell2stringcellarray(X)
%
%
% See also: SGwritetable, array2tableTL, stringcellarray2charcell
%
%
% Copyright 2023 Tim C. Lueth

stringcellarray2charcell(ops)- converts xps cell list of string arrays into cell list of charchains

stringcellarray2charcell(ops)% stringcellarray2charcell(ops) - converts xps cell list of string arrays into cell list of charchains
% (by Tim Lueth, VLFL-Lib, 2023-DEZ-11 as class: ARTIFICIAL INTELLIGENCE)
%
% RESULT IS LIKE: {'"space on a" "space on c" "a on b"' }
%
% the current XPS format is a cell lits of string arrays that cannot be
% written in a n excel file without problems. Thid fnctn converts the
% cell list of string arrays into a cell list of charchains (Status of:
% 2023-12-12)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGwritetable, array2tableTL, charcell2stringcellarray
%
% zzz=stringcellarray2charcell(ops)
% === INPUT PARAMETERS ===
% ops:
% === OUTPUT RESULTS ======
% zzz:
%
% EXAMPLE:
% [ops,start, goal]=XPSblocksworld
% stringcellarray2charcell(ops); xlscell=ans
% SGwritetable('test.xls',array2tableTL(xlscell,'ACTION','CONDITION','ADD_LIST','DEL_LIST'))
%
% See also: SGwritetable, array2tableTL, charcell2stringcellarray
%
%
% Copyright 2023 Tim C. Lueth

xpstrings2cells(sss)- converts a char chain with quation mark separated sentences into a cell list of character chains

xpstrings2cells(sss)% xpstrings2cells(sss) - converts a char chain with quation mark separated sentences into a cell list of character chains
% (by Tim Lueth, VLFL-Lib, 2023-DEZ-11 as class: ARTIFICIAL INTELLIGENCE)
%
% RESULT IS LIKE: {'space on a'} {'a on table'} {'space on b'}
%
% This fnctn may accelerate the XPSEQS concept at a later stage.
% fnctns such as contains work on charchain level
% contains(xpstrings2cells(zzz),unsortrows(xpstrings2cells('"c on
% table"'))')
% fnctns such as ismember work on cell level (Status of: 2023-12-12)
%
% Introduced first in SolidGeometry 5.4
%
% See also: xpstrings2cells, XPcells2strings
%
% ccc=xpstrings2cells(sss)
% === INPUT PARAMETERS ===
% sss: sentences separate by quotation marks such as '"a on b" "b on c"'
% === OUTPUT RESULTS ======
% ccc: cell list of sentences such as [{'space on a'} {'a on table'}]
%
% EXAMPLE:
% sss='"space on a" "a on table" "space on b"'
% xpstrings2cells(sss); ccc=ans
%
%
% See also: xpstrings2cells, XPcells2strings
%
%
% Copyright 2023 Tim C. Lueth

xpcells2strings(ccc)- converts cell list of character chains into one charchain of quotation marks separated sentences

xpcells2strings(ccc)% xpcells2strings(ccc) - converts cell list of character chains into one charchain of quotation marks separated sentences
% (by Tim Lueth, VLFL-Lib, 2023-DEZ-11 as class: ARTIFICIAL INTELLIGENCE)
%
% RESULT IS LIKE: '"space on a" "a on table" "space on b" "b on table"'
%
% This fnctn may accelerate the XPSEQS concept at a later stage.
% fnctns such as contains work on charchain level
% contains(xpstrings2cells(zzz),unsortrows(xpstrings2cells('"c on
% table"'))')
% fnctns such as ismember work on cell level (Status of: 2023-12-12)
%
% Introduced first in SolidGeometry 5.4
%
% See also: xpstrings2cells
%
% sss=xpcells2strings(ccc)
% === INPUT PARAMETERS ===
% ccc: cell list of sentences such as [{'space on a'} {'a on table'}]
% === OUTPUT RESULTS ======
% sss: sentences separate by quotation marks
%
% EXAMPLE:
% ccc=[{'space on a'} {'a on table'} {'space on b'}]
% sss='"space on a" "a on table" "space on b" "b on table" "space on c" "c on table"'
% xpcells2strings(ccc); sss=ans;
%
%
% See also: xpstrings2cells
%
%
% Copyright 2023 Tim C. Lueth

stringpatternpermute(equat,symb,samp)- creates symbol permutation for string pattern equations

stringpatternpermute(equat,symb,samp)% stringpatternpermute(equat,symb,samp) - creates symbol permutation for string pattern equations
% (by Tim Lueth, VLFL-Lib, 2023-DEZ-07 as class: ARTIFICIAL INTELLIGENCE)
%
% Flight back from Hefei to Munich (Status of: 2023-12-08)
%
% Introduced first in SolidGeometry 5.4
%
% See also: cell2strarr, strarr2cell
%
% [VV,LL,CC]=stringpatternpermute(equat,symb,samp)
% === INPUT PARAMETERS ===
% equat: string array of equation
% symb: string array of symbol names
% samp: cell list of samples for each symbol
% === OUTPUT RESULTS ======
% VV: permutation of the string pattern equations
% LL: permutation of unique symbols
% CC: index of LL that has been used for VV
%
% EXAMPLE:
% stringpatternpermute("$A on $B",["$A" "$B"],{["TIM" "BOOK"]; ["SHELF" "BED"]})
% stringpatternpermute(["$A on $B" "$A buys $B"],["$A" "$B"],{["TIM" "BOOK"]; ["SHELF" "BED"]})
% stringpatternpermute(["$A on $B" "$A buys $B"],["$A" "$B"],{["TIM" "BOOK"]; ["SHELF" "BED"]}); cell2strarr(ans)
% stringpatternpermute(["$A on $B" "$A buys $B"],["$A" "$B"],{["TIM" "BOOK"]; ["SHELF" "BED" "TIM"]})
% [a,b,c]=stringpatternpermute(["$A on $B" "$A buys $B"],["$A" "$B"],{["TIM" "BOOK"]; ["TIM" "SHELF" "BED" "TIM"]})
%
% See also: cell2strarr, strarr2cell
%
%
% Copyright 2023 Tim C. Lueth

strarr2cell(strarr,rememt)- converts a string array into a cell list of string

strarr2cell(strarr,rememt)% strarr2cell(strarr,rememt) - converts a string array into a cell list of string
% (by Tim Lueth, VLFL-Lib, 2023-DEZ-07 as class: ARTIFICIAL INTELLIGENCE)
%
% Flight back from Hefei to Munich (Status of: 2023-12-07)
%
% Introduced first in SolidGeometry 5.4
%
% See also: cell2strarr, stringpatternpermute
%
% ccc=strarr2cell(strarr,[rememt])
% === INPUT PARAMETERS ===
% strarr: stringarray
% rememt: if true, empty entries are removed
% === OUTPUT RESULTS ======
% ccc: cell list with string entries
%
% EXAMPLE:
% clc; yyy={["c" "table" "space" "b" "a"];["ontop" "under" "between" ]}
% cell2strarr(yyy); xxx=ans, strarr2cell(xxx)
% cell2strarr(yyy); xxx=ans, strarr2cell(xxx,true) % no empty entries
% cell2strarr(yyy); xxx=ans, strarr2cell(xxx,true); zzz=ans, permutevarargin(zzz{:}) % no empty entries
%
% See also: cell2strarr, stringpatternpermute
%
%
% Copyright 2023 Tim C. Lueth

cell2strarr(ccc,joinch)- converts string arrays in cell lines into a string array

cell2strarr(ccc,joinch)% cell2strarr(ccc,joinch) - converts string arrays in cell lines into a string array
% (by Tim Lueth, VLFL-Lib, 2023-DEZ-07 as class: ARTIFICIAL INTELLIGENCE)
%
% Flight back from Hefei to Munich (Status of: 2023-12-07)
%
% Introduced first in SolidGeometry 5.4
%
% See also: strarr2cell, stringpatternpermute
%
% stra=cell2strarr(ccc,[joinch])
% === INPUT PARAMETERS ===
% ccc: cell list of string lines
% joinch: if a joint char is used the string array has only one column
% === OUTPUT RESULTS ======
% stra: stringarray
%
% EXAMPLE:
% yyy={["c" "table" "space" "b" "a"];["c" "table" "space" ]}
% cell2strarr(yyy) % 2 x 5 array
% cell2strarr(yyy," ") % 2 x 1 array
%
%
% See also: strarr2cell, stringpatternpermute
%
%
% Copyright 2023 Tim C. Lueth

varsofstringpattern(cond)- finds all the symbolvariables in a string array

varsofstringpattern(cond)% varsofstringpattern(cond) - finds all the symbolvariables in a string array
% (by Tim Lueth, VLFL-Lib, 2023-DEZ-03 as class: ARTIFICIAL INTELLIGENCE)
%
% waiting for the flight to Bejing CA962. (Status of: 2023-12-08)
%
% Introduced first in SolidGeometry 5.4
%
% See also: stringpatterncondition, XPSEQS
%
% [var,patt]=varsofstringpattern(cond)
% === INPUT PARAMETERS ===
% cond: string array with terms that use $XXX as variable name
% === OUTPUT RESULTS ======
% var: string array with variable Name including %char
% patt:
%
% EXAMPLE:
% varsofstringpattern(["space on $A", "space on $C", "$A on $B"])
%
% See also: stringpatterncondition, XPSEQS
%
%
% Copyright 2023 Tim C. Lueth

XPSconditionfindneval(cond,state,VLIST)- creates all combinations of a variable based CONDITION that could fit a fact list CONDITION

XPSconditionfindneval(cond,state,VLIST)% XPSconditionfindneval(cond,state,VLIST) - creates all combinations of a variable based CONDITION that could fit a fact list CONDITION
% (by Tim Lueth, VLFL-Lib, 2023-NOV-30 as class: ARTIFICIAL INTELLIGENCE)
%
% 1st name was "stringpatterncondition"
% This fnctn checks whether a list of conditions (COND is a fact string
% array with variables $) can occur or is applicable in a given state
% (STATE is a fact string array without variables). If the list COND is
% applicable in STATE with several different variable assignments, all
% applicable combinations of the variables are delivered and further
% variable-based lists can be instantiated with the instantiated
% variables.
%
% XPpermute(' ',["a" "b"],["C" "D"])
% Equations, or systems of equations, that are based on the form "$A on
% $B" must be limited in their scope of application in some way so that
% the recursion or planning comes to an end. For example, NOT (table on
% ANY)For example, by specifying the set of allowed or disallowed symbols
%
% This fnctns as part of the general Problem solver can also be used as
% logical reasoning
% cond = condition
% state = state
% VLIST = everything that also is valid under this condition (Status of:
% 2024-01-26)
%
% Introduced first in SolidGeometry 5.4
%
% See also: stringpatterncompare, stringpatternreplace, XPSEQS
%
% LITERATURE:
% - Norvig, Peter (1991): Paradigms of Artificial Intelligence
% Programming, Morgan Kaufmann Publisher, San Mateo, CA, USA
%
% [RLIST,VLIST,VARS,INST,SYMS]=XPSconditionfindneval(cond,state,[VLIST])
% === INPUT PARAMETERS ===
% cond: string array of conditions with Variables of Type $Str
% state: string array of facts
% VLIST: Additional string arrys with variables
% === OUTPUT RESULTS ======
% RLIST: all possible condition strings that are part of state
% VLIST: all possible additional condition strings that use the same
% combination of VARS/INST
% VARS: all used symbol names in cond
% INST: all symbol combinations used as variables that fullfill the
% condition in state
% SYMS: string array of all samples
%
% EXAMPLE:
% [~,start,goal]=XPSblocksworld;
% clc;XPSconditionfindneval(["space on $A", "space on $C", "$A on $B"],start)
% clc;XPSconditionfindneval([ "space on $A", "space on $C", "$A on $B"],start,["move $A from $B to $C"], ["$A on $C", "space on $B"], ["$A on $B", "space on $C"])
% clc;XPSconditionfindneval(["$A on $B"],["space on a", "a on b", "b on c", "c on table", "space on table"]) % 5 Solutions for "$A on $B"
% clc;XPSconditionfindneval(["space on $A" "$A on $B"],["space on a", "a on b", "b on c", "c on table", "space on table"]) % 1 Solutions for "$A on $B"
% clc;XPSconditionfindneval(["space on $A" "$B on $A"],["space on a", "a on b", "b on c", "c on table", "space on table"]) % 1 Solutions for "$B on $A"
% clc;XPSconditionfindneval(["$A on $B"],["space on a", "a on b", "b on c", "c on table", "space on table"],["$A loves $B"]) % 5 Solutions that create lists
%
% See also: stringpatterncompare, stringpatternreplace, XPSEQS
%
%
% Copyright 2023-2024 Tim C. Lueth

stringpatterncompare(pattern,txt)- compares strings including variable strings

stringpatterncompare(pattern,txt)% stringpatterncompare(pattern,txt) - compares strings including variable strings
% (by Tim Lueth, VLFL-Lib, 2023-NOV-30 as class: ARTIFICIAL INTELLIGENCE)
%
% Introduced first in SolidGeometry 5.4
%
% See also: stringpatternreplace, XPSGPS, XPSGPSEQ, stringpatterncondition
%
% PAR=stringpatterncompare(pattern,txt)
% === INPUT PARAMETERS ===
% pattern: pattern such as "move $A from $B to $C"
% txt: text to analyze such as "move A from B to C"
% === OUTPUT RESULTS ======
% PAR: List of parameters
%
% EXAMPLE:
% stringpatterncompare("move A from B to C", "move A from B to C") % identical
% stringpatterncompare("move A from B to C", "move X from Y to C") % different
% stringpatterncompare("move $A from $B to C", "move X from Y to C") % identical
% stringpatterncompare("move $A from $B to $C", "move Tim from work to Home") % identical
% stringpatterncompare("move $A from $B to $C", "move $A from work to Home") % empty results
%
%
% See also: stringpatternreplace, XPSGPS, XPSGPSEQ, stringpatterncondition
%
%
% Copyright 2023 Tim C. Lueth

XPSblocksworldequation- RULES for the XPSEQS blockworld problem

XPSblocksworldequation% XPSblocksworldequation - RULES for the XPSEQS blockworld problem
% (by Tim Lueth, VLFL-Lib, 2023-NOV-30 as class: ARTIFICIAL INTELLIGENCE)
%
% This creates simple the test data for the GPS=AI with respect to to
% Peter Norvig (1991) using the STRIPS Rules
%
% It can be used to define similar knowledge action rules (Status of:
% 2024-02-03)
%
% Introduced first in SolidGeometry 5.4
%
% See also: XPSGPS, XPSEQS, XPSblocksworld, XPSslidingpuzzle, XPSlawcase
%
% LITERATURE:
% - Norvig, Peter (1991): Paradigms of Artificial Intelligence
% Programming, Morgan Kaufmann Publisher, San Mateo, CA, USA
%
% [ops,start,finish]=XPSblocksworldequation
% === OUTPUT RESULTS ======
% ops: cell list [n x 4] describing action-name, precondition, add-state,
% diff-state
% start: string array describing the start state
% finish: string array describing the final state
%
% EXAMPLE: [ops,start,finish]=XPSblocksworldequation % Example efinitions of operators start-state and goal-state
% XPSGPS(ops, start, finish)
%
%
% See also: XPSGPS, XPSEQS, XPSblocksworld, XPSslidingpuzzle, XPSlawcase
%
%
% Copyright 2023-2024 Tim C. Lueth

XPSEQS(ops,start,finish,"debug","first")- Expert System implementing the first General Problem Solver (AI Programm)

XPSEQS(ops,start,finish,% XPSEQS(ops,start,finish,"debug","first") - Expert System implementing the first General Problem Solver (AI Programm)
% (by Tim Lueth, VLFL-Lib, 2023-NOV-29 as class: ARTIFICIAL INTELLIGENCE)
%
% Order of parameters changed in Feb 2024
% In contrast to XPSGPS, this fnctn XPSEQS supports also equations based
% on $Var symbols. the delete list is applied before the add list, to
% allow the termination by adding removed facts
% IF COND(STATE)==TRUE; NEWSTATE = [SETDIFF(STATE, DELLIST),ADDLIST)
% Since 2024, also Equations or matlab code can be evaluated such as
% "$A==4" or "$L==$R-1"
% (Status of: 2024-01-20)
%
% Introduced first in SolidGeometry 5.4
%
% See also: XPSblocksworld, XPSGPS, XPSconditionfindneval,
% XPSslidingpuzzle, XPSlawcase
%
% LITERATURE:
% - Norvig, Peter (1991): Paradigms of Artificial Intelligence
% Programming, Morgan Kaufmann Publisher, San Mateo, CA, USA
%
% [solut,endstate,solutstates,plan]=XPSEQS([ops,start,finish,"debug","fir
% st"])
% === INPUT PARAMETERS ===
% ops: cell list [n x 4] describing action-name, precondition, add-state,
% diff-state
% start: string array describing the start state
% finish: string array describing the final state
% "debug": if used, the progress is shown
% "first": if used, the first solution is returned
% === OUTPUT RESULTS ======
% solut: solutions
% endstate: end state of the solutioin
% solutstates: state change of the solutions
% plan: all plans generated
%
% EXAMPLE:
% clc; [ops,start,finish]=XPSblocksworld % Example efinitions of operators start-state and goal-state
% opsnew={["move $A from $B to $C"], ["space on $A", "space on $C", "$A on $B"], ["$A on $C", "space on $B" "space on table"], ["$A on $B", "space on $C"]} % ACTION, COND, ADD, DEL
% XPSEQS(ops, start, finish);
% XPSEQS(opsnew, start, finish);
%
%
% See also: XPSblocksworld, XPSGPS, XPSconditionfindneval,
% XPSslidingpuzzle, XPSlawcase
%
%
% Copyright 2023-2024 Tim C. Lueth

XPSblocksworld- Expert System implementing the first General Problem Solver (AI Programm)

XPSblocksworld% XPSblocksworld - Expert System implementing the first General Problem Solver (AI Programm)
% (by Tim Lueth, VLFL-Lib, 2023-NOV-25 as class: ARTIFICIAL INTELLIGENCE)
%
% This creates simple the test data for the GPS=AI with respect to to
% Peter Norvig (1991)
%
% It can be used to define similar knowledge action rules (Status of:
% 2024-01-10)
%
% Introduced first in SolidGeometry 5.4
%
% See also: XPSGPS, XPSEQS, XPSblocksworldequation, XPSslidingpuzzle,
% XPSlawcase
%
% LITERATURE:
% - Norvig, Peter (1991): Paradigms of Artificial Intelligence
% Programming, Morgan Kaufmann Publisher, San Mateo, CA, USA
%
% [ops,start,goal]=XPSblocksworld
% === OUTPUT RESULTS ======
% ops: cell list [n x 4] describing action-name, precondition, add-state,
% diff-state
% start: string array describing the start state
% goal: string array describing the final state
%
% EXAMPLE:
% [ops,start,finish]=XPSblocksworld % Example efinitions of operators start-state and goal-state
% XPSGPS(ops,start, finish)
%
%
% See also: XPSGPS, XPSEQS, XPSblocksworldequation, XPSslidingpuzzle,
% XPSlawcase
%
%
% Copyright 2023-2024 Tim C. Lueth

XPSGPS(ops,start,finish)- Expert System implementing the first General Problem Solver (AI Programm) using STRIPS

XPSGPS(ops,start,finish)% XPSGPS(ops,start,finish) - Expert System implementing the first General Problem Solver (AI Programm) using STRIPS
% (by Tim Lueth, VLFL-Lib, 2023-NOV-24 as class: ARTIFICIAL INTELLIGENCE)
%
% This is a tutorial how to design general problem solver expert systems,
% that use
% 1st - states as array of strings
% 2nd - operators as cell list of actions, predconditions, add-states and
% delete-states
% All states are strings not chars
% State list are arrays of strings
% (Status of: 2023-12-09)
%
% Introduced first in SolidGeometry 5.4
%
% See also: XPSblocksworld, XPSEQS
%
% LITERATURE:
% - Norvig, Peter (1991): Paradigms of Artificial Intelligence
% Programming, Morgan Kaufmann Publisher, San Mateo, CA, USA
%
% [solut,plan]=XPSGPS([ops,start,finish])
% === INPUT PARAMETERS ===
% ops: cell list [n x 4] describing action-name, precondition, add-state,
% diff-state
% start: string array describing the start state
% finish: string array describing the final state
% === OUTPUT RESULTS ======
% solut: solution - successful plans
% plan: complete plan list
%
% EXAMPLE:
% clc; [ops,start,finish]=XPSblocksworld % Example efinitions of operators start-state and goal-state
% XPSGPS(ops ,start, finish)
%
%
%
% See also: XPSblocksworld, XPSEQS
%
%
% Copyright 2023-2024 Tim C. Lueth

XPpermute(sc,lists)- Auxiliary fnct to create permutation of sets

XPpermute(sc,lists)% XPpermute(sc,lists) - Auxiliary fnct to create permutation of sets
% (by Tim Lueth, VLFL-Lib, 2023-NOV-17 as class: ARTIFICIAL INTELLIGENCE)
%
% Introduced first in SolidGeometry 5.4
%
% See also: permutevarargin, join, XPS
%
% LITERATURE:
% - Norvig, Peter (1991): Paradigms of Artificial Intelligence
% Programming, Morgan Kaufmann Publisher, San Mateo, CA, USA
%
% LL=XPpermute([sc,lists])
% === INPUT PARAMETERS ===
% sc: separator; default is ''
% lists: cell lists of arguments
% === OUTPUT RESULTS ======
% LL: cell list of all combinations of the permutation
%
% EXAMPLE:
% XPpermute(' ',{'ISBIGGER'},{'DOG', 'CAT', 'BIRD', 'LION', 'ELEPHANT'}, {'DOG', 'CAT', 'BIRD', 'LION', 'ELEPHANT'}); XX=ans
%
% See also: permutevarargin, join, XPS
%
%
% Copyright 2023 Tim C. Lueth

permutezzlist(zzlist)- creates multidimensional index sequences for testing or other purposes

permutezzlist(zzlist)% permutezzlist(zzlist) - creates multidimensional index sequences for testing or other purposes
% (by Tim Lueth, VLFL-Lib, 2023-NOV-17 as class: AUXILIARY PROCEDURES)
%
% much faster than permutevector, similar but more generic than
% indexvariant (Status of: 2023-11-17)
%
% Introduced first in SolidGeometry 5.4
%
% See also: permutevector, indexvariant, permutevarargin, join, split,
% XPpermute
%
% LITERATURE:
% - Norvig, Peter (1992): Paradigms of Artificial Intelligence
% Programming, Morgan Kaufmann Publisher, San Mateo, CA, USA
%
% zz=permute[zzlist]([zzlist])
% === INPUT PARAMETERS ===
% zzlist: row or col vector; default is [1 2 3]
% === OUTPUT RESULTS ======
% zz: index field [numel(vec)^dim x dim]
%
% EXAMPLE:
% permutevarargin({'a' 'b' 'c' 'd'}, {'X' 'Y'} ,{1 2 3})
% permutevarargin({'a' 'b' 'c' 'd'}, {'X' 'Y'} ,{'1' '2' '3'})
% permutevarargin({'a' 'b' 'c' 'd'}, {'X' 'Y'} ,{'1' '2' '3'}); XX=ans, join(XX,'-')
% permutevarargin({'a' 'b' 'c' 'd'}, {'X' 'Y'} ,{'1' '2' '3'}); XX=ans, cell2dataset(XX,'VarNames' {'FUNC','PAR1','PAR2'})
% permutevarargin([1 2 3],[4 5 6],[7 8 9])
% permutevarargin({'ISBIGGER'},{'DOG', 'CAT', 'BIRD', 'LION', 'ELEPHANT'}, {'DOG', 'CAT', 'BIRD', 'LION', 'ELEPHANT'})
%
% See also: permutevector, indexvariant, permutevarargin, join, split,
% XPpermute
%
%
% Copyright 2023 Tim C. Lueth

unsortrows(A)- swaps many different rows of a matrix

unsortrows(A)% unsortrows(A) - swaps many different rows of a matrix
% (by Tim Lueth, VLFL-Lib, 2023-NOV-03 as class: AUXILIARY PROCEDURES)
%
% same as ELunsort (Status of: 2023-11-03)
%
% Introduced first in SolidGeometry 5.4
%
% See also: ELunsort, sortrows, unsortNaN
%
% A=unsortrows(A)
% === INPUT PARAMETERS ===
% A: Original matrix
% === OUTPUT RESULTS ======
% A: unosrted matrix, randomly exchnanged rows
%
% EXAMPLE:
% A=sortrows(round(10*rand(10,4)),2), unsortrows(A)
%
%
% See also: ELunsort, sortrows, unsortNaN
%
%
% Copyright 2023 Tim C. Lueth

SGbraitenbergvehicle(BLH,COL,NAM)- creates a simple solid similar to the vehicles of von Braitenberg

SGbraitenbergvehicle(BLH,COL,NAM)% SGbraitenbergvehicle(BLH,COL,NAM) - creates a simple solid similar to the vehicles of von Braitenberg
% (by Tim Lueth, VLFL-Lib, 2023-OKT-22 as class: PARAMETRIC DESIGN)
%
% The center is between the wheels (Status of: 2023-10-22)
%
% Introduced first in SolidGeometry 5.4
%
% See also: sprintftext, SGofCPLcommand, SGtextstamp, TofWheel,
% VehicleLearning.mlx
%
% SG=SGbraitenbergvehicle([BLH,COL,NAM])
% === INPUT PARAMETERS ===
% BLH: [Widht length height]l default is [30 40 10]
% COL: Optional colors for sensor wheel text; default is [yrc]
% NAM: optional name ontop; default is empty;
% === OUTPUT RESULTS ======
% SG: Solid Geometry
%
% EXAMPLE:
% SGbraitenbergvehicle([20 20 10],'yr','JIMMY'); SGR=ans;
% TR=eye(3); hr=[];
% for i=1:100
% d=rand(1,2)/5; % robot creates random numbers for the wheel movement
% % Create robot animation
% TR=TR*TofWheel(30,d); delete(hr); hr=SGplotalpha(SGtransT(SGR,T3ofT2(TR)));
% axis tight; view(-30,30); drawnow;
% end
%
% See also: sprintftext, SGofCPLcommand, SGtextstamp, TofWheel,
% VehicleLearning.mlx
%
%
% Copyright 2023 Tim C. Lueth

fcostbenefit(c,r,t)- cost or benefit fnct

fcostbenefit(c,r,t)% fcostbenefit(c,r,t) - cost or benefit fnct
% (by Tim Lueth, VLFL-Lib, 2023-OKT-14 as class: AUXILIARY PROCEDURES)
%
% Introduced first in SolidGeometry 5.4
%
% See also: VehicleReinforce.mlx
%
% [ff,PL,SG]=fcostbenefit([c,r,t])
% === INPUT PARAMETERS ===
% c: [plateau-width center-shift center-value]; default is [0 0 1]
% r: [ramp width and minimal value[ ;default is [2 0]
% t: type of functiopn  "lin", "atan", "bell"; default is bell (1/1+x^2)
% === OUTPUT RESULTS ======
% ff: handle to cost equation
% PL: Point list of fnctn
% SG: Solid Geometry of fnctn
%
% EXAMPLE:
% fcostbenefit([10 0],10,'bell'); ff=ans; axis equal, ff(4)
% fcostbenefit([10 2],10,'atan'); ff=ans; axis equal, ff(8)
% fcostbenefit([10 2],10,'bell'); ff=ans; axis equal, ff(8)
% fcostbenefit([1 4],2,'bell'); ff=ans; axis normal; ff(10)
%
% See also: VehicleReinforce.mlx
%
%
% Copyright 2023 Tim C. Lueth

SGof2Dfunc(ff,ax,res,D)- creates a surface or a solid of a 1D or 2D fnct

SGof2Dfunc(ff,ax,res,D)% SGof2Dfunc(ff,ax,res,D) - creates a surface or a solid of a 1D or 2D fnct
% (by Tim Lueth, VLFL-Lib, 2023-OKT-14 as class: SURFACES)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGofGeoTIFF, SGofSurface, VLwarpgrid, FLofVLmeshgrid
%
% SG=SGof2Dfunc([ff,ax,res,D])
% === INPUT PARAMETERS ===
% ff: handle to the fnctn; default is @sin
% ax: axis [xmin xmax ymin ymax]; default is [-10 10 -10 10]
% res: step size; default is max(dy,dy)/99;
% D: Socket height; default is '' ==> only surface
% === OUTPUT RESULTS ======
% SG: Solid Geometry
%
% EXAMPLE:
% SGof2Dfunc(@cos,[-pi 2*pi -pi 3*pi],.1); SG=ans; % creates just the surface without thickness
% SGofSurface(SG.VL,SG.FL,0.5) % creates a solid from the surface
%
% SGof2Dfunc(@cos,[-pi 2*pi -pi 3*pi],.1,0) % creates a solid with no socket
% SGof2Dfunc(@cos,[-pi 2*pi -pi 3*pi],.1,1) % creates a solid plus socket
%
% zzz=@(x,y) x+y
% SGof2Dfunc(zzz,[-pi 2*pi -pi 3*pi],.1,1) % creates a solid plus socket
% SGof2Dfunc(str2func('@(x,y)x*x-y*y'),[-1 1 -1 1],.1,1) ;SS=ans; % creates a solid plus socket
% view(0,90); viewsmooth(-30,30,200)
%
% SGof2Dfunc(str2func('@(x,y)x*x-y*y'),[-1 1 -1 1],.01) ;SS=ans;
% SGofSurface(SS,'',.3)
%
%
% See also: SGofGeoTIFF, SGofSurface, VLwarpgrid, FLofVLmeshgrid
%
%
% Copyright 2023-2024 Tim C. Lueth

PLwrench(D,n)- exactly the same as PLinbus

PLwrench(D,n)% PLwrench(D,n) - exactly the same as PLinbus
% (by Tim Lueth, VLFL-Lib, 2023-OKT-13 as class: CLOSED POLYGON LISTS)
%
% Introduced first in SolidGeometry 5.4
%
% See also: PLhexalobular, PLinbus, PLcircle, PLcircseg, PLevolvente,
% PLgearDIN, PLhelix, PLkidney, PLrand, PLspiral, PLsquare, PLstar,
% PLcircleoval, PLtubbing, PLarrow, CPLcirclesofPL
%
% [PL,Rm]=PLwrench([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
% Rm: Radius of circle for PLcircle
%
% EXAMPLE:
% PLwrench(10)
%
% See also: PLhexalobular, PLinbus, PLcircle, PLcircseg, PLevolvente,
% PLgearDIN, PLhelix, PLkidney, PLrand, PLspiral, PLsquare, PLstar,
% PLcircleoval, PLtubbing, PLarrow, CPLcirclesofPL
%
%
% Copyright 2023 Tim C. Lueth

SGjuicerAdapter(Do,Di)- creates a spare part for a BOSCH juicer

SGjuicerAdapter(Do,Di)% SGjuicerAdapter(Do,Di) - creates a spare part for a BOSCH juicer
% (by Tim Lueth, VLFL-Lib, 2023-OKT-13 as class: PARAMETRIC DESIGN)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGbookwedge, SGshieldbase
%
% SGjuicerAdapter([Do,Di])
% === INPUT PARAMETERS ===
% Do: Outer Diameter
% Di: Inner Diameter
%
% See also: SGbookwedge, SGshieldbase
%
%
% Copyright 2023 Tim C. Lueth

TofWheel(D,w)- returns a HT matrix for a 2 wheel kinematic movement

TofWheel(D,w)% TofWheel(D,w) - returns a HT matrix for a 2 wheel kinematic movement
% (by Tim Lueth, VLFL-Lib, 2023-OKT-10 as class: KINEMATICS AND FRAMES)
%
% USE CAREFULLY: TofWheel was not being tested extensively
%
% Used in Braitenberg vehicle examples (Status of: 2023-10-12)
%
% Introduced first in SolidGeometry 5.4
%
% See also: TofDPhi, TofDPhiH
%
% [TS,PL,TR,TL]=TofWheel(D,[w])
% === INPUT PARAMETERS ===
% D: Distance between the two weels in x
% w: movement in rad
% === OUTPUT RESULTS ======
% TS: Center Frame after movement
% PL: path of movement
% TR: Frame of result of right wheel
% TL: Frame of result of left wheel
%
% EXAMPLE:
% TofWheel(30,[0 270]/180*pi)
%
% SGR=SGofCPLcommand("b 30 40,h 10, enter, sph 10, rel center, rel alignback 5, rel alignleft -2,swap, enter, sph 10, rel center, rel alignback 5, rel alignright -2,add, swap , add, enter, c 12, h 5,roty 90,rel alignbottom 1, rel alignleft 5, rel infront -5, add, enter, c 12, h 5,roty 90,rel alignbottom, rel alignright 5, rel alignfront, add");
% TR=eye(3)
% for i=1:100
% d=rand(1,2)/5; % robot creates random numbers for the wheel movement
% % Create robot animation
% TR=TR*TofWheel(30,d); delete(hr); hr=SGplotalpha(SGtransT(SGR,T3ofT2(TR)),'g',0.5);
% axis tight; view(-30,30); drawnow;
% end
%
%
% See also: TofDPhi, TofDPhiH
%
%
% Copyright 2023 Tim C. Lueth

SGshieldbase(ddd,rrr)- creates a shieldbase

SGshieldbase(ddd,rrr)% SGshieldbase(ddd,rrr) - creates a shieldbase
% (by Tim Lueth, VLFL-Lib, 2023-OKT-04 as class: PARAMETRIC DESIGN)
%
% Introduced first in SolidGeometry 5.4
%
% See also: SGbookwedge
%
% SG=SGshieldbase([ddd,rrr])
% === INPUT PARAMETERS ===
% ddd: [length widht height tickness]; default is [117 4 60 2]
% rrr: [stand extension stand height]; default is [10 4]
% === OUTPUT RESULTS ======
% SG: resulting solid
%
% See also: SGbookwedge
%
%
% Copyright 2023 Tim C. Lueth
RapidWeaver Icon

Last Change Nov 2024 for SG-Lib 5.4