CVLzseparate(CVLz,i)- returns a sliced CVL/CPL for a given z value |
% CVLzseparate(CVLz,i) - returns a sliced CVL/CPL for a given z value % (by Tim Lueth, VLFL-Lib, 2020-AUG-23 as class: CLOSED POLYGON LISTS) % % for sliced CVL, i.e. CPL with an added z value, this fnctn returns only % the contours that have the same z value % CVLzseparate works with an index % CVLofSGslices works with z values % (Status of: 2020-08-25) % % Introduced first in SolidGeometry 4.9 % % See also: CVLofSGslices, SGofCVLslices, CVLseparatez, CPLofSGsliceauto, % CVLzofSGsliceauto, CVLzaddauxpoints, CVLzofSGsliceauto, CVLzplot, % CVLzplotasCPS, CVLzplotui, CVLzremovearea, CVLzsimplifyAmin, CVLzsweep, % exp_2017_07_18 % % CVL=CVLzseparate(CVLz,[i]) % === INPUT PARAMETERS === % CVLz: Slices CVL % i: simple index in zz list % === OUTPUT RESULTS ====== % CVL: just the contour with the nth z value % % EXAMPLE: % CVL=CVLofSGslices(SGsample(5),10); % CVLzseparate(CVLzofSGsliceauto(SGsample(5)),2) % % See also: CVLofSGslices, SGofCVLslices, CVLseparatez, CPLofSGsliceauto, % CVLzofSGsliceauto, CVLzaddauxpoints, CVLzofSGsliceauto, CVLzplot, % CVLzplotasCPS, CVLzplotui, CVLzremovearea, CVLzsimplifyAmin, CVLzsweep, % exp_2017_07_18 % % % Copyright 2020 Tim C. Lueth |
CVLzremovearea(res)- removes areas with a small distance to the opposite wall |
% CVLzremovearea(res) - removes areas with a small distance to the opposite wall % (by Tim Lueth, VLFL-Lib, 2020-AUG-23 as class: CLOSED POLYGON LISTS) % % Uses CPLfindsmalldist % (Status of: 2020-08-25) % % Introduced first in SolidGeometry 4.9 % % See also: CPLfindsmalldist, CVLzaddauxpoints, CVLzofSGsliceauto, % CVLzplot, CVLzplotasCPS, CVLzplotui, CVLzseparate, CVLzsimplifyAmin, % CVLzsweep, exp_2017_07_18 % % CVLN=CVLzremovearea([res]) % === INPUT PARAMETERS === % res: minimal required distance to survive as contour % === OUTPUT RESULTS ====== % CVLN: CVL with removed areas the will creates problems during printing % or SG reconstruction % % EXAMPLE: SG=SGservosample(1); CVLz=CVLzofSGsliceauto(SG); % SGfigure; CVLzplotasCPS(CVLzseparate(CVLz,1),'r',1); shg; grid off % SGfigure; CVLzplotasCPS(CVLzremovearea(CVLzseparate(CVLz,1),0.3),'r',1); shg; grid off % % See also: CPLfindsmalldist, CVLzaddauxpoints, CVLzofSGsliceauto, % CVLzplot, CVLzplotasCPS, CVLzplotui, CVLzseparate, CVLzsimplifyAmin, % CVLzsweep, exp_2017_07_18 % % % Copyright 2020 Tim C. Lueth |
CVLzaddauxpoints(CVLz,d)- adds points to CVL z sorted contours |
% CVLzaddauxpoints(CVLz,d) - adds points to CVL z sorted contours % (by Tim Lueth, VLFL-Lib, 2020-AUG-22 as class: CLOSED POLYGON LISTS) % % Introduced first in SolidGeometry 4.9 % % See also: CPLaddauxpoints, GPLauxgridpointsCL, PLELaddauxpoints, % GPLauxgridpointsPLEL, RLaddauxpoints, CVLzofSGsliceauto, CVLzplot, % CVLzplotasCPS, CVLzplotui, CVLzremovearea, CVLzseparate, % CVLzsimplifyAmin, CVLzsweep, exp_2017_07_18 % % CVLz=CVLzaddauxpoints(CVLz,[d]) % === INPUT PARAMETERS === % CVLz: CVL z sorted contour % d: forced maximum distance of points; default is smin % === OUTPUT RESULTS ====== % CVLz: modified an corrected CPLz % % EXAMPLE: % SG=SGservosample(2); CVLz=CVLofSGslices(SG,10); % CVLzaddauxpoints(CVLz); % % % See also: CPLaddauxpoints, GPLauxgridpointsCL, PLELaddauxpoints, % GPLauxgridpointsPLEL, RLaddauxpoints, CVLzofSGsliceauto, CVLzplot, % CVLzplotasCPS, CVLzplotui, CVLzremovearea, CVLzseparate, % CVLzsimplifyAmin, CVLzsweep, exp_2017_07_18 % % % Copyright 2020 Tim C. Lueth |
CVLzplotasCPS(CVLz,c,a,e)- similar to CVLplot but separates the z values just in case somebody forgot nan nan |
% CVLzplotasCPS(CVLz,c,a,e) - similar to CVLplot but separates the z values just in case somebody forgot nan nan % (by Tim Lueth, VLFL-Lib, 2020-AUG-22 as class: VISUALIZATION) % % This procedure is based on VLFLofCVLdelaunay2D % (Status of: 2022-05-21) % % Introduced first in SolidGeometry 4.9 % % See also: CVLzplot, CVLzplothatched, CVLzplotui, VLELplots, CPLplot, % PLplot, VLplot, CVLplots, CVLplot, CVLzaddauxpoints, CVLzofSGsliceauto, % CVLzplot, CVLzplotui, CVLzremovearea, CVLzseparate, CVLzsimplifyAmin, % CVLzsweep, exp_2017_07_18 % % h=CVLzplotasCPS(CVLz,[c,a,e]) % === INPUT PARAMETERS === % CVLz: Several closed vertex list separated by nan % c: Optional color of CPS; default changing colors % a: Optional facete alpha % e: Optional line color % === OUTPUT RESULTS ====== % h: handle to drawing elements % % EXAMPLE: % SG=SGservosample(2); CVLz=CVLofSGslices(SG,10) % SGfigure(-30,30); CVLzplotasCPS(CVLz,'',1) % SGfigure(-30,30); CVLzplotasCPS(CVLz,'',1,'k') % SG=SGservosample(1); CVLz=CVLofSGslices(SG,10); SGfigure(-30,30); CVLzplotasCPS(CVLz,'',1); % % % % See also: CVLzplot, CVLzplothatched, CVLzplotui, VLELplots, CPLplot, % PLplot, VLplot, CVLplots, CVLplot, CVLzaddauxpoints, CVLzofSGsliceauto, % CVLzplot, CVLzplotui, CVLzremovearea, CVLzseparate, CVLzsimplifyAmin, % CVLzsweep, exp_2017_07_18 % % % Copyright 2020-2022 Tim C. Lueth |
VLcorrelate(NVL,VL);- returns the indices of a list in another list |
% VLcorrelate(NVL,VL); - returns the indices of a list in another list % (by Tim Lueth, VLFL-Lib, 2020-AUG-22 as class: AUXILIARY PROCEDURES) % % This fnctn finds the indices of some vertices in a longer list. For a % complete remapping use fnctn "maprows". % bi=findVL(VL,ai); bi=ai(bi) % maprows is extremely and unbeatable fast (Status of: 2020-08-22) % % Introduced first in SolidGeometry 4.9 % % See also: maprows, findVL, reversesortindex, VLFLreorder % % vi=VLcorrelate(NVL,VL); % === INPUT PARAMETERS === % NVL: Long vertex list to search in; must not be unique, first entry is % returned % VL: Second vertex list to find in NVL % === OUTPUT RESULTS ====== % vi: index in NVL % % EXAMPLE: % VL1=rounddiv(rand(20,3)*100,5)-50, VL2=rounddiv(rand(20,3)*100,5)-50 % VLcorrelate(VL1,ELunsort(VL1)) % VLcorrelate([VL1;VL2],ELunsort(VL1)) % VLcorrelate([VL1],[ELunsort(VL1);ELunsort(VL2)]) % % See also: maprows, findVL, reversesortindex, VLFLreorder % % % Copyright 2020 Tim C. Lueth |
Fofbendinggirder(l,h,b,s,E,Slim)- returns binding force of a bended girder |
% Fofbendinggirder(l,h,b,s,E,Slim) - returns binding force of a bended girder % (by Tim Lueth, VLFL-Lib, 2020-AUG-21 as class: MECHANICAL PROCEDURES) % % Helpful parameter: % Steel Slim=355; E=200000 % PA12 Slim=36; E=1240 (PA2200 called at EOS) % The length of a bar which cross section is [h x b] that will be bended % distance s (related to h) if a force F is applied? % the less force F is applied the longer the length is % the less distance s is requested the shorter the length is % The force to deflect a bending beam in the order of its height is % reduced with the 4th power when the height is halved. So to push in an % enclosure with half its wall thickness 1/16 of the force is sufficient. % Two fingers can apply 50N when gripping. 5N, i.e. 500 grams are no % problem. We can even apply 10N to a thin bar of it in continuous load. % (Status of: 2020-09-09) % % Introduced first in SolidGeometry 4.9 % % See also: SGsnaprivet, lofbendinggirder, sofbendinggirder, rofcircbend, % bofbendinggirder % % [F,alpha,Smax,r,c]=Fofbendinggirder([l,h,b,s,E,Slim]) % === INPUT PARAMETERS === % l: length of the bended beam % h: height of the cross section of bended beam; default i 1.5 % b: width of the bended beam; default is h % s: bending distance; default h % E: E modulus default 1200 MPa (Polyamid PA12) % Slim: Limit of bending stress % === OUTPUT RESULTS ====== % F: bending force to achieve distance s % alpha: bending angle % Smax: bending stress % r: bending radius % c: bending contour % % EXAMPLE: % Fofbendinggirder(6,1.5,1.5,2.0) % clip width length 6 and wall thickness 1.5 and pin of 0.5 % % See also: SGsnaprivet, lofbendinggirder, sofbendinggirder, rofcircbend, % bofbendinggirder % % % Copyright 2020 Tim C. Lueth |
exp_2020_08_20_snapper- This experiment is used to determine the excess length of snap hooks |
% exp_2020_08_20_snapper - This experiment is used to determine the excess length of snap hooks % (by Tim Lueth, VLFL-Lib, 2020-AUG-21 as class: EXPERIMENTS) % % A bracket is designed for the SGmotorN20, which can be 3D-printed for % this purpose if you do not have the original. The fnctn uses slfit to % design a clearance fit before the snap hooks are applied. (Status of: % 2020-09-18) % % Introduced first in SolidGeometry 4.9 % % See also: SGsnaprivet, slfit, DIN4AMfitting, exp_2020_08_18_snapper, % SGsnaprivet, lofbendinggirder, sofbendinggirder, rofcircbend, % bofbendinggirder, Fofbendinggirder % % LITERATURE: % - Fischer et al. (2011): Tabellenbuch Metall, Verlag Europa-Lehrmittel, % Nourney, 45. Auflage, % % SGC=exp_2020_08_20_snapper % === OUTPUT RESULTS ====== % SGC: Snapper for SGmotorN20 % % EXAMPLE: % slfit('set formiga'), slfit('c'), slfit('set form3b'), slfit('c') % % exp_2020_08_18_snapper % % % See also: SGsnaprivet, slfit, DIN4AMfitting, exp_2020_08_18_snapper, % SGsnaprivet, lofbendinggirder, sofbendinggirder, rofcircbend, % bofbendinggirder, Fofbendinggirder % % % Copyright 2020 Tim C. Lueth |
userip- return internal and externam ip address of the used computer |
% userip - return internal and externam ip address of the used computer % (by Michael Kleder and Stephen LL, VLFL-Lib, 2020-AUG-20 as class: % AUXILIARY PROCEDURES) % % Michael Kleder of 2005-08-16 and Stephen LL of 2005-08-08 (Status of: % 2020-08-20) % % See also: whoisPID, whoisTCP, whoisIP, lastlogins, userIP % % [ipi,ipe]=userip % === OUTPUT RESULTS ====== % ipi: internal ip address % ipe: externally seen ip address % % EXAMPLE: % userIP % [i,e]=userIP % % See also: whoisPID, whoisTCP, whoisIP, lastlogins, userIP % |
SGcolorsample()- creates boxes in colors with text |
% SGcolorsample() - creates boxes in colors with text % (by Tim Lueth, VLFL-Lib, 2020-AUG-20 as class: SURFACES) % % This fnctn is slow if it creates text, therefor it was extracted from % SGsample % This fnctn checks wether the color code is correct (Status of: % 2020-08-20) % % Introduced first in SolidGeometry 4.9 % % See also: SGsample % % SG=SGcolorsample([]) % === PROPERTY NAMES ===== % 'text' : if 'text' is used asl argument, the boxes show text descriptors % === OUTPUT RESULTS ====== % SG: Colored Boxes % % EXAMPLE: % SGcolorsample % SGcolorsample('text') % % See also: SGsample % % % Copyright 2020 Tim C. Lueth |
bofbendinggirder(h,l,s,F,E,Slim)- returns the width of a bended girder |
% bofbendinggirder(h,l,s,F,E,Slim) - returns the width of a bended girder % (by Tim Lueth, VLFL-Lib, 2020-AUG-19 as class: MECHANICAL PROCEDURES) % % Helpful parameter: % Steel Slim=355; E=200000 % PA12 Slim=36; E=1240 (PA2200 called at EOS) % The length of a bar which cross section is [h x b] that will be bended % distance s (related to h) if a force F is applied? % the less force F is applied the longer the length is % the less distance s is requested the shorter the length is (Status of: % 2020-09-18) % % Introduced first in SolidGeometry 4.9 % % See also: SGsnaprivet, lofbendinggirder, sofbendinggirder, rofcircbend, % Fofbendinggirder % % [b,alpha,Smax,r,c]=bofbendinggirder([h,l,s,F,E,Slim]) % === INPUT PARAMETERS === % h: height of the cross section of bended beam % l: length of the bended beam % s: bending distance; default h % F: bending force to achieve distance s; default 10 N % E: E modulus default 1200 MPa (Polyamid PA12) % Slim: Limit of bending stress % === OUTPUT RESULTS ====== % b: width of cross section of a bended girder % alpha: bending angle % Smax: bending stress % r: bending radius % c: bending contour % % EXAMPLE: % bofbendinggirder(1.5,10,1.5+1) % clip width length 10 and wall thickness 1.5 and pin of 1 % % See also: SGsnaprivet, lofbendinggirder, sofbendinggirder, rofcircbend, % Fofbendinggirder % % % Copyright 2020 Tim C. Lueth |
CVLzplot(CVL,c,w,t,b,f)- similar to CVLplot but separates the z values just in case somebody forgot nan nan |
% CVLzplot(CVL,c,w,t,b,f) - similar to CVLplot but separates the z values just in case somebody forgot nan nan % (by Tim Lueth, VLFL-Lib, 2020-AUG-18 as class: VISUALIZATION) % % ======================================================================= % OBSOLETE (2022-05-21) - USE 'CVLplot' INSTEAD % ======================================================================= % % This procedure is different to VLELplot (Status of: 2020-08-25) % % Introduced first in SolidGeometry 4.9 % % See also: [ CVLplot ] ; CVLzplot, CVLzplotasCPS, CVLzplothatched, % CVLzplotui, VLELplots, CPLplot, PLplot, VLplot, CVLplots, CVLplot, % CVLzaddauxpoints, CVLzofSGsliceauto, CVLzplotasCPS, CVLzplotui, % CVLzremovearea, CVLzseparate, CVLzsimplifyAmin, CVLzsweep, % exp_2017_07_18 % % CVLzplot(CVL,[c,w,t,b,f]) % === INPUT PARAMETERS === % CVL: Several closed vertex list separated by nan % c: Optional color of desired edges; default changing colors % w: Optional line width; default is 1 % t: Size of a cone shaped arrow tip, default is ''=invisible % b: Size of a cube showing the start point; default is ''=invisible % f: Size of a ring showing the end point; default is ''=invisible % % EXAMPLE: % SGfigure; view(-30,30); CVLplots(VLsample(18),'',3,1); % SGfigure; view(-30,30); CVLplots(VLsample(18),'',3,1,1); % SGfigure; view(-30,30); CVLplots(VLsample(18),'',3,1,1,1); % % See also: [ CVLplot ] ; CVLzplot, CVLzplotasCPS, CVLzplothatched, % CVLzplotui, VLELplots, CPLplot, PLplot, VLplot, CVLplots, CVLplot, % CVLzaddauxpoints, CVLzofSGsliceauto, CVLzplotasCPS, CVLzplotui, % CVLzremovearea, CVLzseparate, CVLzsimplifyAmin, CVLzsweep, % exp_2017_07_18 % % % Copyright 2020-2022 Tim C. Lueth |
exp_2020_08_18_snapper- This experiment is used to determine the excess length of snap hooks |
% exp_2020_08_18_snapper - This experiment is used to determine the excess length of snap hooks % (by Tim Lueth, VLFL-Lib, 2020-AUG-18 as class: EXPERIMENTS) % % A bracket is designed for the SGmotorN20, which can be 3D-printed for % this purpose if you do not have the original. The fnctn uses slfit to % design a clearance fit before the snap hooks are applied. (Status of: % 2020-08-21) % % Introduced first in SolidGeometry 4.9 % % See also: SGsnaprivet, lofbendinggirder, sofbendinggirder, rofcircbend, % bofbendinggirder, Fofbendinggirder % % LITERATURE: % - Fischer et al. (2011): Tabellenbuch Metall, Verlag Europa-Lehrmittel, % Nourney, 45. Auflage, % % exp_2020_08_18_snapper % % EXAMPLE: % slfit('set formiga'), slfit('c'), slfit('set form3b'), slfit('c') % % exp_2020_08_18_snapper % % % See also: SGsnaprivet, lofbendinggirder, sofbendinggirder, rofcircbend, % bofbendinggirder, Fofbendinggirder % % % Copyright 2020 Tim C. Lueth |
Dashboard- just opens the web side for formlab dashboard |
% Dashboard - just opens the web side for formlab dashboard % (by Tim Lueth, VLFL-Lib, 2020-AUG-17 as class: AUXILIARY PROCEDURES) % % Introduced first in SolidGeometry 4.9 % % See also: Wegertseder, Norelem % % Dashboard % % See also: Wegertseder, Norelem % % % Copyright 2020 Tim C. Lueth |
saveTL(vname,fname,copyn)- a modified version of the save command |
% saveTL(vname,fname,copyn) - a modified version of the save command % (by Tim Lueth, VLFL-Lib, 2020-AUG-17 as class: AUXILIARY PROCEDURES) % % Matlab save command uses the first argument as name of the file and % further arguments as names of variables. In contrast, this fnctn takes % the name of a variable and saves it under the same filename (Status of: % 2020-09-11) % % Introduced first in SolidGeometry 4.9 % % See also: save % % saveTL(vname,[fname,copyn]) % === INPUT PARAMETERS === % vname: variable name to save under the same name as .mat file % fname: filename % copyn: if true; the variable name changes to fname % % EXAMPLE: % A=SGbox % saveTL(A) % in file A.mat is only variable A % clear all; load A; whos % saveTL(A,'B',false) % in file B.mat is only one variable A % clear all; load B; whos % saveTL(A,'B') % in file B.mat is only one variable B % clear all; load B; whos % % See also: save % % % Copyright 2020 Tim C. Lueth |
exp_2020_08_17_fittings- EXPERIMENT To create a set of fitting cylinders with different slot sizes between the walls |
% exp_2020_08_17_fittings - EXPERIMENT To create a set of fitting cylinders with different slot sizes between the walls % (by Tim Lueth, VLFL-Lib, 2020-AUG-17) % % a) The Experiment for testing t20 different parts to be assembled % afterwards % (Status of: 2020-08-17) % % Introduced first in SolidGeometry 4.9 % % exp_2020_08_17_fittings % % EXAMPLE: Just try % exp_2020_08_17_fittings % % % % Copyright 2020 Tim C. Lueth |
CPLconvexhullfillgap(CPL,d,ftyp,keep)- returns the convex hull for a CPL |
% CPLconvexhullfillgap(CPL,d,ftyp,keep) - returns the convex hull for a CPL % (by Tim Lueth, VLFL-Lib, 2020-AUG-16 as class: CLOSED POLYGON LISTS) % % The fnctns are based on the planar CPLfnctns % - CPLconvexhullfillgap - closes gaps and try to find a SINGLE OUTLINE % contour % - CPLoutlinecontour - just returns ALL OUTLINE contours % - CPLfillgap -just fillgapsb etween contours (Status of: 2021-04-13) % % Introduced first in SolidGeometry 4.9 % % See also: CPLrack4PL, CPLconvexhull, CPLconvexhulldelaunay, % delaunayofCPL, CPLharbour, CPLfillin, CPLfillinside, CPLfillgap, % CPLoutlinecontour % % [CPLD,dn]=CPLconvexhullfillgap(CPL,[d,ftyp,keep]) % === INPUT PARAMETERS === % CPL: CPL % d: distance to fill the gap; default is 0.1 % ftyp: edge type 'default is 'square' % keep: colinear points; default is false % === OUTPUT RESULTS ====== % CPLD: convex hull of the delaunay triangulation % dn: % % EXAMPLE: % CPLconvexhulldelaunay(CPLsample(14)); % CPLconvexhulldelaunay(CPLsample(19)); % CPLconvexhulldelaunay(CPLsample(21)); % CPLfillgap(CPLsample(21),3) % CPLconvexhullfillgap(CPLaddauxpoints(CPLsample(14),0.5),'','miter',true) % % See also: CPLrack4PL, CPLconvexhull, CPLconvexhulldelaunay, % delaunayofCPL, CPLharbour, CPLfillin, CPLfillinside, CPLfillgap, % CPLoutlinecontour % % % Copyright 2020-2021 Tim C. Lueth |
CPLconvexhulldelaunay(CPL)- returns the convex hull for a CPL |
% CPLconvexhulldelaunay(CPL) - returns the convex hull for a CPL % (by Tim Lueth, VLFL-Lib, 2020-AUG-16 as class: CLOSED POLYGON LISTS) % % based on delaunayofCPL (Status of: 2020-08-16) % % Introduced first in SolidGeometry 4.9 % % See also: CPLconvexhull, delaunayofCPL, CPLharbour, CPLfillin, % CPLfillinside, CPLfillgap % % CPLD=CPLconvexhulldelaunay(CPL) % === INPUT PARAMETERS === % CPL: CPL % === OUTPUT RESULTS ====== % CPLD: convex hull of the delaunay triangulation % % See also: CPLconvexhull, delaunayofCPL, CPLharbour, CPLfillin, % CPLfillinside, CPLfillgap % % % Copyright 2020 Tim C. Lueth |
SGcopypatternXYZ(SG,cp,dd,fuse)- returns a cell list of xyz copies or a fused solid of SG |
% SGcopypatternXYZ(SG,cp,dd,fuse) - returns a cell list of xyz copies or a fused solid of SG % (by Tim Lueth, VLFL-Lib, 2020-AUG-16 as class: SURFACES) % % was existing by Lauren de Smedt as SGpatternXYZ but forgotten and % implemented from SGofCPLcommand (Status of: 2020-08-16) % % Introduced first in SolidGeometry 4.9 % % See also: SGboxing, SGpatternRotz, SGcopyrotZ, SGarrangeSG, % SGarrangeSGC, SGCaddSGn, SGCaddSG, SGstackn, SGcopyVL, SGsurfaces % % SG=SGcopypatternXYZ(SG,[cp,dd,fuse]) % === INPUT PARAMETERS === % SG: Solid Geometry % cp: number of copies in [x y z] % dd: distance between the copies % fuse: if true; SG is struct not cell; default is true % === OUTPUT RESULTS ====== % SG: cell list of SG % % EXAMPLE: Create copies at ten random positions % SGcopypatternXYZ(SGcylinder,[1 1 3],4) % SGcopypatternXYZ(SGcylinder,[1 1 3],4,true) % % See also: SGboxing, SGpatternRotz, SGcopyrotZ, SGarrangeSG, % SGarrangeSGC, SGCaddSGn, SGCaddSG, SGstackn, SGcopyVL, SGsurfaces % % % Copyright 2020 Tim C. Lueth |
PoseofCPLcutui(CPL,CPLW)- allows the interactive shaping and move of poses of contours |
% PoseofCPLcutui(CPL,CPLW) - allows the interactive shaping and move of poses of contours % (by Tim Lueth, VLFL-Lib, 2020-AUG-16 as class: KINEMATICS AND FRAMES) % % This fnctn is helpful if you want to cut out from a background % used first in exp_2019_01_27_chair % (Status of: 2020-08-16) % % Introduced first in SolidGeometry 4.9 % % See also: Poseofimageui, Poseorderchange, Posetransui, PoseofCPLui, % exp_2019_01_27_chair % % PS=PoseofCPLcutui(CPL,[CPLW]) % === INPUT PARAMETERS === % CPL: Effektor contour % CPLW: Background Contour % === OUTPUT RESULTS ====== % PS: Pose Struct include A, B, CPLE, CPLB, CPLW % % EXAMPLE: % CPL=PLcircle(70,'','',80); CPLW=PLcircle(60,'','',70); CPL=[CPL; nan nan; CPLW]; % PoseofCPLcutui (CPL,CPLW); PS=ans % % See also: Poseofimageui, Poseorderchange, Posetransui, PoseofCPLui, % exp_2019_01_27_chair % % % Copyright 2020-2021 Tim C. Lueth |
SGButtonDownFcn(srch,cbdat)- Callback Fnct for current axis and all polygons inside |
% SGButtonDownFcn(srch,cbdat) - Callback Fnct for current axis and all polygons inside % (by Tim Lueth, VLFL-Lib, 2020-AUG-15 as class: USER INTERFACE) % % This fnctn installs the callback uipolygonmoveWindowButtonDownFcn if % required % This fnctn can be attached to gca and polygons (Status of: 2020-08-16) % % Introduced first in SolidGeometry 4.9 % % See also: rotate3d, SGWindowButtonMotionFcn % % SGButtonDownFcn(srch,cbdat) % === INPUT PARAMETERS === % srch: callback arg 1 % cbdat: callback arg 2 % % EXAMPLE: % set(gca,'ButtonDownFcn',@SGButtonDownFcn) % set(findobj(gca,'Type','polygon'),'ButtonDownFcn',@SGButtonDownFcn,'selected','off') % % % See also: rotate3d, SGWindowButtonMotionFcn % % % Copyright 2020 Tim C. Lueth |
SGWindowButtonMotionFcn(srch,cbdat)- implements the concept of get(gca,'CurrentPoint') also for rotate3d on |
% SGWindowButtonMotionFcn(srch,cbdat) - implements the concept of get(gca,'CurrentPoint') also for rotate3d on % (by Tim Lueth, VLFL-Lib, 2020-AUG-15 as class: USER INTERFACE) % % It seems that in 2019a in combination with some updates the behaviour % of get(gca,'CurrentPoint') changed. It is not possible anymore within a % ButtonDownFcn callback any other Currentpoint than the point of the % first hit of the fnctn. This is a problem for some fnctn such as % uipolygonmoveWindowButtonDownFcn. Therefor this fnctn, if installed as % WindowButtonMotionFcn callback creates a global variable named % % get_gca_CurrentPoint which is the same as get(gca,'CurrentPoint') % % but works also for rotate3D on. (Status of: 2020-08-16) % % Introduced first in SolidGeometry 4.9 % % See also: rotate3d, SGButtonDownFcn % % h=SGWindowButtonMotionFcn(srch,cbdat) % === INPUT PARAMETERS === % srch: % cbdat: % === OUTPUT RESULTS ====== % h: global variable get_gca_CurrentPoint % % EXAMPLE: % set(gcf,'WindowButtonMotionFcn',@SGWindowButtonMotionFcn); % % % See also: rotate3d, SGButtonDownFcn % % % Copyright 2020 Tim C. Lueth |
SGdesignSupplement(S,F,w)- creates cylinders or CPLs that are big enough to encapsulate the fixture elements |
% SGdesignSupplement(S,F,w) - creates cylinders or CPLs that are big enough to encapsulate the fixture elements % (by Tim Lueth, VLFL-Lib, 2020-AUG-13 as class: AUTOMATIC DESIGN) % % THIS IST DIFFERENT TO SGsupplement % This fnctn is used in combination with the creation of subtraction % solid for fixations for instance such as SGdesignDIN912DIN985 or % SGdesignDIN912DIN985ballbearing % The SGdesignSupplement has to be ADDED to a solid. Afterwards it is % possible to SUBTRACT the Subtraction solids (Status of: 2021-03-21) % % Introduced first in SolidGeometry 4.9 % % See also: SGdesignDIN912DIN985, SGdesignDIN912DIN985ballbearing % % [SGHS,SGNS]=SGdesignSupplement([S,F,w]) % === INPUT PARAMETERS === % S: Screw or Fiaxtion type using a Frame 'C' as separation % F: Frame Name default is 'C' % w: minimum wall size % === OUTPUT RESULTS ====== % SGHS: Solid for Head SGdesignSupplement, green % SGNS: Solid for Nut SGdesignSupplement, yellow % % EXAMPLE: % [H,N,S]=SGdesignDIN912DIN985ballbearing([2.5 7 3.5],[10 +1]) % [SGHS,SGNS]=SGdesignSupplement(S) % SG=SGsubtract(SGHS,H,'alignT',{'C','C'}); SGfigure; view(-30,30); SGTplotalpha(SG,'g',0.8); SGTplotalpha(S,'','','',SG,'alignT',{'C','C'}); % SG=SGsubtract(SGNS,N,'alignT',{'C','C'}); SGfigure; view(-30,30); SGTplotalpha(SG,'y',0.8); SGTplotalpha(S,'','','',SG,'matchT',{'C','C'}); % % % [H,N,S]=SGdesignDIN912DIN985([2.5 8]) % [SGHS,SGNS]=SGdesignSupplement(S) % SGManipulatorLink(40,'',5.2,2); SA=ans; % SA=SGunion(SA,SGNS,'center','matchT',{'C','B'}); SA=SGunion(SA,SGHS,'center','matchT',{'C','F'}); % SGfigure;view(-30,30); SGTplot(SA); % SG=SGsubtract(SA,H,'alignT',{'C','F'}); SGfigure; view(-30,30); SGTplotalpha(SG,'g',0.8); % SG=SGsubtract(SG,N,'alignT',{'C','B'}); SGfigure; view(-30,30); SGTplotalpha(SG,'g',0.8); % % % See also: SGdesignDIN912DIN985, SGdesignDIN912DIN985ballbearing % % % Copyright 2020-2021 Tim C. Lueth |
exp_2020_08_13_refresh- creates an experiment compared to the ones almost 8 years ago |
% exp_2020_08_13_refresh - creates an experiment compared to the ones almost 8 years ago % (by Tim Lueth, VLFL-Lib, 2020-AUG-13 as class: EXPERIMENTS) % % This fnctn not only design a link between two frames, it also makes % sure that it can be screwed by using norm elements such a DIN912 screw % and a DIN985 nut (Status of: 2020-08-13) % % Introduced first in SolidGeometry 4.9 % % See also: exp_2012_12_12, exp_2012_11_11_03 % % exp_2020_08_13_refresh % % See also: exp_2012_12_12, exp_2012_11_11_03 % % % Copyright 2020 Tim C. Lueth |
FLofVLFLinVLFL(VLA,FLA,VLB,FLB,flp)- searches for identical facets of B in A (slow) |
% FLofVLFLinVLFL(VLA,FLA,VLB,FLB,flp) - searches for identical facets of B in A (slow) % (by Tim Lueth, VLFL-Lib, 2020-AUG-13 as class: SURFACES) % % ======================================================================= % OBSOLETE (2020-08-13) - USE 'findfacetsinVLFL' INSTEAD % ======================================================================= % % Good example for a fnctn not implemented better as second try - Compare % with findfacetsinVLFL which is more flexible in Version SG-Lib 4.9 % (Status of: 2020-08-13) % % Introduced first in SolidGeometry 4.9 % % See also: [ findfacetsinVLFL ] ; SGcolorcopy, findfacetsinVLFL, % ismemberFL % % [fia,fib,ci]=FLofVLFLinVLFL(VLA,FLA,VLB,[FLB,flp]) % === INPUT PARAMETERS === % VLA: Vertex list A or SGA % FLA: Facet list A % VLB: Vertex list B or SGB % FLB: Facet list B % flp: not in use % === OUTPUT RESULTS ====== % fia: faces of A used in B % fib: faces of B used in A % ci: face correspondance list % % EXAMPLE: % SGbox([15*dofn(6)*2 20 10]); A=ans; % SGtransP(SGcylinder(20,10,6),[0 0 -5]); B=ans; % A=SGcolorfaces(A,'g'); B=SGcolorfaces(B,'y'); % [a,b,c]=FLofVLFLinVLFL(A,'',B) % SGcolorcopy(A,B); SGfigure(ans); view(30,30) % findfacetsinVLFL(A.VL,A.FL,B.VL,B.FL) % % See also: [ findfacetsinVLFL ] ; SGcolorcopy, findfacetsinVLFL, % ismemberFL % % % Copyright 2020 Tim C. Lueth |
SGbearingslide(Sz,fit)- erzeugt ein Gleitlager nach Spezifikationen für einen AM Printer |
% SGbearingslide(Sz,fit) - erzeugt ein Gleitlager nach Spezifikationen für einen AM Printer % (by Tim Lueth, VLFL-Lib, 2020-AUG-12 as class: PARAMETRIC DESIGN) % % Unter einem Durchmesser von 3mm gibt es kaum Gleitlager und Wälzlager % werden extrem teuer. Nicht zuletzt deshalb bietet es sich an, die % Gleitlager selbst zu drucken in den Größenordnung der verfügbaren % Wälzlager % Diese Funktion unterstützt unterschiedliche Passungen zwischen den % beiden Lagerhälften. (Status of: 2020-08-12) % % Introduced first in SolidGeometry 4.9 % % See also: SGbearing % % [SGI,SGO]=SGbearingslide([Sz,fit]) % === INPUT PARAMETERS === % Sz: Size of the Sliding Bearing % fit: 'c form2b' transition fit for formlab 2 % === OUTPUT RESULTS ====== % SGI: Inner Part for the Screw or Shaft % SGO: Outer Part for "Interference Fit" % % EXAMPLE: % SGbearingslide([2.5 8 1.6],'t formiga') % Transition fit for EOS Formiga100 Printer % SGbearingslide([2.5 8 1.6],'c form3b') % Clearance fit for Formlab FORM3B Printer % % See also: SGbearing % % % Copyright 2020 Tim C. Lueth |
SGManipulatorDIN912DIN985ballbearing(LL,LR,LH,BS,SS)- returns all the parts of a 7DoF manipulator than can be assembled by screws and ballbearings |
% SGManipulatorDIN912DIN985ballbearing(LL,LR,LH,BS,SS) - returns all the parts of a 7DoF manipulator than can be assembled by screws and ballbearings % (by Tim Lueth, VLFL-Lib, 2020-AUG-11 as class: AUTOMATIC DESIGN) % % Writes also all solid geometries on disk. % Be careful that the dimensions of Manipulator arm segments are not % multiples or integer fractions of the length of screws or ball bearings % (Status of: 2020-08-11) % % Introduced first in SolidGeometry 4.9 % % See also: SGManipulator04Basem, SGManipulator04Link % % [A,B,C,D,U,E]=SGManipulatorDIN912DIN985ballbearing([LL,LR,LH,BS,SS]) % === INPUT PARAMETERS === % LL: Distance between Axis; default is 40 % LR: Radius; default is 5.1 % LH: Height default is 7.1 % BS: Ball Bearing size (Ri, RO, W] default is [2.5 7 3.5] % SS: Screw Seize {L oh] Length overhead default is [8 -1] % === OUTPUT RESULTS ====== % A: Baser plate % B: 1st link and 4th link % C: optiona 7DoF % D: 2nd link % U: 3rd link and 5th link % E: 6th link end effector % % EXAMPLE: % [A,B,C,D,H,EF]=SGManipulatorDIN912DIN985ballbearing; % SGTchain({A,B,C,D,H,B,H,EF},[pi pi 0 pi 0 pi 0]); SGn=ans; SGfigure; SGplotalpha(SGn,'w'); view(-30,30); fullview(0.5) % SGfigure; view(-30,30); SGplotalpha(SGn); % % % See also: SGManipulator04Basem, SGManipulator04Link % % % Copyright 2020 Tim C. Lueth |
slfit(typ,name)- returns the slot size value for a desired fitting during programmed design procedures |
% slfit(typ,name) - returns the slot size value for a desired fitting during programmed design procedures % (by Tim Lueth, VLFL-Lib, 2020-AUG-11 as class: MECHANICAL PROCEDURES) % % It is not a perfect method. Better it would be to use frames that % explain the fitting by a letter such as % 'fit-c' or 'fit-cx' if several frames are used or a combination of 'c' % and arbitray frame name % fittings {'c','0123'} with the number as fitting frame name % The results using a FORM2 Printer with clear Resin V4 and 50µm % resolution were on Aug. 16 2020 by Tim Lueth for bore hole radius % oversize (plus == increase of bore hole radius): % +0.05mm not to be pressed in at all by hand - probably destroyed by % hammering % +0.10mm Difficult to push in by hand and difficult to remove even with % a hammer % +0.15mm Easy to press in by hand and can only be easily removed by hand % +0.20mm easy to join by hand and falls out by itself when shaken % +0.25mm falls out by turning under its own weight % The results using a FORM3B Printer with MOdel Resin V2 and 50µm % resolution were on Aug. 11 2020 by Tim Lueth for bore hole radius % oversize (minus == increase of bore hole radius % +0.05mm Difficult to push in by hand and difficult to remove even with % a hammer % +0.10mm Difficult to push in by hand and difficult to remove even with % a hammer % +0.15mm Easy to press in by hand and can only be easily removed by hand % +0.20mm easy to join by hand and falls out by itself when shaken % +0.25mm falls out by turning under its own weight % (Status of: 2020-08-21) % % Introduced first in SolidGeometry 4.9 % % See also: DIN4AMfitting, islfit, FLofSGcolor % % LITERATURE: % - Fischer et al. (2011): Tabellenbuch Metall, Verlag Europa-Lehrmittel, % Nourney, 45. Auflage, % % [sl,Printer]=slfit([typ,name]) % === INPUT PARAMETERS === % typ: clearance type such as 'c', 't', 'i' % name: name fo a printer such as FORM2 % === OUTPUT RESULTS ====== % sl: slot size ==> deivide by 2 for radius % Printer: exact printer name % % EXAMPLE: % slfit('set formiga'); % Ri=3; [sl,AM]=slfit('c','FORM3B') % try 'c' and 't' and 'i' % A=SGofCPLz([PLsquare([8 8]);nan nan;PLcircle(Ri+sl); nan nan; PLcircle(Ri)],10); A.designed4=AM; % SGdimensioning4(A); % % See also: DIN4AMfitting, islfit, FLofSGcolor % % % Copyright 2020-2021 Tim C. Lueth |
SGgrowVLFLfi(VL,FL,fi,dt)- moves facets of an indexed surface along the normal vectors |
% SGgrowVLFLfi(VL,FL,fi,dt) - moves facets of an indexed surface along the normal vectors % (by Tim Lueth, VLFL-Lib, 2020-AUG-10 as class: SURFACES) % % Just a first approach - There is a lot to improve (Status of: % 2020-08-10) % % Introduced first in SolidGeometry 4.9 % % See also: SGgrow, SGgrowinsideFS, SGgrowinsideoutside % % [VL,FL]=SGgrowVLFLfi(VL,FL,fi,dt) % === INPUT PARAMETERS === % VL: Vertex list % FL: Facet list % fi: Facet Indices % dt: distance to grow % === OUTPUT RESULTS ====== % VL: New Vertex list % FL: Same Facet list % % EXAMPLE: % SGfittingsample; A=ans; FSofSGT(A,'F',-1); fi=ans; % SG=SGcolorfaces(A,'r',fi); SGfigure; view(-30,30); SGplotalpha(SG); % fi=FLofSGcolor(SG,'r'); % SGgrowVLFLfi(SG.VL,SG.FL,fi,-1.5) % % See also: SGgrow, SGgrowinsideFS, SGgrowinsideoutside % % % Copyright 2020 Tim C. Lueth |
FLofSGcolor(SG,col)- finds the faced of a specified color |
% FLofSGcolor(SG,col) - finds the faced of a specified color % (by Tim Lueth, VLFL-Lib, 2020-AUG-10 as class: SURFACES) % % Introduced first in SolidGeometry 4.9 % % See also: SGcolorfaces % % fi=FLofSGcolor(SG,col) % === INPUT PARAMETERS === % SG: Solid Geometry % col: search color % === OUTPUT RESULTS ====== % fi: facet index in SG % % EXAMPLE: % SGfittingsample; A=ans; FSofSGT(A,'F',-1); fi=ans; SGcolorfaces(A,'dp',fi); SG=ans, % deep purple % FLofSGcolor(SG,'dp') % logical faces of SG.FL % FLofSGcolor(SG,'r'); % % See also: SGcolorfaces % % % Copyright 2020 Tim C. Lueth |
PLshaft(r,d,b)- creates a PL for a contour for SGofCPLrot |
% PLshaft(r,d,b) - creates a PL for a contour for SGofCPLrot % (by Tim Lueth, VLFL-Lib, 2020-AUG-10 as class: CLOSED POLYGON LISTS) % % ======================================================================= % OBSOLETE (2022-01-16) - USE 'PLshaftrad' INSTEAD % ======================================================================= % % will be removed! (Status of: 2022-01-16) % % Introduced first in SolidGeometry 4.9 % % See also: [ PLshaftrad ] ; CPLmotorshaft % % PL=PLshaft([r,d,b]) % === INPUT PARAMETERS === % r: [r1 r2 r3 ....] radius % d: distance between radius % b: radius for breaking the edges; default is 0.3 % === OUTPUT RESULTS ====== % PL: Point list of a shaft % % EXAMPLE: % PLshaft([6 3 6],5,1); PL=ans; SGofCPLrot(fliplr(PL)) % PLshaft([6 3 6],5,0); PL=ans; SGofCPLrot(fliplr(PL)) % % See also: [ PLshaftrad ] ; CPLmotorshaft % % % Copyright 2020-2022 Tim C. Lueth |
SGfittingsample(d)- returns a solid for fitting experiments |
% SGfittingsample(d) - returns a solid for fitting experiments % (by Tim Lueth, VLFL-Lib, 2020-AUG-08 as class: MODELING PROCEDURES) % % Introduced first in SolidGeometry 4.9 % % See also: SGbox, SGsample % % SG=SGfittingsample([d]) % === INPUT PARAMETERS === % d: [d r1 r2 r3 ....] distance and radius % === OUTPUT RESULTS ====== % SG: Solid Geometry % % EXAMPLE: % SGfittingsample([5 1 2 3]) % % See also: SGbox, SGsample % % % Copyright 2020 Tim C. Lueth |
SGmotorN20()- returns just the Geometry of a N20 motor |
% SGmotorN20() - returns just the Geometry of a N20 motor % (by Tim Lueth, VLFL-Lib, 2020-AUG-06 as class: MODELING PROCEDURES) % % Extraction of the N20 motor from the SGmotorSolExpert fnctn (Status of: % 2020-08-10) % % Introduced first in SolidGeometry 4.9 % % See also: SGbatteriepack, SGmotorSolExpert, SGcapontop, SGmotorshaft, % SGmotorhousing % % SG=SGmotorN20([]) % === OUTPUT RESULTS ====== % SG: Solid Geometry of a N20 Motor % % EXAMPLE: % SGmotorN20; SG=ans; % SGmotorN20('encoder'); SG=ans; SGdimensioning4(SG); % SGmotorhousing(SGgrow(SG,0.5),1.4); % % See also: SGbatteriepack, SGmotorSolExpert, SGcapontop, SGmotorshaft, % SGmotorhousing % % % Copyright 2020 Tim C. Lueth |
DIN4AMfitting(M,Q)- DIN similar table for fitting offsets with different AM-Printers |
% DIN4AMfitting(M,Q) - DIN similar table for fitting offsets with different AM-Printers % (by Tim Lueth, VLFL-Lib, 2020-AUG-05 as class: MECHANICAL PROCEDURES) % % The data was measured with % - 5mm holes and 5mm dowel pins % - 2.5mm hexagonal bits % clearance_fit', => Spielpassung % 'transition_fit', => Übergangspassung % 'interference_fit'=> Presspassung % See also Fischer et al (2011), Page 99ff. (Status of: 2020-08-21) % % Introduced first in SolidGeometry 4.9 % % See also: DIN13, DIN336, DIN464, DIN912, DIN913, DIN985, DINfindinTab, % DIN, 433, DINhelp, DINthreadtorque, DIN4AMFitting, slfit % % LITERATURE: % - Fischer et al. (2011): Tabellenbuch Metall, Verlag Europa-Lehrmittel, % Nourney, 45. Auflage, % % [M,TL,Taborder]=DIN4AMfitting(M,[Q]) % === INPUT PARAMETERS === % M: Search term such as "Formiga' % Q: Optional search term in Taborder % === OUTPUT RESULTS ====== % M: Number oder Char such as "Formiga' % TL: Table or table entry if Q is used % Taborder: Name of Table cols % % EXAMPLE: % DIN4AMfitting % [M,TL]=DIN4AMfitting ('FORM2') % [M,TL]=DIN4AMfitting ('FORM3B','trans') % % See also: DIN13, DIN336, DIN464, DIN912, DIN913, DIN985, DINfindinTab, % DIN, 433, DINhelp, DINthreadtorque, DIN4AMFitting, slfit % % % Copyright 2020 Tim C. Lueth |
SGdesignDIN912DIN985radialbearing(bbb,sdl,ins,tpl,W)- creates subtraction solids for a bearing connection at a specific frame position of a solid |
% SGdesignDIN912DIN985radialbearing(bbb,sdl,ins,tpl,W) - creates subtraction solids for a bearing connection at a specific frame position of a solid % (by Tim Lueth, EXPERIMENT, 2020-AUG-05 as class: AUTOMATIC DESIGN) % % Former name (4.9 and 5.0) was SGdesignDIN912DIN985ballbearing % If two elements should be connected using a ball bearing, this fnctn % helps to create the subtraction solids to achive a fnctnal connection % using standard machine elements. (Status of: 2022-01-15) % % Introduced first in SolidGeometry 4.9 % % See also: SGdesignDIN912DIN985, SGdesignBallbearing, SGdesignSupplement % % [H,N,S,mt,parts]=SGdesignDIN912DIN985radialbearing([bbb,sdl,ins,tpl,W]) % === INPUT PARAMETERS === % bbb: [Ri Ro Width] of the ball bearing % sdl: [length overize] length and oversize of the screw DIN912 % ins: "TT", "TP, "PT", "PP"; Default is "TT" % tpl: Length of Insertion T/P for [HEAD NUT]; default is 10 10 % W: Rotation angle for the depth of the pocket % === OUTPUT RESULTS ====== % H: Subtraction Solid for plug side including frame 'C' % N: Subtraction Solid for bearing side including frame 'C' % S: Geometry of Plug including frame 'C' % mt: remaining material width % parts: parts list for assembly of one connection % % EXAMPLE: % SGdesignDIN912DIN985radialbearing % [P,N,S]=SGdesignDIN912DIN985radialbearing([2.5 7 3.5],[8 -1],'T',20); % SG=SGManipulatorLink('',true); % SG=SGsubtract(SG,P,'alignT',{'C','B'}); % SG=SGsubtract(SG,N,'alignT',{'C','F'}); SGfigure(SG); % % See also: SGdesignDIN912DIN985, SGdesignBallbearing, SGdesignSupplement % % % Copyright 2020-2022 Tim C. Lueth |
DIN433(M)- returns the DIN433 table for a 2D Metric Washer |
% DIN433(M) - returns the DIN433 table for a 2D Metric Washer % (by Tim Lueth, VLFL-Lib, 2020-AUG-05 as class: AUXILIARY PROCEDURES) % % 'M','Inner_Diameter','Outer_Diameter','Height' % The inner diameter is also the norm diameter for a drilling hole for a % screw of this size. I.e. for M5 screws use a 5.3mm diameter for the % drilling hole (Status of: 2020-08-05) % % Introduced first in SolidGeometry 4.9 % % See also: DIN13, DIN336, IN464, DIN912, DIN913, DIN985, DINfindinTab, % DINhelp, DINthreadtorque % % [M,TL,Taborder]=DIN433(M) % === INPUT PARAMETERS === % M: Desired metric diameter % === OUTPUT RESULTS ====== % M: Metric Diameter in Tab % TL: Table row % Taborder: Table colum names % % EXAMPLE: % DIN433 % DIN433(2.3) % DIN_433=DIN433; DINfindinTab(2.3,DIN_433) % % See also: DIN13, DIN336, IN464, DIN912, DIN913, DIN985, DINfindinTab, % DINhelp, DINthreadtorque % % % Copyright 2020 Tim C. Lueth |
FLinsideSurfaceofSG(SG,seper,maxtry,wlim,ilim)- Returns the Facet Indices of inside surfaces |
% FLinsideSurfaceofSG(SG,seper,maxtry,wlim,ilim) - Returns the Facet Indices of inside surfaces % (by Tim Lueth, VLFL-Lib, 2020-AUG-04 as class: EXPERIMENTS) % % Uses SGinsideSurface % In contrast to SGinsideSurface, this fnctn first of all splits a % geometry into independent surfaces, which were possibly only combined % with SGconcat. To avoid STL reading errors it is recommended to use the % SGshortopti fnctn for CATIA/SOLIDWORS exported models. % Afterwards the inner faces are detected for each of these surfaces. % It is not always useful to disassemble the surfaces first, so there is % an option to switch this off (Status of: 2020-08-11) % % Introduced first in SolidGeometry 4.9 % % See also: SGcheckfacedist, SGinsidesurface % % [FLi,SG]=FLinsideSurfaceofSG(SG,[seper,maxtry,wlim,ilim]) % === INPUT PARAMETERS === % SG: Solid Geometry % seper: separate into independent surfaces first; default is true % maxtry: Number of tries to find an opponing facet; default is 10 % wlim: warning limit; default is 0.7 mm % ilim: intended limit; distance that is intended; default is 0.1mm % === OUTPUT RESULTS ====== % FLi: Facet surface index list % SG: inside index of feature surface % % EXAMPLE: % load JACO_robot.mat % SG=SGsurfaces(JC3,3) % FLinsideSurfaceofSG(SG); % % FLinsideSurfaceofSG(SG); fi=ans; fi=find(fi); fi=fi(1), T=Tof3P(SG.VL(SG.FL(fi,:),:)); tplot(T,100); FSofSGT(SG,T,'',.1) % FLinsideSurfaceofSG(SG); fi=ans; SGN=SG; SGN.FL=SG.FL(fi,:); SGsurfaces(SGN) % % See also: SGcheckfacedist, SGinsidesurface % % % Copyright 2020 Tim C. Lueth |
SGDIN464(M,L,H)- SG of a knureld screw |
% SGDIN464(M,L,H) - SG of a knureld screw % (by Tim Lueth, VLFL-Lib, 2020-AUG-03 as class: MODELING PROCEDURES) % % M2.5 V2A => M7 PA (Status of: 2020-08-03) % % Introduced first in SolidGeometry 4.9 % % See also: SGDIN912, SGDIN985, SGDIN433, SGDIN9021 % % [SG,M]=SGDIN464([M,L,H]) % === INPUT PARAMETERS === % M: Metric Diameter % L: Length of Screw % H: Optional knurled head size % === OUTPUT RESULTS ====== % SG: Solid Geomtry % M: % % EXAMPLE: % SGDIN464(5,8) % M5 x 8 NORM % SGDIN464(5,8,10) % M5 x 8 Knureled heigh 10mm % % % See also: SGDIN912, SGDIN985, SGDIN433, SGDIN9021 % % % Copyright 2020 Tim C. Lueth |
DIN464(M)- returns the DIN464 table for a metric threads with knureld head |
% DIN464(M) - returns the DIN464 table for a metric threads with knureld head % (by Tim Lueth, VLFL-Lib, 2020-AUG-03 as class: AUXILIARY PROCEDURES) % % 'M','Knurled_Diameter','Knurled_Height','Socket_Diameter','Head_Height' % (Status of: 2020-08-04) % % Introduced first in SolidGeometry 4.9 % % See also: DIN13, DIN336, DIN912, DIN913, DIN985, DINfindinTab, DINhelp, % DINthreadtorque % % [M,TL,Taborder]=DIN464(M) % === INPUT PARAMETERS === % M: Desired metric diameter % === OUTPUT RESULTS ====== % M: Metric Diameter in Tab % TL: Table row % Taborder: Table colum names % % See also: DIN13, DIN336, DIN912, DIN913, DIN985, DINfindinTab, DINhelp, % DINthreadtorque % % % Copyright 2020 Tim C. Lueth |
PLknurled(R,n,k,m)- returns a sinus contour on a circle |
% PLknurled(R,n,k,m) - returns a sinus contour on a circle % (by Tim Lueth, VLFL-Lib, 2020-AUG-03 as class: CLOSED POLYGON LISTS) % % USED in SGDIN464 (Status of: 2021-01-24) % % Introduced first in SolidGeometry 4.9 % % See also: PLknurled, PLstar, SGDIN464 % % PLK=PLknurled([R,n,k,m]) % === INPUT PARAMETERS === % R: Radius % n: nofrd(R) % k: number of waves % m: offset to R; % === OUTPUT RESULTS ====== % PLK: CPLof of knureld contour % % EXAMPLE: % PLknurled(5) % PLstar(5,100,'','','',0.95); % % See also: PLknurled, PLstar, SGDIN464 % % % Copyright 2020-2021 Tim C. Lueth |
SGslidingcoverofCPLz(CPL,w,T,op)- returns the part of a plane sliding cover for a solid with defined wall sizes |
% SGslidingcoverofCPLz(CPL,w,T,op) - returns the part of a plane sliding cover for a solid with defined wall sizes % (by Tim Lueth, VLFL-Lib, 2020-AUG-02 as class: AUTOMATIC DESIGN) % % w wall thickness % h Height % e Extension length % s Slot size % format [w [h e s]] (Status of: 2020-08-02) % % Introduced first in SolidGeometry 4.9 % % See also: SGcapontop % % SG=SGslidingcoverofCPLz(CPL,[w,T,op]) % === INPUT PARAMETERS === % CPL: Contour of a convex hull % w: [w h e sl] wall thickness of the walls ; height of the plate % T: Frame to align the cover; not supported yet % op: % === OUTPUT RESULTS ====== % SG: Plate consisting of at least three parts % % EXAMPLE: % SGslidingcoverofCPLz (PLsquare(10,20),[2 4]); % Contour with wall thickness 2 and desired height 4 % %% Create a housing for a motor with an sliding cover % SGmotorSolExpert; M=ans; [C,~,CPL]=SGcapontop(M,[inf 2],'','simple'); SGplotalpha(C,'w',0.2); % SGslidingcoverofCPLz(CPL,[2 4]); P=ans; % Create a Slidung Cover % SGtransrelSG(P,C,'under'); P=ans; % Position Sliding Cover % SGanalyzeGroupParts({P,C}); SG=ans; % Fuse Parts % SGunion(SG.SG); SGanalyzeGroupParts(ans) % Show the new solids % SGslidingcoverofCPLz(CPLradialEdges(CPLofPL(PLsquare(20))),[1 4 2 ],'',[9 1]); % with opening % % See also: SGcapontop % % % Copyright 2020 Tim C. Lueth |
SGmotorhousing(M,w,D)- returns a housing betwenn Base frame 'B' and end of motor |
% SGmotorhousing(M,w,D) - returns a housing betwenn Base frame 'B' and end of motor % (by Tim Lueth, VLFL-Lib, 2020-AUG-01 as class: AUTOMATIC DESIGN) % % Introduced first in SolidGeometry 4.9 % % See also: SGcapontop, SGslidingcoverofCPLz % % [C,P]=SGmotorhousing(M,[w,D]) % === INPUT PARAMETERS === % M: SG Model of Motor % w: wall width of housing; default is 2mm [w e sl] % D: Diameter of hole at front side; default is 9mm; 0 and inf is possible % === OUTPUT RESULTS ====== % C: Cell array of housing and slinder % P: % % EXAMPLE: % SGmotorSolExpert; M=ans; % SGmotorhousing(SGgrow(M,.05),2); C=ans % Growing of 1/10 is required for formlab % % See also: SGcapontop, SGslidingcoverofCPLz % % % Copyright 2020 Tim C. Lueth |
SGcablewinch(wsz,drl)- creates a solid for a cable winch |
% SGcablewinch(wsz,drl) - creates a solid for a cable winch % (by Tim Lueth, VLFL-Lib, 2020-AUG-01 as class: AUTOMATIC DESIGN) % % If an optional length is specified, it is possible to set outer Radius % or Height to Zero to get an automatic design of the cable winch (Status % of: 2020-08-06) % % Introduced first in SolidGeometry 4.9 % % See also: SGmotorSolExpert, SGmotorshaft % % [SG,nl]=SGcablewinch([wsz,drl]) % === INPUT PARAMETERS === % wsz: [Ri Ro H] Inner Outer Diameter and Height % drl: [D l] Diameter of cable and optional length % === OUTPUT RESULTS ====== % SG: Solid Geometry % nl: Cable length % % EXAMPLE: % SGcablewinch([5 15 5],1) % Winch for 1mm cable [ri ro h] % SGcablewinch([5 0 5],[1 400]) % calc outer diameter for at least 40 cm % SGcablewinch([5 10 0],[1 400]) % calc Height for at least 40 cm % % See also: SGmotorSolExpert, SGmotorshaft % % % Copyright 2020 Tim C. Lueth |
SGhook4rail(DR,WS,DL)- returns a solid for a rail hook looking to face |
% SGhook4rail(DR,WS,DL) - returns a solid for a rail hook looking to face % (by Tim Lueth, VLFL-Lib, 2020-AUG-01 as class: SURFACES) % % Can be used for a Motorcycle helmet at an 30mm IKEA Rail - Printing % Time 4h (Status of: 2020-08-01) % % Introduced first in SolidGeometry 4.9 % % See also: SGbitISO1173 % % SG=SGhook4rail([DR,WS,DL]) % === INPUT PARAMETERS === % DR: Diameter of Rail; default is 30mm % WS: Wall size; default is DR/3 % DL: Elongation for hook; default is DR/2 % === OUTPUT RESULTS ====== % SG: Hook for a Rail % % EXAMPLE: % SGhook4rail(30,6,'','Biker''s Dream'); SG=ans % % See also: SGbitISO1173 % % % Copyright 2020 Tim C. Lueth |
SGrepairFLsimple(SG)- returns a solid with closed FL of the simpliest condition |
% SGrepairFLsimple(SG) - returns a solid with closed FL of the simpliest condition % (by Tim Lueth, VLFL-Lib, 2020-AUG-01 as class: SURFACES) % % Simply uses FLrepair. % This fnctn closes obvious missing triangles in a facet list. It has % clear limitations if a surface has edge facets with more than 90 degree % angle. (Status of: 2020-08-01) % % Introduced first in SolidGeometry 4.9 % % See also: FLrepair % % % SG=SGrepairFLsimple(SG) % === INPUT PARAMETERS === % SG: Solid Geometry SG.VL,SG.FL % === OUTPUT RESULTS ====== % SG: Repaired Solid % % EXAMPLE: % SGsphere(5); X=ans % Create a shpere % X.FL=X.FL([1:615,617:end],:) % remove one facet % SGcheckmeshlab(X); % Analyze the error % SGrepairFLsimple(X); Y=ans % Close the facet % % See also: FLrepair % % % % Copyright 2020 Tim C. Lueth |
SGTswap(SG,FA,FB);- Swaps two frames of a Solid |
% SGTswap(SG,FA,FB); - Swaps two frames of a Solid % (by Tim Lueth, VLFL-Lib, 2020-JUL-31 as class: KINEMATICS AND FRAMES) % % Introduced first in SolidGeometry 4.9 % % See also: SGTget, SGTset % % SGN=SGTswap(SG,FA,FB); % === INPUT PARAMETERS === % SG: Solid % FA: Frame name A % FB: Frame name B % === OUTPUT RESULTS ====== % SGN: Solid with swapped frame names % % EXAMPLE: % SG=SGcylinder(10,40); SG=SGTset(SG,'F',TofFS(SG,[0 0 1])); SG=SGTset(SG,'B',TofFS(SG,[0 0 -1])); % SGTswap(SG,'F','B') % % See also: SGTget, SGTset % % % Copyright 2020 Tim C. Lueth |
randol(r,c,rmin)- return an random number with at least a minimum value unit the next perdecimal |
% randol(r,c,rmin) - return an random number with at least a minimum value unit the next perdecimal % (by Tim Lueth, VLFL-Lib, 2020-JUL-31 as class: AUXILIARY PROCEDURES) % % helpful for random overlap intervalls (Status of: 2020-07-31) % % Introduced first in SolidGeometry 4.9 % % See also: randsupp, randminv % % r=randol([r,c,rmin]) % === INPUT PARAMETERS === % r: rows or minimum number % c: col % rmin: minimum number; default is 0.01 % === OUTPUT RESULTS ====== % r: randum number, or matrix % % EXAMPLE: % randol(4,4,.2) % 4x4 matrix, numbers between [0.2 and 0.3[ % % See also: randsupp, randminv % % % Copyright 2020 Tim C. Lueth |
exp_2020_07_31_LinkBallbearing- Experiment to print dummyplugs for bearing links |
% exp_2020_07_31_LinkBallbearing - Experiment to print dummyplugs for bearing links % (by Tim Lueth, VLFL-Lib, 2020-JUL-31 as class: EXPERIMENTS) % % ..writes directly on disk (Status of: 2020-07-31) % % Introduced first in SolidGeometry 4.9 % % See also: SGManipulatorLink, SGdesignDIN912DIN985, SGbearing % % exp_2020_07_31_LinkBallbearing % % See also: SGManipulatorLink, SGdesignDIN912DIN985, SGbearing % % % Copyright 2020 Tim C. Lueth |
SGTplotalpha(SG,c,a,e,relSG,relpos)- plots a solid including all frames and supports directly color and alpha value |
% SGTplotalpha(SG,c,a,e,relSG,relpos) - plots a solid including all frames and supports directly color and alpha value % (by Tim Lueth, VLFL-Lib, 2020-JUL-31 as class: USER INTERFACE) % % Just one successive call of SGplotalpha und SGTframeplot % Changes SG-Lib 5.2: Automatically includes also position of frames into % sizze for SGTframeplot (Status of: 2020-07-31) % % Introduced first in SolidGeometry 4.9 % % See also: SGplot, setplotlight, SGplotalpha % % h=SGTplotalpha(SG,[c,a,e,relSG,relpos]) % === INPUT PARAMETERS === % SG: SOlid Geometry % c: color; default is []; % a: alpha value; default is 1; % e: edge color; default is []; % relSG: Solid as Position reference % relpos: relative positioning like SGtransrelSG % === OUTPUT RESULTS ====== % h: handle to graphics object patch % % EXAMPLE: % SGfigure; view(-30,30); SGTplotalpha(SGcylinder(10,20,6),'b',.2); % SGfigure; view(-30,30); SGTplotalpha(SGcylinder(10,20,6),'b',.2,'r'); % SGfigure; view(-30,30); SGTplotalpha({SGbox,SGcylinder(5)},'r',0.4,'g'); shg % SGfigure; view(-30,3); SGTplotalpha(SGbox,'r',1,'',SGbox,'ontop',20); shg % % See also: SGplot, setplotlight, SGplotalpha % % % Copyright 2020-2022 Tim C. Lueth |
SGManipulatorBase(LL,Shap,LD,LH)- Plate, Base, and Hand for Manipulator Design # 4 |
% SGManipulatorBase(LL,Shap,LD,LH) - Plate, Base, and Hand for Manipulator Design # 4 % (by Tim Lueth, VLFL-Lib, 2020-JUL-30 as class: KINEMATICS AND FRAMES) % % Those parts can be assembled using screws, spacer, and nut of DIN DIN % 912, DIN 985, DIN 433 using Diameter 2.5mm and 8mm length and a ball % bearing S692-X-2Z (2.50 Euro /Stück) with inside 2.5mm, outside 7mm and % width 3.5mm % (Status of: 2020-08-01) % % Introduced first in SolidGeometry 4.9 % % See also: SGdimensioning4, SGdesignBallbearing, SGdesignDIN912DIN985, % SGManipulatorLink % % [A,B,K,U,E]=SGManipulatorBase([LL,Shap,LD,LH]) % === INPUT PARAMETERS === % LL: Length of Base and Hand; default is 40 % Shap: Surface shaping; default is true % LD: Radius of the tips; default is 5mm % LH: Height of the parts; default is 6mm % === OUTPUT RESULTS ====== % A: Base PLate % B: Base % K: 7 DoF % U: Hand % E: Effektor % % EXAMPLE: Create all parts of a 7DoF Manipulator % SGManipulatorBase('',false); % Just no surface shaping % [A,B,C,H,EF]=SGManipulatorBase % D=SGManipulatorLink % Link and link extender % SGTchain({A,B,C,D,H,B,H,EF},[pi pi 0 pi 0 pi 0]); SGn=ans; SGfigure; SGplotalpha(SGn,'w'); view(-30,30); fullview(0.5) % SGfigure; view(-30,30); SGplotalpha(SGn) % % See also: SGdimensioning4, SGdesignBallbearing, SGdesignDIN912DIN985, % SGManipulatorLink % % % Copyright 2020 Tim C. Lueth |
SGManipulatorLink(LL,Shap,LD,LH,DD)- Link with 2 Frames to create mechanisms or |
% SGManipulatorLink(LL,Shap,LD,LH,DD) - Link with 2 Frames to create mechanisms or % (by Tim Lueth, VLFL-Lib, 2020-JUL-28 as class: KINEMATICS AND FRAMES) % % This is just a simple design of a mechanical link with desired % dimensions including 2 frames (Status of: 2021-01-07) % % Introduced first in SolidGeometry 4.9 % % See also: SGlinkage, SGdimensioning, SGdesignBallbearing, % SGdesignDIN912DIN985, SGManipulatorBase % % SG=SGManipulatorLink([LL,Shap,LD,LH,DD]) % === INPUT PARAMETERS === % LL: Axis Distance; default is 40; or [Startpoint;Endpoint] % Shap: if true; the links are shaped; default is false % LD: Radius of the Tip rounding; default is 5 % LH: Height of the Elements also used as shaping Radius; default is 6 % DD: if true; the shape is doubled for chaining; default is false % === OUTPUT RESULTS ====== % SG: Link Geometry % % EXAMPLE: % SGManipulatorLink(40,true); SG=ans; % SGdimensioning4(SG); % [P,N]=SGdesignBallbearing([2.5 7 3.5]); % Create Space for Shaft % SG=SGsubtract(SG,P,'alignT',{'C','B'}); % SG=SGsubtract(SG,N,'alignT',{'C','F'}); SGfigure(SG); % SGManipulatorLink(40,true); SG=ans; % [P,N,S]=SGdesignDIN912DIN985([3 10 0],'TT',40,pi/2); % SG=SGsubtract(SG,P,'alignT',{'C','B'}); % SG=SGsubtract(SG,N,'alignT',{'C','F'}); SGfigure(SG); % % See also: SGlinkage, SGdimensioning, SGdesignBallbearing, % SGdesignDIN912DIN985, SGManipulatorBase % % % Copyright 2020-2021 Tim C. Lueth |
CPLTopCM_SUN(CPL,h,E0,nu,fixeddomain,loaddomain,loadvec,spring,pout,poutxy,poutdir,cons,VolFrac,MaxIter)- automatic design of a compliant mechanism based on topology optimization techniques. |
% CPLTopCM_SUN(CPL,h,E0,nu,fixeddomain,loaddomain,loadvec,spring,pout,poutxy,poutdir,cons,VolFrac,MaxIter) - automatic design of a compliant mechanism based on topology optimization techniques. % (by Yilun Sun, VLFL-Lib, 2020-JUL-28 as class: AUTOMATIC DESIGN) % % Very Powerful fnctn to create soft kill option topology optimization % for large displacements % SKOLD (Status of: 2020-08-30) % % Introduced first in SolidGeometry 4.9 % % See also: SGshapeOptiCAO, SGshapeOptiSKO % % [CPL4,z,fem,Vcell,farray]=CPLTopCM_SUN(CPL,h,E0,nu,fixeddomain,loaddoma % in,loadvec,spring,pout,poutxy,poutdir,cons,VolFrac,MaxIter) % === INPUT PARAMETERS === % CPL: % h: % E0: % nu: % fixeddomain: % loaddomain: % loadvec: % spring: % === OUTPUT RESULTS ====== % CPL4: extracted 2D contour from the density distribution % z: optimized density distribution (design variable) % fem: FEM model of the optimized structure % Vcell: logged information of the density distribution in each iteration % farray: logged information of the objective fnctn in each iteration % % EXAMPLE: [h E0 nu] % % % See also: SGshapeOptiCAO, SGshapeOptiSKO % |
isemptycell(A)- similar to isempty but works with cells |
% isemptycell(A) - similar to isempty but works with cells % (by Tim Lueth, VLFL-Lib, 2020-JUL-27 as class: AUXILIARY PROCEDURES) % % Introduced first in SolidGeometry 4.9 % % See also: isempty % % e=isemptycell(A) % === INPUT PARAMETERS === % A: cell % === OUTPUT RESULTS ====== % e: logical list % % EXAMPLE: % A=SGsample(20), isemptycell(A) % % See also: isempty % % % Copyright 2020 Tim C. Lueth |
SGdesignBallbearing(sdl,ins,tpl)- creates subtraction solids for a bearing connection at a specific frame position of a solid |
% SGdesignBallbearing(sdl,ins,tpl) - creates subtraction solids for a bearing connection at a specific frame position of a solid % (by Tim Lueth, VLFL-Lib, 2020-JUL-27 as class: AUTOMATIC DESIGN) % % If two elements should be connected using a ball bearing, this fnctn % helps to create the subtraction solids to achive a fnctnal connection % using standard machine elements. (Status of: 2020-07-29) % % Introduced first in SolidGeometry 4.9 % % See also: SGdesignDIN912DIN985, SGbearing % % [P,N,S,B]=SGdesignBallbearing([sdl,ins,tpl]) % === INPUT PARAMETERS === % sdl: [Ri Ro Width Ol] % ins: Insertion Tunnel % tpl: Length of Insertion T/P for [HEAD NUT]; default is 10 10 % === OUTPUT RESULTS ====== % P: Subtraction Solid for plug side including frame 'C' % N: Subtraction Solid for bearing side including frame 'C' % S: Geometry of Plug including frame 'C' % B: Bearing Model % % EXAMPLE: % SGdesignBallbearing; % [P,N]=SGdesignBallbearing([2.5 7 3.5]); % Create Space for Shaft % [P,N]=SGdesignBallbearing([2.5 7 3.5],'S'); % Create Spave for Nuts and Screw Heads % SG=SGManipulatorLink('',true); % SG=SGsubtract(SG,P,'alignT',{'C','B'}); % SG=SGsubtract(SG,N,'alignT',{'C','F'}); SGfigure(SG); % % See also: SGdesignDIN912DIN985, SGbearing % % % Copyright 2020-2021 Tim C. Lueth |
SGManipulator07Link(LL,Shap,m)- Link and Link extender for Manipulator Design # 4 |
% SGManipulator07Link(LL,Shap,m) - Link and Link extender for Manipulator Design # 4 % (by Tim Lueth, VLFL-Lib, 2020-JUL-27 as class: KINEMATICS AND FRAMES) % % In contrast to the original design #4, this design number 7 is just % created by a different strategy, that ist independent on the screw % diameter and shaping. % Since V2A screws are much more strength than polyamid , the is no real % need to increase the size of the screw diameter (Status of: 2020-07-27) % % Introduced first in SolidGeometry 4.9 % % See also: SGdimensioning, SGManipulator04Base, SGManipulator04Link % % SL=SGManipulator07Link([LL,Shap,m]) % === INPUT PARAMETERS === % LL: Axis Distance; default is 40 % Shap: if true; the links are shaped; default is false % m: screw diameter; default is 2.5 % === OUTPUT RESULTS ====== % SL: Link 2.5mm screw and 2.5mm Nut % % EXAMPLE: % [A,B,C,H,EF]=SGManipulator07Base % [D]=SGManipulator07Link % Link and link extender % SGTchain({A,B,C,D,H,B,H,EF},[pi pi 0 pi 0 pi 0]); SGn=ans; SGfigure; SGplotalpha(SGn,'w'); view(-30,30); fullview(0.5) % SGfigure; view(-30,30); SGplotalpha(SGn); % % % See also: SGdimensioning, SGManipulator04Base, SGManipulator04Link % % % Copyright 2020 Tim C. Lueth |
TofTrel(T,rel,gap)- creates a HT matrix relative to a frame |
% TofTrel(T,rel,gap) - creates a HT matrix relative to a frame % (by Tim Lueth, VLFL-Lib, 2020-JUL-26 as class: ANALYTICAL GEOMETRY) % % Introduced first in SolidGeometry 4.9 % % See also: TofP, TofR, TofT % % T=TofTrel(T,[rel,gap]) % === INPUT PARAMETERS === % T: Original frame % rel: % gap: % === OUTPUT RESULTS ====== % T: New Frame % % EXAMPLE: % TofTrel(eye(4),'transz',10,'roty',pi/4) % % See also: TofP, TofR, TofT % % % Copyright 2020 Tim C. Lueth |
SGdesignDIN912DIN985(sdl,ins,tpl,W)- creates subtraction solids for a screw fixation at a specific frame position of a solid |
% SGdesignDIN912DIN985(sdl,ins,tpl,W) - creates subtraction solids for a screw fixation at a specific frame position of a solid % (by Tim Lueth, VLFL-Lib, 2020-JUL-25 as class: AUTOMATIC DESIGN) % % THIS FNCTN USES FITTINGS by fnctn slfit und DIN4AMfitting % If two elements should be connected using a DIN912 Screw and a DIN985 % Nut, this fnctn helps to create the subtraction solids to achive a % fnctnal connection using standard machine elements. % Pocket holes modified for clearancefit in height (2022-01-09) % (Status of: 2022-01-09) % % Introduced first in SolidGeometry 4.9 % % See also: SGDIN912, SGDIN985, SGdesignBallbearing, SGdesignSupplement % % [H,N,S,mt,parts]=SGdesignDIN912DIN985([sdl,ins,tpl,W]) % === INPUT PARAMETERS === % sdl: [M L d] = Metrix Length and delta in nut for screw connection % ins: Characters for "T"unnel or "P"ocket; default is 'TP' for [HEAD NUT] % tpl: Length of Insertion T/P for [HEAD NUT]; default is 10 10 % W: Rotation angle for Pocket if required; default is 0; % === OUTPUT RESULTS ====== % H: Subtraction Solid for Head side including frame 'C' % N: Subtraction Solid for Nut side including frame 'C' % S: Srew and Nut for Visualziation including frame 'C' % mt: remainig wall thickness % parts: parts list for assembly of one connection % % EXAMPLE: % clc; [H,N,S]=SGdesignDIN912DIN985([5 10 0],'TT',40); % SGsubtract(SGbox,H,'alignT',{'C','Y-'}) % SGsubtract(SGbox,N,'alignT',{'C','Y-'}) % clc; [H,N,S]=SGdesignDIN912DIN985([3 10 0],'TP',40,pi/2); % SGsubtract(SGbox,H,'alignT',{'C','Y-'}) % SGsubtract(SGbox,N,'alignT',{'C','Y-'}) % % See also: SGDIN912, SGDIN985, SGdesignBallbearing, SGdesignSupplement % % % Copyright 2020-2022 Tim C. Lueth |
Wegertseder(text)- just opens the website of company Wegertseder for often used normed elements |
% Wegertseder(text) - just opens the website of company Wegertseder for often used normed elements % (by Tim Lueth, VLFL-Lib, 2020-JUL-25 as class: AUXILIARY PROCEDURES) % % Introduced first in SolidGeometry 4.9 % % See also: firmen, DIN912, SGDIN912 % % Wegertseder([text]) % === INPUT PARAMETERS === % text: string or number of DIN norm such as 7979 or '7979' % % EXAMPLE: % Wegertseder('912') % % See also: firmen, DIN912, SGDIN912 % % % Copyright 2020 Tim C. Lueth |
SGpintorquegauge(d,l,m)- Creates a pin with a defined diameter and height with a torque-loadable head |
% SGpintorquegauge(d,l,m) - Creates a pin with a defined diameter and height with a torque-loadable head % (by Tim Lueth, VLFL-Lib, 2020-JUL-23 as class: MODELING PROCEDURES) % % When load tests are carried out with torques, the plastic at the point % of engagement of the torque wrench deforms long before the actual % interesting torque occurs. (Status of: 2020-07-23) % % Introduced first in SolidGeometry 4.9 % % See also: SGDIN912head, SGpinwrenchsize % % SG=SGpintorquegauge([d,l,m]) % === INPUT PARAMETERS === % d: diameter % l: length % m: metric Nut and Scre concept for DIN985, DIN912 % === OUTPUT RESULTS ====== % SG: Solid Geometry (white) % % EXAMPLE: % SGpintorquegauge (5,10) % % See also: SGDIN912head, SGpinwrenchsize % % % Copyright 2020 Tim C. Lueth |
ismemberincell(C,c,csens,fullc)- finds the logical indices of an member inside a cell list of DIFFERENT types |
% ismemberincell(C,c,csens,fullc) - finds the logical indices of an member inside a cell list of DIFFERENT types % (by Tim Lueth, VLFL-Lib, 2020-JUL-22 as class: AUXILIARY PROCEDURES) % % This fnctn is for cell lists with DIFFERENT types % for strings in cell list think about % - contains(l,'.m:%') % - startsWith(l,'SG') % - ismember % there is no need for ismemberincell for identical types % Failed in 'R2020b Update 6' and was repaired in SG-LIB 5.1 by % introducing fnctn celltype % (Status of: 2020-09-13) % % Introduced first in SolidGeometry 4.9 % % See also: ismemberincell, celltype % % a=ismemberincell(C,c,[csens,fullc]) % === INPUT PARAMETERS === % C: Cell list % c: Single entry to find % csens: character sensitive; default is false % fullc: full compare instead of starting chars; default is false % === OUTPUT RESULTS ====== % a: logical field % % EXAMPLE: % A={'A', 0, pi, {'A','B'}} % ismemberincell(A,pi) % ismemberincell(A,'A') % ismemberincell(A,{'A','B'}) % % See also: ismemberincell, celltype % % % Copyright 2020-2021 Tim C. Lueth |
SGshapecylindric(SG,ez,ce,R)- shapes a solid with a cylindrical intersection |
% SGshapecylindric(SG,ez,ce,R) - shapes a solid with a cylindrical intersection % (by Tim Lueth, VLFL-Lib, 2020-JUL-22 as class: MODELING PROCEDURES) % % Introduced first in SolidGeometry 4.9 % % See also: SGshapeOptiCAO % % SGN=SGshapecylindric([SG,ez,ce,R]) % === INPUT PARAMETERS === % SG: Solid Geometry % ez: shaping direction;default is [1 0 0]; x axis % ce: centered or not centered; default is false % R: option Radius if not calculated from Solid; % === OUTPUT RESULTS ====== % SGN: Final Solid % % EXAMPLE: % SGshapecylindric(SGtransP(SGTremove(SGbox,'all'),[0 0 5]),[ 1 0 0],true) % SGshapecylindric(SGtransP(SGTremove(SGbox,'all'),[0 0 5]),[ 1 0 0],false) % % See also: SGshapeOptiCAO % % % Copyright 2020 Tim C. Lueth |
SGmotorshaft(D,L,r,ol)- returns a solid geometry for a motor shaft with undercut |
% SGmotorshaft(D,L,r,ol) - returns a solid geometry for a motor shaft with undercut % (by Tim Lueth, VLFL-Lib, 2020-JUL-21 as class: MODELING PROCEDURES) % % Originally created for Dr. Franz Irlinger (Status of: 2020-07-21) % % Introduced first in SolidGeometry 4.9 % % See also: exp_2020_07_08_franz, SGpinwrenchsize % % [SG,PL]=SGmotorshaft([D,L,r,ol]) % === INPUT PARAMETERS === % D: Diamater, default is 0.25 % L: Length, default is D % r: Undercut, default is .25 % ol: Step, default is r % === OUTPUT RESULTS ====== % SG: Solid Geometry including Frames % PL: Point List % % EXAMPLE: % SGmotorshaft(2.5,4,0.1,[0 4]) % % See also: exp_2020_07_08_franz, SGpinwrenchsize % % % Copyright 2020 Tim C. Lueth |
CPLxor(A,B);- returns a Boolean exclusive or of 2 CPLs |
% CPLxor(A,B); - returns a Boolean exclusive or of 2 CPLs % (by Tim Lueth, VLFL-Lib, 2020-JUL-20 as class: CLOSED POLYGON LISTS) % % simply based on CPLbool (Status of: 2020-07-20) % % Introduced first in SolidGeometry 4.9 % % See also: CPLbool, CPLsubtract, CPLunion, CPLintersect % % CPL=CPLxor(A,B); % === INPUT PARAMETERS === % A: CPL A % B: CPL B % === OUTPUT RESULTS ====== % CPL: Resulting Boolean % % EXAMPLE: % CPLxor(PLcircle(10,6),PLcircle(5,6)+[7 0]); % % See also: CPLbool, CPLsubtract, CPLunion, CPLintersect % % % Copyright 2020 Tim C. Lueth |
CPLintersect(A,B);- returns a Boolean intersection of 2 CPLs |
% CPLintersect(A,B); - returns a Boolean intersection of 2 CPLs % (by Tim Lueth, VLFL-Lib, 2020-JUL-20 as class: CLOSED POLYGON LISTS) % % simply based on CPLbool (Status of: 2020-07-20) % % Introduced first in SolidGeometry 4.9 % % See also: CPLbool, CPLsubtract, CPLunion, CPLxor % % CPL=CPLintersect(A,B); % === INPUT PARAMETERS === % A: CPL A % B: CPL B % === OUTPUT RESULTS ====== % CPL: Resulting Boolean % % EXAMPLE: % CPLintersect(PLcircle(10,6),PLcircle(5,6)+[7 0]); % % See also: CPLbool, CPLsubtract, CPLunion, CPLxor % % % Copyright 2020 Tim C. Lueth |
CPLunion(A,B,sr)- returns a Boolean addition of 2 CPLs |
% CPLunion(A,B,sr) - returns a Boolean addition of 2 CPLs % (by Tim Lueth, VLFL-Lib, 2020-JUL-20 as class: CLOSED POLYGON LISTS) % % simply based on CPLbool % CPLadd works different and protects all hole in the CPLs (Status of: % 2021-01-16) % % Introduced first in SolidGeometry 4.9 % % See also: CPLadd, CPLbool, CPLsubtract, CPLintersect, CPLxor, CPLconcat % % CPL=CPLunion(A,B,[sr]) % === INPUT PARAMETERS === % A: CPL A % B: CPL B % sr: spatial relation for CPLtransrelCPL % === OUTPUT RESULTS ====== % CPL: Resulting Boolean % % EXAMPLE: % CPLunion(PLcircle(10,6),PLcircle(5,6)+[7 0]); % CPLunion(PLcircle(10,6),{PLcircle(5,6)+[7 0], PLstar(3)}); % % See also: CPLadd, CPLbool, CPLsubtract, CPLintersect, CPLxor, CPLconcat % % % Copyright 2020-2021 Tim C. Lueth |
CPLsubtract(A,B);- returns a Boolean subtraction of 2 CPLs |
% CPLsubtract(A,B); - returns a Boolean subtraction of 2 CPLs % (by Tim Lueth, VLFL-Lib, 2020-JUL-20 as class: CLOSED POLYGON LISTS) % % simply based on CPLbool (Status of: 2020-07-20) % % Introduced first in SolidGeometry 4.9 % % See also: CPLbool, CPLunion, CPLintersect, CPLxor % % CPL=CPLsubtract(A,B); % === INPUT PARAMETERS === % A: CPL A % B: CPL B % === OUTPUT RESULTS ====== % CPL: Resulting Boolean % % EXAMPLE: % CPLsubtract(PLcircle(10),PLcircle(5)+[7 0]); % % See also: CPLbool, CPLunion, CPLintersect, CPLxor % % % Copyright 2020 Tim C. Lueth |
SGpinwrenchsize(D,H,n,B,W)- creates a pin/heaxagon pin for a specified metric wrench size |
% SGpinwrenchsize(D,H,n,B,W) - creates a pin/heaxagon pin for a specified metric wrench size % (by Tim Lueth, VLFL-Lib, 2020-JUL-20 as class: MODELING PROCEDURES) % % This fnctn can be used to create bore holes for nuts or screws if 'c' % or 'n' is used , DIN 912 or DIN985 is used for the diameter of screw % head and nut % (Status of: 2020-07-23) % % Introduced first in SolidGeometry 4.9 % % See also: SGDIN912head, SGpintorquegauge % % SG=SGpinwrenchsize([D,H,n,B,W]) % === INPUT PARAMETERS === % D: Metric Diameter % H: Length of pin or 'c'(cylinder) for 'n'(ut) % n: number of edges % B: Width as subtraction sold % W: Angle for rotation % === OUTPUT RESULTS ====== % SG: Solid Geometry % % EXAMPLE: % SGpinwrenchsize(5,10); % 5mm x 10 mm % SGpinwrenchsize(5,10,6); % 5mm x 10 mm - Inbus % SGpinwrenchsize(5,10,6,20); % 5mm x 10 mm - Inbus subtraction solid % SGpinwrenchsize(5,5,6,20,pi/2); % 5mm x 10 mm - Inbus subtraction solid rotated % SGpinwrenchsize([ 5 2.5 4 ],[5 10 5 ],[6 0 6],20); % % See also: SGDIN912head, SGpintorquegauge % % % Copyright 2020 Tim C. Lueth |
DIN985(M)- returns the DIN985/ISO476 table for a metric threads |
% DIN985(M) - returns the DIN985/ISO476 table for a metric threads % (by Tim Lueth, VLFL-Lib, 2020-JUL-20 as class: MECHANICAL PROCEDURES) % % The table DIN985/ISO4762 has the following columns. All values are % given in millimeter % M InbusWrench InbusDiameter WrenchHeight NutHeight (Status % of: 2020-08-04) % % Introduced first in SolidGeometry 4.9 % % See also: DIN13, DIN336, DIN464, DIN912, DIN913, DINfindinTab, DINhelp, % DINthreadtorque % % [M,TL]=DIN985(M) % === INPUT PARAMETERS === % M: metric treat diameter % === OUTPUT RESULTS ====== % M: M that was used for the table entry % TL: Table entry for M % % EXAMPLE: % DIN985; % [M,TL]=DIN985(2.5) % Wegertseder(985) % % See also: DIN13, DIN336, DIN464, DIN912, DIN913, DINfindinTab, DINhelp, % DINthreadtorque % % % Copyright 2020 Tim C. Lueth |
DINthreadtorque(m,mat)- returns the DIN912 torque for tightening screw threads |
% DINthreadtorque(m,mat) - returns the DIN912 torque for tightening screw threads % (by Tim Lueth, VLFL-Lib, 2020-JUL-18 as class: MECHANICAL PROCEDURES) % % http://www.schrauben-lexikon.de/td3-werkstoffe-stahl.asp % https://schraube-mutter.de/drehmoment-tabelle-drehmoment-berechnung-din % -912/ % https://www.schweizer-fn.de/maschinenelemente/schraube/schraubenverbind % ung.php#ma % (Status of: 2020-08-04) % % Introduced first in SolidGeometry 4.9 % % See also: DIN13, DIN336, DIN464, DIN912, DIN913, DIN985, DINfindinTab, % DINhelp % % [Tq,TL]=DINthreadtorque(m,[mat]) % === INPUT PARAMETERS === % m: metric diameter % mat: material; default is V2A % === OUTPUT RESULTS ====== % Tq: Torque % TL: Table % % EXAMPLE: % DINthreadtorque(3,'PA') % % See also: DIN13, DIN336, DIN464, DIN912, DIN913, DIN985, DINfindinTab, % DINhelp % % % Copyright 2020 Tim C. Lueth |
SGDIN912head(M,Tp)- creates a Solid Geometry of a screw head with respect to DIN 912 |
% SGDIN912head(M,Tp) - creates a Solid Geometry of a screw head with respect to DIN 912 % (by Tim Lueth, VLFL-Lib, 2020-JUL-18 as class: MODELING PROCEDURES) % % Introduced first in SolidGeometry 4.9 % % See also: SGiso4026, SGiso4762, SGDIN433, SGDIN912 % % SGDIN912head([M,Tp]) % === INPUT PARAMETERS === % M: Diameter metric % Tp: Length metric mm % % EXAMPLE: % SGDIN912head(5) % % See also: SGiso4026, SGiso4762, SGDIN433, SGDIN912 % % % Copyright 2020 Tim C. Lueth |
SGbearing(Sz,Tp,Ax)- returns the SG of a simple bearing |
% SGbearing(Sz,Tp,Ax) - returns the SG of a simple bearing % (by Tim Lueth, VLFL-Lib, 2020-JUL-18 as class: MODELING PROCEDURES) % % Introduced first in SolidGeometry 4.9 % % See also: SGbearing2012, SGunion, SGdesignBallbearing % % SG=SGbearing([Sz,Tp,Ax]) % === INPUT PARAMETERS === % Sz: [Di Do H os] oversize default is 0 % Tp: 'plain', '2012', % Ax: axis to left and right % === OUTPUT RESULTS ====== % SG: Solid Geometry % % EXAMPLE: % SGbearing([2.5 6 1.8]) % SGbearing([2.5 6 1.8],'plain',[1 2]) % SGbearing([2.5 6 1.8],'plug',[4 2]); SG=ans; SGunion(SG) % % See also: SGbearing2012, SGunion, SGdesignBallbearing % % % Copyright 2020 Tim C. Lueth |
SGdimensioningSide(SG,pnt,acc)- Creates a Front View Dimensioning Figure |
% SGdimensioningSide(SG,pnt,acc) - Creates a Front View Dimensioning Figure % (by Tim Lueth, VLFL-Lib, 2020-JUL-18 as class: VISUALIZATION) % % Introduced first in SolidGeometry 4.9 % % See also: SGTdimensioning, viewdimensioning, PLdimensioning, % CVLdimclassifier, SGdimensioning4, SGdimensioningTop, % SGdimensioningFront % % CPL=SGdimensioningSide(SG,[pnt,acc]) % === INPUT PARAMETERS === % SG: Solid geometry % pnt: crossing point % acc: accuracy; default is 0.1 % === OUTPUT RESULTS ====== % CPL: CPL of Side-view % % EXAMPLE: % SGsample(27); SG=ans; % SGdimensioningSide(SG); % % See also: SGTdimensioning, viewdimensioning, PLdimensioning, % CVLdimclassifier, SGdimensioning4, SGdimensioningTop, % SGdimensioningFront % % % Copyright 2020 Tim C. Lueth |
SGdimensioningFront(SG,pnt,acc)- Creates a Side View Dimensioning Figure |
% SGdimensioningFront(SG,pnt,acc) - Creates a Side View Dimensioning Figure % (by Tim Lueth, VLFL-Lib, 2020-JUL-18 as class: VISUALIZATION) % % Introduced first in SolidGeometry 4.9 % % See also: SGTdimensioning, viewdimensioning, PLdimensioning, % CVLdimclassifier, SGdimensioning4, SGdimensioningTop, SGdimensioningSide % % CPL=SGdimensioningFront(SG,[pnt,acc]) % === INPUT PARAMETERS === % SG: Solid geometry % pnt: crossing point % acc: accuracy; default is 0.1 % === OUTPUT RESULTS ====== % CPL: CPL of Side-view % % EXAMPLE: % SGsample(27); SG=ans; % SGdimensioningSide(SG); % % See also: SGTdimensioning, viewdimensioning, PLdimensioning, % CVLdimclassifier, SGdimensioning4, SGdimensioningTop, SGdimensioningSide % % % Copyright 2020 Tim C. Lueth |
SGdimensioningTop(SG,pnt,acc)- Creates a Front View Dimensioning Figure |
% SGdimensioningTop(SG,pnt,acc) - Creates a Front View Dimensioning Figure % (by Tim Lueth, VLFL-Lib, 2020-JUL-18 as class: VISUALIZATION) % % Introduced first in SolidGeometry 4.9 % % See also: SGTdimensioning, viewdimensioning, PLdimensioning, % CVLdimclassifier, SGdimensioning4, SGdimensioningSide, % SGdimensioningFront % % CPL=SGdimensioningTop(SG,[pnt,acc]) % === INPUT PARAMETERS === % SG: Solid geometry % pnt: crossing point % acc: accuracy; default is 0.1 % === OUTPUT RESULTS ====== % CPL: CPL of Topview % % EXAMPLE: % SGsample(27); SG=ans; % SGdimensioningTop(SG); % % See also: SGTdimensioning, viewdimensioning, PLdimensioning, % CVLdimclassifier, SGdimensioning4, SGdimensioningSide, % SGdimensioningFront % % % Copyright 2020 Tim C. Lueth |
SGDIN985(M)- creates a Solid Geometry with respect to DIN 985 |
% SGDIN985(M) - creates a Solid Geometry with respect to DIN 985 % (by Tim Lueth, VLFL-Lib, 2020-JUL-16 as class: MODELING PROCEDURES) % % Introduced first in SolidGeometry 4.9 % % See also: SGiso4026, SGiso4762, SGDIN433, SGDIN912, DIN985 % % SG=SGDIN985(M) % === INPUT PARAMETERS === % M: Diameter metric % === OUTPUT RESULTS ====== % SG: Solid Geometry including Frames % % EXAMPLE: % SGDIN985(2.5) % % See also: SGiso4026, SGiso4762, SGDIN433, SGDIN912, DIN985 % % % Copyright 2020 Tim C. Lueth |
SGconcat(A,B,relpos)- Simple Concatenation of Solid Geometries |
% SGconcat(A,B,relpos) - Simple Concatenation of Solid Geometries % (by Tim Lueth, VLFL-Lib, 2020-JUL-15 as class: SURFACES) % % Sometimes there is no possibility to boolean unite solids but the % calling code of SGunion is already written. In this case there is a % compatible fnctn SGconcat for simple concatenation that also supports % relative positioning. This fnctn is based on SGcat2 and SGtransrelSG. % (Status of: 2021-01-04) % % Introduced first in SolidGeometry 4.9 % % See also: SGbool, SGtransrelSG, SGboolh, SGintersect, SGsubtract, % SGunion, SGxor, SGsupplement % % SG=SGconcat([A,B,relpos]) % === INPUT PARAMETERS === % A: Solid A % B: Solid B % relpos: list of relative positions for SGtransrelSG % === OUTPUT RESULTS ====== % SG: Concatenation Result of A+B % % EXAMPLE: % SGconcat(SGboxsphere([30,20,10],4,10)) % SGconcat(SGboxsphere([30,20,10],4,10),SGbox([5,5,5]),'incenter','left',-2) % SGconcat(SGboxsphere([30,20,10],4,10),SGbox([5,5,5]),'incenter','infront',-2) % % See also: SGbool, SGtransrelSG, SGboolh, SGintersect, SGsubtract, % SGunion, SGxor, SGsupplement % % % Copyright 2020-2021 Tim C. Lueth |
SGfittinggauge- creates a solid for testing fits on a 3D printer |
% SGfittinggauge - creates a solid for testing fits on a 3D printer % (by Tim Lueth, VLFL-Lib, 2020-JUL-15 as class: MODELING PROCEDURES) % % This fnctn was rewritten because there were problems with ball bearings % when fitting in manipulators printed on the Formlab FORM2. (Status of: % 2020-07-15) % % Introduced first in SolidGeometry 4.9 % % See also: exp_2012_04_10 % % SGF=SGfittinggauge % === OUTPUT RESULTS ====== % SGF: Solid % % EXAMPLE: % SGfittinggauge % % % See also: exp_2012_04_10 % % % Copyright 2020 Tim C. Lueth |
SGDIN912(M,L)- creates a Solid Geometry with respect to DIN 912 |
% SGDIN912(M,L) - creates a Solid Geometry with respect to DIN 912 % (by Tim Lueth, VLFL-Lib, 2020-JUL-14 as class: MODELING PROCEDURES) % % Introduced first in SolidGeometry 4.9 % % See also: SGiso4026, SGiso4762, SGDIN433 % % SG=SGDIN912([M,L]) % === INPUT PARAMETERS === % M: Diameter metric % L: Length metric mm % === OUTPUT RESULTS ====== % SG: Solid Geometry including Frames % % EXAMPLE: % SGDIN912(2.5,8) % % See also: SGiso4026, SGiso4762, SGDIN433 % % % Copyright 2020 Tim C. Lueth |
SGDIN433(M)- creates a Solid Geometry with respect to DIN 433 |
% SGDIN433(M) - creates a Solid Geometry with respect to DIN 433 % (by Tim Lueth, VLFL-Lib, 2020-JUL-14 as class: MODELING PROCEDURES) % % Introduced first in SolidGeometry 4.9 % % See also: SGiso4026, SGiso4762, SGDIN912 % % SG=SGDIN433([M]) % === INPUT PARAMETERS === % M: Diameter metric % === OUTPUT RESULTS ====== % SG: Solid Geometry including Frames % % EXAMPLE: % SGDIN433(1.9) % % See also: SGiso4026, SGiso4762, SGDIN912 % % % Copyright 2020 Tim C. Lueth |
DINfindinTab(M,Tab,takelarg)- searches an entry with in a table name |
% DINfindinTab(M,Tab,takelarg) - searches an entry with in a table name % (by Tim Lueth, VLFL-Lib, 2020-JUL-14 as class: AUXILIARY PROCEDURES) % % Introduced first in SolidGeometry 4.9 % % See also: DIN13, DIN336, DIN464, DIN912, DIN913, DIN985, DINhelp, % DINthreadtorque % % TL=DINfindinTab(M,Tab,[takelarg]) % === INPUT PARAMETERS === % M: Scalar to find in Tab % Tab: Table with M as first col; Table name is important % takelarg: if true nearest larger is selected; default is true % === OUTPUT RESULTS ====== % TL: Table row % % EXAMPLE: % DIN433=[ 1.0 1.1 2.5 0.3; 1.2 1.3 3.0 0.3]; % DINfindinTab(1.1,DIN433) % % See also: DIN13, DIN336, DIN464, DIN912, DIN913, DIN985, DINhelp, % DINthreadtorque % % % Copyright 2020 Tim C. Lueth |
SGManipulator05Link(LL)- Link and Link extender for Manipulator Design # 5 |
% SGManipulator05Link(LL) - Link and Link extender for Manipulator Design # 5 % (by Tim Lueth, VLFL-Lib, 2020-JUL-14 as class: KINEMATICS AND FRAMES) % % Those parts can be assembled using screws, spacer, and nut of DIN DIN % 912, DIN 985, DIN 433 using Diameter 2.5mm and 8mm length and a ball % bearing S692-X-2Z (2.50 Euro /Stück) with inside 2.5mm, outside 7mm and % width 3.5mm % % % (Status of: 2020-07-14) % % Introduced first in SolidGeometry 4.9 % % See also: SGdimensioning4, SGManipulator04Base, SGManipulator04Link, % SGManipulator05Base % % [SL,SL2]=SGManipulator05Link([LL]) % === INPUT PARAMETERS === % LL: Axis Distance; default is 40 % === OUTPUT RESULTS ====== % SL: Link 2.5mm screw and 2.5mm Nut % SL2: Link 2.5mm screw nut and 2.5mm screw nut % % EXAMPLE: % [A,B,C,H,EF]=SGManipulator05Base % [D]=SGManipulator05Link % Link and link extender % SGTchain({A,B,C,D,H,B,H,EF},[pi pi 0 pi 0 pi 0]); SGn=ans; SGfigure; SGplotalpha(SGn,'w'); view(-30,30); fullview(0.5) % SGfigure; view(-30,30); SGplotalpha(SGn); % % % See also: SGdimensioning4, SGManipulator04Base, SGManipulator04Link, % SGManipulator05Base % % % Copyright 2020 Tim C. Lueth |
SGManipulator05Base(LS)- Plate, Base, and Hand for Manipulator Design # 5 |
% SGManipulator05Base(LS) - Plate, Base, and Hand for Manipulator Design # 5 % (by Tim Lueth, VLFL-Lib, 2020-JUL-14 as class: KINEMATICS AND FRAMES) % % Those parts can be assembled using screws, spacer, and nut of DIN DIN % 912, DIN 985, DIN 433 using Diameter 2.5mm and 8mm length and a ball % bearing S692-X-2Z (2.50 Euro /Stück) with inside 2.5mm, outside 7mm and % width 3.5mm % (Status of: 2020-07-15) % % Introduced first in SolidGeometry 4.9 % % See also: SGdimensioning4, SGManipulator04Base, SGManipulator04Link, % SGManipulator05Link % % [A,B,K,U,EF]=SGManipulator05Base([LS]) % === INPUT PARAMETERS === % LS: Length of Base and Hand; default is 40 % === OUTPUT RESULTS ====== % A: Base PLate % B: Base % K: 7 DoF % U: Hand % EF: Effektor % % EXAMPLE: % [A,B,C,H,EF]=SGManipulator05Base % [D]=SGManipulator05Link % Link and link extender % SGTchain({A,B,C,D,H,B,H,EF},[pi pi 0 pi 0 pi 0]); SGn=ans; SGfigure; SGplotalpha(SGn,'w'); view(-30,30); fullview(0.5) % SGfigure; view(-30,30); SGplotalpha(SGn) % % See also: SGdimensioning4, SGManipulator04Base, SGManipulator04Link, % SGManipulator05Link % % % Copyright 2020 Tim C. Lueth |
SGdimensioning4(SG,pt)- Creates a simple 4 quadrant dimensioning view for a solid Geometry |
% SGdimensioning4(SG,pt) - Creates a simple 4 quadrant dimensioning view for a solid Geometry % (by Tim Lueth, VLFL-Lib, 2020-JUL-14 as class: VISUALIZATION) % % Very similar to SGTdimenionsing, which does not allow to change the % font size but is programmed better (Status of: 2020-07-14) % % Introduced first in SolidGeometry 4.9 % % See also: SGTdimensioning, viewdimensioning, PLdimensioning, % CVLdimclassifier, SGdimensioningTop, SGdimensioningSide, % SGdimensioningFront % % hf=SGdimensioning4(SG,[pt]) % === INPUT PARAMETERS === % SG: Solid geometry % pt: crossing point % === OUTPUT RESULTS ====== % hf: heandle to figure % % EXAMPLE: % SGsample(27); SG=ans; % SGdimensioning4(SG); % SGTdimensioning(SG); % % See also: SGTdimensioning, viewdimensioning, PLdimensioning, % CVLdimclassifier, SGdimensioningTop, SGdimensioningSide, % SGdimensioningFront % % % Copyright 2020 Tim C. Lueth |
exp_2020_07_02_subtractjoint- Sucvessfull experiment to create a universal revolute joint subtraction part |
% exp_2020_07_02_subtractjoint - Sucvessfull experiment to create a universal revolute joint subtraction part % (by Tim Lueth, VLFL-Lib, 2020-JUL-03 as class: KINEMATICS AND FRAMES) % % This part creates a revolute joint in each solid if subtracted (Status % of: 2020-07-03) % % Introduced first in SolidGeometry 4.9 % % See also: SGcutTa, exp_2018_08_04_jointsubstraction % % C=exp_2020_07_02_subtractjoint % === OUTPUT RESULTS ====== % C: universal revolute joint subtraction part % % EXAMPLE: % exp_2020_07_02_subtractjoint % % See also: SGcutTa, exp_2018_08_04_jointsubstraction % % % Copyright 2020 Tim C. Lueth |
SGManipulator04Link(LL)- Link and Link extender for Manipulator Design # 4 |
% SGManipulator04Link(LL) - Link and Link extender for Manipulator Design # 4 % (by Tim Lueth, VLFL-Lib, 2020-JUN-29 as class: KINEMATICS AND FRAMES) % % Those parts can be assembled using screws, spacer, and nut of DIN DIN % 912, DIN 985, DIN 9021 using Diameter 2.5mm and 8mm length (Status of: % 2020-06-29) % % Introduced first in SolidGeometry 4.9 % % See also: SGManipulator04Base % % [SL,SL2]=SGManipulator04Link([LL]) % === INPUT PARAMETERS === % LL: Axis Distance; default is 40 % === OUTPUT RESULTS ====== % SL: Link 2.5mm screw and 2.5mm Nut % SL2: Link 2.5mm screw nut and 2.5mm screw nut % % EXAMPLE: % [A,B,C,H,EF]=SGManipulator04Base % [D]=SGManipulator04Link % Link and link extender % SGTchain({A,B,C,D,H,B,H,EF},[pi pi 0 pi 0 pi 0]); SGn=ans; SGfigure; SGplotalpha(SGn,'w'); view(-30,30); fullview(0.5) % SGfigure; view(-30,30); SGplotalpha(SGn); % % % See also: SGManipulator04Base % % % Copyright 2020 Tim C. Lueth |
SGmotorSolExpert(mn,d,n,h)- return the simplified solid Geometry of a 50:1 Gearbox Motor 6 V of www.sol-expert-group.de |
% SGmotorSolExpert(mn,d,n,h) - return the simplified solid Geometry of a 50:1 Gearbox Motor 6 V of www.sol-expert-group.de % (by Tim Lueth, VLFL-Lib, 2020-JUN-29 as class: MODELING PROCEDURES) % % The Motor has an Axle with motor shaft of 3mm/2.5mm and a an axis % length of % (Status of: 2020-07-08) % % Introduced first in SolidGeometry 4.9 % % See also: SGdimensioning, SGmotorhousing % % [SG,SGG]=SGmotorSolExpert([mn,d,n,h]) % === INPUT PARAMETERS === % mn: option Name such as G50V6 % d: Diameter of the gear wheel; default is 10 % n: Number of teeth of the gear wheel; default is 21 % h: Height of the gear wheel; default is 7 % === OUTPUT RESULTS ====== % SG: Solid Geometry including Frames % SGG: Gear 2mm, 15 Teethm % % EXAMPLE: % SGmotorSolExpert('G50V6',10,15,3) % % See also: SGdimensioning, SGmotorhousing % % % Copyright 2020 Tim C. Lueth |
SGManipulator04Base(LS)- Plate, Base, and Hand for Manipulator Design # 4 |
% SGManipulator04Base(LS) - Plate, Base, and Hand for Manipulator Design # 4 % (by Tim Lueth, VLFL-Lib, 2020-JUN-27 as class: KINEMATICS AND FRAMES) % % Those parts can be assembled using screws, spacer, and nut of DIN DIN % 912, DIN 985, DIN 9021 using Diameter 2.5mm and 8mm length (Status of: % 2020-06-29) % % Introduced first in SolidGeometry 4.9 % % See also: SGManipulator04Link % % [A,B,K,U,EF]=SGManipulator04Base([LS]) % === INPUT PARAMETERS === % LS: Length of Base and Hand; default is 40 % === OUTPUT RESULTS ====== % A: Base PLate % B: Base % K: 7 DoF % U: Hand % EF: Effektor % % EXAMPLE: % [A,B,C,H,EF]=SGManipulator04Base % [D]=SGManipulator04Link % Link and link extender % SGTchain({A,B,C,D,H,B,H,EF},[pi pi 0 pi 0 pi 0]); SGn=ans; SGfigure; SGplotalpha(SGn,'w'); view(-30,30); fullview(0.5) % SGfigure; view(-30,30); SGplotalpha(SGn); % % % See also: SGManipulator04Link % % % Copyright 2020 Tim C. Lueth |
SGManipulator03Base(LS)- Base, and Hand for Manipulator Design # 3 |
% SGManipulator03Base(LS) - Base, and Hand for Manipulator Design # 3 % (by Tim Lueth, VLFL-Lib, 2020-JUN-23 as class: KINEMATICS AND FRAMES) % % Those parts can be assembled using screws, spacer, and nut of DIN DIN % 912, DIN 985, DIN 9021 using Diameter 2.5mm and 8mm length (Status of: % 2020-06-23) % % Introduced first in SolidGeometry 4.9 % % See also: SGManipulator03Link % % [A,B,U,EF]=SGManipulator03Base([LS]) % === INPUT PARAMETERS === % LS: Length of Base and Hand; default is 40 % === OUTPUT RESULTS ====== % A: Base PLate % B: Base % U: Hand % EF: Effektor % % EXAMPLE: % [A,B,H,E]=SGManipulator03Base(20) % [C,D]=SGManipulator03Link % Link and link extender % SGn=SGTchain({A,B,C,H,B,H,E},[pi pi pi 0 pi 0 pi],0,SGTframeChain(1:7)); % SGfigure; view(-30,30); SGplotalpha(SGn); % % % See also: SGManipulator03Link % % % Copyright 2020 Tim C. Lueth |
SGManipulator03Link(LL)- Link and Link extender for Manipulator Design # 3 |
% SGManipulator03Link(LL) - Link and Link extender for Manipulator Design # 3 % (by Tim Lueth, VLFL-Lib, 2020-JUN-23 as class: KINEMATICS AND FRAMES) % % Those parts can be assembled using screws, spacer, and nut of DIN DIN % 912, DIN 985, DIN 9021 using Diameter 2.5mm and 8mm length (Status of: % 2020-06-23) % % Introduced first in SolidGeometry 4.9 % % See also: SGManipulator03Base % % [SL,SL2]=SGManipulator03Link([LL]) % === INPUT PARAMETERS === % LL: Axis Distance; default is 40 % === OUTPUT RESULTS ====== % SL: Link 2.5mm screw and 2.5mm Nut % SL2: Link 2.5mm screw nut and 2.5mm screw nut % % EXAMPLE: % [A,B,H,E]=SGManipulator03Base(20) % [C,D]=SGManipulator03Link % Link and link extender % SGn=SGTchain({A,B,C,H,B,H,E},[pi pi pi 0 pi 0 pi],0,SGTframeChain(1:7)); % SGfigure; view(-30,30); SGplotalpha(SGn); % % % See also: SGManipulator03Base % % % Copyright 2020 Tim C. Lueth |
SGplotmultiple(SGc,frame);- creates a figure and simply plots all solids in a cell aray |
% SGplotmultiple(SGc,frame); - creates a figure and simply plots all solids in a cell aray % (by Tim Lueth, VLFL-Lib, 2020-JUN-21 as class: VISUALIZATION) % % Introduced first in SolidGeometry 4.9 % % See also: SGwriteMultipleSTL, SGplotalpha, SGTplotalpha % % SGplotmultiple(SGc,[frame]); % === INPUT PARAMETERS === % SGc: Cell array of Solids % frame: if true; frames are plotted also; default is false % % EXAMPLE: % loadweb JACO_robot.mat; whos JACO % SGplotmultiple(JACO); % plot solids % SGplotmultiple(JACO,true); % including frames % % See also: SGwriteMultipleSTL, SGplotalpha, SGTplotalpha % % % Copyright 2020-2022 Tim C. Lueth |
SGplotcellmultiple(SGc,,"scale","frames")- Creates a SGfigure and plots all cell elements in different subplots |
% SGplotcellmultiple(SGc,,"scale","frames") - Creates a SGfigure and plots all cell elements in different subplots % (by Tim Lueth, VLFL-Lib, 2020-JUN-21 as class: VISUALIZATION) % % It also plots the frames (Status of: 2022-03-29) % % Introduced first in SolidGeometry 4.9 % % See also: SGplot, SGplotcell, SGwriteMultipleSTL, view4all, axisscale % % h=SGplotcellmultiple(SGc,[,"scale","frames"]) % === INPUT PARAMETERS === % SGc: Cell list of Solids that should be printed % "scale": if used, all figures show the frames too % "frames": % === OUTPUT RESULTS ====== % h: handle to graphics objects % % EXAMPLE: % A=SGsample(20) % SGplotcellmultiple(A); % plot all with maximum size % SGplotcellmultiple(A,'scale'); % Plot all in the same scale % % See also: SGplot, SGplotcell, SGwriteMultipleSTL, view4all, axisscale % % % Copyright 2020-2022 Tim C. Lueth |
SGofCPLzseparated(CPL,hl)- creates for each closed contour of a CPL an individual solid with an individual height |
% SGofCPLzseparated(CPL,hl) - creates for each closed contour of a CPL an individual solid with an individual height % (by Tim Lueth, VLFL-Lib, 2020-JUN-17 as class: SURFACES) % % creates never holes; required for some editor fnctns (Status of: % 2020-06-17) % % Introduced first in SolidGeometry 4.9 % % See also: SGofCPLz % % SG=SGofCPLzseparated(CPL,hl) % === INPUT PARAMETERS === % CPL: CPL % hl: sorted list for height in CPL % === OUTPUT RESULTS ====== % SG: Solid Geoemtry % % EXAMPLE: % SGofCPLzseparated(CPLsample(11),[7 8 3 9]) % % See also: SGofCPLz % % % Copyright 2020 Tim C. Lueth |
SGsculpturepedestal(SG,Otext,ht,ov,ez)- create a pedestal for a sculpture |
% SGsculpturepedestal(SG,Otext,ht,ov,ez) - create a pedestal for a sculpture % (by Tim Lueth, VLFL-Lib, 2020-JUN-14 as class: AUTOMATIC DESIGN) % % Currently there are many STL for greek and roman sculptures available % for download. % It is a way of adding a standard pedestal, which has a height of 12.5% % of the height of the sculpture and about 80% of the width and depth of % the figure. (Status of: 2020-06-14) % % Introduced first in SolidGeometry 4.9 % % See also: webdownload, https://www.yeggi.com/q/greek+statue/, % https://www.myminifactory.com/search/?cat=112&query=venus % % [SG,SGB,SGT]=SGsculpturepedestal(SG,[Otext,ht,ov,ez]) % === INPUT PARAMETERS === % SG: Solid Geometry % Otext: Text to add on sculpture; Lines separated by '\n' % ht: desired height in z; default is 130; 0 for original size % ov: overlap of hte pedestral; default is -1mm % ez: orientation of text; default is [0 -1 0]; (Backside) % === OUTPUT RESULTS ====== % SG: SG of complete Figure including pedestral and text % SGB: SG of pedestral % SGT: SG of text % % EXAMPLE: % fname=webdownload('https://www.myminifactory.com/download/37471'); % SGreadSTL(fn); SG=ans; % SGsculpturepedestal(SG,'Venus Italica\nAntonio Canova (1823)\n',0,-4); % view(-150,6);shg; % % See also: webdownload, https://www.yeggi.com/q/greek+statue/, % https://www.myminifactory.com/search/?cat=112&query=venus % % % Copyright 2020 Tim C. Lueth |
google()- just searches a string at google.com |
% google() - just searches a string at google.com % (by Tim Lueth, VLFL-Lib, 2020-APR-01 as class: USER INTERFACE) % % for lazy people like me ....... % (Status of: 2020-04-01) % % Introduced first in SolidGeometry 4.9 % % See also: web % % google([]) % % EXAMPLE: % google servomotor % google wiki servomotor % % See also: web % % % Copyright 2020 Tim C. Lueth |
filenameinc(fname,step,fchk,srch,dchn)- increases a file name and check it's existance by option |
% filenameinc(fname,step,fchk,srch,dchn) - increases a file name and check it's existance by option % (by Tim Lueth, VLFL-Lib, 2020-MÄR-30 as class: AUXILIARY PROCEDURES) % % Introduced first in SolidGeometry 4.9 % % See also: strcounter % % fni=filenameinc(fname,[step,fchk,srch,dchn]) % === INPUT PARAMETERS === % fname: file name % step: step size; default is +1 % fchk: check if file or folder; default is true % srch: default is false; try to increase the file name % dchn: increase also all file names in folder names; default is true; % === OUTPUT RESULTS ====== % fni: % % See also: strcounter % % % Copyright 2020 Tim C. Lueth |
strcounter(fn,step)- detects an integer number at the end of a string and increments it |
% strcounter(fn,step) - detects an integer number at the end of a string and increments it % (by Tim Lueth, VLFL-Lib, 2020-MÄR-30 as class: AUXILIARY PROCEDURES) % % Auxiliary fnctn to manage file sequences for example (Status of: % 2020-03-30) % % Introduced first in SolidGeometry 4.9 % % See also: filenameinc % % [fni,ostr,cstr]=strcounter(fn,[step]) % === INPUT PARAMETERS === % fn: original string % step: step size % === OUTPUT RESULTS ====== % fni: new string name % ostr: replaced chain % cstr: % % EXAMPLE: % [a,b,c]=strcounter('AIM_LEC_02_SLIDE_05 INCL SOUND.avi') % strcounter('X345X123 ist ein TestA-100',-1) % strcounter('X345X123 ist ein TestA-99') % strcounter('X345X123 ist ein TestA-0099') % strcounter('X345X123 ist ein TestA-0000',-1) % strcounter('X345X123 ist ein TestA-100',-4) % % % See also: filenameinc % % % Copyright 2020 Tim C. Lueth |
audiorecorderTLautostop(DV,FS,damp,SH)- records an audio sample from a specified device |
% audiorecorderTLautostop(DV,FS,damp,SH) - records an audio sample from a specified device % (by Tim Lueth, VLFL-Lib, 2020-MÄR-28 as class: VIDEO/AUDIO/PDF) % % simplifies the use of different input devices (Status of: 2020-03-28) % % Introduced first in SolidGeometry 4.9 % % See also: soundTL, audiorecorderTL, audiotrim, audiovocoder, % audiorecordsentences % % [y,FS]=audiorecorderTLautostop([DV,FS,damp,SH]) % === INPUT PARAMETERS === % DV: device string' default is webcam % FS: Sampe rate; default is 16000 % damp: damping for stopping recorning; default is 0.1 % SH: if true; a time scale is displayed; default is true % === OUTPUT RESULTS ====== % y: Signal % FS: Sample rate % % EXAMPLE: % audiorecorderTL('HELP',16000,2); % returns the existing input devices % audiorecorderTL('pro X',16000,2); y=ans; soundTL(y,16000,'Pro X') % % See also: soundTL, audiorecorderTL, audiotrim, audiovocoder, % audiorecordsentences % % % Copyright 2020 Tim C. Lueth |
audioeditspokentext(Y,FS)- this keyboardbased fnct is to edit spoken text |
% audioeditspokentext(Y,FS) - this keyboardbased fnct is to edit spoken text % (by Tim Lueth, VLFL-Lib, 2020-MÄR-28 as class: VIDEO/AUDIO/PDF) % % This is Tim's main editor fnctn to create digital video lecture during % the CORONA-COVID-19 virus crisis! It is a powerful audio editor to % record sentence by sentence to describe the content of an static image % and to create an AVI video (1 fps) including audio. (Status of: % 2020-03-30) % % Introduced first in SolidGeometry 4.9 % % See also: audiotrim, audioseparatebreaks, audiorecordspokentext % % Y=audioeditspokentext(Y,FS) % === INPUT PARAMETERS === % Y: Original Signal % FS: Sample Rate % === OUTPUT RESULTS ====== % Y: Final Text % % See also: audiotrim, audioseparatebreaks, audiorecordspokentext % % % Copyright 2020 Tim C. Lueth |
audioseparatebreaks(y,FS,damp,brkdur,minvoic)- separates an audio sequence of spoken text into breaks |
% audioseparatebreaks(y,FS,damp,brkdur,minvoic) - separates an audio sequence of spoken text into breaks % (by Tim Lueth, VLFL-Lib, 2020-MÄR-28 as class: VIDEO/AUDIO/PDF) % % Introduced first in SolidGeometry 4.9 % % See also: audiotrim % % [Voice,VLen]=audioseparatebreaks(y,[FS,damp,brkdur,minvoic]) % === INPUT PARAMETERS === % y: Audio Signal % FS: Sample Rate; default is 16000 % damp: damping for break detection; linear = ; defalt 0.01 = -40dB % brkdur: minimum break durance default is 0.3 seconds % minvoic: minimal voice length; default is 1 second % === OUTPUT RESULTS ====== % Voice: List of [start and end] samples for the voice segments % VLen: length of the individual segments % % EXAMPLE: % [Y,FS]=audioreadTL('/Users/lueth/Desktop/Ohne Titel.mp4'); [Y,FS]=audioresample(Y,FS,16000); FS % soundTL(Y,FS) % audioseparatebreaks(Y); % % % See also: audiotrim % % % Copyright 2020 Tim C. Lueth |
audioresample(OSig,FSo,FSn)- resamples the audiosignal with a different sample rate |
% audioresample(OSig,FSo,FSn) - resamples the audiosignal with a different sample rate % (by Tim Lueth, VLFL-Lib, 2020-MÄR-28 as class: VIDEO/AUDIO/PDF) % % For writing audiofiles, typically 44100 Hz are used. For voice % recording, and processing 16000 is sufficient. % The resample process does not use any windowing. (Status of: 2020-03-28) % % Introduced first in SolidGeometry 4.9 % % See also: stretchAudio, audiotrim % % [NSig,FSn]=audioresample(OSig,[FSo,FSn]) % === INPUT PARAMETERS === % OSig: Original Signal % FSo: Original Sample rate; default is 44100 % FSn: NEw Sample ratel default is 16000 % === OUTPUT RESULTS ====== % NSig: New Signal % FSn: New Sample rate % % EXAMPLE: % load handel.mat; filename = desktopdir('handel.wav'); audiowrite(filename,y,Fs); clear y Fs % [y,FS]=audioreadTL; % audioresample(y,FS,16000); % % See also: stretchAudio, audiotrim % % % Copyright 2020 Tim C. Lueth |
imageaudio2video(IName,isize,AName)- creates video clips from an image and an audio file with the same name |
% imageaudio2video(IName,isize,AName) - creates video clips from an image and an audio file with the same name % (by Tim Lueth, VLFL-Lib, 2020-MÄR-28) % % Audiofile by default is same name as image; The default video time % without sound is 45 seconds % The clip is scaled and the image written with frame rate 1 fps in an % AVI file. While the fnctn image2video is able to adapt the frame rate, % the fram erate here is always 1 fps. % (Status of: 2020-03-28) % % Introduced first in SolidGeometry 4.9 % % See also: audiorecordsentences, image2video % % WName=imageaudio2video([IName,isize,AName]) % === INPUT PARAMETERS === % IName: Image file full name % isize: number of rows or [c r]; default is 1080 % AName: Audiofilename or number of default time seconds (45 Sec) % === OUTPUT RESULTS ====== % WName: Name of AVI file with audio track % % EXAMPLE: % imfile=desktopdir('peppers.png'), copyfile(which('peppers.png'),imfile) % imageaudio2video(imfile) % % % See also: audiorecordsentences, image2video % % % Copyright 2020 Tim C. Lueth |
imageFolderContent(DirName)- finds all image files within a folder |
% imageFolderContent(DirName) - finds all image files within a folder % (by Tim Lueth, VLFL-Lib, 2020-MÄR-27 as class: IMAGES) % % very slow fnctn since it really tries to open all files as image % without considering the extensions (Status of: 2020-03-28) % % Introduced first in SolidGeometry 4.9 % % See also: isfolder, isfile % % ImFileList=imageFolderContent([DirName]) % === INPUT PARAMETERS === % DirName: folder name % === OUTPUT RESULTS ====== % ImFileList: cell list of image files % % EXAMPLE: % imageFolderContent(desktopdir) % % See also: isfolder, isfile % % % Copyright 2020 Tim C. Lueth |
ftouch(fname)- file touch on mac - use carefully - does not support wildcards but only single files |
% ftouch(fname) - file touch on mac - use carefully - does not support wildcards but only single files % (by Tim Lueth, VLFL-Lib, 2020-MÄR-27 as class: FILE HANDLING) % % only full filenames are allowed for this fnctn % the wildcard touch fails in the batch fnctn if there are too many files % such in the SG Library (Status of: 2020-03-28) % % Introduced first in SolidGeometry 4.9 % % See also: isfile, touchfiles, pcodeTL % % ftouch(fname) % === INPUT PARAMETERS === % fname: exact filename % % EXAMPLE: % ftouch('pcodeTL.m') % % See also: isfile, touchfiles, pcodeTL % % % Copyright 2020-2022 Tim C. Lueth |
audioreadTL(AName,nFS)- similar to audioread but with sound output after readin |
% audioreadTL(AName,nFS) - similar to audioread but with sound output after readin % (by Tim Lueth, VLFL-Lib, 2020-MÄR-27 as class: VIDEO/AUDIO/PDF) % % similar to audioread but allows interactive use and returns information % during plays (Status of: 2020-03-28) % % Introduced first in SolidGeometry 4.9 % % See also: soundTL, audiorecorderTL, audiotrim, audiovocoder, % audiorecordsentences, audiowriteTL % % [y,FS]=audioreadTL([AName,nFS]) % === INPUT PARAMETERS === % AName: Filename; User interaction required if empty % nFS: desired sample frequency % === OUTPUT RESULTS ====== % y: Signal % FS: Sample Frequency % % EXAMPLE: % audioreadTL('/Users/lueth/Desktop/IMG_9776.mp4'); % audioreadTL; % % See also: soundTL, audiorecorderTL, audiotrim, audiovocoder, % audiorecordsentences, audiowriteTL % % % Copyright 2020 Tim C. Lueth |
audiowriteTL(OSig,FS,FName)- writes an audio sequence with fixed frequency of 44100 Hz |
% audiowriteTL(OSig,FS,FName) - writes an audio sequence with fixed frequency of 44100 Hz % (by Tim Lueth, VLFL-Lib, 2020-MÄR-27 as class: VIDEO/AUDIO/PDF) % % Since Windows supports only a few frequences, the signal is adjusted % and written (Status of: 2020-03-28) % % Introduced first in SolidGeometry 4.9 % % See also: soundTL, audiorecorderTL, audiotrim, audiovocoder, % audiorecordsentences % % Aname=audiowriteTL(OSig,[FS,FName]) % === INPUT PARAMETERS === % OSig: Original Audio % FS: Original Audio Frequency; writing rate is always fixed to 44100 Hz % FName: Filenamep; default is EXP-YYYY-MM-DD % === OUTPUT RESULTS ====== % Aname: Full filename of written file % % EXAMPLE: % [Y,FS]=audiorecorderTL; % audiowriteTL(Y,FS); % It is not written in sample rate FS but using 44100 Hz % % See also: soundTL, audiorecorderTL, audiotrim, audiovocoder, % audiorecordsentences % % % Copyright 2020 Tim C. Lueth |
audiovocoder(OSig,acc)- changes the pitch of the signal without changing the length |
% audiovocoder(OSig,acc) - changes the pitch of the signal without changing the length % (by Tim Lueth, VLFL-Lib, 2020-MÄR-27 as class: VIDEO/AUDIO/PDF) % % Uses stretchAudio (2019b) % Acc Values > 1 make the voices deeper and slower in same time period % (Status of: 2020-03-28) % % Introduced first in SolidGeometry 4.9 % % See also: soundTL, audiorecorderTL, audiotrim, audiorecordsentences % % [NSig,NSR]=audiovocoder(OSig,[acc]) % === INPUT PARAMETERS === % OSig: Original signal % acc: pitch; default is 1.03 % === OUTPUT RESULTS ====== % NSig: New Signal % NSR: New Sample rate; not used yet % % EXAMPLE: Compare 3% voice vocoder % y=audiorecorderTL('PRO X',16000,5); % record 5 seconds % soundTL(audiovocoder(y,1),16000,'PRO X'); pause(5); soundTL(audiovocoder(y,1.03),16000,'PRO X') % % % See also: soundTL, audiorecorderTL, audiotrim, audiorecordsentences % % % Copyright 2020 Tim C. Lueth |
audiorecordspokentext(org,FS,DV,def)- records a list of sentences an compiles it to a longer text |
% audiorecordspokentext(org,FS,DV,def) - records a list of sentences an compiles it to a longer text % (by Tim Lueth, VLFL-Lib, 2020-MÄR-26 as class: VIDEO/AUDIO/PDF) % % Helps to record sentences for a slide (Status of: 2020-03-28) % % Introduced first in SolidGeometry 4.9 % % See also: soundTL, audiorecorderTL, audiotrim, audiovocoder, % audioeditspokentext % % B=audiorecordspokentext([org,FS,DV,def]) % === INPUT PARAMETERS === % org: Signal to append; default is empty % FS: Sample rate default is 16000 % DV: device default is 'pro x' % def: sentence length; default is 10 seconds % === OUTPUT RESULTS ====== % B: Final Sequqnce % % EXAMPLE: % audiorecordspokentext % % See also: soundTL, audiorecorderTL, audiotrim, audiovocoder, % audioeditspokentext % % % Copyright 2020 Tim C. Lueth |
audiotrim(y,FS,n,thr)- trims an audio signal and adds a short break |
% audiotrim(y,FS,n,thr) - trims an audio signal and adds a short break % (by Tim Lueth, VLFL-Lib, 2020-MÄR-26 as class: AUXILIARY PROCEDURES) % % Introduced first in SolidGeometry 4.9 % % See also: soundTL, audiorecorderTL, audiovocoder, audiorecordsentences % % y=audiotrim(y,FS,[n,thr]) % === INPUT PARAMETERS === % y: samples % FS: Sample rate % n: seconds to add silence; default is 0.2 % thr: threshold for silence; default is 0.01 % === OUTPUT RESULTS ====== % y: sample signal % % EXAMPLE: % y=audiorecorderTL('PRO X',16000,5); audiotrim(y,16000); y=ans; soundTL(y,16000,'pro x'); % % See also: soundTL, audiorecorderTL, audiovocoder, audiorecordsentences % % % Copyright 2020 Tim C. Lueth |
audiorecorderTL(DV,FS,tim,SH)- records an audio sample from a specified device |
% audiorecorderTL(DV,FS,tim,SH) - records an audio sample from a specified device % (by Tim Lueth, VLFL-Lib, 2020-MÄR-26 as class: VIDEO/AUDIO/PDF) % % simplifies the use of different input devices % for autostop use audiorecorderTLautostop (Status of: 2020-03-28) % % Introduced first in SolidGeometry 4.9 % % See also: soundTL, audiotrim, audiovocoder, audiorecordsentences, % audiorecorderTLautostop % % [y,FS]=audiorecorderTL([DV,FS,tim,SH]) % === INPUT PARAMETERS === % DV: device string' default is webcam % FS: Sampe rate; default is 16000 % tim: time to samplel default is 1 sec % SH: if true; a time scale is displayed; default is true % === OUTPUT RESULTS ====== % y: Signal % FS: Sample rate % % EXAMPLE: % audiorecorderTL('HELP',16000,2); % returns the existing input devices % audiorecorderTL('pro X',16000,2); y=ans; soundTL(y,16000,'Pro X') % % See also: soundTL, audiotrim, audiovocoder, audiorecordsentences, % audiorecorderTLautostop % % % Copyright 2020 Tim C. Lueth |
soundTL(y,FS,DV,SH)- same as sound by support audio output devices |
% soundTL(y,FS,DV,SH) - same as sound by support audio output devices % (by Tim Lueth, VLFL-Lib, 2020-MÄR-26 as class: USER INTERFACE) % % Since an audioplayer is erased at the same time the fnctn returns, but % the sound is not played, this fnctn is required to support different % output devices similar to the sound fnctn (Status of: 2020-03-27) % % Introduced first in SolidGeometry 4.9 % % See also: sound, audiorecorderTL, audiotrim, audiovocoder, % audiorecordsentences % % soundTL(y,FS,[DV,SH]) % === INPUT PARAMETERS === % y: Samples % FS: Sample rate % DV: Device Name string to use % SH: if true; a time scale is displayed; default is true % % EXAMPLE: % audiorecorderTL('pro X',16000,5); y=ans; soundTL(y,16000,'Pro X') % % See also: sound, audiorecorderTL, audiotrim, audiovocoder, % audiorecordsentences % % % Copyright 2020 Tim C. Lueth |
SGshrinktofit(SG,dim)- reduces the size that the solid fits into a bounding box |
% SGshrinktofit(SG,dim) - reduces the size that the solid fits into a bounding box % (by Tim Lueth, VLFL-Lib, 2020-MÄR-22 as class: SURFACES) % % Simplified version of SGscale2dim % Shrinks only if it does not fit (Status of: 2020-08-09) % % Introduced first in SolidGeometry 4.9 % % See also: SGgrowoutsideFS, SGgrow, SGmagnifyVL, SGscale2dim % % [SGN,k]=SGshrinktofit(SG,[dim]) % === INPUT PARAMETERS === % SG: Solid Geometry % dim: Maximum dimensions % === OUTPUT RESULTS ====== % SGN: Shrinked Solid % k: shrinking factor % % EXAMPLE: % SGbox(1000*rand(1,3)); SG=ans; % SGshrinktofit(SG,150) % SGshrinktofit(SG,[150, 150 , 150]) % % See also: SGgrowoutsideFS, SGgrow, SGmagnifyVL, SGscale2dim % % % Copyright 2020 Tim C. Lueth |
sprintfvec(f,s,X)- prints vectors in a way that it can used in code generation |
% sprintfvec(f,s,X) - prints vectors in a way that it can used in code generation % (by Tim Lueth, VLFL-Lib, 2020-MÄR-21 as class: AUXILIARY PROCEDURES) % % Introduced first in SolidGeometry 4.9 % % See also: fprintfvec, fprintfvec2, str2codelines % % ostr=sprintfvec([f,s,X]) % === INPUT PARAMETERS === % f: file pointer; default is '' % s: format string % X: number % === OUTPUT RESULTS ====== % ostr: output string % % EXAMPLE: % sprintfvec('%.3f',[1 2 3; 4 5 6]) % sprintfvec('%d',[1 2 3; 4 5 6]) % % See also: fprintfvec, fprintfvec2, str2codelines % % % Copyright 2020 Tim C. Lueth |
FLselect3Dginput(VL,FL,singlef)- selects a point in the gca and finds the facets in a surface |
% FLselect3Dginput(VL,FL,singlef) - selects a point in the gca and finds the facets in a surface % (by Tim Lueth, VLFL-Lib, 2020-MÄR-21 as class: USER INTERFACE) % % Introduced first in SolidGeometry 4.9 % % See also: select3d, ginput % % fi=FLselect3Dginput(VL,FL,[singlef]) % === INPUT PARAMETERS === % VL: Vertex List % FL: Facet list % singlef: if true; only one facet is returned instead of all; default is % true % === OUTPUT RESULTS ====== % fi: list of facets that belong to the mouse click % % See also: select3d, ginput % % % Copyright 2020 Tim C. Lueth |
video2video(fname,WName,sizecr,cutt,frames,accel)- creates an AVI in different size and speed from a video file |
% video2video(fname,WName,sizecr,cutt,frames,accel) - creates an AVI in different size and speed from a video file % (by Tim Lueth, VLFL-Lib, 2020-MÄR-11 as class: VISUALIZATION) % % This fnctn is manly the same as video2anim. % The AVi file can be converted by many programs on PC or MAc to movie % files. (Status of: 2020-03-11) % % Introduced first in SolidGeometry 4.9 % % See also: image2video, videoCopyCutMovies, video2animatedGIF % % WName=video2video([fname,WName,sizecr,cutt,frames,accel]) % === INPUT PARAMETERS === % fname: Video file; default is ''=> selection by browser % WName: Name for animated GIF file; default is same as Video file name % sizecr: size columns by rows; default is unchanged; if scalar<10 => % ratio if scalar>10 =>rows % cutt: [start time end time]; default is [0 inf] % frames: fps; default is unchanged; 10 is a useful value; % accel: integer acceleration factor > 1; default is 1 % === OUTPUT RESULTS ====== % WName: Name of written File % % EXAMPLE: Just try % video2video('','',[1024 768],[2 3]) % select any video and cut between 2 and 3 seconds % video2video('','',0.5,[2 3]) % scaling ration 0.5 % video2video('','',720 lines,[2 3]) % use 720 lines % video2video('','',720 lines,[2 3],10) % use 720 lines and 10 fps % % See also: image2video, videoCopyCutMovies, video2animatedGIF % % % Copyright 2020 Tim C. Lueth |
strbreaklines(InpStr,numc)- Breaks a text string into paragraphs of a maximum number of chars per line |
% strbreaklines(InpStr,numc) - Breaks a text string into paragraphs of a maximum number of chars per line % (by Tim Lueth, VLFL-Lib, 2020-MÄR-07 as class: AUXILIARY PROCEDURES) % % Introduced first in SolidGeometry 4.9 % % See also: splitlines, ismemberincell, cell2strlines, strsplit % % OutStr=strbreaklines(InpStr,[numc]) % === INPUT PARAMETERS === % InpStr: Input String % numc: number of chars per line % === OUTPUT RESULTS ====== % OutStr: Output String % % EXAMPLE: % a='The quick brown fox jumps over the lazy dog. ' % a=repmat(a,1,20); % strbreaklines(a,15) % strbreaklines(a,40) % strbreaklines(a,2) % % See also: splitlines, ismemberincell, cell2strlines, strsplit % % % Copyright 2020-2022 Tim C. Lueth |
PLcircumcenterofCPL(CPL,lim)- returns the points that create the circumcenters of a CPL |
% PLcircumcenterofCPL(CPL,lim) - returns the points that create the circumcenters of a CPL % (by Tim Lueth, VLFL-Lib, 2020-MÄR-05 as class: CLOSED POLYGON LISTS) % % This fnctn can be used to understand the addition of points before the % delaunay traingulation to avoid extreme triangle angles. (Status of: % 2020-03-05) % % Introduced first in SolidGeometry 4.9 % % See also: delaunayTriangulation % % PL=PLcircumcenterofCPL(CPL,[lim]) % === INPUT PARAMETERS === % CPL: CPL % lim: minimum distance between the additional points; default is 0 % === OUTPUT RESULTS ====== % PL: Point list of circumcenterpoints of CPL % % EXAMPLE: % PLcircumcenterofCPL(CPLsample(29),.1); % PLcircumcenterofCPL(CPLsample(29),1); % PLcircumcenterofCPL(CPLsample(29),2); % % See also: delaunayTriangulation % % % Copyright 2020 Tim C. Lueth |
SGstentVeitPhillipMohamadAbdelhafez(L,D,w,halfring)- SG of a silikon stent using the deisng rules of Veit Phillip and Mohamed Abdelhafez |
% SGstentVeitPhillipMohamadAbdelhafez(L,D,w,halfring) - SG of a silikon stent using the deisng rules of Veit Phillip and Mohamed Abdelhafez % (by Tim Lueth, VLFL-Lib, 2020-MÄR-04 as class: SURFACES) % % This fnctn replaces the first SGofCPLstring by Tim Lueth of 2020-02-28. % Michaell Kruttschnitt also designed a Stent Design fnctn using the % SG-Lib. (Status of: 2020-03-05) % % Introduced first in SolidGeometry 4.9 % % See also: SGstentPeterEwert01, SGstentradsym, SGstent % % SG=SGstentVeitPhillipMohamadAbdelhafez([L,D,w,halfring]) % === INPUT PARAMETERS === % L: Length (full length, upper opening, lower opening] % D: Diameter (Stent, uper opening, lower opening] % w: wall thicknes [wall upper ring radius, lower ring radius] % halfring: false=fullring true=halfring; default is true; % === OUTPUT RESULTS ====== % SG: Solid Geometry % % EXAMPLE: % SGstentVeitPhillipMohamadAbdelhafez % SGstentVeitPhillipMohamadAbdelhafez([140 20 30], [18 22 24], [1 2 2]) % SGstentVeitPhillipMohamadAbdelhafez([140 20 30], [18 22 24], [1 2 2],false) % % See also: SGstentPeterEwert01, SGstentradsym, SGstent % % % Copyright 2020 Tim C. Lueth |
SGexplain(name,parm,fname)- returs help texts similar to a wiki system |
% SGexplain(name,parm,fname) - returs help texts similar to a wiki system % (by Tim Lueth, VLFL-Lib, 2020-MÄR-01 as class: USER INTERFACE) % % Support Hyperlinks % [[http://link | Text]] % [[@goggle | Text]] % [[@wiki | Text]] % (Status of: 2020-10-18) % % Introduced first in SolidGeometry 4.9 % % See also: strhyperlink, sprintfhyperlinktab, evalhyperlinktab, explain, % notiz % % SGexplain([name,parm,fname]) % === INPUT PARAMETERS === % name: name of a search text % parm: additional parameter such as 'edit' % fname: File name for database; default is 'SGexplainDocumentation.txt' % % EXAMPLE: % SGexplain % SGexplain Alibaba % % % See also: strhyperlink, sprintfhyperlinktab, evalhyperlinktab, explain, % notiz % % % Copyright 2020 Tim C. Lueth |
triangleheight(v1,v2,v3)- returns the heights of a triangle - slow but correct |
% triangleheight(v1,v2,v3) - returns the heights of a triangle - slow but correct % (by Tim Lueth, Video-Lib, 2020-FEB-28 as class: ANALYTICAL GEOMETRY) % % Introduced first in SolidGeometry 4.9 % % See also: mirroringatline3D, triangleheight % % % h=triangleheight(v1,v2,v3) % === INPUT PARAMETERS === % v1: vertex 1 or Vertex list % v2: vertex 2 % v3: vertex 3 % === OUTPUT RESULTS ====== % h: [h1 h2 h3] % % EXAMPLE: % VLsampletriangles(25); VL=ans; % triangleheight(VL); view(-10,0) % % See also: mirroringatline3D, triangleheight % % % % Copyright 2020 Tim C. Lueth |
SGchecktrianglegeometry(SG)- returns the extreme values for angle, edge length and area |
% SGchecktrianglegeometry(SG) - returns the extreme values for angle, edge length and area % (by Tim Lueth, VLFL-Lib, 2020-FEB-27 as class: SURFACES) % % Introduced first in SolidGeometry 4.9 % % See also: SGcheckmeshlab % % [wmin,emin,Amin,ai]=SGchecktrianglegeometry(SG) % === INPUT PARAMETERS === % SG: Solid Geometry % === OUTPUT RESULTS ====== % wmin: Minimal angle % emin: Minimal edge length % Amin: Minimul area % ai: index of areas with minial area % % EXAMPLE: % [A,B]=CSGsample(13); SGfigure(B); % SGchecktrianglegeometry(B) % % See also: SGcheckmeshlab % % % Copyright 2020 Tim C. Lueth |
VLFLshortopti(VL,FL,otyp)- returns the vertex list with optimal number of loss less reduced vertices |
% VLFLshortopti(VL,FL,otyp) - returns the vertex list with optimal number of loss less reduced vertices % (by Tim Lueth, VLFL-Lib, 2020-FEB-27 as class: AUXILIARY PROCEDURES) % % Some CAD Systems creates STL files that have different vertex % coordinates for the same vertices because of inaccuracies. This fnctn % uses VLcheckvertexaccuracy to find the optimal grid for loss less % optimization % This fnctn should be used after the first readin of an exported STL % file. Afterwards it makes sense to check the file using SGcheckmeshlab % (Status of: 2020-03-05) % % Introduced first in SolidGeometry 4.9 % % See also: VLcheckvertexaccuracy, SGshortopti, SGshort, % VLcheckboundaryaccuracy, SGcheckmeshlab % % [NVL,NFL]=VLFLshortopti(VL,FL,[otyp]) % === INPUT PARAMETERS === % VL: Vertex List % FL: Facet List % otyp: optimization type: 'vertex' or 'boundary' % === OUTPUT RESULTS ====== % NVL: SG.VL, SG.FL with optimal number of loss less reduced vertices % NFL: New Facet List % % EXAMPLE: % load JACO_robot.mat % VLFLshortopti(JC2.VL,JC2.FL) % VLFLshortopti(JC2.VL,JC2.FL,'vertex') % VLFLshortopti(JC2.VL,JC2.FL,'boundary') % % % See also: VLcheckvertexaccuracy, SGshortopti, SGshort, % VLcheckboundaryaccuracy, SGcheckmeshlab % % % Copyright 2020 Tim C. Lueth |
VLFLchecktrianglegeometry(VL,FL)- returns the extreme values for angle, edge length and area |
% VLFLchecktrianglegeometry(VL,FL) - returns the extreme values for angle, edge length and area % (by Tim Lueth, VLFL-Lib, 2020-FEB-25 as class: SURFACES) % % Introduced first in SolidGeometry 4.9 % % See also: VLFLcheckmeshlab % % [wmin,emin,Amin,ai]=VLFLchecktrianglegeometry(VL,FL) % === INPUT PARAMETERS === % VL: Vertex list % FL: Facet list % === OUTPUT RESULTS ====== % wmin: Minimal angle % emin: Minimal edge length % Amin: Minimul area % ai: index of areas of minal area % % EXAMPLE: % [A,B]=CSGsample(13); SGfigure(B); % VLFLchecktrianglegeometry(B.VL,B.FL); % % See also: VLFLcheckmeshlab % % % Copyright 2020 Tim C. Lueth |
PLtriangle(a1,a2,h)- returns a triangle from an agle |
% PLtriangle(a1,a2,h) - returns a triangle from an agle % (by Tim Lueth, VLFL-Lib, 2020-FEB-24 as class: CLOSED POLYGON LISTS) % % Introduced first in SolidGeometry 4.9 % % See also: PLsample % % PL=PLtriangle([a1,a2,h]) % === INPUT PARAMETERS === % a1: angle; default 1e-2 % a2: angle; default is 0 % h: height of the triangle % === OUTPUT RESULTS ====== % PL: Point list of a single triangle % % EXAMPLE: % PLtriangle(1e-1,2e-1) % PLtriangle(1e-) % % See also: PLsample % % % Copyright 2020 Tim C. Lueth |
EXP_2020_02_21_PLFLofPLFLequidelaunay (PL,FL)- |
% EXP_2020_02_21_PLFLofPLFLequidelaunay (PL,FL) - % (by Tim Lueth, VLFL-Lib, 2020-FEB-22 as class: EXPERIMENTS) % % Introduced first in SolidGeometry 4.9 % % EXP_2020_02_21_PLFLofPLFLequidelaunay(PL,FL) % === INPUT PARAMETERS === % PL: % FL: % % % Copyright 2020 Tim C. Lueth |
PLtetragrid(d,bb,w)- returns a tetra grid point list for a bounding box or CPL |
% PLtetragrid(d,bb,w) - returns a tetra grid point list for a bounding box or CPL % (by Tim Lueth, VLFL-Lib, 2020-FEB-22 as class: CLOSED POLYGON LISTS) % % Introduced first in SolidGeometry 4.9 % % See also: PLtetragridofCPL % % PL=PLtetragrid([d,bb,w]) % === INPUT PARAMETERS === % d: distance of % bb: length, b h, bounding box or CPL % w: wall distance/ default is d/3 % === OUTPUT RESULTS ====== % PL: Point list % % EXAMPLE: % PLtetragrid(1,[5 3]); % PLtetragrid(1,CPLsample(30),2); % Grid 1 , wall 2 % PLtetragrid(0,CPLsample(30)); % Grid automatic % PLtetragrid(0,CPLsample(29)); % % See also: PLtetragridofCPL % % % Copyright 2020 Tim C. Lueth |
PLaddTetragridofCPL(CPL,d,w)- returns a tetra grid point list for a bounding box or CPL |
% PLaddTetragridofCPL(CPL,d,w) - returns a tetra grid point list for a bounding box or CPL % (by Tim Lueth, VLFL-Lib, 2020-FEB-22 as class: CLOSED POLYGON LISTS) % % Introduced first in SolidGeometry 4.9 % % See also: PLtetragrid, PLaddTricircumcentersofCPL, % PLaddTrisplitpointsofCPL % % PL=PLaddTetragridofCPL([CPL,d,w]) % === INPUT PARAMETERS === % CPL: CPL % d: distance of triangle grid points % w: wall distance/ default is d/3 % === OUTPUT RESULTS ====== % PL: Point list % % EXAMPLE: % PLaddTetragridofCPL(CPLsample(29),1); % Fixed Grid size of 1 % PLaddTetragridofCPL(CPLsample(29)); % Automatic adjustment % % % See also: PLtetragrid, PLaddTricircumcentersofCPL, % PLaddTrisplitpointsofCPL % % % Copyright 2020 Tim C. Lueth |
lplots(P1L,P2L,c,w,ts,ss,str,fs)- plots a straight lines between 2 point lists |
% lplots(P1L,P2L,c,w,ts,ss,str,fs) - plots a straight lines between 2 point lists % (by Tim Lueth, HT-Lib, 2020-FEB-21 as class: VISUALIZATION) % % plots a straight line between 2 point pairs (Status of: 2020-02-22) % % Introduced first in SolidGeometry 4.9 % % See also: lplot, pplot, tfplot, aplot, tlplot, slplot, plotTP, plotL, % plotT, T2Plot % % h=lplots(P1L,P2L,[c,w,ts,ss,str,fs]) % === INPUT PARAMETERS === % P1L: Starting point % P2L: End point % c: Color and symbol default is "r*-" % w: line width; default is 1 % ts: tip size; 0==auto % ss: start block size; 0==auto % str: Text string at tip % fs: font size of text % === OUTPUT RESULTS ====== % h: handle to all line elements % % EXAMPLE: % SGfigure; lplots(rand(10,2),rand(10,2),'r-',2,0,0) % % See also: lplot, pplot, tfplot, aplot, tlplot, slplot, plotTP, plotL, % plotT, T2Plot % % % Copyright 2020 Tim C. Lueth |
PLsampletriangles(z,n)- creates extreme triangle geometries |
% PLsampletriangles(z,n) - creates extreme triangle geometries % (by Tim Lueth, VLFL-Lib, 2020-FEB-18 as class: ANALYTICAL GEOMETRY) % % Introduced first in SolidGeometry 4.9 % % See also: VLFLsamplecircles, VLsampletriangles, PLtriangle % % PLsampletriangles([z,n]) % === INPUT PARAMETERS === % z: extreme dimension; default is 1e-15 % n: number of additional random point around the triangle % % EXAMPLE: % PLsampletriangles % % See also: VLFLsamplecircles, VLsampletriangles, PLtriangle % % % Copyright 2020 Tim C. Lueth |
EXP_2020_02_17_accuracy(bary,z)- This experiment was used to detect error in coplanar and barycentric transformations |
% EXP_2020_02_17_accuracy(bary,z) - This experiment was used to detect error in coplanar and barycentric transformations % (by Tim Lueth, VLFL-Lib, 2020-FEB-17 as class: EXPERIMENTS) % % Testing PLofVLcoplanar with an extremely sharpedged triangle (EDUCATION % FNCTN) % Using this fnctn it became clear that the most accuracte method to % achieve coplanar cartesion coordates is a simple rotation using a % triangle and for barycentric coordinates % AFTERWARDS the triangulation class must be used for barycentric % coordinats. % The fnctn carttobaryVL of 2012 will be modified appropriately to % achieve the same accuracy. % % (Status of: 2020-02-18) % % Introduced first in SolidGeometry 4.9 % % See also: PLofVLcoplanar, carttobaryVL % % EXP_2020_02_17_accuracy([bary,z]) % === INPUT PARAMETERS === % bary: false = cartesian, true = barycentric % z: accuracy; default is 1e-15 (lowest limit! for PLofVLcoplanar) % % EXAMPLE: % EXP_2020_02_17_accurcay(true,1e-17) % % See also: PLofVLcoplanar, carttobaryVL % % % Copyright 2020 Tim C. Lueth |
VLFLdeleteFLofvi(VL,FL,vi)- removes the faces that belongs to a specific vertex |
% VLFLdeleteFLofvi(VL,FL,vi) - removes the faces that belongs to a specific vertex % (by Tim Lueth, VLFL-Lib, 2020-FEB-15 as class: SURFACES) % % more or less for education, understanding and testing % ri=sum(ismember(FL,vi),2)>0; FLN=FL(~ri,:); % (Status of: 2020-02-15) % % Introduced first in SolidGeometry 4.9 % % See also: VLFLremoveVertex % % [FLN,EL,CIL,CVL]=VLFLdeleteFLofvi(VL,FL,[vi]) % === INPUT PARAMETERS === % VL: Vertex list % FL: Facet list % vi: index of vertices to remove frome the facet list % === OUTPUT RESULTS ====== % FLN: New facet list % EL: Open edge list % CIL: CIL of open Edge list % CVL: CVL of open edge list % % EXAMPLE: % A=SGbox % X=A; VLFLdeleteFLofvi(A.VL,A.FL,6); X.FL=ans % connectable edges % VLFLfreeboundary(X) % SGsample(43); A=ans; % X=A; VLFLdeleteFLofvi(A.VL,A.FL,55); X.FL=ans % unconnectable edges % % % See also: VLFLremoveVertex % % % Copyright 2020 Tim C. Lueth |
VLFLcircFLedges(VL,FL)- modifies the Facet list by circulating rows to minimize the distance P2-P3. |
% VLFLcircFLedges(VL,FL) - modifies the Facet list by circulating rows to minimize the distance P2-P3. % (by Tim Lueth, VLFL-Lib, 2020-FEB-15 as class: SURFACES) % % Time consuming fnctn: % An FL consists of the sequence of three vertex indices [P1 P2 P3]. In % principle, each row of the FL can rotate its entries without any change % happening: [1 2 3] = [2 3 1] = [ 3 1 2]. % In many calculations, however, the cross product at point P1 is always % calculated using the equation % cross(P2-P1,P3-P1). This calculation is the more accurate the longer % the two legs P2P1 and P3P1 are. For very acute-angled triangles, it can % be useful to circulate rows of the facet list so that the distance % P3-P2 is shorter than the other two, i.e. the apex angle is in P1. This % would also allow the accuracy limit of the triangle to be reliably % determined by the angle in P1: % For small angles the following applies: a = tan(a) but it is necessary % to use cos instead of tan, since tan is the upper border of cos % (Status of: 2020-02-19) % % Introduced first in SolidGeometry 4.9 % % See also: VLDLBBofVLFL % % [FL,cosa]=VLFLcircFLedges(VL,FL) % === INPUT PARAMETERS === % VL: Vertex list % FL: Facet list % === OUTPUT RESULTS ====== % FL: Facet list with circulated rows to minimize distance |P2P3| % cosa: resulting cos alpha of angle at P1 % % EXAMPLE: % [A,B]=CSGsample(13); SGfigure(B) % SGsample(27); B=ans; % VLFLcircFLedges(B.VL,B.FL); % B.FL=VLFLcircFLedges(B.VL,B.FL); % % See also: VLDLBBofVLFL % % % Copyright 2020 Tim C. Lueth |
delaunayTriangulationONE2D(PLO,CL,thr)- creates a delaunayTriangulation of a single triangle avoiding inaccuracy problems |
% delaunayTriangulationONE2D(PLO,CL,thr) - creates a delaunayTriangulation of a single triangle avoiding inaccuracy problems % (by Tim Lueth, VLFL-Lib, 2020-FEB-10 as class: SURFACES) % % ATTENTION THE 2D delaunayTriangulation of a coplanar 3D set cannot % guarantee the normal vector % The first three points have to be the outer triangle in the point order % [1 2 3]. % Similar fnctn to VLFLinsertFacetPoints. % The use of barycentric coordinates as introduced in % VLFLinsertFacetPoints is still the most accurate solution. % There are two main rules: % 1) If a point is outside of the triangle; the point is corrected to the % point of the line % 2) If a point is inside of a triangle but near, it is moved to the line % (Status of: 2020-02-10) % % Introduced first in SolidGeometry 4.9 % % See also: delaunayTriangulation2D, VLFLinsertFacetPoints % % [FLN,CLN,outside,nearside]=delaunayTriangulationONE2D(PLO,CL,[thr]) % === INPUT PARAMETERS === % PLO: 2D Point list in order [p1; p2; p3; .....] % CL: Constraintlist % thr: threshold for testing; default is 1e-7 % === OUTPUT RESULTS ====== % FLN: Facet List = Connectivity List % CLN: Edge List - Constraint List % outside: points of PLO that are outside of edges of the triangle % nearside: points of PLO that are inside near the edges of the triangle % % EXAMPLE: % delaunayTriangulationONE2D([0 0; 2 2; 2 0; 1 1],[1 2;2 3;3 1]) % delaunayTriangulationONE2D([0 0; 2 2; 2 0; 1 1+.1],[1 2;2 3;3 1]) % Distortion % delaunayTriangulationONE2D([0 0; 2 2; 2 0; 1 1+.1],[1 2;2 3;3 1;3 4]) % Condition % % See also: delaunayTriangulation2D, VLFLinsertFacetPoints % % % Copyright 2020 Tim C. Lueth |
finduniqueVL(NVL,VL,tol,warn)- similar to unique but more reliable |
% finduniqueVL(NVL,VL,tol,warn) - similar to unique but more reliable % (by Tim Lueth, VLFL-Lib, 2020-FEB-08 as class: AUXILIARY PROCEDURES) % % Introduced first in SolidGeometry 4.9 % % See also: unique, uniquetol % % [ic,err,ia]=finduniqueVL(NVL,VL,[tol,warn]) % === INPUT PARAMETERS === % NVL: vector row list to search in % VL: vector row list to search for % tol: tolerance for warning; default is 1e-12 % warn: if true; warnings are shown; default is true % === OUTPUT RESULTS ====== % ic: list of index entries; 3rd result of unique % err: deviation between VL and best fit in NVL % ia: list of index entries; 2nd result of unique % % EXAMPLE: % finduniqueVL(rand(10,3),rand(6,3)) % X=rand(10,3); X=[X(1:5,:);X(3,:); X(1,:);X(6:end,:)] % [ic,err,ia]=finduniqueVL(X,X) % identical mapping % [ic,err,ia]=finduniqueVL(X,X+1e-3) % warning since thr= 1e-12 % [ic,err,ia]=finduniqueVL(X,X+1e-3,0.01) % No warning since thr= 0.01 % % % See also: unique, uniquetol % % % Copyright 2020 Tim C. Lueth |
ELremovedoubledconstraints(CL)- removes doubles from a constraint edge list |
% ELremovedoubledconstraints(CL) - removes doubles from a constraint edge list % (by Tim Lueth, VLFL-Lib, 2020-FEB-08 as class: EDGE LISTS) % % There is a bug in delaunayTriangulation % (Status of: 2020-02-10) % % Introduced first in SolidGeometry 4.9 % % See also: BUGREPORT_delaunayTriangulation, delaunayTriangulation % % CL=ELremovedoubledconstraints(CL) % === INPUT PARAMETERS === % CL: Constraint edge list % === OUTPUT RESULTS ====== % CL: Constraint edge list with no doubles % % EXAMPLE: % ELremovedoubledconstraints([1 2; 1 2; 3 4;3 4; 4 3]) % % See also: BUGREPORT_delaunayTriangulation, delaunayTriangulation % % % Copyright 2020 Tim C. Lueth |
BUGREPORT_delaunayTriangulation- this simple fnct shows an triangulation bug in delaunayTriangulation 2019a |
% BUGREPORT_delaunayTriangulation - this simple fnct shows an triangulation bug in delaunayTriangulation 2019a % (by Tim Lueth, VLFL-Lib, 2020-FEB-08 as class: EXPERIMENTS) % % Introduced first in SolidGeometry 4.9 % % BUGREPORT_delaunayTriangulation % % % Copyright 2020 Tim C. Lueth |
viewVLinspect (VL,vi)- inspects one by one points of the vertex list |
% viewVLinspect (VL,vi) - inspects one by one points of the vertex list % (by Tim Lueth, VLFL-Lib, 2020-FEB-04 as class: USER INTERFACE) % % Introduced first in SolidGeometry 4.9 % % See also: camset % % viewVLinspect(VL,[vi]) % === INPUT PARAMETERS === % VL: Vertex list % vi: optional index list to VL % % EXAMPLE: % SGbox; A=ans; viewVLinspect(A.VL,5:8) % % See also: camset % % % Copyright 2020 Tim C. Lueth |
ELofcrosspoints2F(XL,PA,PB,PinA,PinB)- returns the Edge Constraint List from a crosspoint List |
% ELofcrosspoints2F(XL,PA,PB,PinA,PinB) - returns the Edge Constraint List from a crosspoint List % (by Tim Lueth, VLFL-Lib, 2020-FEB-02 as class: SURFACES) % % This fnctn is an auxiliary fnctn that will finally be part of % crosspoint2F. % The challenge is NOT only to find the cross points, but to find the % edge constraints which can be different for triangle A and triangle B % if some points of A are inside B and vice versa. Fortunately, the % intersection points of cross2F or crosspoints2F are already generated % in the correct order. It is only possible that sometimes two lines have % to be swapped! Afterwards, the points are already available in the % correct order. Now, at the end, the points that are located within the % intersected triangle must be added. Here the list of the triangle A and % B differs. After that the intersection sequence in triangle A and % triangle B is fixed. Now you only have to create an edge list using % circshift and afterwards edges with identical start and end points can % be deleted. % (Status of: 2020-02-03) % % Introduced first in SolidGeometry 4.9 % % See also: crosspoints2F % % ELofcrosspoints2F(XL,PA,PB,PinA,PinB) % === INPUT PARAMETERS === % XL: List of cross points of triangle A and triangle B (may include PA % and PB) % PA: Three points of triangle A % PB: Three points of triangle B % PinA: index list which points of B are inside A % PinB: index list which points of A are inside B % % See also: crosspoints2F % % % Copyright 2020 Tim C. Lueth |
plothatch(h,col,w,dist,angle);- creates a hatch for a graphics object |
% plothatch(h,col,w,dist,angle); - creates a hatch for a graphics object % (by Iram Weinstein, Kirill Pankratov, Tim Lueth, VLFL-Lib, 2020-JAN-29 % as class: USER INTERFACE) % % ======================================================================= % OBSOLETE (2022-05-22) - USE 'CPLplothatched' INSTEAD % ======================================================================= % % Not Bug free - removed!! (Status of: 2022-05-22) % % Introduced first in SolidGeometry 4.9 % % See also: [ CPLplothatched ] ; CPLhatch, CPLplothatched, % CVLzplothatched, hatch % % hh=plothatch(h,[col,w,dist,angle]); % === INPUT PARAMETERS === % h: hadle to graphics object % col: color; default is 'r--' % w: line width; default is 1 % dist: distance in steps of 100*sofgca % angle: angle in multiples of 30 degree % === OUTPUT RESULTS ====== % hh: handle to hatch % % EXAMPLE: % SGfigure; h=CPLplot(PLstar(10)); plothatch(h,'g-',2,0); % % See also: [ CPLplothatched ] ; CPLhatch, CPLplothatched, % CVLzplothatched, hatch % % % Copyright 2020-2022 Tim C. Lueth |
crosspoints2F(p1,p2,p3,pa,pb,pc,SHW)- This Fnct designed for SGbool6 returns all crossing points of 2 triangles |
% crosspoints2F(p1,p2,p3,pa,pb,pc,SHW) - This Fnct designed for SGbool6 returns all crossing points of 2 triangles % (by Tim Lueth, VLFL-Lib, 2020-JAN-28 as class: SURFACES) % % In contrast to fnctn cross2F of 2012 and cross2Fplanar, which are the % origin and a step inbetween of this fnctn, crosspoints2F is able to % handle the following cases: % A) Two triangles are not in-plane or in-parallel as in cross2F of 2012 % B) Two triangles are in-parallel but not in-plane and have no crossings % C) Two triangles are in-plane and have a lot of % Furthermore, the consideration for the inplane-case is not only the % cross-points but also which point is inside of another triangle. % Furthermore, the constraint edge list for a delaunay triangulation is % also returned (Status of: 2020-02-07) % % Introduced first in SolidGeometry 4.9 % % See also: VLsampletriangles, cross2F, cross2Fplanar % % [XP,PinA,PinB,EL1,EL2]=crosspoints2F(p1,p2,p3,pa,pb,pc,[SHW]) % === INPUT PARAMETERS === % p1: Vertex 1 of A; or a VL=[p1;p2;p3;pa;pb;pc] % p2: Vertex 2 of A % p3: Vertex 3 of A % pa: Vertex 1 of B % pb: Vertex 2 of B % pc: Vertex 3 of B % SHW: show additional information if true % === OUTPUT RESULTS ====== % XP: Crosspoints of Edges [edgeA edgeB X Y Z dir] similar to cross2F but % handles also co-planar points % PinA: Additional Points in A if both traingles co-planar (may be not in % XP) % PinB: Additional Points in B if both traingles co-planar (may be not in % XP) % EL1: Edges between additional points in A (MAGENTA) % EL2: Edges between additional points in B (CYAN) % % EXAMPLE: % VLsampletriangles(3); VL=ans; crosspoints2F(VL(1,:),VL(2,:),VL(3,:),VL(4,:),VL(5,:),VL(6,:)) % crosspoints2F([-10 -5 -5],[10 -5 5],[-1 -5 5],[-5 -5 0],[5 -5 0],[5 -5 20]); % % See also: VLsampletriangles, cross2F, cross2Fplanar % % % Copyright 2020 Tim C. Lueth |
exp_2020_01_27_speedtest(Nr,n)- EXperiment zum Vergleich der VErfahren zur Separierung planarer Dreiecke |
% exp_2020_01_27_speedtest(Nr,n) - EXperiment zum Vergleich der VErfahren zur Separierung planarer Dreiecke % (by Tim Lueth, VLFL-Lib, 2020-JAN-27 as class: EXPERIMENTS) % % Using VLcross2Lines3D nine times is between 1.5 and 100 times faster % than calling delaunayTriangulation2D % No crossings: 100 time % 6 crossings: 1.5 times % In case of cross2F the speed of crossF is just between 4 and 1.5 times % faster than calling delaunayTriangulation2D (Status of: 2020-01-28) % % Introduced first in SolidGeometry 4.9 % % See also: VLcross2Lines3D, delaunayTriangulation2D, cross2F % % exp_2020_01_27_speedtest([Nr,n]) % === INPUT PARAMETERS === % Nr: Testnr. of VLsampletriangles % n: number of tests; default is 10000 % % EXAMPLE: % exp_2020_01_27_speedtest(1);% No crossing % exp_2020_01_27_speedtest(9); % 6 crossing % exp_2020_01_27_speedtest(11); % 6 crossing % % See also: VLcross2Lines3D, delaunayTriangulation2D, cross2F % % % Copyright 2020 Tim C. Lueth |
delaunayTriangulation2D(VL,CL)- returns a 2D delaunay triangulation for planar surfaces in 3D |
% delaunayTriangulation2D(VL,CL) - returns a 2D delaunay triangulation for planar surfaces in 3D % (by Tim Lueth, VLFL-Lib, 2020-JAN-26 as class: SURFACES) % % Not speed optimzed at the moment. % A Delaunay Triangulation in 2D consists of a point cloud, an area % decomposition into triangles and a list of constraints, i.e. an edge % list containing forced exceptions to the optimal Delaunay % Triangulation. % The Matlab delaunayTriangulation fnctn generates either a rejection or % a convex hull for planar surfaces in 3D, without this being detectable % in advance. % My fnctn creates a planar Delaunay triangulation in 3D and returns the % constraint list separately as an Edge List. % It is based on a rotation of all points into a plane based on the first % 4 points of the vertex list, the delaunay triangulation in 2D wrt to % the Constraint-Edge List, and the transformation of a new crossing % points into 3D as the original points and rounding to 12 significant % digits. (Status of: 2020-01-28) % % Introduced first in SolidGeometry 4.9 % % See also: delaunayTriangulation, triangulation % % [TR3,CL,NVL,chng,FL,isInter]=delaunayTriangulation2D(VL,[CL]) % === INPUT PARAMETERS === % VL: Vertex list, Point list in 3D % CL: Edge List, Constraints % === OUTPUT RESULTS ====== % TR3: triangulation % CL: Edge List, constraints % NVL: true if points list is extended or consolidated (doubled vertex % removal) % chng: Full Triangulation % FL: inInteriorflag % isInter: % % EXAMPLE: % n=1 % Test number % [A,B]=VLsampletriangles(n); VL=[A;B]*rot(1,2,3); SGfigure; VLELplots(VL,[1 2;2 3; 3 1; 4 5;5 6;6 4]); % delaunayTriangulation2D([A;B],[1 2;2 3;3 1]) % delaunayTriangulation2D(VL,[1 2;2 3;3 1;4 5;5 6;6 4]) % delaunayTriangulation2D(VL,[1 2;2 3; 3 1; 4 5;5 6;6 4]) % delaunayTriangulation2D(VLsampletriangles(11),[1 2;2 3;3 1; 4 6; 6 5; 5 4]), view(0,0) % delaunayTriangulation2D(VLsampletriangles(11),[1 2;2 3;3 1; 6 4; 5 6; 4 5]), view(0,0) % delaunayTriangulation2D([0 0 0;0 1 0;3 0 0; 1 0 0; 2 0 0],[1 2;2 3;3 1; 4 5;5 4]) % % See also: delaunayTriangulation, triangulation % % % Copyright 2020 Tim C. Lueth |
VLsampletriangles(Nr,cmd)- returns pairs of vertex lists for triangle tests |
% VLsampletriangles(Nr,cmd) - returns pairs of vertex lists for triangle tests % (by Tim Lueth, VLFL-Lib, 2020-JAN-24 as class: VERTICES / CLOUDS) % % This fnctn creates pairs of triangles and in addition is a test for % cross2F and crosspoints2F and ELofcrosspoints2F in case of planar and % non planar surfaces. % (Status of: 2020-02-05) % % Introduced first in SolidGeometry 4.9 % % See also: cross2F, CPLsample, SGsample, VLsample, PLsample, VLFLsample, % CSGsample, SGerrorsample, SGfischertechniksample, SGcmdsample, % CVLzsample % % [VLA,VLB,cp,cpa,cpb,EL1]=VLsampletriangles([Nr,cmd]) % === INPUT PARAMETERS === % Nr: Number of traingle test % cmd: such as 'last','flipA','Acirc1','Acirc2','rand','swapAB','rot' % === OUTPUT RESULTS ====== % VLA: 3 Points of VLA or if nargout==1, [VLA;VLB] % VLB: 3 Points of VLB if nargout>=2 % cp: List of unique cross points if nargout>=3 % cpa: points in A % cpb: points in B % EL1: Edge list of crossing constraints % % EXAMPLE: % VLsampletriangles; % show all % VLsampletriangles(9); % Sample Pair Nr 9 % VLsampletriangles('','rand') % VLsampletriangles(10) % VLsampletriangles(10,'rand') % VLsampletriangles(10,'flipA, Acirc1') % % See also: cross2F, CPLsample, SGsample, VLsample, PLsample, VLFLsample, % CSGsample, SGerrorsample, SGfischertechniksample, SGcmdsample, % CVLzsample % % % Copyright 2020-2021 Tim C. Lueth |
VLcrossstraightnline3D(A,B,C,D)- returns the crossing point of 2 lines in [x y z] |
% VLcrossstraightnline3D(A,B,C,D) - returns the crossing point of 2 lines in [x y z] % (by Tim Lueth, VLFL-Lib, 2020-JAN-22 as class: ANALYTICAL GEOMETRY) % % Introduced first in SolidGeometry 4.9 % % See also: PLcross2Lines, PLcrossstraightnline, VLcross2Lines3D % % [CP,ka,kb,kc]=VLcrossstraightnline3D(A,B,C,D) % === INPUT PARAMETERS === % A: starting point A [x y z] or PL[4 x 2 % B: ending point A [x y z] % C: starting point B [x y z] % D: Direction from C to [x y z] % === OUTPUT RESULTS ====== % CP: Crossing Point % ka: factor from A to B % kb: factor from C into direction D; always > 0 % kc: reason for removal % % EXAMPLE: % VLcrossstraightnline3D([[0 -4 0 ];[0 10 0];[-3 -3 0]; [1 1 0]]) % VLcrossstraightnline3D([[0 -4 0 ];[0 10 0];[-3 -3 0]; [1 1 1]]) % % See also: PLcross2Lines, PLcrossstraightnline, VLcross2Lines3D % % % Copyright 2020 Tim C. Lueth |
VLcross2Lines3D(A,B,C,D)- returns the crossing point of 2 lines in [x y z] |
% VLcross2Lines3D(A,B,C,D) - returns the crossing point of 2 lines in [x y z] % (by Tim Lueth, VLFL-Lib, 2020-JAN-22 as class: ANALYTICAL GEOMETRY) % % Accelerated version by previous checks. still uses rref in case of % crossings % Renamed to PLcross2Lines from originally cross4PN % (Status of: 2020-01-22) % % Introduced first in SolidGeometry 4.9 % % See also: PLcross2Lines, PLcrossstraightnline, VLcrossstraightnline3D % % [CP,ka,kb,kc]=VLcross2Lines3D(A,B,C,D) % === INPUT PARAMETERS === % A: starting point A [x y] or PL[4 x 2 % B: ending point A [x y] % C: starting point B [x y] % D: ending point B [x y] % === OUTPUT RESULTS ====== % CP: Crossing Point % ka: factor from A to B % kb: factor from C into direction D; always > 0 % kc: reason for removal % % EXAMPLE: % VLcross2Lines3D([[0 -4 0];[0 10 0];[-3 -3 0]; [+5 1 0]]) % VLcross2Lines3D([[0 -4 0];[0 10 0];[-3 -3 0]; [+5 1 1]]) % VLcross2Lines3D([[0 -4 0];[0 10 0];[-3 -3 1]; [+5 1 1]]) % % See also: PLcross2Lines, PLcrossstraightnline, VLcrossstraightnline3D % % % Copyright 2020 Tim C. Lueth |
PLcrossstraightnline(A,B,C,D)- returns the crossing point of 2 lines in [x y] |
% PLcrossstraightnline(A,B,C,D) - returns the crossing point of 2 lines in [x y] % (by Tim Lueth, VLFL-Lib, 2020-JAN-22 as class: ANALYTICAL GEOMETRY) % % Accelerated version by previous checks. still uses rref in case of % crossings % Renamed to PLcross2Lines from originally cross4PN % PLcross2Lines (Status of: 2020-01-22) % % Introduced first in SolidGeometry 4.9 % % See also: PLcross2Lines, VLcross2Lines3D, VLcrossstraightnline3D % % [CP,ka,kb,kc]=PLcrossstraightnline(A,B,C,D) % === INPUT PARAMETERS === % A: starting point A [x y] or PL[4 x 2 % B: ending point A [x y] % C: starting point B [x y] % D: Direction from B to [x y] % === OUTPUT RESULTS ====== % CP: Crossing Point % ka: factor from A to B % kb: factor from C into direction D; always > 0 % kc: reason for removal % % EXAMPLE: % PLcrossstraightnline([[0 -4];[0 10];[-3 -3]; [+1 +1]]) % PLcrossstraightnline([[0 -4];[0 10];[-3 -3]; [-1 -1]]) % PLcrossstraightnline([[0 -4];[0 10];[-3 -3]; [+4 +4]]) % % See also: PLcross2Lines, VLcross2Lines3D, VLcrossstraightnline3D % % % Copyright 2020 Tim C. Lueth |
FLofVLPLofVLplaneprojection(VL,EL)- returns a FL for 2D could also be FLofVLELplanarDelaunay |
% FLofVLPLofVLplaneprojection(VL,EL) - returns a FL for 2D could also be FLofVLELplanarDelaunay % (by Tim Lueth, VLFL-Lib, 2020-JAN-22 as class: SURFACES) % % In contrast to a transformation relative to the normal vector of the % plane, this fnctn estimates the normal vector (VLeigenvect) based on % the eigenvalues of the covariance matrix insteead of simply three % vaertices. The smallest eigenvalue/eigenvector is then used to create a % normal vector. This normal vector is used in combination with % PLofVLplaneprojection to map the surface to 2D coordinates. % Fast version for large vertex lists (Status of: 2020-01-22) % % Introduced first in SolidGeometry 4.9 % % See also: FLofDelaunay, FLofPLEL, VLFLofVLELdelaunay3D, % FLofVLDelaunay2Dprojection % % [FL,PL]=FLofVLPLofVLplaneprojection(VL,[EL]) % === INPUT PARAMETERS === % VL: Vertex List of a 2D Surface inb 3D Space % EL: Optional Edge list % === OUTPUT RESULTS ====== % FL: Facet List % PL: Projection Point list; Not a real Transofmation % % EXAMPLE: % AVL=[0 0 0; 20 0 0; 20 0 10; 0 0 10]; BVL=VLtransR(AVL,rot(pi/10,pi/4,pi/9)) % FLofVLPLofVLplaneprojection(BVL) % FLofVLPLofVLplaneprojection(BVL,[1 3]) % % See also: FLofDelaunay, FLofPLEL, VLFLofVLELdelaunay3D, % FLofVLDelaunay2Dprojection % % % Copyright 2020 Tim C. Lueth |
VLeigenvect(VL)- Calculates Eigenvectors and Eigenvalues of Vertex list |
% VLeigenvect(VL) - Calculates Eigenvectors and Eigenvalues of Vertex list % (by Tim Lueth, VLFL-Lib, 2020-JAN-22 as class: VERTICES / CLOUDS) % % Similar to TofVL % IN SG-LIB 5.0 we have to following concepts: % - (2010) - T3P: T - right hand system from 3 Point. Origin is p1 % - (2012) - TofVL: T - Eigenvalues and Center of convexhull of VL % - (2015) - PLofVL: T - ex is the longest distance of mean(VL) % - (2016) - TofPez: T - ey has no x dimension or ex=[0 0 1] % - (2019) - TofVLFL:T - ez is calucated from the face normals, o=mean(VL) % - (2020) - VLeigenvect - same as TofVL but no convex hull and faster % - (2020) - TofCVL: T - ez is calucated from the edge normals, o=mean(VL) % (Status of: 2020-09-14) % % Introduced first in SolidGeometry 4.9 % % See also: TofVLFL, TofVL, T3P, TofPez, PLofVL, TofCVL % % [EVL,EWL,T]=VLeigenvect(VL) % === INPUT PARAMETERS === % VL: Vertex List % === OUTPUT RESULTS ====== % EVL: row list of eigenvecors ordered in norm of eigenvalue % EWL: row of Eigenvalue % T: Transformation matrix % % EXAMPLE: % VLeigenvect(VLtransR(rand(30,3),rot(pi/10,pi/4,pi/9))); % A.VL=[0 0 0; 20 0 0; 20 0 10; 0 0 10]; VLeigenvect(VLtransR(A.VL,rot(pi/10,pi/4,pi/9))); % % See also: TofVLFL, TofVL, T3P, TofPez, PLofVL, TofCVL % % % Copyright 2020 Tim C. Lueth |
zoomVL(VL,gwfac)- simply zooms into a bounding box of the vertex list |
% zoomVL(VL,gwfac) - simply zooms into a bounding box of the vertex list % (by Tim Lueth, VLFL-Lib, 2020-JAN-22 as class: USER INTERFACE) % % Introduced first in SolidGeometry 4.9 % % See also: zoom, zoompatch % % ax=zoomVL(VL,[gwfac]) % === INPUT PARAMETERS === % VL: Vertex List % gwfac: growing factor; default is 1.1 % === OUTPUT RESULTS ====== % ax: axis % % EXAMPLE: % SGbox(randminv(20,3,[1 15]),8,'pack'); zoomVL(VLFLofSG(ans)) % % See also: zoom, zoompatch % % % Copyright 2020 Tim C. Lueth |
viVLFLnearestneighborVL(VLA,FLA,VL)- returns the vertex indices of the nearest neighbors of a Vertex list |
% viVLFLnearestneighborVL(VLA,FLA,VL) - returns the vertex indices of the nearest neighbors of a Vertex list % (by Tim Lueth, VLFL-Lib, 2020-JAN-22 as class: SURFACES) % % TR=triangulation(FLA,VLA); vi=nearestNeighbor(TR,VL); (Status of: % 2020-01-22) % % Introduced first in SolidGeometry 4.9 % % See also: FLofVLFLfi, FLofVLFLnearestneighborVL, FLofVLFLvi % % vi=viVLFLnearestneighborVL(VLA,FLA,VL) % === INPUT PARAMETERS === % VLA: Vertex List of Solid % FLA: Facet List of Solid % VL: Vertex list to check % === OUTPUT RESULTS ====== % vi: neares neighbor index to VLA % % EXAMPLE: % SG=SGbox; viVLFLnearestneighborVL(SG.VL,SG.FL,rand(1,3)*10) % % See also: FLofVLFLfi, FLofVLFLnearestneighborVL, FLofVLFLvi % % % Copyright 2020 Tim C. Lueth |
isInteriorofCPL(CPL,PL);- tests whether a point is inside of a closed contour in 2D! |
% isInteriorofCPL(CPL,PL); - tests whether a point is inside of a closed contour in 2D! % (by Tim Lueth, VLFL-Lib, 2020-JAN-22 as class: ANALYZING PROCEDURES) % % for simple CPL; this fnctn is faster than insideCPL % +1 means point is inside or on contour % 0 means point is outside (Status of: 2020-10-04) % % Introduced first in SolidGeometry 4.9 % % See also: crosstest, insideCPL, insideCPS, insideC, CPLselectbyP % % ii=isInteriorofCPL(CPL,PL); % === INPUT PARAMETERS === % CPL: Vertex list of the contour % PL: Point to check % === OUTPUT RESULTS ====== % ii: +1==inside or on, 0==outside % % EXAMPLE: % isInteriorofCPL(CPLsample(8)/10,rand(1000000,2)); % isInteriorofCPL(PLcircle(1),rand(1000000,2)); % % % See also: crosstest, insideCPL, insideCPS, insideC, CPLselectbyP % % % Copyright 2020-2021 Tim C. Lueth |
insideCPL(VL,PL);- tests whether a point is inside of a closed contour in 2D! |
% insideCPL(VL,PL); - tests whether a point is inside of a closed contour in 2D! % (by Tim Lueth, VLFL-Lib, 2020-JAN-22 as class: ANALYZING PROCEDURES) % % ONLY FOR SINGLE CLOSED CONTOURS % for simple CPL; this fnctn is faster than % +1 means point is inside % -1 means point is outside % 0 means point is on the contour (Status of: 2020-10-04) % % Introduced first in SolidGeometry 4.9 % % See also: crosstest, insideCPS, isInteriorofCPL, insideC, CPLselectbyP % % tp=insideCPL(VL,PL); % === INPUT PARAMETERS === % VL: Vertex list of the contour! MUST BE CLOSED OTHERWISE START/END % POINTS ARE NOT DETECTED % PL: Point to check % === OUTPUT RESULTS ====== % tp: +1==inside, -1==outside, 0== on the contour % % EXAMPLE: % insideCPL([0 0; 1 0; 1 1; 0 0],rand(1000000,2)); % % See also: crosstest, insideCPS, isInteriorofCPL, insideC, CPLselectbyP % % % Copyright 2020 Tim C. Lueth |
SGboolDEBUG(cmd)- reads in in the STL Geometries that created problems during SGboolh |
% SGboolDEBUG(cmd) - reads in in the STL Geometries that created problems during SGboolh % (by Tim Lueth, VLFL-Lib, 2020-JAN-22 as class: SURFACES) % % SGboolDEBUG: Starting with SG-Lib. 4.9, the fnctn "SGboolh" writes the % STL-Files for corrupted Arguments or corrupted Results to the % desktopdir: % SG-Lib_Debug_Boolh_FAIL_A.STL is Operand/Parameter A if SGBoolh failed! % SG-Lib_Debug_Boolh_FAIL_B.STL is Operand/Parameter B if SGBoolh failed! % Always both Parameters are written to file by SGboolh (Status of: % 2020-01-22) % % Introduced first in SolidGeometry 4.9 % % See also: SGboolh, SGboolanalyze, SGcheckmeshlab % % [SGs,erra,errb]=SGboolDEBUG([cmd]) % === INPUT PARAMETERS === % cmd: optional command for checking in further versions % === OUTPUT RESULTS ====== % SGs: Cell list of 2 Solids {A,B} % erra: errors of A of SGcheckmeshlab % errb: errors of B of SGcheckmeshlab % % EXAMPLE: % SGdumbbell('bool'); SG=ans; view(90,0); err=SGcheckmeshlab(SG); % SGboolDEBUG; SG=ans; A=SG{1}; B=SG{2}; % Ready to make further testing % % See also: SGboolh, SGboolanalyze, SGcheckmeshlab % % % Copyright 2020 Tim C. Lueth |
SGsortcollVLFL(SGc)- returns a collision index list of all SG in the SG cell list and considers all VLFL |
% SGsortcollVLFL(SGc) - returns a collision index list of all SG in the SG cell list and considers all VLFL % (by Tim Lueth, VLFL-Lib, 2020-JAN-21 as class: SURFACES) % % In contrast to SGsortcollVLFLBB, which considers the Bounding Boxes of % all Facets of two solids, this fnctn checks afterwards real % intersections of all facets if necessary. It includes the code of % SGsortcollBB and SGsortcollVLFL to save time. (Status of: 2020-01-21) % % Introduced first in SolidGeometry 4.9 % % See also: SGsortfitinBB, SGsortcollBB, SGsortisinsideBB, % SGsortcollVLFLBB % % [ELcoll,CIL,SG]=SGsortcollVLFL(SGc) % === INPUT PARAMETERS === % SGc: Bounding Box List or Solid Geometry cell list with n entries % === OUTPUT RESULTS ====== % ELcoll: Collision pair list | It is an undirected graph % CIL: logical collision index list, size n % SG: Solid Geometry list % % EXAMPLE: % A=SGbox; B=SGsphere(4); SGfigure; C={A,B}; SGsurfaces(C); SGsortcollVLFL(C) % BB=rounddiv(randminv(20,3,[1 10]),2) % Create 10 Bounding boxes % SGbox(BB,30,'randxy'); SG=ans % Create 10 Boxes in random distance % SGsortcollVLFL(SG) % Collision pair list % [a,b]=SGsortcollBB(SG) % SG=SGsurfaces(SGdumbbell), SGsortcollVLFLBB(SG) % SG=SGsurfaces(SGdumbbell), SGsortcollVLFL(SG) % SG=SGsurfaces(SGdumbbell); SGsortisinsideBB(SG) % % % See also: SGsortfitinBB, SGsortcollBB, SGsortisinsideBB, % SGsortcollVLFLBB % % % Copyright 2020 Tim C. Lueth |
SGdumbbell(type)- returns the shape of a dumbbell |
% SGdumbbell(type) - returns the shape of a dumbbell % (by Tim Lueth, VLFL-Lib, 2020-JAN-21 as class: SURFACES) % % more a less a testing fnctn for specific surface geometries such as % SGbox, SGboxsphere etc. (Status of: 2020-01-21) % % Introduced first in SolidGeometry 4.9 % % See also: SGboxsphere, SGBox % % SG=SGdumbbell([type]) % === INPUT PARAMETERS === % type: design method such as 'bool' or 'rot' % === OUTPUT RESULTS ====== % SG: Solid Geometry % % EXAMPLE: % SGdumbbell % SGdumbbell('bool') % SGdumbbell('rot') % % % See also: SGboxsphere, SGBox % % % Copyright 2020 Tim C. Lueth |
SGbendcone(SG,R1,R2,L,Rz1,Rz2)- bends a solid geometry around a conic segment with defined geometry |
% SGbendcone(SG,R1,R2,L,Rz1,Rz2) - bends a solid geometry around a conic segment with defined geometry % (by Nicholas Moser, VLFL-Lib, 2020-JAN-21 as class: SURFACES) % % SGbendcone takes in a solid geometry and parameters defining the % geometry of a cone centered along the y-axis. It returns the deformed % solid so that it is wrapped around the virtual cone, with the xy-plane % being transferred to the surface of this cone (Status of: 2020-02-03) % % See also: SGbending, SGbendedCPL, SGcone % % SG=SGbendcone(SG,R1,[R2,L,Rz1,Rz2]) % === INPUT PARAMETERS === % SG: Solid geometry to be bent % R1: Radius of the cone at the xz-plane % R2: Radius of the cone at a distance L along the +y-axis. Defaults to R1 % L: Distance between R1 and R2. Defaults to furthest distance of solid % geometry along +y-axis % Rz1: radius in the z-direction. Together with R1, defines an elliptical % cross-section % Rz2: radius in the z-direction. Together with R2, defines an elliptical % cross-section % === OUTPUT RESULTS ====== % SG: deformed solid geometry. Positioned as if the cone was centered on % the y-axis % % EXAMPLE: % SGofCPLzdelaunayGrid(CPLoftext('test'),2,.5); SGT=ans % SGbendcone(SGT,10,20) % % % See also: SGbending, SGbendedCPL, SGcone % |
SGsortcollVLFLBB(BBL)- returns a collision index list of all SG in the SG cell list but considers the BB of VLFL |
% SGsortcollVLFLBB(BBL) - returns a collision index list of all SG in the SG cell list but considers the BB of VLFL % (by Tim Lueth, VLFL-Lib, 2020-JAN-21 as class: SURFACES) % % In contrast to SGsortcollBB, which consideres only the Bounding Box of % the Solids, this fnctn checks in case of a potential collision also the % Bounding Boxes of all Facets of two solids. I includes the code of % SGsortcollBB to save time. Next step would be SGintersectFacetPoints. % (Status of: 2020-01-21) % % Introduced first in SolidGeometry 4.9 % % See also: SGsortfitinBB, SGsortcollBB, SGsortisinsideBB, % SGintersectFacetPoints % % [ELcoll,CIL,SG]=SGsortcollVLFLBB(BBL) % === INPUT PARAMETERS === % BBL: Bounding Box List or Solid Geometry cell list with n entries % === OUTPUT RESULTS ====== % ELcoll: Collision pair list | It is an undirected graph % CIL: logical collision index list, size n % SG: Solid Geometry list % % EXAMPLE: % A=SGbox; B=SGsphere(4); SGfigure; C={A,B}; SGsurfaces(C); SGsortcollVLFLBB(C) % BB=rounddiv(randminv(20,3,[1 10]),2) % Create 10 Bounding boxes % SGbox(BB,30,'randxy'); SG=ans % Create 10 Boxes in random distance % SGsortcollBB(SG) % Collision pair list % [a,b]=SGsortcollBB(SG) % % See also: SGsortfitinBB, SGsortcollBB, SGsortisinsideBB, % SGintersectFacetPoints % % % Copyright 2020 Tim C. Lueth |
SGsortisinsideBB(BBL)- returns a fits-in index list of all SG in the SG cell list |
% SGsortisinsideBB(BBL) - returns a fits-in index list of all SG in the SG cell list % (by Tim Lueth, VLFL-Lib, 2020-JAN-21 as class: SURFACES) % % In contrast to fnctn SGsortfitinBB, which takes only into account the % size of the boxes, this fnctn really considers size and position of the % Bounding boxes. % The next step would be to check the collisions of all the faces if a % box is crossing or inside by SGsortcollVLFLBB or % [~,~,~,~,~,~,bba]=VLDLBBofVLFL(VLA,FLA); % [~,~,~,~,~,~,bbb]=VLDLBBofVLFL(VLB,FLB); % CL=collofBBs(bba,bbb); (Status of: 2020-01-21) % % Introduced first in SolidGeometry 4.9 % % See also: SGsortcollBB, SGsortfitinBB, SGsortcollVLFLBB, VLDLBBofVLFL, % collofBBs % % [ELins,iso,xsi,bsi,isi]=SGsortisinsideBB(BBL) % === INPUT PARAMETERS === % BBL: Bounding Box List or Solid Geometry cell list with n entries % === OUTPUT RESULTS ====== % ELins: Is enclosed-in pair list | It is a directed graph % iso: Neither inside nor encapsulation % xsi: inbetween , i.e. encapuslation and enclosing % bsi: encapsulating but not enclosed % isi: nothing inside % % EXAMPLE: % BB=rounddiv(randminv(20,3,[1 30]),2) % Create 20 Bounding boxes % SGbox(BB); SG=ans % Create 20 Boxes centered % SGsortisinsideBB(SG) % Collision pair list % [a,iso,xsi,bsi,isi]=SGsortisinsideBB(SG) % % See also: SGsortcollBB, SGsortfitinBB, SGsortcollVLFLBB, VLDLBBofVLFL, % collofBBs % % % Copyright 2020 Tim C. Lueth |
SGsortfitinBB(BBL)- returns a fits-in index list of all SG in the SG cell list |
% SGsortfitinBB(BBL) - returns a fits-in index list of all SG in the SG cell list % (by Tim Lueth, VLFL-Lib, 2020-JAN-20 as class: SURFACES) % % In contrast to fnctn SGsortisinsideBB, this fnctn takes only into % account the size of the bounding boxes and not the position. % The next step would be to check the collisions of all the faces if a % box is crossing or inside by SGsortcollVLFLBB or % [~,~,~,~,~,~,bba]=VLDLBBofVLFL(VLA,FLA); % [~,~,~,~,~,~,bbb]=VLDLBBofVLFL(VLB,FLB); % CL=collofBBs(bba,bbb); (Status of: 2020-01-21) % % Introduced first in SolidGeometry 4.9 % % See also: SGsortcollBB, SGsortisinsideBB, SGsortcollVLFLBB, % VLDLBBofVLFL, collofBBs % % [ELfit,iso,xsi,bsi,isi]=SGsortfitinBB(BBL) % === INPUT PARAMETERS === % BBL: Bounding Box List or Solid Geometry cell list with n entries % === OUTPUT RESULTS ====== % ELfit: Fits in pair list | It is a directed graph % iso: Neither inside nor encapsulation % xsi: inbetween , i.e. encapuslation and enclosing % bsi: encapsulating but not enclosed % isi: nothing inside % % EXAMPLE: % BB=rounddiv(randminv(20,3,[1 10]),2) % Create 10 Bounding boxes % SGbox(BB,'','rand'); SG=ans % Create 10 Boxes in random distance % SGsortfitinBB(SG) % Collision pair list % [a,b]=SGsortfitinBB(SG) % % See also: SGsortcollBB, SGsortisinsideBB, SGsortcollVLFLBB, % VLDLBBofVLFL, collofBBs % % % Copyright 2020 Tim C. Lueth |
SGsortcollBB(BBL)- returns a collision index list of all SG in the SG cell list |
% SGsortcollBB(BBL) - returns a collision index list of all SG in the SG cell list % (by Tim Lueth, VLFL-Lib, 2020-JAN-20 as class: SURFACES) % % This fnctn returns if there is a collision between two bounding boxes % of the solids in the cell list % The next step would be to check the collisions of all the faces by % SGsortcollVLFLBB or % [~,~,~,~,~,~,bba]=VLDLBBofVLFL(VLA,FLA); % [~,~,~,~,~,~,bbb]=VLDLBBofVLFL(VLB,FLB); % CL=collofBBs(bba,bbb); % % (Status of: 2020-01-21) % % Introduced first in SolidGeometry 4.9 % % See also: SGsortfitinBB, SGsortisinsideBB, SGsortcollVLFLBB, % VLDLBBofVLFL, collofBBs % % [ELcoll,CIL,ss,SG]=SGsortcollBB(BBL) % === INPUT PARAMETERS === % BBL: Bounding Box List or Solid Geometry cell list with n entries % === OUTPUT RESULTS ====== % ELcoll: Collision pair list | It is an undirected graph % CIL: logical collision index list, size n % ss: bounding bo size list % SG: Solid Geometry list % % EXAMPLE: % A=SGbox; B=SGsphere(4); SGfigure; C={A,B}; SGsurfaces(C); SGsortcollBB(C) % BB=rounddiv(randminv(20,3,[1 10]),2) % Create 10 Bounding boxes % SGbox(BB,30,'randxy'); SG=ans % Create 10 Boxes in random distance % SGsortcollBB(SG) % Collision pair list % [a,b]=SGsortcollBB(SG) % % See also: SGsortfitinBB, SGsortisinsideBB, SGsortcollVLFLBB, % VLDLBBofVLFL, collofBBs % % % Copyright 2020 Tim C. Lueth |
FLofoppositefacesofVLFL(VL,FL,dmax,redf)- returns the list of faces that have opposit facets within a bounding box |
% FLofoppositefacesofVLFL(VL,FL,dmax,redf) - returns the list of faces that have opposit facets within a bounding box % (by Tim Lueth, VLFL-Lib, 2020-JAN-20 as class: SURFACES) % % This heuristic fnctn uses VLFLoppositefaces on a facet reduced surface % (SGreduceVLFL) to detect opposite faces, and uses later % SGisInteriorofBB to detect all surfaces within this BB. % This allows to analyze even larger bone surfaces or other surface % scanned solids % % Current only ONE opposite face are is supported! The fnctn is still % slow because of SGisInteriorofBB % % The fnctn should later cut the narrow bride between femur an patella % (Status of: 2020-01-20) % % Introduced first in SolidGeometry 4.9 % % See also: SGnearestpointsofSG, VLFLoppositefaces % % si=FLofoppositefacesofVLFL(VL,FL,[dmax,redf]) % === INPUT PARAMETERS === % VL: Vertex list % FL: Facet list % dmax: maximal distance % redf: number of reduced facet for first opposit faces check. default is % 1000 % === OUTPUT RESULTS ====== % si: logical index of facets % % EXAMPLE: % SG=SGsample(25) % FLofoppositefacesofVLFL(SG.VL,SG.FL); % FLofoppositefacesofVLFL(SG.VL,SG.FL,[1 2]); % % See also: SGnearestpointsofSG, VLFLoppositefaces % % % Copyright 2020 Tim C. Lueth |
VLFLoppositefaces(VL,FL,dmax,slec)- returns the list of faces that have opposit facets in the same solid |
% VLFLoppositefaces(VL,FL,dmax,slec) - returns the list of faces that have opposit facets in the same solid % (by Tim Lueth, VLFL-Lib, 2020-JAN-19 as class: SURFACES) % % SLOW fnctn works up to 1000 facets within a second, 4 seconds for 2000 % facets etc. % Use heuristic fnctn FLofoppositefacesofVLFL for larger face numbers % such as bone surfaces or other surface scanned solids % (Status of: 2020-01-20) % % Introduced first in SolidGeometry 4.9 % % See also: SGnearestpointsofSG, FLofoppositefacesofVLFL % % [ofi,DL,SGB,FCL,FNL]=VLFLoppositefaces(VL,FL,[dmax,slec]) % === INPUT PARAMETERS === % VL: Vertex list % FL: Facet list % dmax: maximal distance % slec: '&' or '|' '&' forces the faces to hit a surface of the same % set; default is '&' % === OUTPUT RESULTS ====== % ofi: logical index of facets % DL: [si dist ei cp ] % SGB: Solid Geometry of the Bounding Box % FCL: Facet center list % FNL: Facet Normal list % % EXAMPLE: % SG=SGsample(25) % VLFLoppositefaces(SG.VL,SG.FL); % VLFLoppositefaces(SG.VL,SG.FL,[1 2]); % % See also: SGnearestpointsofSG, FLofoppositefacesofVLFL % % % Copyright 2020 Tim C. Lueth |
find2logical(ind,N)- converts a index list into a logical vector |
% find2logical(ind,N) - converts a index list into a logical vector % (by Tim Lueth, VLFL-Lib, 2020-JAN-19 as class: AUXILIARY PROCEDURES) % % exist most probably already in matlab (Status of: 2020-01-19) % % Introduced first in SolidGeometry 4.9 % % See also: rcofind, indofrc % % l=find2logical(ind,N) % === INPUT PARAMETERS === % ind: index list % N: numel of logical row vector % === OUTPUT RESULTS ====== % l: logical row vector % % EXAMPLE: % find2logical([1 3 5],6) % find2logical([1 3 5]',6) % % See also: rcofind, indofrc % % % Copyright 2020 Tim C. Lueth |
SGfindjointDoFofSG(A,B,slim,stol)- try to find the DoF between two solids |
% SGfindjointDoFofSG(A,B,slim,stol) - try to find the DoF between two solids % (by Tim Lueth, VLFL-Lib, 2020-JAN-18 as class: SURFACES) % % Very slow since 12 times collision detection % Still required to test (Status of: 2020-01-18) % % Introduced first in SolidGeometry 4.9 % % See also: SGnearestpointsofSG, SGintersectingtriangles, % SGintersectFacetPoints % % [DOF,T]=SGfindjointDoFofSG(A,B,[slim,stol]) % === INPUT PARAMETERS === % A: Solid A % B: Solid B % slim: range limit for search; default is 10; inf works too. % stol: tolerance wrt to minimal point; default is .1; 1 = 100 Percent % of minimal distance is accepted % === OUTPUT RESULTS ====== % DOF: List [Avi Bvi dist nvec] of minimal distance point pairs % T: Facets a A with a least one point in DIL(:,1) % % EXAMPLE: % A=SGbox; B=SGhollowsolid(A,1,4);; A=SGtransrelSG(A,B,'right',0.2); SGfindjointDoFofSG(A,B,inf) % A=SGbox; B=SGhollowsolid(A,1,4);; A=SGtransrelSG(A,B,'ontop',0.2); SGfindjointDoFofSG(A,B,inf) % A=SGsphere(5); B=SGhollowsolid(A,1,4); SGfindjointDoFofSG(A,B,inf) % % See also: SGnearestpointsofSG, SGintersectingtriangles, % SGintersectFacetPoints % % % Copyright 2020 Tim C. Lueth |
FLofVLFLnearestneighborVL(VL,FL,VLR)- Facet List that contains vertices that are neighbors of a vertex list |
% FLofVLFLnearestneighborVL(VL,FL,VLR) - Facet List that contains vertices that are neighbors of a vertex list % (by Tim Lueth, VLFL-Lib, 2020-JAN-18 as class: SURFACES) % % This fnctn calls FLofVLFLvi after using TR=triangulation(FL,VL); % vi=nearestNeighbor(TR,VLR); (Status of: 2020-01-18) % % Introduced first in SolidGeometry 4.9 % % See also: SGisInteriorofBB, SGnearestpointsofSG, FLofVLFLvi, % FLofVLFLfi, FSofSGfacet % % [NFL,fi3,fi2,fi1]=FLofVLFLnearestneighborVL(VL,FL,VLR) % === INPUT PARAMETERS === % VL: Vertex list % FL: Facet List % VLR: vertex list to find the nearest neighbor for % === OUTPUT RESULTS ====== % NFL: FL(fi3,:); (GREEN) % fi3: all faces that have three points of VL(vi,:) % fi2: all faces that have 2 points of VL(vi,:) % fi1: all faces that have 1 points of VL(vi,:) % % EXAMPLE: % SG=SGboxsphere; FLofVLFLnearestneighborVL(SG.VL,SG.FL,rand(100,3)*2); % % See also: SGisInteriorofBB, SGnearestpointsofSG, FLofVLFLvi, % FLofVLFLfi, FSofSGfacet % % % Copyright 2020 Tim C. Lueth |
SGnearestpointsofSG(A,B,slim,stol)- returns the nearest vertices and facets of two solid geometries |
% SGnearestpointsofSG(A,B,slim,stol) - returns the nearest vertices and facets of two solid geometries % (by Tim Lueth, VLFL-Lib, 2020-JAN-17 as class: SURFACES) % % Introduced first in SolidGeometry 4.9 % % See also: SGintersectingtriangles, SGintersectFacetPoints, % SGfindjointDoFofSG % % [DILM,FLAi,FLBi,DIL]=SGnearestpointsofSG(A,B,[slim,stol]) % === INPUT PARAMETERS === % A: Solid A % B: Solid B % slim: range limit for search; default is 10; inf works too. % stol: tolerance wrt to minimal point; default is .1; 1 = 100 Percent % of minimal distance is accepted % === OUTPUT RESULTS ====== % DILM: List [Avi Bvi dist nvec] of minimal distance point pairs % FLAi: Facets a A with a least one point in DIL(:,1) % FLBi: Facets a A with a least one point in DIL(:,2) % DIL: Full List [Avi Bvi dist nvec] of minimal distance point pairs % % EXAMPLE: % SG=SGsurfaces(SGsample(25)); % SGnearestpointsofSG(SG{1},SG{2}); M=ans; mean(M(:,4:6)), std(M(:,4:6)) % loadweb JACO_robot.mat; JC2=SGshortopti(JC2); JC3=SGshortopti(JC3); % R=rot(pi/10,pi/5,pi/3); JC2=SGtransR(SGshortopti(JC2),R); JC3=SGtransR(SGshortopti(JC3),R); % SGnearestpointsofSG(JC2,JC3); % C=SGboxsphere; D=SGtransrelSG(SGbox,C,'ontop',+5); % SGnearestpointsofSG(C,D); M=ans, mean(M(:,4:6)), std(M(:,4:6)) % % % See also: SGintersectingtriangles, SGintersectFacetPoints, % SGfindjointDoFofSG % % % Copyright 2020 Tim C. Lueth |
SGisIntersectingBB(SG,bb,T)- returns all facets of a solid that are crossed/intersected by a bounding box |
% SGisIntersectingBB(SG,bb,T) - returns all facets of a solid that are crossed/intersected by a bounding box % (by Tim Lueth, VLFL-Lib, 2020-JAN-16 as class: SURFACES) % % The bounding box can also be a SGofBB Solid Geometry, and it is also % possible to transfer the bounding box by a HT Frame like SGofBBui. % (Status of: 2020-01-16) % % Introduced first in SolidGeometry 4.9 % % See also: SGisInteriorofBB, SGofBBui, FLofVLFLvi, FLofVLFLfi, % VLFLselect, VLFLselectcrossingfacets % % [SGi,si,ci,SIL]=SGisIntersectingBB(SG,bb,[T]) % === INPUT PARAMETERS === % SG: Solid Geometry % bb: bound bog or second solid % T: Transformation matrix for bb % === OUTPUT RESULTS ====== % SGi: Solid that has faces that are crossed/intersected by the BB % si: facets of SG (not SGi) that are crossed/intersected by BB % ci: facets of SG (not SGi) that belong to the same surfaces of si % SIL: Sort Selection and Index list used to create SGi using VLFLselect % % EXAMPLE: % SG=SGofCPLcommand('c 4, h 10 m 4, dupg 3 3 1 20'); % SGfigure; SGplotalpha(SG,'r',1); view(-30,30); SGofBBui; A=ans; % SGisIntersectingBB(SG,A) % % % See also: SGisInteriorofBB, SGofBBui, FLofVLFLvi, FLofVLFLfi, % VLFLselect, VLFLselectcrossingfacets % % % Copyright 2020 Tim C. Lueth |
SGisInteriorofBB(SG,bb,T)- returns all facets of a solid that are within a bounding box |
% SGisInteriorofBB(SG,bb,T) - returns all facets of a solid that are within a bounding box % (by Tim Lueth, VLFL-Lib, 2020-JAN-16 as class: SURFACES) % % The bounding box can also be a SGofBB Solid Geometry, and it is also % possible to transfer the bounding box by a HT Frame like SGofBBui. % (Status of: 2020-01-16) % % Introduced first in SolidGeometry 4.9 % % See also: SGisIntersectingBB, SGofBBui, FLofVLFLvi, FLofVLFLfi, % VLFLselect % % [SGi,si,ci,SIL]=SGisInteriorofBB(SG,bb,[T]) % === INPUT PARAMETERS === % SG: Solid Geometry % bb: bound bog or second solid % T: Transformation matrix for bb % === OUTPUT RESULTS ====== % SGi: Solid that has vertices inside of the BB % si: facets of SG (not SGi) with all vertices inside of BB % ci: facets of SG (not SGi) that belong to the same surfaces of si % SIL: Sort Selection and Index list used to create SGi using VLFLselect % % EXAMPLE: % SG=SGofCPLcommand('c 4, h 10 m 4, dupg 3 3 1 20'); % SGfigure; SGplotalpha(SG,'r',1); view(-30,30); SGofBBui; A=ans; % SGisInteriorofBB(SG,A) % % % See also: SGisIntersectingBB, SGofBBui, FLofVLFLvi, FLofVLFLfi, % VLFLselect % % % Copyright 2020 Tim C. Lueth |
FLofVLFLfi(VL,FL,fi)- returns the facets that are attached to the known facets |
% FLofVLFLfi(VL,FL,fi) - returns the facets that are attached to the known facets % (by Tim Lueth, VLFL-Lib, 2020-JAN-16 as class: SURFACES) % % Introduced first in SolidGeometry 4.9 % % See also: SGisInteriorofBB, FLofVLFLvi, FSofSGfacet % % cfi=FLofVLFLfi(VL,FL,fi) % === INPUT PARAMETERS === % VL: Vertex list % FL: Facet list % fi: facet indices that are know to belong to the surface % === OUTPUT RESULTS ====== % cfi: connected facet index % % EXAMPLE: % SG=SGofCPLcommand('c 4, h 10 m 4, dupg 3 3 1 20'); % FLofVLFLfi(SG.VL,SG.FL,500); % % See also: SGisInteriorofBB, FLofVLFLvi, FSofSGfacet % % % Copyright 2020 Tim C. Lueth |
FLofVLFLvi(VL,FL,vi)- Facet List that contains entries of a vertex list |
% FLofVLFLvi(VL,FL,vi) - Facet List that contains entries of a vertex list % (by Tim Lueth, VLFL-Lib, 2020-JAN-16 as class: SURFACES) % % This fnctn can be used with vertex indices of the Solid given by VLFL % in nearest neighbor mode for any vertex list % Best is to call TR=triangulation(FL,VL); vi=nearestNeighbor(TR,vi); if % vi ist a full vertex list % (Status of: 2020-09-11) % % Introduced first in SolidGeometry 4.9 % % See also: SGisInteriorofBB, SGnearestpointsofSG, FLofVLFLfi, FSofSGfacet % % [FL,fi3,fi2,fi1,fi0]=FLofVLFLvi(VL,FL,vi) % === INPUT PARAMETERS === % VL: Vertex list % FL: Facet List % vi: vertex index list OR logical vi or vertex list for % triangulation.nearestNeighbor % === OUTPUT RESULTS ====== % FL: FL(fi3,:); (GREEN) % fi3: all faces that have three points of VL(vi,:) - green % fi2: all faces that have 2 points of VL(vi,:) - yellow % fi1: all faces that have 1 points of VL(vi,:) - magenta % fi0: all faces that have 0 points of VL(vi,:) - red % % EXAMPLE: % SG=SGboxsphere; FLofVLFLvi(SG.VL,SG.FL,[1 2 3 4]) % SG=SGboxsphere; FLofVLFLvi(SG.VL,SG.FL,[1 2 3]); % SG=SGboxsphere; FLofVLFLvi(SG.VL,SG.FL,[1 2 3]*1.00001); % % See also: SGisInteriorofBB, SGnearestpointsofSG, FLofVLFLfi, FSofSGfacet % % % Copyright 2020 Tim C. Lueth |
SGxor(A,B,relpos)- Boolean XOR of Solid Geometries |
% SGxor(A,B,relpos) - Boolean XOR of Solid Geometries % (by Tim Lueth, VLFL-Lib, 2020-JAN-14 as class: SURFACES) % % SGxor should not be used since it creates Solid that cannot be sliced! % This fnctn belongs to a changed concept of polyshape versus the mapping % toolbox since 2017b % Therefor the fnctns SGintersect, SGsubtract, SGunion, SGxor were % implemented (Status of: 2021-01-04) % % Introduced first in SolidGeometry 4.9 % % See also: SGbool, SGtransrelSG, SGboolh, SGintersect, SGsubtract, % SGunion, SGconcat, SGsupplement % % SG=SGxor([A,B,relpos]) % === INPUT PARAMETERS === % A: Solid A % B: Solid B % relpos: list of relative positions for SGtransrelSG % === OUTPUT RESULTS ====== % SG: Boolean Result of A+B % % EXAMPLE: % SGxor(SGboxsphere([30,20,10],4,10)) % SGxor(SGboxsphere([30,20,10],4,10),SGbox([5,5,5]),'incenter','left',-2) % SGxor(SGboxsphere([30,20,10],4,10),SGbox([5,5,5]),'incenter','infront',-2) % % See also: SGbool, SGtransrelSG, SGboolh, SGintersect, SGsubtract, % SGunion, SGconcat, SGsupplement % % % Copyright 2020-2021 Tim C. Lueth |
SGintersect(A,B,relpos)- Boolean intersection of Solid Geometries |
% SGintersect(A,B,relpos) - Boolean intersection of Solid Geometries % (by Tim Lueth, VLFL-Lib, 2020-JAN-14 as class: SURFACES) % % more or less SGbool('&',A,SGtransrelSG(B,A)) % This fnctn belongs to a changed concept of polyshape versus the mapping % toolbox since 2017b % Therefor the fnctns SGintersect, SGsubtract, SGunion, SGxor were % implemented (Status of: 2021-01-04) % % Introduced first in SolidGeometry 4.9 % % See also: SGconvexofSGintersect, SGbool, SGtransrelSG, SGboolh, % SGsubtract, SGunion, SGxor, SGconcat, SGsupplement % % SG=SGintersect([A,B,relpos]) % === INPUT PARAMETERS === % A: Solid A % B: Solid B % relpos: list of relative positions for SGtransrelSG % === OUTPUT RESULTS ====== % SG: Boolean Result of A+B % % EXAMPLE: % SGintersect(SGboxsphere([30,20,10],4,10)) % SGintersect(SGboxsphere([30,20,10],4,10),SGbox([5,5,5]),'incenter','left',-2) % SGintersect(SGboxsphere([30,20,10],4,10),SGbox([5,5,5]),'incenter','infront',-2) % % See also: SGconvexofSGintersect, SGbool, SGtransrelSG, SGboolh, % SGsubtract, SGunion, SGxor, SGconcat, SGsupplement % % % Copyright 2020-2021 Tim C. Lueth |
SGunion(AA,B,relpos)- Boolean Addition of Solid Geometries |
% SGunion(AA,B,relpos) - Boolean Addition of Solid Geometries % (by Tim Lueth, VLFL-Lib, 2020-JAN-14 as class: SURFACES) % % more or less SGbool('+',A,SGtransrelSG(B,A)) % This fnctn belongs to a changed concept of polyshape versus the mapping % toolbox since 2017b % Therefor the fnctns SGintersect, SGsubtract, SGunion, SGxor were % implemented (Status of: 2021-01-04) % % Introduced first in SolidGeometry 4.9 % % See also: SGbool, SGtransrelSG, SGboolh, SGintersect, SGsubtract, % SGxor, SGconcat, SGsupplement % % SG=SGunion([AA,B,relpos]) % === INPUT PARAMETERS === % AA: Solid A % B: Solid B % relpos: list of relative positions for SGtransrelSG % === OUTPUT RESULTS ====== % SG: Boolean Result of A+B % % EXAMPLE: % SGunion({SGbox(10),SGbox(20),SGbox(30)}) % Cell mode % SGunion(SGboxsphere([30,20,10],4,10)) % SGunion(SGboxsphere([30,20,10],4,10),SGbox([5,5,5]),'incenter','left',-2) % SGunion(SGboxsphere([30,20,10],4,10),SGbox([5,5,5]),'incenter','infront',-2) % % See also: SGbool, SGtransrelSG, SGboolh, SGintersect, SGsubtract, % SGxor, SGconcat, SGsupplement % % % Copyright 2020-2021 Tim C. Lueth |
VLreadPLY(FName,mag)- reads in a Point Cloud in PLY Format |
% VLreadPLY(FName,mag) - reads in a Point Cloud in PLY Format % (by Tim Lueth, VLFL-Lib, 2020-JAN-13 as class: VERTICES / CLOUDS) % % Introduced first in SolidGeometry 4.9 % % See also: SGreadPLY % % LITERATURE: % http://graphics.stanford.edu/data/3Dscanrep/#bunny, % % [VL,ptCloud]=VLreadPLY([FName,mag]) % === INPUT PARAMETERS === % FName: File Name or Empty for interactive selection % mag: magnification; default is 1000 % === OUTPUT RESULTS ====== % VL: Vertex List; double prec % ptCloud: Point Cloud; single prec % % EXAMPLE: % VLreadPLY('/Volumes/LUETH-WIN/WIN AIM Matlab Libraries/Point Clouds/bunny/reconstruction/bun_zipper.ply') % % See also: SGreadPLY % % % Copyright 2020 Tim C. Lueth |
SGofBBui(h,viewd,plong)- interactive mode to create a bounding box of the current camera view and 2 mouse clicks |
% SGofBBui(h,viewd,plong) - interactive mode to create a bounding box of the current camera view and 2 mouse clicks % (by Tim Lueth, VLFL-Lib, 2020-JAN-13 as class: SURFACES) % % Introduced first in SolidGeometry 4.9 % % See also: BBofSGcutT % % [SB,dd,T,bb]=SGofBBui([h,viewd,plong]) % === INPUT PARAMETERS === % h: handle to gca % viewd: if true; the box depends on the view direction % plong: % === OUTPUT RESULTS ====== % SB: Solid of SGtransT(SGofBB(dd,0),T) % dd: bounding box % T: Camera View Transformation % bb: smallest BB in view direction % % EXAMPLE: % SG=SGofCPLcommand('c 4, h 10 m 4, dupg 3 3 1 20'); % SGfigure; SGplotalpha(SG,'r',1); view(-30,30); % SGofBBui % % See also: BBofSGcutT % % % Copyright 2020 Tim C. Lueth |
rotate3dlight(tog)- Switches the automatic camera light conditions on and off |
% rotate3dlight(tog) - Switches the automatic camera light conditions on and off % (by Tim Lueth, VLFL-Lib, 2020-JAN-13 as class: VISUALIZATION) % % Up to Rel 4.8, SGfigure automatically installed view point cameras, % which automatically adjusted the lighting conditions of a plot. This % slowed down the rotation of large surfaces (detected by Alexandra % Mercader). Therefor by default the SG-Lib ist not installing the % rotating view point lights anymore, but it is possible to switch this % feature on an off by this fnctn. (Status of: 2020-07-03) % % Introduced first in SolidGeometry 4.9 % % See also: camlightTL, VLFLplotlight, SGshadelight, SGshowcolors % % rotate3dlight([tog]) % === INPUT PARAMETERS === % tog: 'on', 'off', or toggle by no parameter % % EXAMPLE: % rotate3dlight % rotate3dlight off % rotate3dlight on % % See also: camlightTL, VLFLplotlight, SGshadelight, SGshowcolors % % % Copyright 2020 Tim C. Lueth |
PLofVLplaneprojection(VL,nv)- main axis projection of a vertex list along the largest dimension of a normal vector |
% PLofVLplaneprojection(VL,nv) - main axis projection of a vertex list along the largest dimension of a normal vector % (by Yilun Sun, VLFL-Lib, 2020-JAN-13 as class: VERTICES / CLOUDS) % % This fnctn was written by YILUN Sun on 2018-08-16. It uses the effect % that the max fnctn returns the first occurance index of the largest % value of the operand. % This is not a true to scale fnctn since it is a axis projection !!! % This fnctn can easily extented to more than 3 dimensions. (Status of: % 2020-01-13) % % Introduced first in SolidGeometry 4.9 % % See also: VLprojection, VLtransT, TofVL % % PL=PLofVLplaneprojection(VL,nv) % === INPUT PARAMETERS === % VL: Vertex list % nv: normal vector; default is [0 0 1] ==> xy projection % === OUTPUT RESULTS ====== % PL: 2D Point list as main axis projection (not true to scale) % % EXAMPLE: % PLofVLplaneprojection (rand(30,3)); % PLofVLplaneprojection (rand(30,3),[0 0 1]); % PLofVLplaneprojection (rand(30,3),[0 1 0]); % PLofVLplaneprojection (rand(30,3),[1 0 0]); % PLofVLplaneprojection (rand(30,3),[1 1 1]); % PLofVLplaneprojection (rand(30,3),[.9 0 1]); % % See also: VLprojection, VLtransT, TofVL % |
isonVLFLplanes(VLA,FLA,VL,tol)- returns wether a point is on a plane of a facet not necessarily inside of the facet |
% isonVLFLplanes(VLA,FLA,VL,tol) - returns wether a point is on a plane of a facet not necessarily inside of the facet % (by Tim Lueth, VLFL-Lib, 2020-JAN-12 as class: SURFACES) % % In contrast to isonVLFL/isonVLFLsurface this fnctn returns if a point % is on a plane defined by the facets, i.e. distance to any point of the % plane * normal vector (Status of: 2020-01-12) % % Introduced first in SolidGeometry 4.9 % % See also: isonVLFL, isonVLFLsurface % % [vi,il]=isonVLFLplanes(VLA,FLA,VL,[tol]) % === INPUT PARAMETERS === % VLA: Vertex list % FLA: Facet list % VL: Vertex list to test % tol: default is 1e-5 % === OUTPUT RESULTS ====== % vi: vertex index list true/false % il: cell list of facets for each vertex % % EXAMPLE: % A=SGbool('-',SGbox([30,20,10]),SGbox([26,16,6])); % isonVLFLplanes(A.VL,A.FL,[0 0 5]) % isonVLFLplanes(A.VL,A.FL,[12 12 5]) % isonVLFLsurface(A.VL,A.FL,[12 12 5]) % isonVLFLplanes(A.VL,A.FL,0.5*(A.VL+circshift(A.VL,1))) % % See also: isonVLFL, isonVLFLsurface % % % Copyright 2020 Tim C. Lueth |
BBaddtolerance(BB,tol)- increases the size of a Boundary Box |
% BBaddtolerance(BB,tol) - increases the size of a Boundary Box % (by Tim Lueth, VLFL-Lib, 2020-JAN-11 as class: AUXILIARY PROCEDURES) % % in contrast to BBgrow, this fnctn BBaddtolerance adds a tolerance and % does not magnify the BB. % this fnctn is able to handle lists of BBs (Status of: 2020-01-11) % % Introduced first in SolidGeometry 4.9 % % See also: axis, BBofSG, BBgrow % % BBG=BBaddtolerance(BB,[tol]) % === INPUT PARAMETERS === % BB: bounding box or axis % tol: growing size % === OUTPUT RESULTS ====== % BBG: new bounding box % % EXAMPLE: % BBaddtolerance(BBofCPL(PLcircle(4)),1) % BBaddtolerance(BBofSG(SGbox),1) % % BBgrow(BBofCPL(PLcircle(4)),1) % BBgrow(BBofSG(SGbox),1) % % See also: axis, BBofSG, BBgrow % % % Copyright 2020 Tim C. Lueth |
SGisOnsurface(SG,VL);- returns whether a point is on a surface |
% SGisOnsurface(SG,VL); - returns whether a point is on a surface % (by Tim Lueth, VLFL-Lib, 2020-JAN-11 as class: SURFACES) % % Based on isonVLFL % (Status of: 2020-01-11) % % Introduced first in SolidGeometry 4.9 % % See also: SGisInterior, VLFLisInterior, isonVLFLsurface, isonVLFL, % VLisInteriorofBBlist % % vi=SGisOnsurface(SG,VL); % === INPUT PARAMETERS === % SG: Solid Geometry % VL: Vertex list to test % === OUTPUT RESULTS ====== % vi: On Surface Index of VL % % EXAMPLE: % A=SGbool('-',SGbox([30,20,10]),SGbox([26,16,6])); % SGisOnsurface(A,0.5*(A.VL+circshift(A.VL,1))) % isonVLFL(A.VL,A.FL,0.5*(A.VL+circshift(A.VL,3))) % isonVLFL(A.VL,A.FL,0.5*(A.VL+circshift(A.VL,3))) % % See also: SGisInterior, VLFLisInterior, isonVLFLsurface, isonVLFL, % VLisInteriorofBBlist % % % Copyright 2020 Tim C. Lueth |
VLisInteriorofBBlist(BBL,VP)- returns for a list of Bounding Boxes and a single vertex the BB that contain the vertex |
% VLisInteriorofBBlist(BBL,VP) - returns for a list of Bounding Boxes and a single vertex the BB that contain the vertex % (by Tim Lueth, VLFL-Lib, 2020-JAN-11 as class: SURFACES) % % After calculating the Bounding Boxes for a list of facets of a surface, % there is an interst to find out whether a point is inside of such a % box. This fnctn is used for detection vertices that are on surfaces by % isonVLFL or isonVLFLsurface. (Status of: 2020-01-11) % % Introduced first in SolidGeometry 4.9 % % See also: VLDLBBofVLFL, isonVLFLsurface, isonVLFL % % bi=VLisInteriorofBBlist(BBL,VP) % === INPUT PARAMETERS === % BBL: List of Bounding Boxes % VP: Single Vertex % === OUTPUT RESULTS ====== % bi: bounding box index for is on bounding box or inside bounding box % % EXAMPLE: % A=SGbox([30,20,10]) % [~,~,~,~,~,~,BBL]=VLDLBBofVLFL(A.VL,A.FL) % VLisInteriorofBBlist(BBL,A.VL(1,:)) % % % See also: VLDLBBofVLFL, isonVLFLsurface, isonVLFL % % % Copyright 2020 Tim C. Lueth |
isonVLFL(VLA,FLA,VL)- returns whether a point is on a surface |
% isonVLFL(VLA,FLA,VL) - returns whether a point is on a surface % (by Tim Lueth, VLFL-Lib, 2020-JAN-11 as class: SURFACES) % % Developed on 2018-08-16 by Yilun Sun to improve the SGisInterior Fnctn % Accelerated Version by Tim Lueth 2020-01-11 % For VLA:[40000×3 double] FLA:[79996×3 double] and VL:[40000×3 double] % this fnctn takes instead of 40 seconds just 6.7 seconds (Status of: % 2020-01-12) % % Introduced first in SolidGeometry 4.9 % % See also: SGisInterior, VLFLisInterior, isonVLFLsurface, % isonVLFLplanes, VLisInteriorofBBlist, SGisOnsurface % % vi=isonVLFL(VLA,FLA,VL) % === INPUT PARAMETERS === % VLA: Vertex list % FLA: Facet list % VL: Vertex list to test % === OUTPUT RESULTS ====== % vi: On Surface Index of VL % % EXAMPLE: % A=SGbox([30,20,10]); % A=SGbool('-',SGbox([30,20,10]),SGbox([26,16,6])); % isonVLFL(A.VL,A.FL,0.5*(A.VL+circshift(A.VL,1))) % isonVLFL(A.VL,A.FL,0.5*(A.VL+circshift(A.VL,3))) % isonVLFL(A.VL,A.FL,0.5*(A.VL+circshift(A.VL,3))) % % See also: SGisInterior, VLFLisInterior, isonVLFLsurface, % isonVLFLplanes, VLisInteriorofBBlist, SGisOnsurface % % % Copyright 2020 Tim C. Lueth |
VLFLplotalpha(VL,FL,c,a,e)- plots a solid support directly color and alpha value |
% VLFLplotalpha(VL,FL,c,a,e) - plots a solid support directly color and alpha value % (by Tim Lueth, VLFL-Lib, 2020-JAN-11 as class: USER INTERFACE) % % This fnctn was written 2019-06-12 in Tokyo visiting Hajime Asama's Lab % at The University of Tokyo (Status of: 2020-01-11) % % Introduced first in SolidGeometry 4.9 % % See also: SGplot, setplotlight, SGplotalpha % % h=VLFLplotalpha(VL,FL,[c,a,e]) % === INPUT PARAMETERS === % VL: Vertex List % FL: Facet List % c: color; default is []; % a: alpha value; default is []; % e: edge color; default is []; % === OUTPUT RESULTS ====== % h: handle to graphics object patch % % EXAMPLE: % A=SGbox([30,20,10]) % SGfigure; view(-30,30); VLFLplotalpha(A.VL,A.FL,'r',0.9) % SGfigure; view(-30,30); VLFLplotalpha(A.VL,A.FL,'r',0.9,'k') % % See also: SGplot, setplotlight, SGplotalpha % % % Copyright 2020 Tim C. Lueth |
isonVLFLsurface(VL,FL,VLT)- returns whether a point is on a surface |
% isonVLFLsurface(VL,FL,VLT) - returns whether a point is on a surface % (by Yilun Sun, VLFL-Lib, 2020-JAN-11 as class: SURFACES) % % Developed on 2018-08-16 by Yilun Sun to improve the SGisInterior Fnctn % (Status of: 2020-01-12) % % Introduced first in SolidGeometry 4.9 % % See also: SGisInterior, VLFLisInterior, isonVLFL, isonVLFLplanes % % VILon=isonVLFLsurface(VL,FL,VLT) % === INPUT PARAMETERS === % VL: Vertex list % FL: Facet list % VLT: Vertex list to test % === OUTPUT RESULTS ====== % VILon: On Surface Index of VLT % % EXAMPLE: % A=SGbox([30,20,10]); % A=SGbool('-',SGbox([30,20,10]),SGbox([26,16,6])); % isonVLFLsurface(A.VL,A.FL,0.5*(A.VL+circshift(A.VL,1))) % isonVLFLsurface(A.VL,A.FL,0.5*(A.VL+circshift(A.VL,3))) % isonVLFLsurface(A.VL,A.FL,0.5*(A.VL+circshift(A.VL,3))) % % See also: SGisInterior, VLFLisInterior, isonVLFL, isonVLFLplanes % |
SGsubtract(A,B,relpos)- Boolean Subtraction of Solid Geometries |
% SGsubtract(A,B,relpos) - Boolean Subtraction of Solid Geometries % (by Tim Lueth, VLFL-Lib, 2020-JAN-10 as class: SURFACES) % % more or less SGbool('-',A,SGtransrelSG(B,A)) % This fnctn belongs to a changed concept of polyshape versus the mapping % toolbox since 2017b % Therefor the fnctns SGintersect, SGsubtract, SGunion, SGxor were % implemented (Status of: 2021-01-04) % % Introduced first in SolidGeometry 4.9 % % See also: SGbool, SGseparatebyPez, SGtransrelSG, SGboolh, SGintersect, % SGunion, SGxor, SGconcat, SGsupplement % % SG=SGsubtract([A,B,relpos]) % === INPUT PARAMETERS === % A: Solid A % B: Solid B % relpos: list of relative positions for SGtransrelSG % === OUTPUT RESULTS ====== % SG: Boolean Result of A-B % % EXAMPLE: % SGsubtract(SGboxsphere([30,20,10],4,10)) % SGsubtract(SGboxsphere([30,20,10],4,10),SGbox([5,5,5]),'incenter','left',-2) % SGsubtract(SGboxsphere([30,20,10],4,10),SGbox([5,5,5]),'incenter','infront',-2) % % See also: SGbool, SGseparatebyPez, SGtransrelSG, SGboolh, SGintersect, % SGunion, SGxor, SGconcat, SGsupplement % % % Copyright 2020-2022 Tim C. Lueth |
SGpunchTCPLthrough(SG,To,CPL)- punching: shoots a contour through a solid |
% SGpunchTCPLthrough(SG,To,CPL) - punching: shoots a contour through a solid % (by Tim Lueth, VLFL-Lib, 2020-JAN-09 as class: SURFACES) % % This fnctns works only for correct boolean merged solids! No open % boundaries et al. % This fnctn fails if tehre are hollow cavities inside of a solid % This fnctn was developed 6.Nov.2018 as SGcutTCPL first (Status of: % 2020-01-11) % % Introduced first in SolidGeometry 4.9 % % See also: BBofSGcutT, SGcut, SGcut2, SGcutBB, SGcutTd, % SGpunchTCPLfirstwall % % [C,Ts,succ]=SGpunchTCPLthrough([SG,To,CPL]) % === INPUT PARAMETERS === % SG: Solid Geometry % To: Optional T frame % CPL: Closed Polygon Line % === OUTPUT RESULTS ====== % C: Resulting Solid % Ts: HT MAtrix for cutting in z direction % succ: flag for success % % EXAMPLE: % SGpunchTCPLthrough(SGsample(25),TofP([-4 -6 0]),[PLcircle(1,8);nan nan;PLcircle(0.5)]) % SGpunchTCPLthrough(SGsample(25),'',[PLcircle(1,8);nan nan;PLcircle(0.5)]) % SGpunchTCPLthrough(SGboxsphere,'',[PLcircle(1,8);nan nan;PLcircle(0.5)]) % % % See also: BBofSGcutT, SGcut, SGcut2, SGcutBB, SGcutTd, % SGpunchTCPLfirstwall % % % Copyright 2020 Tim C. Lueth |
SGboxsphere(S,n)- Solid of a box with an containing sphere, mainly used for testing |
% SGboxsphere(S,n) - Solid of a box with an containing sphere, mainly used for testing % (by Tim Lueth, VLFL-Lib, 2020-JAN-09 as class: SURFACES) % % Introduced first in SolidGeometry 4.9 % % See also: SGbox, SGcone, SGsphere, SGarrow, SGspherelink, SGtrapezoid % % SG=SGboxsphere([S,n]) % === INPUT PARAMETERS === % S: Diameter [x y z] % n: number of edges in x y % === OUTPUT RESULTS ====== % SG: Solid Geometry % % EXAMPLE: % SGboxsphere([30,20,10],6) % % See also: SGbox, SGcone, SGsphere, SGarrow, SGspherelink, SGtrapezoid % % % Copyright 2020 Tim C. Lueth |
SGpunchTCPLfirstwall(SG,To,CPL,olap,plan)- punchs from a frame or from an outside poit a hole with a CPL into the first wall |
% SGpunchTCPLfirstwall(SG,To,CPL,olap,plan) - punchs from a frame or from an outside poit a hole with a CPL into the first wall % (by Tim Lueth, VLFL-Lib, 2020-JAN-09 as class: SURFACES) % % In case of wrong orientations (inside volumes, the SG bool fnctn fails) % (Status of: 2020-01-11) % % Introduced first in SolidGeometry 4.9 % % See also: SGcutT, CPLofSGcutT, SGcutTinsertpins, SGcutTCPL, % SGpunchTCPLthrough % % [SG,p,ez]=SGpunchTCPLfirstwall([SG,To,CPL,olap,plan]) % === INPUT PARAMETERS === % SG: Solid Geometry % To: Frame to punch; default is interactive Mode % CPL: CPL or radius % olap: overlap; default is radius or 1e-2 % plan: if true, the surface is used to punchl default is false % === OUTPUT RESULTS ====== % SG: Solid Geometry % p: punch point % ez: punch direction % % EXAMPLE: % SGpunchTCPLfirstwall(SGsample(13),'',.7,0,false) % SGpunchTCPLfirstwall(SGsample(13),'',.7,0,true) % SGpunchTCPLfirstwall(SGboxsphere,'',[PLcircle(2,4)]) % SGpunchTCPLfirstwall(SGboxsphere,'',[PLcircle(2,4)],'',true) % % See also: SGcutT, CPLofSGcutT, SGcutTinsertpins, SGcutTCPL, % SGpunchTCPLthrough % % % Copyright 2020 Tim C. Lueth |
matrixofCPL(CPL,nrc)- simplified version of matrixdistanceofCPL |
% matrixofCPL(CPL,nrc) - simplified version of matrixdistanceofCPL % (by Tim Lueth, VLFL-Lib, 2020-JAN-09 as class: CLOSED POLYGON LISTS) % % Introduced first in SolidGeometry 4.9 % % See also: matrixdistanceofCPL % % [M,GPL,ax]=matrixofCPL(CPL,[nrc]) % === INPUT PARAMETERS === % CPL: CPL % nrc: [nx ny] or [dx dy] if [dx,dy]<10 mm % === OUTPUT RESULTS ====== % M: Matrix % GPL: Grid Point Coordinates % ax: [xmin xmax ymin ymax] % % EXAMPLE: % matrixofCPL(CPLsample(29)); % % See also: matrixdistanceofCPL % % % Copyright 2020 Tim C. Lueth |
crosspointVLFL2(VL,FL,p,ez)- returns the surfacepoint of a solid hit by a beam |
% crosspointVLFL2(VL,FL,p,ez) - returns the surfacepoint of a solid hit by a beam % (by Tim Lueth, VLFL-Lib, 2020-JAN-08 as class: AUXILIARY PROCEDURES) % % In contrast to crosspointVLFL this fnctn supports different ez vectors % Straight forward but fast procedure to calucate the surface point of a % beam starting at point p in the direction of ez. (Status of: 2020-01-09) % % Introduced first in SolidGeometry 4.9 % % See also: intersectstriangle, VLprojection, crosspointVLFL, % crosspointsVLFLofT % % [cp,t,fi,a]=crosspointVLFL2(VL,FL,p,[ez]) % === INPUT PARAMETERS === % VL: Vertex list of a solid % FL: Facet list of a solid % p: beam starting point % ez: beam direction vector; if empty the facet normal vectors are used % === OUTPUT RESULTS ====== % cp: cross point on surface, empty if there is no crossing point % t: distance (t * ez) % fi: facet index of 1st crossed surface % a: full list of facet index and distance [fi, d] % % EXAMPLE: % SG=SGtransP(SGbox([80,80,5]),[0 0 40]); p=[5 0 0]; % crosspointVLFL2(SG.VL,SG.FL,p,[1 1 5]) % crosspointVLFL2(SG.VL,SG.FL,p,[1 0 1.2]) % crosspointVLFL2(SG.VL,SG.FL,p) % SGsample(3);SG=ans; % crosspointVLFL2(SG.VL,SG.FL,[0.1 .1 8]) % % See also: intersectstriangle, VLprojection, crosspointVLFL, % crosspointsVLFLofT % % % Copyright 2020 Tim C. Lueth |
dist2line(P1,ev,p)- mirrors a point at a straight line in 2D |
% dist2line(P1,ev,p) - mirrors a point at a straight line in 2D % (by Tim Lueth, VLFL-Lib, 2020-JAN-08 as class: ANALYTICAL GEOMETRY) % % Should be renamed into PLmirroratline (Status of: 2020-01-08) % % Introduced first in SolidGeometry 4.9 % % See also: PLcross2Lines, PLcrossCPLline, mirroringatline3D, % mirroringatline2D % % [mp,do,cp,ov]=dist2line(P1,ev,p) % === INPUT PARAMETERS === % P1: Point on line % ev: direction vector % p: point to mirror % === OUTPUT RESULTS ====== % mp: mirror point % do: distance to straight line (wrt to ev) % cp: crossing point on line % ov: orthogonal vector to straight line from p to cp % % EXAMPLE: % mirroringatline([0 0],+[-1 -6],[1 1]) % % See also: PLcross2Lines, PLcrossCPLline, mirroringatline3D, % mirroringatline2D % % % Copyright 2020 Tim C. Lueth |
matrixPLplot(M,PL)- plots a matrix and a point list |
% matrixPLplot(M,PL) - plots a matrix and a point list % (by Tim Lueth, VLFL-Lib, 2020-JAN-08 as class: AUXILIARY PROCEDURES) % % shows the result of path planning (Status of: 2020-01-08) % % Introduced first in SolidGeometry 4.9 % % See also: matrixplot % % h=matrixPLplot(M,PL) % === INPUT PARAMETERS === % M: Matrix entries % PL: [r c] or [y x] list % === OUTPUT RESULTS ====== % h: handle to graphics objects % % EXAMPLE: % matrixdistancefield(M,[20 70;80 50]); M=ans; whos M % SGfigure; matrixPLplot(M,[1 1; 100 50]) % % % See also: matrixplot % % % Copyright 2020 Tim C. Lueth |
SGselect3dPL(SG,p)- similar to select3d cals nearest point and vertices but for any fiven point |
% SGselect3dPL(SG,p) - similar to select3d cals nearest point and vertices but for any fiven point % (by Tim Lueth, VLFL-Lib, 2020-JAN-08 as class: SURFACES) % % Introduced first in SolidGeometry 4.9 % % See also: select3d, crosspointVLFL2, SGselect3d, SGselect3Dsurface % % [NL,FVL,fi]=SGselect3dPL(SG,[p]) % === INPUT PARAMETERS === % SG: Solid Geoemtry % p: point to be checked % === OUTPUT RESULTS ====== % NL: List of point with nearest distance to PL % FVL: list of point on nearest vertex % fi: index of nearest vertex % % EXAMPLE: % SGselect3dPL(SGsample(3),[0 -6 80]) % SGselect3dPL(SGsample(3),[0 -6 8]) % SGselect3dPL(SGsample(3),[1 -6 8]) % [a,b,c]=SGselect3dPL(SGsample(3),[1 -6 8]) % [a,b,c]=SGselect3dPL(SGsample(3),[1 -6 80]) % % See also: select3d, crosspointVLFL2, SGselect3d, SGselect3Dsurface % % % Copyright 2020 Tim C. Lueth |
matrixfillseedpoints(M,neighb,PLrc);- fills a matrix similiar as matrixdistanceofCPL but with discrete values |
% matrixfillseedpoints(M,neighb,PLrc); - fills a matrix similiar as matrixdistanceofCPL but with discrete values % (by Tim Lueth, VLFL-Lib, 2020-JAN-08 as class: AUXILIARY PROCEDURES) % % Introduced first in SolidGeometry 4.9 % % See also: GPLofmatrix, matrixdistanceofCPL, ELofmatrixneigbors, % ELofmatrixneigborweight, matrixlocalminmax, matrixskeleton, % matrixfilldistance, matrixfillborder % % MM=matrixfillseedpoints(M,[neighb,PLrc]); % === INPUT PARAMETERS === % M: Matrix with nan as untouchable regions % neighb: '8' oder '4' as neighborhood; default is '8' % PLrc: List of Start points using PLrc defining the % === OUTPUT RESULTS ====== % MM: Matrix with discrete distance values % % EXAMPLE: % matrixfillseedpoints(matrixdistanceofCPL(CPLsample(29),[100 100]),'',[50 50]); % matrixfillseedpoints(matrixdistanceofCPL(CPLsample(29),[100 100]),'',[80 50]); % matrixfillseedpoints(matrixdistanceofCPL(CPLsample(29),[100 100]),'',[10 70]); % % See also: GPLofmatrix, matrixdistanceofCPL, ELofmatrixneigbors, % ELofmatrixneigborweight, matrixlocalminmax, matrixskeleton, % matrixfilldistance, matrixfillborder % % % Copyright 2020 Tim C. Lueth |
matrixpath(M,GL,AP,ST)- searches a path in a potential field matrix from start point to matrix value = zeros |
% matrixpath(M,GL,AP,ST) - searches a path in a potential field matrix from start point to matrix value = zeros % (by Tim Lueth, RP-Lib, 2020-JAN-08 as class: AUXILIARY PROCEDURES) % % Use matrixfillseedpoints, matrixfilldistance, matrixfillborder, % matrixdistanceofCPL, matrixdistancefield, first (Status of: 2020-01-09) % % Introduced first in SolidGeometry 4.9 % % See also: PLshortestpathinCPL, matrixfillseedpoints, % matrixfilldistance, matrixfillborder, ELofmatrixneigborweight, % matrixdistancefield, matrixdistanceofCPL % % % PL=matrixpath(M,[GL,AP,ST]) % === INPUT PARAMETERS === % M: Matrix as result of % GL: Goal start tart search from % AP: Attraction point; default is Matrix==0 % ST: Style of Line "push', 'pull' , 'dist'; default is pull % === OUTPUT RESULTS ====== % PL: PLrc list from start to end % % EXAMPLE: % matrixfillseedpoints(matrixdistanceofCPL(CPLsample(29),[100 100]),'8',[80 50]); M=ans; whos M % matrixpath(M,[30 20],'','push') % select farest point to straight line % matrixpath(M,[30 20],'','pull') % select nearest point to straight line % matrixpath(M,[30 20],'','dist') % select nearest point to goal % % See also: PLshortestpathinCPL, matrixfillseedpoints, % matrixfilldistance, matrixfillborder, ELofmatrixneigborweight, % matrixdistancefield, matrixdistanceofCPL % % % % Copyright 2020 Tim C. Lueth |
SGofVLFLz(VL,FL,z)- returns a fitting solid based on a surface, i.e. simplified version of SGofSurface |
% SGofVLFLz(VL,FL,z) - returns a fitting solid based on a surface, i.e. simplified version of SGofSurface % (by Tim Lueth, VLFL-Lib, 2020-JAN-07 as class: SURFACES) % % Fast and stable fnctn even for large data sets. (Status of: 2020-01-07) % % Introduced first in SolidGeometry 4.9 % % See also: SGofSurface, VLFLofCPLdelaunayGrid, VLtransN, VLFLvertexNormal % % SG=SGofVLFLz(VL,FL,[z]) % === INPUT PARAMETERS === % VL: Vertex list of a surface (nx3) % FL: Facet list of a surface (nx3) % z: thickness of the solid; default is 0.5 % === OUTPUT RESULTS ====== % SG: resulting solid that can be attached to the surface % % EXAMPLE: % [VL,FL]=VLFLsample(14); SGofVLFLz(VL,FL,1) % [VL,FL]=VLFLsample(18); SGofVLFLz(VL,FL,1) % % See also: SGofSurface, VLFLofCPLdelaunayGrid, VLtransN, VLFLvertexNormal % % % Copyright 2020 Tim C. Lueth |
SGisInterior(SG,VL)- returns the isInside Flag for a SG and a VL |
% SGisInterior(SG,VL) - returns the isInside Flag for a SG and a VL % (by MATLAB-CENTRAL, VLFL-Lib, 2020-JAN-07 as class: SURFACES) % % It is still a fast checking fnctn for points that are on or not on the % surface. Surface points belong to the inner points. Bugs appear if % points are at the same position but different z axis. Could easily be % solved. See mesh2mesh to learn how to improve VLFLinpolyhedron. (Status % of: 2020-01-16) % % See also: VLisInteriorofBB, mesh2mesh, VLFLinpolyhedron, BBiscollofVL, % outboundingbox, VLcrossingSG, crossingfacets2VLFL, SGisconvex % % [VIL,Vin,Von]=SGisInterior(SG,VL) % === INPUT PARAMETERS === % SG: Solid Geoemtry or cell list % VL: Vertex list to test or Frame T % === OUTPUT RESULTS ====== % VIL: Vertex inside or surface % Vin: Vertex inside not on surface % Von: Vertex on surface not inside % % EXAMPLE: % SGplatesofSGML(SGbox([60,40,20]),1.5,PLcircle(4)); SG=ans; % [~,~,~,VL]=meshgridofBB(BBofSG(SG),50,50,50,0); SGisInterior(SG,VL); % A=SGbool('-',SGbox([30,20,10]),SGbox([26,16,6])); B=SGsphere(10); % SGisInterior(A,[A.VL;B.VL]); % % See also: VLisInteriorofBB, mesh2mesh, VLFLinpolyhedron, BBiscollofVL, % outboundingbox, VLcrossingSG, crossingfacets2VLFL, SGisconvex % |