Wir verwenden Google für unsere Suche. Mit Klick auf „Suche aktivieren“ aktivieren Sie das Suchfeld und akzeptieren die Nutzungsbedingungen.

# New in SG-Lib 4.3

###### SGboolh(flag,A,B);- returns boolean operations on solid geometries using a heuristic
 % SGboolh(flag,A,B); - returns boolean operations on solid geometries using a heuristic% (by Tim Lueth, VLFL-Lib, 2018-NOV-06 as class: SURFACES)% % without any change of SGbool/SGbool5 (Aug 2017) this fnctn returns % quite useful results by avoiding numerical instabilities. (Status of: % 2018-11-07)% % Introduced first in SolidGeometry 4.3% % See also: CSGsample, SGbool% % C=SGboolh(flag,A,B);% === INPUT PARAMETERS ===% flag: '+', 'x', 'A' ,'B'% A: Solid A% B: Solid B% === OUTPUT RESULTS ======% C: result of boolean operation% % EXAMPLE: % testfunctTL('[A,B]=CSGsample(#2); SGboolh(#1,A,B);','+xAB',1:10)% n=14; [A,B]=CSGsample(n); CSGsample(n)% SGboolh('+',A,B); SGcheckmeshlab(ans);% SGboolh('-',A,B); SGcheckmeshlab(ans);% SGboolh('A',A,B); SGcheckmeshlab(ans);% SGboolh('B',A,B); SGcheckmeshlab(ans);% % See also: CSGsample, SGbool% % % Copyright 2018 Tim C. Lueth
###### SGcutTCPL(SG,To,CPL);- shoots a contour through a solid
 % SGcutTCPL(SG,To,CPL); - shoots a contour through a solid% (by Tim Lueth, VLFL-Lib, 2018-NOV-06 as class: SURFACES)% % Introduced first in SolidGeometry 4.3% % See also: SGcutT, BBofSGcutT, SGcut, SGcut2, SGcutBB% % [C,succ]=SGcutTCPL([SG,To,CPL]);% === INPUT PARAMETERS ===% SG: Solid Geometry% To: Optional T frame% CPL: Closed Polygon Line% === OUTPUT RESULTS ======% C: Resulting Solid% succ: flag for success% % EXAMPLE: % SGcutTCPL(SGsample(25),TofP([-4 -6 0]),[PLcircle(1,8);nan nan;PLcircle(0.5)])% SGcutTCPL(SGsample(25),'',[PLcircle(1,8);nan nan;PLcircle(0.5)])% % See also: SGcutT, BBofSGcutT, SGcut, SGcut2, SGcutBB% % % Copyright 2018 Tim C. Lueth
###### CPLsweep(CPL,wt,cp)- returns a swept contour
 % CPLsweep(CPL,wt,cp) - returns a swept contour% (by Tim Lueth, VLFL-Lib, 2018-NOV-05 as class: CLOSED POLYGON LISTS)% % Contour required for creating revolute joints (Status of: 2018-11-05)% % Introduced first in SolidGeometry 4.3% % See also: CPLconvexhull% % CPLN=CPLsweep(CPL,[wt,cp])% === INPUT PARAMETERS ===% CPL: Closed polygon line% wt: angle w or [wmin wmax]% cp: center point for rotation% === OUTPUT RESULTS ======% CPLN: Final contour% % EXAMPLE: % CPLsweep(CPLsample(14),[-pi/50 pi/4]);% CPLsweep(CPLsample(14),[-pi/50 pi/4],[15 0]);% CPLsweep(CPLsample(14),[-pi/50 pi/4],[0 15]);% % See also: CPLconvexhull% % % Copyright 2018 Tim C. Lueth
###### BBofSGcutT(SGx,Tx,z,d)- returns the bounding box for a cutting frame
 % BBofSGcutT(SGx,Tx,z,d) - returns the bounding box for a cutting frame% (by Tim Lueth, VLFL-Lib, 2018-NOV-05 as class: SURFACES)% % Introduced first in SolidGeometry 4.3% % See also: SGcutT, TofPcam, SGcut, SGcut2, SGcutBB, SGcutT% % [BB,Ts,Tc,SGC]=BBofSGcutT([SGx,Tx,z,d])% === INPUT PARAMETERS ===% SGx: Solid Geoemtry% Tx: Cutting frame (cuts above z==0)% z: size [-z/2 +z/2] or [zmin zmax]% d: displacement to add to x and y values of BB; z unchanged% === OUTPUT RESULTS ======% BB: Bounding box size% Ts: Cutting frame (if interactively used) on surface% Tc: Cutting Frame in center point% SGC: Cutted Solid Geometry of [zmin zmax]% % EXAMPLE: % loadweb JACO_robot.mat% BBofSGcutT(JC0,eye(4),10);% BBofSGcutT(JC0,eye(4));% BBofSGcutT(JC0);% BBofSGcutT;% % See also: SGcutT, TofPcam, SGcut, SGcut2, SGcutBB, SGcutT% % % Copyright 2018 Tim C. Lueth
###### SGcutend(SG,ez,d,expl);- returns a cutted object that is cuttet related to the BB
 % SGcutend(SG,ez,d,expl); - returns a cutted object that is cuttet related to the BB% (by Tim Lueth, VLFL-Lib, 2018-NOV-04 as class: SURFACES)% % Introduced first in SolidGeometry 4.3% % See also: SGcutT, SGcutBB, SGcut% % [A,B,T]=SGcutend([SG,ez,d,expl]);% === INPUT PARAMETERS ===% SG: SG if empty, SGofgca% ez: string as 'top,'bottom','behind','left',right','infront'% d: distance from outside border% expl: explosition distance; Parts are separated; default is 0;% === OUTPUT RESULTS ======% A: remaining solid (magenta)% B: removed solid (white)% T: Transformation matrix used% % EXAMPLE: % loadweb JACO_robot.mat% SGcutend(JCF,'top',10,10)% % See also: SGcutT, SGcutBB, SGcut% % % Copyright 2018 Tim C. Lueth
###### CPLconvexhull(CPL)- returns the convex hull for a CPL
 % CPLconvexhull(CPL) - returns the convex hull for a CPL% (by Tim Lueth, VLFL-Lib, 2018-NOV-03 as class: CLOSED POLYGON LISTS)% % Introduced first in SolidGeometry 4.3% % See also: delaunayofCPL% % CPLN=CPLconvexhull(CPL)% === INPUT PARAMETERS ===% CPL: CPL% === OUTPUT RESULTS ======% CPLN: convex hull% % EXAMPLE: % CPLconvexhull(PLstar(10))% CPLconvexhull(CPLsample(14))% delaunayofCPL(CPLsample(14))% % % See also: delaunayofCPL% % % Copyright 2018 Tim C. Lueth
###### SGsurfaceselect(SG,fi,vi)- returns an isolated surface from a solid or SGofgca
 % SGsurfaceselect(SG,fi,vi) - returns an isolated surface from a solid or SGofgca% (by Tim Lueth, VLFL-Lib, 2018-NOV-03 as class: SURFACES)% % DOES NOT WORK WITH NON MANIFOLD VERTICES - SGchecknonmanifoldvertices % (Status of: 2018-11-03)% % Introduced first in SolidGeometry 4.3% % See also: SGsurface% % [SGI,SG,SIL,nfi]=SGsurfaceselect([SG,fi,vi])% === INPUT PARAMETERS ===% SG: Solid geometry or empty for gca% fi: facet index% vi: vertex index% === OUTPUT RESULTS ======% SGI: Selected closed surface% SG: SG with reordered facet list% SIL: Surface index list for all surfaces% nfi: facet index with respect to % % EXAMPLE: % SGfigure; SGplot(JCF); SGsurfaceselect% SGsurfaceselect(JCF,[2803 2865 2870])% SGsurfaceselect(JCF,1000)% SGsurfaceselect(JCF,'',2803)% % See also: SGsurface% % % Copyright 2018 Tim C. Lueth
###### CPLbufferEdges(CPL,r,t)- returns contours with broken our rounded edges;
 % CPLbufferEdges(CPL,r,t) - returns contours with broken our rounded edges; % (by Tim Lueth, VLFL-Lib, 2018-NOV-03 as class: CLOSED POLYGON LISTS)% % ATTENTION = 'round' creates too many points wrt 3D printing% This fnctn based on CPLbuffer / polybuffer(polyshape)% Square doubles the numver of points; round at least triples the number % of points (Status of: 2018-11-03)% % Introduced first in SolidGeometry 4.3% % See also: CPLradialEdges% % CPLN=CPLbufferEdges(CPL,[r,t])% === INPUT PARAMETERS ===% CPL: Closed Polygon Line% r: radius; default is 0.3% t: 'square', 'round'% === OUTPUT RESULTS ======% CPLN: % % EXAMPLE: % CPLbufferEdges([PLgearDIN(1,9);nan nan;PLcircle(.5)],.3,'round')% CPLbufferEdges([PLgearDIN(1,9);nan nan;PLcircle(.5)],.3,'square')% % See also: CPLradialEdges% % % Copyright 2018 Tim C. Lueth
###### SGhelptext(helpstr,cname)- Writes a text annotation box on top of the current axis
 % SGhelptext(helpstr,cname) - Writes a text annotation box on top of the current axis% (by Tim Lueth, VLFL-Lib, 2018-NOV-02 as class: USER INTERFACE)% % This fnctn was already part of several interactive fnctn and is now % just a independent fnctn (Status of: 2018-11-02)% % Introduced first in SolidGeometry 4.3% % See also: SGfigure, rotate3d, ginput, select3d% % h=SGhelptext(helpstr,[cname])% === INPUT PARAMETERS ===% helpstr: help string (yellow)% cname: caller string (red)% === OUTPUT RESULTS ======% h: handle to text annotation% % EXAMPLE: % SGhelptext('Rotate and Press Enter','Solid Geometry Modeler'); a=ans% SGhelptext('',''); % % See also: SGfigure, rotate3d, ginput, select3d% % % Copyright 2018 Tim C. Lueth
###### TofPcam(p,r)- returns a transformation matrix using a vertex and a the current camera view
 % TofPcam(p,r) - returns a transformation matrix using a vertex and a the current camera view% (by Tim Lueth, VLFL-Lib, 2018-NOV-02 as class: ANALYTICAL GEOMETRY)% % This fnctn is used to create interactively transformation matrices% ez = view direction% ey = cup of view% ex= ez cross ey% t = p; (Status of: 2018-11-02)% % Introduced first in SolidGeometry 4.3% % See also: Tofgca, Tofcam, camplot, camset, Tofgca, Tofcam, tcamera, % camofT% % [T,vi,fi]=TofPcam([p,r])% === INPUT PARAMETERS ===% p: 3D coordinate in the current view% r: 'z 'x 'y' as view direction ; default is 'z'% === OUTPUT RESULTS ======% T: HT matrix with ez = view direction and ey = cup of view% vi: % fi: % % EXAMPLE: % SGfigure(SGbox([30,20,10]));% shg; rotate3d on; pause; ginput(1); p=select3d; TofPcam(p), rotate3d on% % See also: Tofgca, Tofcam, camplot, camset, Tofgca, Tofcam, tcamera, % camofT% % % Copyright 2018 Tim C. Lueth
###### SGfischertechniksample(name)- returns SG for some Fischertechnik samples
 % SGfischertechniksample(name) - returns SG for some Fischertechnik samples% (by Tim Lueth, VLFL-Lib, 2018-NOV-02 as class: MODELING PROCEDURES)% % This is not to replace Fischertechnik elements. It is much cheaper to % buy them from Fischertechnik. It is more an example how to integrate % Fischertechnik compatible contours and elements into other mechanisms. % (Status of: 2018-11-02)% % Introduced first in SolidGeometry 4.3% % See also: CPLsample, SGsample, VLsample, PLsample, VLFLsample, % CSGsample, SGerrorsample, SGcmdsample, testfunctTL, permutevector% % SG=SGfischertechniksample([name])% === INPUT PARAMETERS ===% name: name of a solid or just empty to see all supported ones% === OUTPUT RESULTS ======% SG: Solid Geometry% % EXAMPLE: % SGfischertechniksample% % See also: CPLsample, SGsample, VLsample, PLsample, VLFLsample, % CSGsample, SGerrorsample, SGcmdsample, testfunctTL, permutevector% % % Copyright 2018 Tim C. Lueth
###### CPLfischertechnik(tol,gb);- returns the most common CPL for the design of fischertechnik compatible connections
 % CPLfischertechnik(tol,gb); - returns the most common CPL for the design of fischertechnik compatible connections% (by Tim Lueth, VLFL-Lib, 2018-OKT-31 as class: CLOSED POLYGON LISTS)% % The stones have a width of 15 x 15 x 15 mm% The buttons have a height of 2.5 mm, a width of 4 mm at the head and 3 % mm at the foot.% The distance between the rails is therefore also 15 mm.% The rods have a diameter of 4 mm.% The drill holes have a distance of 10 mm% The holes are cut with the button foot widths% The buttons were initially cut circles and have changed to swallowtails % or today V-lips% (Status of: 2018-11-01)% % Introduced first in SolidGeometry 4.3% % See also: FTelement, VLFLdovetail% % [CPLL,CPLI,CPLC,PL3,PL4]=CPLfischertechnik([tol,gb]);% === INPUT PARAMETERS ===% tol: [tolerance between the lines CPLL and CPLI[a% gb: length of contour; default is 15 mm% === OUTPUT RESULTS ======% CPLL: Line to create a blade or concave contour (rail, blade)% CPLI: Line to create a convex contour (know)% CPLC: % PL3: % PL4: % % EXAMPLE: % [a,b,c,d,e]=CPLfischertechnik;% f=a(2:end-1,:); SGofCPLrot(f);% f=a(2:end-1,:); SGofCPLrot(f,4);% f=c(2:end-1,:); SGofCPLrot(f);% SGofCPLz(e,15);% SGofCPLz(d,15);% f=b(2:end-1,:); SGofCPLrot(f,4,true)% SGofCPLz(d,15); A=ans; f=b(2:end-1,:); SGofCPLrot(f,4); B=ans; SGtransrelSG(B,A,'aligntop',2.5)% % % See also: FTelement, VLFLdovetail% % % Copyright 2018 Tim C. Lueth
###### SGofSGTsurface(SGT,FNam,t,d,s)- returns the flange surface for a given T matrix frame name
 % SGofSGTsurface(SGT,FNam,t,d,s) - returns the flange surface for a given T matrix frame name% (by Tim Lueth, VLFL-Lib, 2018-OKT-31 as class: SURFACES)% % calls fnctn SGofSurface with the surfaces of Frame N (Status of: % 2018-10-31)% % Introduced first in SolidGeometry 4.3% % See also: isplanarVLFL, SGofSurface, VLFLofSGTsurface% % SG=SGofSGTsurface([SGT,FNam,t,d,s])% === INPUT PARAMETERS ===% SGT: Solid Geometry% FNam: Name of Frame% t: thickness of the solid; default is 0.5% d: distance from the surface; default is 0.3% s: streching of the border line; default is 0% === OUTPUT RESULTS ======% SG: Solid Geometry% % EXAMPLE: % load JACO_robot.mat% X=SGTui(JC01,'T',1);% SGofSGTsurface(X,'T')% % See also: isplanarVLFL, SGofSurface, VLFLofSGTsurface% % % Copyright 2018 Tim C. Lueth
###### SGcmdsample(name)- Creates a SGcommandstring or a solid for some sampke geometries
 % SGcmdsample(name) - Creates a SGcommandstring or a solid for some sampke geometries% (by Tim Lueth, VLFL-Lib, 2018-OKT-31 as class: SURFACES)% % Introduced first in SolidGeometry 4.3% % See also: SGofCPLcommand, SGofCPLui, CPLsample, CSGsample, PLsample, % SGerrorsample, SGsample, VLFLsample, VLsample% % [cmd,SG]=SGcmdsample([name])% === INPUT PARAMETERS ===% name: name of solid or empty% === OUTPUT RESULTS ======% cmd: command string% SG: solid geometry% % EXAMPLE: % SGcmdsample% SGcmdsample('3156')% SGcmdsample('S3156')% % See also: SGofCPLcommand, SGofCPLui, CPLsample, CSGsample, PLsample, % SGerrorsample, SGsample, VLFLsample, VLsample% % % Copyright 2018 Tim C. Lueth
###### CPLofPLgrowline(PL,s,edge,caps);- converts a single open polygon into a grown contour
 % CPLofPLgrowline(PL,s,edge,caps); - converts a single open polygon into a grown contour% (by Tim Lueth, VLFL-Lib, 2018-OKT-30 as class: CLOSED POLYGON LISTS)% % Reimplemented version of PLgrowline using the polyshape class on % 2018-10-30 by Tim Lueth (Status of: 2018-10-30)% % Introduced first in SolidGeometry 4.3% % See also: PLgrow, CPLgrow, CPLbuffer, CPLofPLgrow% % CPL=CPLofPLgrowline(PL,s,[edge,caps]);% === INPUT PARAMETERS ===% PL: Open point list line% s: thickness% edge: true= rounded edges; false = simple; default false;% caps: true= rounded caps; false = straight; default is false;% === OUTPUT RESULTS ======% CPL: Closed Polygon line% % EXAMPLE: PL=[-5 10; -5 0; +5 0; +5 -10], CPLofPLgrowline(PL,1,true)% PL=[-5 10; -5 0; +5 0; +5 -10], CPLofPLgrowline(PL,1,false)% PL=[0 -19;0 20;0 19; 0 0]% PL=[-5 10; -5 0; +5 0; +5 -10], CPLofPLgrowline(PL,1,true,true)% % See also: PLgrow, CPLgrow, CPLbuffer, CPLofPLgrow% % % Copyright 2018 Tim C. Lueth
###### CPLofPLgrow(PL,R)- creates CPL circles around points of a point list
 % CPLofPLgrow(PL,R) - creates CPL circles around points of a point list% (by Tim Lueth, VLFL-Lib, 2018-OKT-30 as class: CLOSED POLYGON LISTS)% % Introduced first in SolidGeometry 4.3% % See also: CPLbuffer, CPLofPLgrowline% % CPL=CPLofPLgrow(PL,R)% === INPUT PARAMETERS ===% PL: point list [n x 2]% R: Radius% === OUTPUT RESULTS ======% CPL: % % EXAMPLE: % CPLofPLgrow(PLstar(10),1)% CPLofPLgrow(PLstar(10),2)% CPLofPLgrow([PLstar(10);nan nan;PLstar(5)],1)% % See also: CPLbuffer, CPLofPLgrowline% % % Copyright 2018 Tim C. Lueth
###### CPLbuffer(CPL,d,typ);- grows shrinks a CPL
 % CPLbuffer(CPL,d,typ); - grows shrinks a CPL % (by Tim Lueth, VLFL-Lib, 2018-OKT-30 as class: CLOSED POLYGON LISTS)% % Introduced first in SolidGeometry 4.3% % See also: CPLofPLgrow, CPLofPLgrowline% % CPLN=CPLbuffer(CPL,d,[typ]);% === INPUT PARAMETERS ===% CPL: Closed Polygon line line% d: Shifting distance% typ: 'round'—Round out ,'square'—Square off, 'miter'—Preserve angle% % === OUTPUT RESULTS ======% CPLN: Closed Polygon line% % EXAMPLE: % CPLbuffer(PLstar(10),1);% CPLbuffer(CPLsample(12),+3);% % See also: CPLofPLgrow, CPLofPLgrowline% % % Copyright 2018 Tim C. Lueth
###### surfofgca(gh)- returns the surfaces (not the patches) from the graphics handel
 % surfofgca(gh) - returns the surfaces (not the patches) from the graphics handel% (by Tim Lueth, VLFL-Lib, 2018-OKT-30 as class: VISUALIZATION)% % uses h=findall(gh,'type','surface'); surf2patch(h,'triangles');% (Status of: 2018-10-31)% % Introduced first in SolidGeometry 4.3% % See also: VLFLofSurf, surf2patch% % [h,VL,FL]=surfofgca([gh])% === INPUT PARAMETERS ===% gh: axis handle; default is gca% === OUTPUT RESULTS ======% h: handle to all surfaces of hf% VL: Vertex list of surface% FL: Triangulated Facet List of Surfaces using surf2patch % % % See also: VLFLofSurf, surf2patch% % % Copyright 2018 Tim C. Lueth
###### VLFLofSurf(s)- returns a vertex and facet list from a surf handle
 % VLFLofSurf(s) - returns a vertex and facet list from a surf handle% (by Tim Lueth, VLFL-Lib, 2018-OKT-30 as class: SURFACES)% % Matlab support not only patches (n x 3) tesselates surfaces but also % polygon shaphed surfaces caller surfaces (Status of: 2018-10-31)% % Introduced first in SolidGeometry 4.3% % See also: VLFLofPatch% % [VL,FL]=VLFLofSurf(s)% === INPUT PARAMETERS ===% s: surface handle% === OUTPUT RESULTS ======% VL: Vertex list% FL: Facet list% % See also: VLFLofPatch% % % Copyright 2018 Tim C. Lueth
###### cellsize(C);- returns the size of cell elements
 % cellsize(C); - returns the size of cell elements% (by Tim Lueth, VLFL-Lib, 2018-OKT-30 as class: AUXILIARY PROCEDURES)% % Introduced first in SolidGeometry 4.3% % See also: size, numel, length% % cs=cellsize(C);% === INPUT PARAMETERS ===% C): cell array% === OUTPUT RESULTS ======% cs: size of array% % EXAMPLE: % loadweb JACO_robot.mat; % FS=FSofSG(JCF), size(FS)% cellsize(FS)% cellsize(FS')% cellsize({[1 ],[3 2] [2 3 1] [2]})% % See also: size, numel, length% % % Copyright 2018 Tim C. Lueth
###### CPLofSGautoslice(SG,dz);- returns the slive with a significant z distance
 % CPLofSGautoslice(SG,dz); - returns the slive with a significant z distance% (by Tim Lueth, VLFL-Lib, 2018-OKT-29 as class: SLICES)% % Introduced first in SolidGeometry 4.3% % See also: CPLofSGslice, CPLofSGslice2, CPLofSGslice3% % [CPL,CVL]=CPLofSGautoslice(SG,[dz]);% === INPUT PARAMETERS ===% SG: Solid Geometry% dz: minimal z change; default is soBB(SG)/50% === OUTPUT RESULTS ======% CPL: Closed Polygon Line% CVL: Closed Vertex List of all z values% % EXAMPLE: % SGreadSTL; A=ans; SGrotateservo(A); B=ans% CPLofSGautoslice(B);% % % See also: CPLofSGslice, CPLofSGslice2, CPLofSGslice3% % % Copyright 2018 Tim C. Lueth
###### SGrotateservo(SG)- turns the SG of a servo motor to an upright position
 % SGrotateservo(SG) - turns the SG of a servo motor to an upright position% (by Tim Lueth, VLFL-Lib, 2018-OKT-29 as class: SURFACES)% % The X axis is the longest dimension% The y axis is the smallest dimension (Status of: 2018-10-29)% % Introduced first in SolidGeometry 4.3% % See also: SGrotate% % [SG,T,CPL1,CPL2]=SGrotateservo(SG)% === INPUT PARAMETERS ===% SG: Original Servo Solid Geoemtry% === OUTPUT RESULTS ======% SG: Rotate Solid% T: Frame of Shaft% CPL1: Contour of Shaft% CPL2: Contour of body% % EXAMPLE: % SGreadSTL; A=ans; SGrotateservo(A)% % See also: SGrotate% % % Copyright 2018 Tim C. Lueth
###### SGofCPLui- simple CPL and SG editor using SGofCPLcommand
 % SGofCPLui - simple CPL and SG editor using SGofCPLcommand% (by Tim Lueth, VLFL-Lib, 2018-OKT-28 as class: CLOSED POLYGON LISTS)% % Introduced first in SolidGeometry 4.3% % See also: SGofCPLcommand, SGcmdsample% % [SG,CPL]=SGofCPLui% === OUTPUT RESULTS ======% SG: Solid geometry% CPL: Closed polygon line% % EXAMPLE: % SGofCPLui% c 4, c 2, h 3, b 40 40, h 5% g 10 22, ms 4 2, h 5, c 7, h 7, % % See also: SGofCPLcommand, SGcmdsample% % % Copyright 2018 Tim C. Lueth
###### PCwriteXYZ(PC,FNAME,ONAME)- writes an XYZ File of Vertices and Normals that is used by Meshlab
 % PCwriteXYZ(PC,FNAME,ONAME) - writes an XYZ File of Vertices and Normals that is used by Meshlab% (by Tim Lueth, VLFL-Lib, 2018-OKT-28 as class: VERTICES / CLOUDS)% % Introduced first in SolidGeometry 4.3% % See also: SGwriteSTL, CPLwriteSVG% % PCwriteXYZ(PC,[FNAME,ONAME])% === INPUT PARAMETERS ===% PC: Point Cloud or Vertex list% FNAME: % ONAME: % % EXAMPLE: % loadweb IntelRealsense.mat % loads vertex lists from RS300 and RS415% PCwriteXYZ(VL_D415a);% % See also: SGwriteSTL, CPLwriteSVG% % % Copyright 2018 Tim C. Lueth
###### CPLboolpshape(fflag,CPLA,CPLB);- Boolean Fncts based on the polyshape class
 % CPLboolpshape(fflag,CPLA,CPLB); - Boolean Fncts based on the polyshape class % (by Tim Lueth, VLFL-Lib, 2018-OKT-26 as class: SURFACES)% % case {'+','PLUS','OR','UNION'}% case {'X','AND','INTERSECT'}% case {'A','A\B'}% case 'XOR' % % (Status of: 2018-10-26)% % Introduced first in SolidGeometry 4.3% % See also: CPLbool% % CPLN=CPLboolpshape(fflag,CPLA,CPLB);% === INPUT PARAMETERS ===% fflag: Operator% CPLA: Contour A% CPLB: Contour B% === OUTPUT RESULTS ======% CPLN: Final CPL% % EXAMPLE: % CPLboolpshape('+',PLcircle(10), flipud(PLcircle(8)+4))% % See also: CPLbool% % % Copyright 2018 Tim C. Lueth
###### SGofCPLcommand(cstr)- Simple commandline based 2.5 solid modeler for the use of a caliper
 % SGofCPLcommand(cstr) - Simple commandline based 2.5 solid modeler for the use of a caliper% (by Tim Lueth, VLFL-Lib, 2018-OKT-25 as class: PARAMETRIC DESIGN)% % First a Contour is designed; afterwards the contour is extruded; and % set below the alraedy designed existing solid % ATTENTION IF YOU MELT THE PARTS AFTERWARDS AVOID edges with same planes% G d n ==> Gear with diameter and number of teeth% CP x y ==> Center Point of X and Y% C d ==> Cylinder/Circle with diameter% B x y ==> Box with % D d dx dy ==> drilling holes% (Status of: 2018-10-31)% % Introduced first in SolidGeometry 4.3% % See also: SGofCPLui, SGofCPLz, SGsurfacemeltbool, SGsurfacemeltbool% % [SG,CPLO]=SGofCPLcommand(cstr)% === INPUT PARAMETERS ===% cstr: CPL command string, use '?' for info% === OUTPUT RESULTS ======% SG: solid Geometry% CPLO: % % EXAMPLE: % SGofCPLcommand('g 4 21, h 4'); % Gear with diameter 4mm, 21 teeth, height 4 mm% SGofCPLcommand('g 4 21, h 4, c 3, h 1, move 5 0, b 40 10 ,h 2,b 25 10 , h 20')% SGofCPLcommand('g 4 21, h 4, c 3, h 1, move 5 0, b 40 10 ,d 2.5 -15 0, d 2.5 +15 0, h 2,b 25 10 , h 20')% SGofCPLcommand('g 4 21, h 4, c 3, h 1, move 5 0, b 15 8, h 4, b 40 10 ,d 2.5 -15 0, d 2.5 +15 0, h 2,b 25 10 , h 20')% % See also: SGofCPLui, SGofCPLz, SGsurfacemeltbool, SGsurfacemeltbool% % % Copyright 2018 Tim C. Lueth
###### SGgearmwormDIN(m,dw,wg)- returns a gear worm solid
 % SGgearmwormDIN(m,dw,wg) - returns a gear worm solid% (by Tim Lueth, VLFL-Lib, 2018-OKT-24 as class: PARAMETRIC DESIGN)% % DIN 3975% (Status of: 2018-10-25)% % Introduced first in SolidGeometry 4.3% % See also: PLgearrackDIN, SGgearDIN, SGgearpairDIN, SGgearrackDIN, % CPLmotorshaft% % SGW=SGgearmwormDIN([m,dw,wg])% === INPUT PARAMETERS ===% m: modul% dw: diameter middle circle% wg: number of windings; default is% === OUTPUT RESULTS ======% SGW: Solid of gear work% % EXAMPLE: % SGgearmwormDIN(1,5)% SGgearmwormDIN(1,10)% SGgearmwormDIN(1,20)% SGgearmwormDIN(1,40)% SGgearmwormDIN(1,40,6)% SGgearmwormDIN(1,'','',2); view(-30,30);% SGgearmwormDIN(1,'','',CPLmotorshaft); view(-30,30);% % See also: PLgearrackDIN, SGgearDIN, SGgearpairDIN, SGgearrackDIN, % CPLmotorshaft% % % Copyright 2018 Tim C. Lueth
###### VLFLselectcrossingfacets(SG,T,XSG,xfull);- selects the crossing facets of a solid that is crossed by a second one
 % VLFLselectcrossingfacets(SG,T,XSG,xfull); - selects the crossing facets of a solid that is crossed by a second one% (by Tim Lueth, VLFL-Lib, 2018-OKT-21 as class: SURFACES)% % This fnctn is an optional interactive fnctn to select the potential % crossing facet of two solids (Status of: 2018-10-21)% % Introduced first in SolidGeometry 4.3% % See also: VLDLBBofVLFL, collofBBs, SGintersectFacetPoints% % CFL=VLFLselectcrossingfacets(SG,[T,XSG,xfull]);% === INPUT PARAMETERS ===% SG: Solid A% T: point or HT matrix; default==''; manual select% XSG: cube length, rectangle size, box size or Solid Geoemetry% xfull: true == full cross check not only BB of XSG; default is false;% === OUTPUT RESULTS ======% CFL: crossing facets of [SG XSG]% % EXAMPLE: % load SG_Instruments.mat% VLFLselectcrossingfacets(SG_Forceps)% VLFLselectcrossingfacets(SG_Forceps,[120 75])% VLFLselectcrossingfacets(SG_Forceps,[120 75],[40 20])% VLFLselectcrossingfacets(SGsphere(12),'',[1 50 50]);% % See also: VLDLBBofVLFL, collofBBs, SGintersectFacetPoints% % % Copyright 2018 Tim C. Lueth
###### CPLplotregions(CPL,ind)- plots the regions of a CPL / polyshape in different colors
 % CPLplotregions(CPL,ind) - plots the regions of a CPL / polyshape in different colors% (by Tim Lueth, VLFL-Lib, 2018-OKT-18 as class: CLOSED POLYGON LISTS)% % Introduced first in SolidGeometry 4.3% % See also: CPLplot, CPLplotcolors% % h=CPLplotregions(CPL,[ind])% === INPUT PARAMETERS ===% CPL: Closed polygon % ind: index of regions; default is all% === OUTPUT RESULTS ======% h: handle to graphics objects% % EXAMPLE: % SGfigure; CPLplotregions(CPLsample(14))% % See also: CPLplot, CPLplotcolors% % % Copyright 2018 Tim C. Lueth
###### CPLplotcolors(CPL,ind)- plots all contours or indexed contours in colors
 % CPLplotcolors(CPL,ind) - plots all contours or indexed contours in colors% (by Tim Lueth, VLFL-Lib, 2018-OKT-18 as class: CLOSED POLYGON LISTS)% % Introduced first in SolidGeometry 4.3% % See also: CPLplot, CPLplotregions% % h=CPLplotcolors(CPL,[ind])% === INPUT PARAMETERS ===% CPL: Closed Polygon line% ind: indizes; default is all% === OUTPUT RESULTS ======% h: handle to graphics objects% % EXAMPLE: % SGfigure; CPLplotcolors(CPLsample(12))% % See also: CPLplot, CPLplotregions% % % Copyright 2018 Tim C. Lueth
###### CPLopendistance(CPL)- returns the maximal distance between neighbor points of a contour related to the contour size
 % CPLopendistance(CPL) - returns the maximal distance between neighbor points of a contour related to the contour size% (by Tim Lueth, VLFL-Lib, 2018-OKT-18 as class: CLOSED POLYGON LISTS)% % This fnctn is designed for analyzing CPLofprocessedimage contoures or % CPLofimage contours (Status of: 2018-10-18)% % Introduced first in SolidGeometry 4.3% % See also: CPLofprocessedimage, CPLofimage% % [DP,DN]=CPLopendistance(CPL)% === INPUT PARAMETERS ===% CPL: CLosed Polygon line% === OUTPUT RESULTS ======% DP: maximum distance in relation to bb of CPL% DN: maximum distance between two points% % See also: CPLofprocessedimage, CPLofimage% % % Copyright 2018 Tim C. Lueth
###### FLofVLonsphereprojection(VL)- returns a facet list that is based on alphashape triangulation of sphere projected vertices
 % FLofVLonsphereprojection(VL) - returns a facet list that is based on alphashape triangulation of sphere projected vertices% (by Yilun Sun, VLFL-Lib, 2018-OKT-17 as class: VERTICES / CLOUDS)% % Point clouds that are recorded by a video camera create vertices that % are equidistant if they are projected on to a internal surface of a % sphere. Therefor this fnctn projects first vertices to spherical, % performs an alphashape triangulation, and returns the facets (Status % of: 2018-10-17)% % Introduced first in SolidGeometry 4.3% % See also: FLofVLnearestneighbors, FLofVLdelaunay% % [FL,PL]=FLofVLonsphereprojection(VL)% === INPUT PARAMETERS ===% VL: Vertex list / Point cloud% === OUTPUT RESULTS ======% FL: Facet list% PL: Point list [AZ EL]% % EXAMPLE: % loadweb IntelRealsense.mat; whos% FLofVLonsphereprojection(VL_D415c);% % % See also: FLofVLnearestneighbors, FLofVLdelaunay%
###### CPLofprocessedimage(I,ms,fspecial);- returns contours inside a processed image
 % CPLofprocessedimage(I,ms,fspecial); - returns contours inside a processed image% (by Tim Lueth, VLFL-Lib, 2018-OKT-17 as class: IMAGES)% % It uses finally CPL=CPLofimage(I,2); % Support: 'gaussian', 'sobel', 'prewitt', 'laplacian', 'log', 'average', % 'unsharp', 'disk', 'motion'% (Status of: 2018-10-17)% % Introduced first in SolidGeometry 4.3% % See also: fspecial, imfilter, CPLofimage% % CPL=CPLofprocessedimage(I,[ms,fspecial]);% === INPUT PARAMETERS ===% I: Image% ms: optional resize value; default is 1024; 0==unchanged% fspecial: optional filter values - see at fspecial% === OUTPUT RESULTS ======% CPL: % % EXAMPLE: % loadweb CAD_pictures.mat; imshow(CADpictservo); shg% CPLofprocessedimage(CADpictservo,'','disk',20); CPL=ans; CPL=CPL/10;% findcirclesinCPL(CPL,1)% % See also: fspecial, imfilter, CPLofimage% % % Copyright 2018 Tim C. Lueth
###### lengthNaN(CPL)- returns the length of the individiual entries of a nan separated list
 % lengthNaN(CPL) - returns the length of the individiual entries of a nan separated list% (by Tim Lueth, VLFL-Lib, 2018-OKT-16 as class: AUXILIARY PROCEDURES)% % Introduced first in SolidGeometry 4.3% % See also: selectNaN, replaceNaN, cellofNaN, separateNaN% % [l,a]=lengthNaN(CPL)% === INPUT PARAMETERS ===% CPL: nan separated list% === OUTPUT RESULTS ======% l: length of the individual segments of the nan separated list% a: starting indices% % EXAMPLE: % loadweb CAD_pictures.mat; imshow(CADpictservo);% CPLofimage(CADpictservo); CPL=ans;% selectNaN(CPL,find(lengthNan(CPL)>300));% [a,b]=lengthNaN(CPLsample(11))% % See also: selectNaN, replaceNaN, cellofNaN, separateNaN% % % Copyright 2018 Tim C. Lueth
###### imshow4(I)- Plots RGB images in 4 color segments
 % imshow4(I) - Plots RGB images in 4 color segments% (by Tim Lueth, VLFL-Lib, 2018-OKT-13 as class: AUXILIARY PROCEDURES)% % Auxiliary fnctn to understand easier the color chanels of a r x c x % chanel image (Status of: 2018-10-13)% % Introduced first in SolidGeometry 4.3% % See also: imshow% % imshow4(I)% === INPUT PARAMETERS ===% I: RGB image or grayscale% % EXAMPLE: % I=imread('peppers.png');% imshow4(I)% imshow4(imresize(I,[640 nan]))% imshow4(rgb2gray(I))% imshow4(rgb2ntsc(I))% imshow4(sum(I,3))% % See also: imshow% % % Copyright 2018 Tim C. Lueth
###### imresizep(I,maxrc)- resizes an image proportional relative to a mimum number of pixels
 % imresizep(I,maxrc) - resizes an image proportional relative to a mimum number of pixels% (by Tim Lueth, VLFL-Lib, 2018-OKT-13 as class: IMAGES)% % This fnctn is used to limit an image size before image processing to % guarantee a defined processing time. (Status of: 2018-10-17)% % Introduced first in SolidGeometry 4.3% % See also: imreadui% % I=imresizep(I,maxrc)% === INPUT PARAMETERS ===% I: Images% maxrc: maximum number of rows or cols% === OUTPUT RESULTS ======% I: resized image smaller than [maxrc x maxrc]% % EXAMPLE: % I=imread('peppers.png'); whos I% imresizep(I,480);% % See also: imreadui% % % Copyright 2018 Tim C. Lueth
###### imageofipcam(u)- returns an image of the ipcam
 % imageofipcam(u) - returns an image of the ipcam% (by Tim Lueth, VLFL-Lib, 2018-OKT-11 as class: IMAGES)% % does work with the iPhoneapp ipcam (Status of: 2018-10-11)% % Introduced first in SolidGeometry 4.3% % See also: ipcam_2014b, immeasureui, ipcam% % imageofipcam([u])% === INPUT PARAMETERS ===% u: url - used at least for the first call% % EXAMPLE: % imageofipcam('http://10.183.35.246:8020/image.jpg');% % See also: ipcam_2014b, immeasureui, ipcam% % % Copyright 2018 Tim C. Lueth
###### CPLmotorshaft(Ra,Rc,tW)- returns the CPL for a motorshaft, for instance Fischertechnik
 % CPLmotorshaft(Ra,Rc,tW) - returns the CPL for a motorshaft, for instance Fischertechnik% (by Tim Lueth, VLFL-Lib, 2018-OKT-11 as class: CLOSED POLYGON LISTS)% % the standard shape is a % Ra=Da/2; Rc=Dc-Ra (Status of: 2018-10-17)% % Introduced first in SolidGeometry 4.3% % See also: SGgearDIN, SGgearrackDIN% % PL=CPLmotorshaft([Ra,Rc,tW])% === INPUT PARAMETERS ===% Ra: Radius of the largest Diameter% Rc: Radius distance from the center to the plate% tW: turning offset in degree% === OUTPUT RESULTS ======% PL: Point List for CPL% % EXAMPLE: % CPLmotorshaft(3,2)% CPLmotorshaft(3,2,pi/2)% % See also: SGgearDIN, SGgearrackDIN% % % Copyright 2018 Tim C. Lueth
###### SGgearandrackDIN(m,z1,z2,R,h)- retunrs a gear and gear rack combination
 % SGgearandrackDIN(m,z1,z2,R,h) - retunrs a gear and gear rack combination% (by Tim Lueth, VLFL-Lib, 2018-OKT-11 as class: MODELING PROCEDURES)% % Introduced first in SolidGeometry 4.3% % See also: PLgearrackDIN, SGgearDIN, SGgearpairDIN, SGgearrackDIN, % CPLmotorshaft% % SGgearandrackDIN([m,z1,z2,R,h])% === INPUT PARAMETERS ===% m: module% z1: teeth number of gear% z2: teeth number of rack% R: bore of gear% h: height of gear and rack% % EXAMPLE: % SGgearandrackDIN(1,32,12,5,10)% SGgearandrackDIN(1,32,12,CPLmotorshaft(5,3),10)% % See also: PLgearrackDIN, SGgearDIN, SGgearpairDIN, SGgearrackDIN, % CPLmotorshaft% % % Copyright 2018 Tim C. Lueth
###### SGgearrackDIN(m,z,h0,b,tig,re)- returns a gear rack for a gear
 % SGgearrackDIN(m,z,h0,b,tig,re) - returns a gear rack for a gear% (by Tim Lueth, VLFL-Lib, 2018-OKT-11 as class: SURFACES)% % Introduced first in SolidGeometry 4.3% % See also: PLgearrackDIN, SGgearDIN, SGgearpairDIN% % SG=SGgearrackDIN([m,z,h0,b,tig,re])% === INPUT PARAMETERS ===% m: module% z: number of teeth if integer or length if real% h0: base size% b: width of rack / height of gear% tig: false = gap; true= tooth% re: rounded edges; default is false% === OUTPUT RESULTS ======% SG: Solid Geoemtry% % EXAMPLE: % SGgearrackDIN(1,5,'',5,false)% SGgearrackDIN(1,5,'',5,false,true)% % See also: PLgearrackDIN, SGgearDIN, SGgearpairDIN% % % Copyright 2018 Tim C. Lueth
###### getfuncparams(n,args,v)- processes varargin list -
 % getfuncparams(n,args,v) - processes varargin list - % (by Tim Lueth, VLFL-Lib, 2018-OKT-11 as class: AUXILIARY PROCEDURES)% % Default method to replace the macro % if nargin>=XX && ~isempty(varargin{XX}); YYY=varargin{XX}; end;% (Status of: 2018-10-11)% % Introduced first in SolidGeometry 4.3% % See also: getvarg% % nv=getfuncparams(n,args,v)% === INPUT PARAMETERS ===% n: number of parameter varargin% args: varargin% v: default value% === OUTPUT RESULTS ======% nv: value for variable% % EXAMPLE: % m=getfuncparams(1,varargin,1);% getfuncparams(1,{'a','b','c'},3)% getfuncparams(4,{'a','b','c'},3)% % % See also: getvarg% % % Copyright 2018 Tim C. Lueth
###### PLgearrackDIN(m,l,h0,tig,rem,l,h0,re)- returns a PL for gearrack
 % PLgearrackDIN(m,l,h0,tig,re,m) - returns a PL for gearrack% (by Tim Lueth, VLFL-Lib, 2018-OKT-11 as class: MECHANICAL PROCEDURES)% % Introduced first in SolidGeometry 4.3% % See also: PLgearDIN% % [PL,l,p]=PLgearrackDIN([m,l,h0,tig,re,m])% === INPUT PARAMETERS ===% m: modul% l: number of teeth if integer; maximal length if real;% h0: optional height% tig: false=tooth a origin; true=gap at origin% re: rounded edges; default is false% m: % === OUTPUT RESULTS ======% PL: Point list [ n x 3]% l: exact length% p: tooth + gap size = pi * m% % EXAMPLE: % PLgearrackDIN(1)% PLgearrackDIN(1,10)% PLgearrackDIN(1,10.001,10)% PLgearrackDIN(1,4,'',false)% PLgearrackDIN(1,4,'',true)% PLgearrackDIN(1,4,'',true,true)% % See also: PLgearDIN% % % Copyright 2018 Tim C. Lueth
###### SGgearpairDIN(m,z1,z2,h,R,d)- provides a simple gear ratio stage as Solid Geometry
 % SGgearpairDIN(m,z1,z2,h,R,d) - provides a simple gear ratio stage as Solid Geometry% (by Tim Lueth, VLFL-Lib, 2018-OKT-08 as class: MECHANICAL PROCEDURES)% % Introduced first in SolidGeometry 4.3% % See also: PLgear, PLgearDIN, SGgearDIN, SGspurgear, VLFLgear, % VLFLgearhub4shaft, VLFLinternalgear% % [SG1,SG2,SG3,SG4]=SGgearpairDIN([m,z1,z2,h,R,d])% === INPUT PARAMETERS ===% m: modules% z1: number of teeth 1% z2: number of teeth 1% h: height of the gear% R: radius of axle% d: height of the bearing% === OUTPUT RESULTS ======% SG1: Gear 1% SG2: Gear 2% SG3: Bearing 1% SG4: Bearing Top% % EXAMPLE: % SGgearpairDIN(1,32,16,5);% % See also: PLgear, PLgearDIN, SGgearDIN, SGspurgear, VLFLgear, % VLFLgearhub4shaft, VLFLinternalgear% % % Copyright 2018 Tim C. Lueth
###### SGgearDIN(m,z,R,h,tig)- Calculate a gear with the count from 9.12 to 48; for internal and external gears
 % SGgearDIN(m,z,R,h,tig) - Calculate a gear with the count from 9.12 to 48; for internal and external gears% (by Tim Lueth, VLFL-Lib, 2018-OKT-08 as class: MECHANICAL PROCEDURES)% % There is much more precise modelling by Yannick Krieger and Matthias % Traeger.% (Status of: 2018-10-09)% % Introduced first in SolidGeometry 4.3% % See also: PLgear, PLgearDIN, SGgearpairDIN, SGspurgear, VLFLgear, % VLFLgearhub4shaft, VLFLinternalgear% % SG=SGgearDIN([m,z,R,h,tig])% === INPUT PARAMETERS ===% m: modul; negativ values for internal gears% z: number of teeth% R: radius for a shaft/axle or CPL for inner contour% h: height of the gear% tig: 0/1 for the position if the first tooth at zeros degree% === OUTPUT RESULTS ======% SG: Solid Geometry% % EXAMPLE: % SGgearDIN (+1,26)% SGgearDIN (+1,26,3)% SGgearDIN (+1,26,CPLofmotorshaft)% SGgearDIN (-1,26)% SGgearDIN (+1,26,'','',1)% SGgearDIN (+1,26,'','',0)% % See also: PLgear, PLgearDIN, SGgearpairDIN, SGspurgear, VLFLgear, % VLFLgearhub4shaft, VLFLinternalgear% % % Copyright 2018 Tim C. Lueth
###### TplanesofVLFLfacets(VL,FL)- returns the HT matrices for the facets from center and normal
 % TplanesofVLFLfacets(VL,FL) - returns the HT matrices for the facets from center and normal% (by Tim Lueth, VLFL-Lib, 2018-OKT-08 as class: ANALYTICAL GEOMETRY)% % This fnctn calculates the center of each facet and the normal and % creates % a HT matrix for the center point and a% Vertex facet list from the center and a larger edge length (Status of: % 2018-10-08)% % Introduced first in SolidGeometry 4.3% % See also: TplanesofPCnormals% % [T,DVL,DFL]=TplanesofVLFLfacets(VL,FL)% === INPUT PARAMETERS ===% VL: Vertex list or Solid Geometry% FL: Facet list% === OUTPUT RESULTS ======% T: cell list of transformation matrices% DVL: Triangle vertex list% DFL: fTriangle vertex listacet list% % EXAMPLE: % loadweb IntelRealsense.mat % loads vertex lists from RS300 and RS415% VLdownsample(VL_D415a,30); NVL=ans; whos('VL_D415a'), whos ('NVL')% TplanesofVLFLfacets(NVL,FL)% % See also: TplanesofPCnormals% % % Copyright 2018 Tim C. Lueth
###### TplanesofPCnormals(pc)- returns the HT matrices for the points and normals
 % TplanesofPCnormals(pc) - returns the HT matrices for the points and normals% (by Tim Lueth, VLFL-Lib, 2018-OKT-08 as class: ANALYTICAL GEOMETRY)% % in fact this fnctn makes quite clear that the vertex normals of a point % cloud are all oriented into the center of the origin (Status of: % 2018-10-08)% % Introduced first in SolidGeometry 4.3% % See also: TplanesofVLFLfacets% % [T,DVL,FL]=TplanesofPCnormals(pc)% === INPUT PARAMETERS ===% pc: point cloud or vertex list% === OUTPUT RESULTS ======% T: cell list of transformation matrices% DVL: Triangle vertex list% FL: facet list% % EXAMPLE: % loadweb IntelRealsense.mat % loads vertex lists from RS300 and RS415% VLdownsample(VL_D415a,30); NVL=ans; whos('VL_D415a'), whos ('NVL')% TplanesofPCnormals(NVL)% % See also: TplanesofVLFLfacets% % % Copyright 2018 Tim C. Lueth
###### CPLofPLalphashape(PL,)- returns a closed polygon contour around a point list using alphashape
 % CPLofPLalphashape(PL,) - returns a closed polygon contour around a point list using alphashape% (by Tim Lueth, VLFL-Lib, 2018-OKT-08 as class: SURFACES)% % same as PLFLofPLalphashape (Status of: 2018-10-08)% % Introduced first in SolidGeometry 4.3% % See also: PLFLofPLalphashape% % [CPL,PL,FL,EL,CEL]=CPLofPLalphashape(PL,[])% === INPUT PARAMETERS ===% PL: Original Point cloud% === OUTPUT RESULTS ======% CPL: Closed Polygon List of contour (endpoint=startpoint)% PL: Point list (doubled entries removed)% FL: Facet List% EL: Edge list of free boundary sorted% CEL: Contour index list% % EXAMPLE: % pc=PCofSG(SGsample(25),30000); PL=pc.Location(:,1:2);% CPLofPLalphashape(PL);% % See also: PLFLofPLalphashape% % % Copyright 2018 Tim C. Lueth
###### VLdownsample(VL,gs,ongrid)- returns a downsampled vertex list
 % VLdownsample(VL,gs,ongrid) - returns a downsampled vertex list% (by Tim Lueth, VLFL-Lib, 2018-OKT-08 as class: SR300)% % Introduced first in SolidGeometry 4.3% % See also: pcdownsample, unique% % [NVL,a,b]=VLdownsample(VL,[gs,ongrid])% === INPUT PARAMETERS ===% VL: Vertex list% gs: grid size; default is 1 percent (100x100x100) = 10000% ongrid: 'grid','mean','stable','first','last'% === OUTPUT RESULTS ======% NVL: New vertex list% a: selection index of VL% b: mapping index of VL% % EXAMPLE: % loadweb IntelRealsense.mat% VLdownsample(VL_D415a); NVL=ans; whos('VL_D415a'), whos ('NVL')% % See also: pcdownsample, unique% % % Copyright 2018 Tim C. Lueth
###### PCfindNearestNeighbors(pc,ind,nr,al)- returns for a pointcloud a list of direct neighbors, distances and areas
 % PCfindNearestNeighbors(pc,ind,nr,al) - returns for a pointcloud a list of direct neighbors, distances and areas% (by Tim Lueth, VLFL-Lib, 2018-OKT-08 as class: SR300)% % Since the nearest neighbor search is time consuming, it makes sense to % reduce the number of points to less than 10000. % uses findNearestNeighbors from class pointCLoud. (Status of: 2018-10-08)% % Introduced first in SolidGeometry 4.3% % See also: findNearestNeighbors% % [NIL,DIL,OA,AL,pc]=PCfindNearestNeighbors(pc,[ind,nr,al])% === INPUT PARAMETERS ===% pc: point cloud or vertex list% ind: indices' default is all% nr: number of neighbors; default is 3% al: minimal angle for triangles; default is zero% === OUTPUT RESULTS ======% NIL: Neighbor index list [n x nr] = Facet list for nr==3% DIL: Neighbor distance list [n x nr]% OA: point cloud% AL: Area list% pc: point cloud% % EXAMPLE: % loadweb IntelRealsense.mat % loads vertex lists from RS300 and RS415% VLdownsample(VL_D415a); NVL=ans; whos('VL_D415a'), whos ('NVL')% PCfindNearestNeighbors(NVL);% % See also: findNearestNeighbors% % % Copyright 2018 Tim C. Lueth
###### planedistanceofT(T,VL)- returns the distance of a vertex list to a plane in HT coordinate form
 % planedistanceofT(T,VL) - returns the distance of a vertex list to a plane in HT coordinate form% (by Tim Lueth, VLFL-Lib, 2018-OKT-07 as class: ANALYTICAL GEOMETRY)% % high speed fnctn% In contrast to distT, this fnctn returns only the distance value % (Status of: 2018-10-07)% % Introduced first in SolidGeometry 4.3% % See also: distE, distT% % D=planedistanceofT(T,VL)% === INPUT PARAMETERS ===% T: Transformationmatrix 4x4% VL: Vertex list% === OUTPUT RESULTS ======% D: Distance vector % % EXAMPLE: % VL=rand(10,3), planedistanceofT(TofR(rot(0,pi/2,0)),VL)% % % See also: distE, distT% % % Copyright 2018 Tim C. Lueth
###### PLFLofPLalphashape(PL,r)- returns a facet list from a point list using alphashape
 % PLFLofPLalphashape(PL,r) - returns a facet list from a point list using alphashape% (by Tim Lueth, VLFL-Lib, 2018-OKT-07 as class: SURFACES)% % This fnctn is helpful to % creates a closed surface from a point list (Status of: 2018-10-08)% % Introduced first in SolidGeometry 4.3% % See also: CPLofPLalphashape% % [PL,FL,CPL,EL,CEL]=PLFLofPLalphashape(PL,[r])% === INPUT PARAMETERS ===% PL: Original Point cloud% r: optional radius for alphashape triangulation% === OUTPUT RESULTS ======% PL: Point list (doubled entries removed)% FL: Facet List% CPL: Closed Polygon List of contour (endpoint=startpoint)% EL: Edge list of free boundary sorted% CEL: Contour index list% % EXAMPLE: % pc=PCofSG(SGsample(25),30000); PL=pc.Location(:,1:2);% PLFLofPLalphashape(PL);% % See also: CPLofPLalphashape% % % Copyright 2018 Tim C. Lueth
###### imageofgca(h,rs)- returns the image snapshot of the currect gca
 % imageofgca(h,rs) - returns the image snapshot of the currect gca% (by Tim Lueth, VLFL-Lib, 2018-OKT-05 as class: VISUALIZATION)% % similar to I=getframe(gca); (Status of: 2018-10-07)% % Introduced first in SolidGeometry 4.3% % See also: getframe% % I=imageofgca([h,rs])% === INPUT PARAMETERS ===% h: optional different handle than gca such as gcf% rs: resize parameter, see imresize% === OUTPUT RESULTS ======% I: Image of gca% % EXAMPLE: % SGsample(25);% imageofgca; I=ans; whos I% % See also: getframe% % % Copyright 2018 Tim C. Lueth
###### PCofSG(SG,nmax,vgrid,vnoise)- returns a point cloud from a SG with defined number of points and noise
 % PCofSG(SG,nmax,vgrid,vnoise) - returns a point cloud from a SG with defined number of points and noise% (by Tim Lueth, VLFL-Lib, 2018-OKT-04 as class: SR300)% % This recursive fnctns aborts if there is no change to create more % points. % To speed up this recursive procedure set vgrid to zero, other wise a % distribution of vgrid is tried.% The sample points are created using VLFLaddfacetcenterpoints.% % could be improved by an addition view point vector to use only facets % that can be seen from a view points (Status of: 2018-10-04)% % Introduced first in SolidGeometry 4.3% % See also: VLFLaddfacetcenterpoints% % [pc,NL]=PCofSG(SG,[nmax,vgrid,vnoise])% === INPUT PARAMETERS ===% SG: Solid Geometry% nmax: expected number of points; default is 30000% vgrid: grid size; defaults is 1/100 of sofBB; quick response with 0% vnoise: vertex noise in percent! 1 == 1/100 of sofBB; default is 0;% === OUTPUT RESULTS ======% pc: point cloud% NL: normal vector list of point cloud% % EXAMPLE: % PCofSG(SGbox([30,20,10]),3000);% PCofSG(SGsample(25),3000);% % % See also: VLFLaddfacetcenterpoints% % % Copyright 2018 Tim C. Lueth
 % VLFLaddfacetcenterpoints(VL,FL,nn); - creates additional vertices in the middle of each facet% (by Tim Lueth, VLFL-Lib, 2018-OKT-03 as class: SURFACES)% % the number of facets is length(FL)*3% the number of vertices is length(VL) + length(FL)*3% (Status of: 2018-10-04)% % Introduced first in SolidGeometry 4.3% % See also: PCofSG% % [NVL,NFL]=VLFLaddfacetcenterpoints(VL,FL,[nn]);% === INPUT PARAMETERS ===% VL: vertex list% FL: facet list% nn: recursive number of calls; default is 1% === OUTPUT RESULTS ======% NVL: New vertex list% NFL: New facet list% % EXAMPLE: % A=SGbox([30,20,10]); VL=A.VL; FL=A.FL;% VLFLaddfacetcenterpoints(VL,FL);% VLFLaddfacetcenterpoints(VL,FL,5);% % % See also: PCofSG% % % Copyright 2018 Tim C. Lueth
###### iconfilesearch(sterm)- searches and shows in the original matlab directories for icon files that contain a string term
 % iconfilesearch(sterm) - searches and shows in the original matlab directories for icon files that contain a string term% (by Tim Lueth, VLFL-Lib, 2018-OKT-03 as class: USER INTERFACE)% % Introduced first in SolidGeometry 4.3% % See also: uibuttongroup, uicontrol, SGfiguretopbuttons, % SGfigureleftbuttons% % fn=iconfilesearch([sterm])% === INPUT PARAMETERS ===% sterm: search term of cell list of icon files % === OUTPUT RESULTS ======% fn: list of files within the matlab directory% % EXAMPLE: iconfilesearch('open'); fnames=ans% iconfilesearch(fnames)% iconfilesearch; a=ans% iconfilesearch(a,'stop')% % % See also: uibuttongroup, uicontrol, SGfiguretopbuttons, % SGfigureleftbuttons% % % Copyright 2018 Tim C. Lueth
###### PCofVL(VL)- returns a points cloud including NL from Vertex List
 % PCofVL(VL) - returns a points cloud including NL from Vertex List% (by Tim Lueth, VLFL-Lib, 2018-OKT-02 as class: SR300)% % Introduced first in SolidGeometry 4.3% % See also: PCofVL, PCplot, PCfindplanes% % pc=PCofVL(VL)% === INPUT PARAMETERS ===% VL: Vertex list% === OUTPUT RESULTS ======% pc: point cloud including normals% % EXAMPLE: % loadweb ('AAruffo_surf.mat'); pc=PCofVL(SG1.VL);% % See also: PCofVL, PCplot, PCfindplanes% % % Copyright 2018 Tim C. Lueth
###### PCplot(PC)- plots a point cloud or a cell list of point clouds without any registration
 % PCplot(PC) - plots a point cloud or a cell list of point clouds without any registration% (by Tim Lueth, VLFL-Lib, 2018-OKT-01 as class: SR300)% % Introduced first in SolidGeometry 4.3% % See also: PCofVL, PCfindplanes% % PCplot(PC)% === INPUT PARAMETERS ===% PC: cell list of point clouds% % EXAMPLE: % SR300getPointclouds(10); PC=ans;% PCplot(PC)% % See also: PCofVL, PCfindplanes% % % Copyright 2018 Tim C. Lueth
###### SGfiguretopbuttons(nrx,callback,bstyle,icfile,bsize,tiptext)- creates a button row in the current figure
 % SGfiguretopbuttons(nrx,callback,bstyle,icfile,bsize,tiptext) - creates a button row in the current figure% (by Alexandra Mercader, VLFL-Lib, 2018-OKT-01 as class: USER INTERFACE)% % The fnctn is based on the concept of uibuttongroup and uicontrol. It % supports the% 'Style', % 'CData', % 'Callback'% 'Tooltip'% % (Status of: 2018-10-01)% % See also: uibuttongroup, uicontrol% % [hf]=SGfiguretopbuttons(nrx,[callback,bstyle,icfile,bsize,tiptext])% === INPUT PARAMETERS ===% nrx: Nr of the % callback: desired fnctn to call if pressed; default is 'beep'% bstyle: button style; default is 'pushbutton'% icfile: icon file or text% bsize: button size% tiptext: description text at tool tip% === OUTPUT RESULTS ======% [hf]: % % EXAMPLE: % SGfigure; % SGfiguretopbuttons(1:3,'','','test',100,'helptext');% SGfiguretopbuttons(2,'','','warning.gif',100,'Makes Beep');% % See also: uibuttongroup, uicontrol%
###### PCfindplanes(PC)- EXPERIMENT TO SHOW THE PLANES IN AN IMAGE
 % PCfindplanes(PC) - EXPERIMENT TO SHOW THE PLANES IN AN IMAGE% (by Tim Lueth, VLFL-Lib, 2018-SEP-26 as class: EXPERIMENTS)% % Introduced first in SolidGeometry 4.3% % See also: PCofVL, PCplot% % PCfindplanes(PC)% === INPUT PARAMETERS ===% PC: % % See also: PCofVL, PCplot% % % Copyright 2018 Tim C. Lueth
###### SR300getVLFL(zl)- returns a surface from the surface camera
 % SR300getVLFL(zl) - returns a surface from the surface camera% (by Tim Lueth, VLFL-Lib, 2018-SEP-26 as class: SR300)% % Introduced first in SolidGeometry 4.3% % See also: SR300install, SR300stop, SR300start, SR300depthimage, % SR300videoimage, SR300allimages, SR300getVL% % SG=SR300getVLFL([zl])% === INPUT PARAMETERS ===% zl: zlimitation; default is 400% === OUTPUT RESULTS ======% SG: Struct with vertices VL and Facets FL% % EXAMPLE: % SR300getVLFL; SG=ans;% SGfigure; SGplot(SG); view(-180,-90); % % See also: SR300install, SR300stop, SR300start, SR300depthimage, % SR300videoimage, SR300allimages, SR300getVL% % % Copyright 2018 Tim C. Lueth
###### bplot(VL,bs,)- plots grid boxes at a desired position
 % bplot(VL,bs,) - plots grid boxes at a desired position% (by Tim Lueth, VLFL-Lib, 2018-SEP-25 as class: VISUALIZATION)% % Introduced first in SolidGeometry 4.3% % See also: aplot, pplot, lplot, tfplot, tlplot, slplot, plotTP, plotL, % plotT, T2Plot, textP, textT, textVL% % h=bplot(VL,bs,[])% === INPUT PARAMETERS ===% VL: Vertex list% bs: Box size% === OUTPUT RESULTS ======% h: handle to graphics object% % EXAMPLE: % SGfigure; h=bplot([0 0 0],20,'m--',2); view(-30,30); pause(1); delete(h)% VL=rand(10,3)*100; h=bplot(VL,20,'m--',2); view(-30,30);% % See also: aplot, pplot, lplot, tfplot, tlplot, slplot, plotTP, plotL, % plotT, T2Plot, textP, textT, textVL% % % Copyright 2018 Tim C. Lueth
###### VMofVL(VL,res)- returns a Voxel model from a vertex list
 % VMofVL(VL,res) - returns a Voxel model from a vertex list% (by Tim Lueth, VLFL-Lib, 2018-SEP-24 as class: VOXELS)% % Introduced first in SolidGeometry 4.3% % See also: VLofVM, SGofVMdelaunay, SGofVMisosurface, SGofVMmarchcube% % [VM,vs,SG]=VMofVL(VL,[res])% === INPUT PARAMETERS ===% VL: Vertex list% res: Optional resolution; default is 2m% === OUTPUT RESULTS ======% VM: Voxel model% vs: size of voxel% SG: optional Solid Geometry% % EXAMPLE: % SR300getVL; VL=ans; SGfigure; VLplot(VL,'.'); view(0,-90);% [a,b,c]=VMofVL(VL,5);% SGc=SGsurfaces(c);% for i=1:length(SGc); A(i)=SGarea(SGc{i}); end; Asum=sum(A); m=find(A==max(A))% SGfigure; SGplot(SGc{m});% % See also: VLofVM, SGofVMdelaunay, SGofVMisosurface, SGofVMmarchcube% % % Copyright 2018 Tim C. Lueth
###### figurerotate (mtime,angle)- rotates the current figure to show 3D effects
 % figurerotate (mtime,angle) - rotates the current figure to show 3D effects% (by Tim Lueth, VLFL-Lib, 2018-SEP-24 as class: VISUALIZATION)% % by slowly rotation surfaces, even 2D surface are seen as 3D surfaces % (Status of: 2018-09-24)% % Introduced first in SolidGeometry 4.3% % See also: SGfigurevideo, SGfiguremovie% % figurerotate([mtime,angle])% === INPUT PARAMETERS ===% mtime: minimal rotation time; default is 1% angle: rotation angle; default is 5 degree% % EXAMPLE: % SGfigure(SGbox(3)); % Show a simple box% figurerotate(5) % rotate for 5 seconds% % % See also: SGfigurevideo, SGfiguremovie% % % Copyright 2018 Tim C. Lueth
###### SR300allimages- returns a depth image 640x480 from the IntelRealSense300 camera
 % SR300allimages - returns a depth image 640x480 from the IntelRealSense300 camera% (by Tim Lueth, VLFL-Lib, 2018-SEP-24 as class: SR300)% % The IntelRealSense300 is very sensitive to bright ambient light and % 50Hz fluctuations in ambient light. Dark ambient light is better than % bright ambient light. (Status of: 2018-09-24)% % Introduced first in SolidGeometry 4.3% % See also: SR300install, SR300stop, SR300start, SR300depthimage, % SR300videoimage, SR300getVL% % [vimg,dimg,VL]=SR300allimages% === OUTPUT RESULTS ======% vimg: 1920 x 1080 x uint3 - color image% dimg: 640x 480 x 3 uint8 - depth image% VL: Vertex List of surface points - [n x 3]% % EXAMPLE: % SR300start% SR300allimages; [a,b,c]=SR300allimages; whos a, whos b , whos c% VLmindist(c); view(-90,-90); VLplot(VL,'r.');% % See also: SR300install, SR300stop, SR300start, SR300depthimage, % SR300videoimage, SR300getVL% % % Copyright 2018 Tim C. Lueth
###### SR300videoimage- returns a video image 1920x1080 from the IntelRealSense300 camera
 % SR300videoimage - returns a video image 1920x1080 from the IntelRealSense300 camera% (by Tim Lueth, VLFL-Lib, 2018-SEP-23 as class: SR300)% % The IntelRealSense300 is very sensitive to bright ambient light and % 50Hz fluctuations in ambient light. Dark ambient light is better than % bright ambient light. (Status of: 2018-09-24)% % Introduced first in SolidGeometry 4.3% % See also: SR300install, SR300stop, SR300start, SR300depthimage, % SR300allimages, SR300getVL% % [img,data]=SR300videoimage% === OUTPUT RESULTS ======% img: 920x1080x3 uint8 % data: original data of the camera% % EXAMPLE: % SR300start% SR300videoimage; a=ans; whos a, tic, b=imresize(a,[480,640]); toc, whos b% imshow(rot90(b,-1))% % See also: SR300install, SR300stop, SR300start, SR300depthimage, % SR300allimages, SR300getVL% % % Copyright 2018 Tim C. Lueth
###### SR300stop- initializes the Intel RealSense 300 Scanner and creates a global struct IntelRealSense300
 % SR300stop - initializes the Intel RealSense 300 Scanner and creates a global struct IntelRealSense300% (by Tim Lueth, VLFL-Lib, 2018-SEP-23 as class: SR300)% % Stops the pipline of global struct named: IntelRealSense300% (Status of: 2018-09-24)% % Introduced first in SolidGeometry 4.3% % See also: SR300install, SR300start, SR300depthimage, SR300videoimage, % SR300allimages, SR300getVL% % SR300stop% % EXAMPLE: % SR300start;% SR300depthimage;% SR300stop;% SR300stop;% % See also: SR300install, SR300start, SR300depthimage, SR300videoimage, % SR300allimages, SR300getVL% % % Copyright 2018 Tim C. Lueth
###### matlabtoolboxdir- returns the default matlab add-on toolbox directory
 % matlabtoolboxdir - returns the default matlab add-on toolbox directory% (by Tim Lueth, VLFL-Lib, 2018-SEP-23 as class: FILE HANDLING)% % On mac: '/Users/lueth/Documents/MATLAB/Add-Ons/Toolboxes/'% (Status of: 2018-09-23)% % Introduced first in SolidGeometry 4.3% % See also: desktopdir, pcodedirTL, smbFilename, smbPSLibname, workdir, % expname, matlabdir% % mldir=matlabtoolboxdir% === OUTPUT RESULTS ======% mldir: default user matlab add-on toolbox directory% % EXAMPLE: % matlabtoolboxdir, dir (matlabtoolboxdir)% % See also: desktopdir, pcodedirTL, smbFilename, smbPSLibname, workdir, % expname, matlabdir% % % Copyright 2018 Tim C. Lueth
###### matlabdir- returns the default matlab directory that is also used for custom toolboxes
 % matlabdir - returns the default matlab directory that is also used for custom toolboxes% (by Tim Lueth, VLFL-Lib, 2018-SEP-23 as class: FILE HANDLING)% % On mac: '/Users/lueth/Documents/MATLAB/'% (Status of: 2018-09-23)% % Introduced first in SolidGeometry 4.3% % See also: desktopdir, pcodedirTL, smbFilename, smbPSLibname, workdir, % expname, matlabtoolboxdir% % mldir=matlabdir% === OUTPUT RESULTS ======% mldir: default user matlab directory% % EXAMPLE: % matlabdir, dir (matlabdir)% % See also: desktopdir, pcodedirTL, smbFilename, smbPSLibname, workdir, % expname, matlabtoolboxdir% % % Copyright 2018 Tim C. Lueth
###### SR300depthimage- returns a depth image 640x480 from the IntelRealSense300 camera
 % SR300depthimage - returns a depth image 640x480 from the IntelRealSense300 camera% (by Tim Lueth, VLFL-Lib, 2018-SEP-22 as class: SR300)% % The IntelRealSense300 is very sensitive to bright ambient light and % 50Hz fluctuations in ambient light. Dark ambient light is better than % bright ambient light. (Status of: 2018-09-24)% % Introduced first in SolidGeometry 4.3% % See also: SR300install, SR300stop, SR300start, SR300videoimage, % SR300allimages, SR300getVL% % [img,data]=SR300depthimage% === OUTPUT RESULTS ======% img: 480x640x3 uint8% data: original data of the camera% % EXAMPLE: % SR300start% SR300depthimage% [I,d]=SR300depthimage; whos I, whos d% imshow(SR300depthimage);% % See also: SR300install, SR300stop, SR300start, SR300videoimage, % SR300allimages, SR300getVL% % % Copyright 2018 Tim C. Lueth
###### SR300start- initializes the Intel RealSense 300 Scanner and creates a global struct IntelRealSense300
 % SR300start - initializes the Intel RealSense 300 Scanner and creates a global struct IntelRealSense300% (by Samuel Detzel, VLFL-Lib, 2018-SEP-17 as class: SR300)% % (Takes at least 3 seconds!)% This fnctn uses the "librealsense2 class library" developed by by Lior % Ramati, lior.ramati@intel.com, which was downloaded from % https://github.com/IntelRealSense/librealsense in September 2018.% Some additional required file for simple Matlab inetgration on % PC/MAC/Linux were added by Samuel Detzel and Christian Dietz at TU % Munich. The complete package can be downloaded by the command % SR3300install which is located at matlab crentral.% The classe library is located in the directory +realsense. % The global variable is named: IntelRealSense300% (Status of: 2018-09-24)% % See also: SR300install, SR300stop, SR300depthimage, SR300videoimage, % SR300allimages, SR300getVL% % SR300start% % EXAMPLE: % SR300start% SR300getVL% VL=SR300getVL; SGfigure; VLplot(VL,'.'); view(0,-90); % SGfiguremovie% SGofVLalphaShape(VL,5)% % See also: SR300install, SR300stop, SR300depthimage, SR300videoimage, % SR300allimages, SR300getVL%
###### SR300getVL(zlim)- return a VL of the currect Realsesen
 % SR300getVL(zlim) - return a VL of the currect Realsesen% (by Samuel Detzel and Tim Lueth, VLFL-Lib, 2018-SEP-17 as class: SR300)% % Introduced first in SolidGeometry 4.3% % See also: SR300install, SR300stop, SR300start, SR300depthimage, % SR300videoimage, SR300allimages% % [VL,VLA]=SR300getVL([zlim])% === INPUT PARAMETERS ===% zlim: depth limit for taken z values% === OUTPUT RESULTS ======% VL: Vertex List of selected depth% VLA: Complete Vertex List% % EXAMPLE: % SR300start% SR300getVL% VL=SR300getVL; SGfigure; VLplot(VL,'.'); view(0,-90); % SGfiguremovie% SGofVLalphaShape(VL,5)% % See also: SR300install, SR300stop, SR300start, SR300depthimage, % SR300videoimage, SR300allimages% % % Copyright 2018 Tim C. Lueth
###### togglefig- toggels the position of the current SGfigure
 % togglefig - toggels the position of the current SGfigure% (by Tim Lueth, VLFL-Lib, 2018-SEP-15 as class: VISUALIZATION)% % moves a figure by the first call to a default position and at second % back to the original position (Status of: 2018-09-15)% % Introduced first in SolidGeometry 4.3% % See also: SGfigure, copyfig, SGfigureannotation, SGfiguremovie, subfig% % togglefig% % EXAMPLE: % SGfigure; set (gcf,'Position',[100 200 300 400]);% togglefig; pause(1); togglefig; pause(1); togglefig% % See also: SGfigure, copyfig, SGfigureannotation, SGfiguremovie, subfig% % % Copyright 2018 Tim C. Lueth
###### camlightTL- deletes all camlights and set three new
 % camlightTL - deletes all camlights and set three new % (by Tim Lueth, VLFL-Lib, 2018-SEP-15 as class: VISUALIZATION)% % % camlight('headlight','infinite'); ...% camlight('right','infinite');...% camlight('left','infinite');]; (Status of: 2018-09-15)% % Introduced first in SolidGeometry 4.3% % See also: camlightTL, camplot, camset, selectCameraPosition, showcam, % tcamera, Tofcam, TofcamVLPL, VLFLcamlight% % h=camlightTL% === OUTPUT RESULTS ======% h: handle to three camlights% % EXAMPLE: % SGfigure; SGplot(SGbox(4)); view(-30,30);% camlightTL% % See also: camlightTL, camplot, camset, selectCameraPosition, showcam, % tcamera, Tofcam, TofcamVLPL, VLFLcamlight% % % Copyright 2018 Tim C. Lueth
###### VLFLcheckselfintersection(VL,FL,csep)- checks an returns the number of self intersecting facets
 % VLFLcheckselfintersection(VL,FL,csep) - checks an returns the number of self intersecting facets% (by Tim Lueth, VLFL-Lib, 2018-SEP-14 as class: CHECKING PROCEDURES)% % Introduced first in SolidGeometry 4.3% % See also: VLFLchecknonmanifoldedges, VLFLchecknonmanifoldvertices, % VLFLcheckmeshlab, VLofVLFLselfIntersection% % [n,d]=VLFLcheckselfintersection(VL,FL,[csep])% === INPUT PARAMETERS ===% VL: Vertex list or SG% FL: Facet List % csep: separate solids before check {true,false}; default is false% === OUTPUT RESULTS ======% n: number of facets% d: facets list% % EXAMPLE: % VLFLcheckselfintersection(SGsample(36))% VLofVLFLselfIntersection(SGsample(17),'',true)% VLofVLFLselfIntersection(SGsample(17),'',false)% % See also: VLFLchecknonmanifoldedges, VLFLchecknonmanifoldvertices, % VLFLcheckmeshlab, VLofVLFLselfIntersection% % % Copyright 2018 Tim C. Lueth
###### ismemberFL(FLA,FLB)- returns ismember for all three possibilities of a facet list
 % ismemberFL(FLA,FLB) - returns ismember for all three possibilities of a facet list% (by Tim Lueth, VLFL-Lib, 2018-SEP-14 as class: EDGE LISTS)% % % % (Status of: 2018-09-14)% % Introduced first in SolidGeometry 4.3% % See also: ismember, ismembertol% % im=ismemberFL(FLA,FLB)% === INPUT PARAMETERS ===% FLA: Facet List A% FLB: Facet List B% === OUTPUT RESULTS ======% im: ismember result % % EXAMPLE: % FLA=[1 2 3; 4 5 6; 7 8 9]; FLB=[2 3 1; 6 5 4; 9 7 8]; % ismemberFL(FLA,FLB)% % See also: ismember, ismembertol% % % Copyright 2018 Tim C. Lueth
###### VLNLplot(VL,NL,vi,c,w)- plots a normal vector list at a vertex list
 % VLNLplot(VL,NL,vi,c,w) - plots a normal vector list at a vertex list% (by Tim Lueth, VLFL-Lib, 2018-SEP-13 as class: ANALYTICAL GEOMETRY)% % Introduced first in SolidGeometry 4.3% % See also: VLplot, VLELplot, VLELplots, VLplotmotion, VLFLplot, % VLFLplotfacets, PLplot, PLELplot, CVLplot, CVLplots% % h=VLNLplot(VL,NL,[vi,c,w])% === INPUT PARAMETERS ===% VL: Vertex list% NL: Normal vector list% vi: optional index selector% c: optional color and line% w: optional line thickness% === OUTPUT RESULTS ======% h: handle to plot% % EXAMPLE: % A=SGsample(5); NL=VLFLvertexNormal(A); SGfigure; VLNLplot(A.VL,NL); view(-30,30)% VL=rand(100,3)*10; NL=rand(100,3); SGfigure; h=VLNLplot(VL,NL,1:10,'m.-',1)% % See also: VLplot, VLELplot, VLELplots, VLplotmotion, VLFLplot, % VLFLplotfacets, PLplot, PLELplot, CVLplot, CVLplots% % % Copyright 2018 Tim C. Lueth
###### VLFLsmoothboundary(VL,FL,al,lr,al2,be)- creates facets to smoothen or closing open boundaries without adding points
 % VLFLsmoothboundary(VL,FL,al,lr,al2,be) - creates facets to smoothen or closing open boundaries without adding points% (by Tim Lueth, VLFL-Lib, 2018-SEP-12 as class: SURFACES)% % This fnctn is a recursive fnctn with valuable parameters. % First Parameter 'al' is the bend angle of two edges at a corner point. % al' indicates which is the minimum bend angle at which two edges may be % closed by a triangle. If the angle is small, almost straight lines are % closed by a surface. % The second parameter "lr" excludes triangles when closing, if the edge % lengths do not correspond to special criteria. "lr" specifies the % maximum length ratio of the two legs of a triangle that may still be % closed. If "lr" is less than zero, abs(lr) is the absolute maximum % length of the trough in millimeters. If "lr" is exactly zero, then the % longer of the two legs must not exceed the mean value of all triangular % distances (automatic mode).% The third parameter 'al2' also restricts the triangles to be closed. % Triangles with too little kink angle are not closed if the knee angle % is smaller than 'al2'.% The fourth parameter "be" also restricts the triangles to be closed. It % defines the surface angle difference, i.e. the orientation of the % surface relative to the already existing surfaces. The larger the angle % "be" is, the straighter the triangle walls are which are still allowed % to close. If "be" > pi/1.5 is selected, there are almost only straight % edges left. If "be" is ~ pi/2, then edges with surfaces can be closed % at right angles.% (Status of: 2018-09-15)% % Introduced first in SolidGeometry 4.3% % See also: VLFLremoveIntersectFacets% % [FL,NFL]=VLFLsmoothboundary(VL,FL,[al,lr,al2,be])% === INPUT PARAMETERS ===% VL: Vertex list% FL: Facet list% al: closing if edge angle is > al; default is pi/4% lr: leg length maximum ratio; default is 1.5 % al2: minimal angle value for closing; default is 0;% be: required distance angle to parallel walls% === OUTPUT RESULTS ======% FL: List of old and appended new facets% NFL: List of New facets% % EXAMPLE: % loadweb AAruffo_surf.mat % load some surface data sets% A=SG1; VLFLsmoothboundary(A.VL,A.FL);% A=SG1; VLFLsmoothboundary(A.VL,A.FL,0.01,1000,0,0); % Close all angles - too simple approach% A=SG1; VLFLsmoothboundary(A.VL,A.FL,0.01,1000,0,pi/1.3); % Close all angles if walls are straight% A=SG1; VLFLsmoothboundary(A.VL,A.FL,0.01,0,0,pi/1.3); % Close angles of similar size/wall straight% A=SG1; VLFLsmoothboundary(A.VL,A.FL,0,0,0.5,pi/1.3); % Avoid closing straight lines% A=SG1; VLFLsmoothboundary(A.VL,A.FL,0,-10,0.5,pi/1.3); % Close up tom 10mm leg length% % See also: VLFLremoveIntersectFacets% % % Copyright 2018 Tim C. Lueth
###### finddoubledrows(VL)- returns the indices of the lines with copies of a earlier row
 % finddoubledrows(VL) - returns the indices of the lines with copies of a earlier row% (by Tim Lueth, VLFL-Lib, 2018-SEP-11 as class: AUXILIARY PROCEDURES)% % Introduced first in SolidGeometry 4.3% % See also: flipvar% % c=finddoubledrows(VL)% === INPUT PARAMETERS ===% VL: list of rows% === OUTPUT RESULTS ======% c: indices of the second, third, and so on, occur to be removed% % EXAMPLE: % A=[7 9 8 1 2 3 4 5 3 6 4 5]';% finddoubledrows(A), A(ans)% % A=[0 0; 1 0 ; 2 0; 4 0; 1 0];% finddoubledrows(A), A(ans,:)% % See also: flipvar% % % Copyright 2018 Tim C. Lueth
###### VLFLremoveIntersectFacets(VL,FL)- removes intersecting facets from a VLFL surface
 % VLFLremoveIntersectFacets(VL,FL) - removes intersecting facets from a VLFL surface% (by Tim Lueth, VLFL-Lib, 2018-SEP-11 as class: SURFACES)% % Introduced first in SolidGeometry 4.3% % See also: SGcheckmeshlab, SGintersectFacetPoints, % VLFLinsertFacetPoints, SGisInterior, VLofVLFLselfIntersection% % [NFL,remi,nii]=VLFLremoveIntersectFacets(VL,FL)% === INPUT PARAMETERS ===% VL: Vertex list or SG% FL: Facet List% === OUTPUT RESULTS ======% NFL: New Facet list% remi: index of removed facets relative to FL% nii: index of not intersecting facets relative to FL% % EXAMPLE: % A=SGreadSTL('/Volumes/LUETH-WIN/WIN AIM Matlab Libraries/STL Files for SG-Lib/Herzklappe Patient.STL')% VLFLremoveIntersectFacets(A.VL,A.FL);% % A=SGsample(36)% VLFLremoveIntersectFacets(A.VL,A.FL);% % See also: SGcheckmeshlab, SGintersectFacetPoints, % VLFLinsertFacetPoints, SGisInterior, VLofVLFLselfIntersection% % % Copyright 2018 Tim C. Lueth
###### ezof3P(VL)- returns ez and R for 3 Point Rotation Matrix
 % ezof3P(VL) - returns ez and R for 3 Point Rotation Matrix% (by Tim Lueth, VLFL-Lib, 2018-SEP-04 as class: ANALYTICAL GEOMETRY)% % Same as T3P and Tof3P% x=p2-p1; ex=p2/norm(x);% z=cross(x,p3-p1); ez=z/norm(z);% y=cross(ez,ex); ey=y/norm(y); (Status of: 2018-09-05)% % Introduced first in SolidGeometry 4.3% % See also: TofR, TofVL, TPL, TofDPhiH, T3ofT2, T3P, T2P, Tof3P, Tof2P% % [ez,R,T]=ezof3P(VL)% === INPUT PARAMETERS ===% VL: Vertex List% === OUTPUT RESULTS ======% ez: ez vector [x y z]% R: Rotation Matrix [ex ey ez]% T: Transformation matrix [ex ey ez p1]% % EXAMPLE: % ezof3P([0 0 0;10 0 0; 0 10 0])% % See also: TofR, TofVL, TPL, TofDPhiH, T3ofT2, T3P, T2P, Tof3P, Tof2P% % % Copyright 2018 Tim C. Lueth
###### CVLofSGfreeboundary(SG)- returns the closed vertex list for all open surfaces
 % CVLofSGfreeboundary(SG) - returns the closed vertex list for all open surfaces% (by Tim Lueth, VLFL-Lib, 2018-SEP-04 as class: SURFACES)% % Same as CVLofopenfaces. This fnctn is more or less for testing % purposes. The fnctn VLFLcorrectdoubledvertex is called first, since % otherwise it makes no sense to detect open surfaces (Status of: % 2018-09-04)% % Introduced first in SolidGeometry 4.3% % See also: CVLofopenfaces, SGcheckboundaryedges% % CVL=CVLofSGfreeboundary(SG)% === INPUT PARAMETERS ===% SG: Solid Geometry% === OUTPUT RESULTS ======% CVL: Closed Vertex List% % EXAMPLE: % loadweb JACO_robot.mat; A=SGseparate(JC2,2)% CVLofopenfaces(A.VL,A.FL);% % loadweb AAruffo_surf.mat % load some surface data sets% CVLofSGfreeboundary(SG1);% % % See also: CVLofopenfaces, SGcheckboundaryedges% % % Copyright 2018 Tim C. Lueth
###### VLcheckboundaryaccuracy(VL,FL)- returns the sufficient number of digits for rounding to achieve minimal open boundaries
 % VLcheckboundaryaccuracy(VL,FL) - returns the sufficient number of digits for rounding to achieve minimal open boundaries% (by Tim Lueth, VLFL-Lib, 2018-SEP-01 as class: SURFACES)% % This fnctn VLcheckboundaryaccuracy tries to round the points of the % vertexlist (to press on a grid) in such a way that there are as few % free / open surface edges as possible. The older fnctn % VLcheckvertexaccuracy tries to guarantee the distance between vertices.% otab format: [rounding digits nr-of-edges nr-of-groups] (Status of: % 2018-09-01)% % Introduced first in SolidGeometry 4.3% % See also: VLcheckvertexaccuracy, SGchecknonmanifoldedges, % SGchecknonmanifoldvertices, SGcheckmeshlab, SGcheckVLaccuracy% % [otab,SGN]=VLcheckboundaryaccuracy(VL,FL)% === INPUT PARAMETERS ===% VL: Original Vertex List or SG% FL: Original Facet List% === OUTPUT RESULTS ======% otab: full table of significant vertex distances after rounding% SGN: corrected Solid Geometry% % EXAMPLE: loadweb JACO_robot.mat% VLcheckboundaryaccuracy(JC2);% VLcheckboundaryaccuracy(JACO);% otab=VLcheckboundaryaccuracy(JC2); JC2.VL=round(JC2.VL,otab(1,1));% % % See also: VLcheckvertexaccuracy, SGchecknonmanifoldedges, % SGchecknonmanifoldvertices, SGcheckmeshlab, SGcheckVLaccuracy% % % Copyright 2018 Tim C. Lueth
###### VLcheckvertexaccuracy(VLorg)- returns the sufficient number of digits for rounding the vertex coordinates of a solid
 % VLcheckvertexaccuracy(VLorg) - returns the sufficient number of digits for rounding the vertex coordinates of a solid % (by Tim Lueth, VLFL-Lib, 2018-AUG-30 as class: SURFACES)% % This fnctn takes time since it works iterative manner.% Before using SGchecknonmanifoldedges, SGchecknonmanifoldvertices, % SGcheckmeshlab it makes sense to find out what the accuracy of the STL % generating process was. (Status of: 2018-09-01)% % Introduced first in SolidGeometry 4.3% % See also: VLcheckboundaryaccuracy, SGchecknonmanifoldedges, % SGchecknonmanifoldvertices, SGcheckmeshlab, SGcheckVLaccuracy% % atab=VLcheckvertexaccuracy(VLorg)% === INPUT PARAMETERS ===% VLorg: Original Vertex List% === OUTPUT RESULTS ======% atab: full table of significant vertex distances after rounding% % EXAMPLE: loadweb JACO_robot.mat% VLcheckvertexaccuracy(JC2);% VLcheckvertexaccuracy(JC2.VL);% atab=VLcheckvertexaccuracy(JC2.VL), JC2.VL=round(JC2.VL,atab(1,1)); % First Correction% atab=VLcheckvertexaccuracy(JC2.VL), JC2.VL=round(JC2.VL,atab(1,1)); % No further correction % % % See also: VLcheckboundaryaccuracy, SGchecknonmanifoldedges, % SGchecknonmanifoldvertices, SGcheckmeshlab, SGcheckVLaccuracy% % % Copyright 2018 Tim C. Lueth
###### SGshortopti(SG,otyp)- returns the vertex list with optimal number of loss less reduced vertices
 % SGshortopti(SG,otyp) - returns the vertex list with optimal number of loss less reduced vertices% (by Tim Lueth, VLFL-Lib, 2018-AUG-30 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: 2018-09-01)% % Introduced first in SolidGeometry 4.3% % See also: VLcheckvertexaccuracy, SGshort, VLcheckboundaryaccuracy, % SGcheckmeshlab% % SGN=SGshortopti(SG,[otyp])% === INPUT PARAMETERS ===% SG: Original SG% otyp: optimization type: 'vertex' or 'boundary'% === OUTPUT RESULTS ======% SGN: SG.VL, SG.FL with optimal number of loss less reduced vertices% % EXAMPLE: % load JACO_robot.mat% SGshortopti(JC2)% SGshortopti(JC2,'vertex')% SGshortopti(JC2,'boundary')% % % See also: VLcheckvertexaccuracy, SGshort, VLcheckboundaryaccuracy, % SGcheckmeshlab% % % Copyright 2018 Tim C. Lueth
###### SGrepairnonmanifoldvertices(SG)- returns a solid without non manfold vertices
 % SGrepairnonmanifoldvertices(SG) - returns a solid without non manfold vertices% (by Tim Lueth, VLFL-Lib, 2018-AUG-30 as class: EXPERIMENTS)% % Non manifold vertices are vertices that are shared in separate surface % models. This can only exist if there are several separate surface % models in a VLFL structure. SGsurfaceplot/SGseparate would display % multiple surfaces.% Current method: For the vertices that have been used several times, the % respective surface normal vector is calculated separately in each % surface and the vertex is slightly shifted in the opposite direction. % This separates the surface when they have had a different orientation.% ATTENTION: Meshlab consideres points with a distance less than 1e-4 as % identical!% % There are different strategies to resolve the non manifold vertices. % a) Disconnect and insert a distance% b) Separate and slide the surfaces into each other% c) Separate and then selectively connect using additional points to % form a link or several common points, i.e. a link of length zero. % (Status of: 2018-09-05)% % Introduced first in SolidGeometry 4.3% % See also: SGshortopti, exp_2018_08_25_nonmanedge, % exp_2018_08_25_nonmanvert% % SGc=SGrepairnonmanifoldvertices(SG)% === INPUT PARAMETERS ===% SG: Solid Geometry% === OUTPUT RESULTS ======% SGc: Resulting Geometries as cells% % EXAMPLE: % loadweb JACO_robot.mat;% SGrepairnonmanifoldvertices(JC3)% SGrepairnonmanifoldvertices(SGshortopti(JC3,'boundary'))% SGrepairnonmanifoldvertices(J63)% SGrepairnonmanifoldvertices(SGSample(37))% % See also: SGshortopti, exp_2018_08_25_nonmanedge, % exp_2018_08_25_nonmanvert% % % Copyright 2018 Tim C. Lueth
###### VLunidirect(VL,thr)- returns a unidirected vector ist
 % VLunidirect(VL,thr) - returns a unidirected vector ist% (by Tim Lueth, VLFL-Lib, 2018-AUG-26 as class: AUXILIARY PROCEDURES)% % Occasionally in a list of vectors only the direction of a vector is % important and not its sign. This fnctn removes the duplication of % vectors and always takes the first occurrence of this vector for % copies. (Status of: 2018-08-28)% % Introduced first in SolidGeometry 4.3% % See also: VLnorm, VLdistance% % [NL,ri]=VLunidirect(VL,[thr])% === INPUT PARAMETERS ===% VL: Vector list% thr: number of relevant digits for round; default is 5% === OUTPUT RESULTS ======% NL: Reduced Vector list% ri: removal index list% % EXAMPLE: % VL=[1 0 0;-1 0 0; 0 1 0; 0 -1 0; 0 0 1; 0 0 -1;1 -1 0; -1 1 0.00001], % VLunidirect(VL,3)% VLunidirect(VL,5)% % See also: VLnorm, VLdistance% % % Copyright 2018 Tim C. Lueth
###### exp_2018_08_25_nonmanedge (SG)- EXPERIMENT to repair non manifold vertices of TWO OR MORE Surfaces
 % exp_2018_08_25_nonmanedge (SG) - EXPERIMENT to repair non manifold vertices of TWO OR MORE Surfaces% (by Tim Lueth, VLFL-Lib, 2018-AUG-25 as class: EXPERIMENTS)% % This fnctn does not handle the case of a self touching surface such as % SGsample(35)% % Non manifold edges are edges that are used by two surfaces % simultaneously, i.e. two two points are common to the connecting edge. % In contrast to non manifold vertices, the surfaces can no longer be % identified as separate surfaces. To solve the problem, the two points % and the edge must be duplicated. This raises the question of which of % the facets that connect to the edge belongs to one of the two bodies. % Only when this question has been clarified can the bodies be separated.% % Current method: First, all areas hanging on all non manifold edges are % determined. These surfaces fc are removed and the remaining surfaces of % the original body now disintegrate into different bodies. The surfaces % fc are now assigned to these separated bodies again. For the % calculation of the shift vector of the points of the edge only the % surfaces of fc are used, which are assigned to the respective body. % Each body thus receives different displacement vectors for the two % points. For each body and each point the sum of the shifts is % calculated again. Then a new point is created in the VL for each body % and point, which corresponds to a copy of the old point plus the % displacement vector. The list of points is only extended. The % superfluous points remain in the list. (Status of: 2018-08-27)% % Introduced first in SolidGeometry 4.3% % See also: exp_2018_08_25_nonmanvert% % exp_2018_08_25_nonmanedge(SG)% === INPUT PARAMETERS ===% SG: Solid Geometry% % EXAMPLE: % exp_2018_08_25_nonmanedge(SGsample(14))% exp_2018_08_25_nonmanedge(SGsample(37)) % one non manifold vertex of two solids% exp_2018_08_25_nonmanedge(SGsample(38)) % one non manifold edges of two solids% exp_2018_08_25_nonmanedge(SGsample(39)) % two non manifold edges of three solids% exp_2018_08_25_nonmanedge(SGsample(40)) % two non manifold edges of three solids% % See also: exp_2018_08_25_nonmanvert% % % Copyright 2018 Tim C. Lueth
###### exp_2018_08_25_nonmanvert(SG)- EXPERIMENT to repair non manifold vertices
 % exp_2018_08_25_nonmanvert(SG) - EXPERIMENT to repair non manifold vertices% (by Tim Lueth, VLFL-Lib, 2018-AUG-25 as class: EXPERIMENTS)% % Non manifold vertices are vertices that are shared in separate surface % models. This can only exist if there are several separate surface % models in a VLFL structure. SGsurfaceplot/SGseparate would display % multiple surfaces.% Current method: For the vertices that have been used several times, the % respective surface normal vector is calculated separately in each % surface and the vertex is slightly shifted in the opposite direction. % This separates the surface when they have had a different orientation.% ATTENTION: Meshlab consideres points with a distance less than 1e-4 as % identical!% % There are different strategies to resolve the non manifold vertices. % a) Disconnect and insert a distance% b) Separate and slide the surfaces into each other% c) Separate and then selectively connect using additional points to % form a link or several common points, i.e. a link of length zero. % (Status of: 2018-08-27)% % Introduced first in SolidGeometry 4.3% % See also: exp_2018_08_25_nonmanedge% % SGc=exp_2018_08_25_nonmanvert(SG)% === INPUT PARAMETERS ===% SG: Solid Geometry% === OUTPUT RESULTS ======% SGc: Resulting Geometries as cells% % EXAMPLE: % loadweb JACO_robot.mat;% exp_2018_08_25_nonmanvert(JC3)% exp_2018_08_25_nonmanvert(JC6)% exp_2018_08_25_nonmanvert(SGsample(37))% % See also: exp_2018_08_25_nonmanedge% % % Copyright 2018 Tim C. Lueth
###### VLofVLFLselfIntersection(VL,FL,sep,thr)- returns the self intersection crossing points of a Surface
 % VLofVLFLselfIntersection(VL,FL,sep,thr) - returns the self intersection crossing points of a Surface% (by Tim Lueth, VLFL-Lib, 2018-AUG-25 as class: SURFACES)% % Only original facet points are not returned% Fnctn could be improved by returning the crossing facets (Status of: % 2018-09-11)% % Introduced first in SolidGeometry 4.3% % See also: VLFLcheckmeshlab, SGintersectFacetPoints, % VLFLinsertFacetPoints, SGisInterior, VLFLremoveIntersectFacets, % VLFLcheckselfintersection% % [CVL,SG,CVLi,CFi]=VLofVLFLselfIntersection(VL,FL,[sep,thr])% === INPUT PARAMETERS ===% VL: Vertex list% FL: Facet list% sep: surface separation {true,false}; default is false;% thr: rounding threshold default is 1e-7% === OUTPUT RESULTS ======% CVL: Faces collision points% SG: Cell list of Separated Geometry Surfaces% CVLi: Cell list of faces collision points% CFi: % % EXAMPLE: % SG=SGsample(15); VLofVLFLselfIntersection (SG.VL,SG.FL);% SG=SGsample(36); VLofVLFLselfIntersection(SG.VL,SG.FL);% SG=SGsample(17); VLofVLFLselfIntersection(SG.VL,SG.FL,true);% SG=SGsample(17); VLofVLFLselfIntersection(SG.VL,SG.FL,false);% % See also: VLFLcheckmeshlab, SGintersectFacetPoints, % VLFLinsertFacetPoints, SGisInterior, VLFLremoveIntersectFacets, % VLFLcheckselfintersection% % % Copyright 2018 Tim C. Lueth
###### SGcheckmeshlab (SG)- performs the most important checks for STL files
 % SGcheckmeshlab (SG) - performs the most important checks for STL files% (by Tim Lueth, VLFL-Lib, 2018-AUG-24 as class: AUXILIARY PROCEDURES)% % This fnctn should return the same results as the output of Meshlab from % http://vcg.isti.cnr.it (Status of: 2018-08-26)% % Introduced first in SolidGeometry 4.3% % See also: SGchecker, VLFLchecknonmanifoldedges, % VLFLchecknonmanifoldvertices, VLFLcheckboundaryedges, VLFLcheckmeshlab, % SGchecknonmanifoldedges, SGchecknonmanifoldvertices, % SGcheckboundaryedges% % SGcheckmeshlab(SG)% === INPUT PARAMETERS ===% SG: Solid Geoemtry% % EXAMPLE: % SG=SGsample(14); SGcheckmeshlab(SG)% SG=SGsample(35); SGcheckmeshlab(SG)% % See also: SGchecker, VLFLchecknonmanifoldedges, % VLFLchecknonmanifoldvertices, VLFLcheckboundaryedges, VLFLcheckmeshlab, % SGchecknonmanifoldedges, SGchecknonmanifoldvertices, % SGcheckboundaryedges% % % Copyright 2018 Tim C. Lueth
###### VLFLcheckmeshlab (VL,FL)- performs the most important checks for STL files
 % VLFLcheckmeshlab (VL,FL) - performs the most important checks for STL files% (by Tim Lueth, VLFL-Lib, 2018-AUG-24 as class: AUXILIARY PROCEDURES)% % This fnctn should return the same results as the output of Meshlab from % http://vcg.isti.cnr.it (Status of: 2018-08-24)% % Introduced first in SolidGeometry 4.3% % See also: SGchecker, VLFLchecknonmanifoldedges, % VLFLchecknonmanifoldvertices, VLFLcheckboundaryedges, % SGchecknonmanifoldedges, SGchecknonmanifoldvertices, % SGcheckboundaryedges, SGcheckmeshlab% % VLFLcheckmeshlab(VL,FL)% === INPUT PARAMETERS ===% VL: Vertex list% FL: Facet list% % EXAMPLE: % SG=SGsample(14); VLFLcheckmeshlab(SG.VL,SG.FL)% SG=SGsample(35); VLFLcheckmeshlab(SG.VL,SG.FL)% % See also: SGchecker, VLFLchecknonmanifoldedges, % VLFLchecknonmanifoldvertices, VLFLcheckboundaryedges, % SGchecknonmanifoldedges, SGchecknonmanifoldvertices, % SGcheckboundaryedges, SGcheckmeshlab% % % Copyright 2018 Tim C. Lueth
###### SGcheckboundaryedges(SG)- returns the open boundaries of the surface
 % SGcheckboundaryedges(SG) - returns the open boundaries of the surface% (by Tim Lueth, VLFL-Lib, 2018-AUG-24 as class: AUXILIARY PROCEDURES)% % This fnctn should return the same results as the output of Meshlab from % http://vcg.isti.cnr.it% more or less the same as VLFLfreeboundaryfacets% (Status of: 2018-08-26)% % Introduced first in SolidGeometry 4.3% % See also: SGchecker, VLFLchecknonmanifoldedges, % VLFLchecknonmanifoldvertices, VLFLcheckboundaryedges, VLFLcheckmeshlab, % SGchecknonmanifoldedges, SGchecknonmanifoldvertices, SGcheckmeshlab% % [EL,CEL,fi,VL,FL]=SGcheckboundaryedges(SG)% === INPUT PARAMETERS ===% SG: Solid Geoemtry% === OUTPUT RESULTS ======% EL: Edge list of open boundaries% CEL: CEL edge list to group EL segments% fi: facet index list of the facets% VL: Vertex list of SG% FL: Facet list of SG% % EXAMPLE: % loadweb JACO_robot.mat;% SG=SGshort(JC3,1e-7); SGcheckboundaryedges(SG);% testfunctTL('SG=SGshort(JC61,#1); SGcheckboundaryedges(SG);',power(1/10,2:15))% % See also: SGchecker, VLFLchecknonmanifoldedges, % VLFLchecknonmanifoldvertices, VLFLcheckboundaryedges, VLFLcheckmeshlab, % SGchecknonmanifoldedges, SGchecknonmanifoldvertices, SGcheckmeshlab% % % Copyright 2018 Tim C. Lueth
###### VLFLcheckboundaryedges(VL,FL)- returns the open boundaries of the surface
 % VLFLcheckboundaryedges(VL,FL) - returns the open boundaries of the surface% (by Tim Lueth, VLFL-Lib, 2018-AUG-24 as class: AUXILIARY PROCEDURES)% % This fnctn should return the same results as the output of Meshlab from % http://vcg.isti.cnr.it% more or less the same as VLFLfreeboundaryfacets% (Status of: 2018-08-26)% % Introduced first in SolidGeometry 4.3% % See also: SGchecker, VLFLchecknonmanifoldedges, % VLFLchecknonmanifoldvertices, SGchecknonmanifoldedges, % SGchecknonmanifoldvertices% % [EL,CEL,fi]=VLFLcheckboundaryedges(VL,FL)% === INPUT PARAMETERS ===% VL: Vertex List% FL: Facet List% === OUTPUT RESULTS ======% EL: Edge list of open boundaries% CEL: CEL edge list to group EL segments% fi: facet index list of the facets% % EXAMPLE: % loadweb JACO_robot.mat;% SG=SGshort(JC3,1e-7); VLFLcheckboundaryedges(SG.VL,SG.FL);% testfunctTL('SG=SGshort(JC3,#1); VLFLcheckboundaryedges(SG.VL,SG.FL);',power(1/10,3:15))% % See also: SGchecker, VLFLchecknonmanifoldedges, % VLFLchecknonmanifoldvertices, SGchecknonmanifoldedges, % SGchecknonmanifoldvertices% % % Copyright 2018 Tim C. Lueth
###### SGchecknonmanifoldvertices(SG)- returns the non manifold vertices, i.e. identical points used in separated surfaces
 % SGchecknonmanifoldvertices(SG) - returns the non manifold vertices, i.e. identical points used in separated surfaces% (by Tim Lueth, VLFL-Lib, 2018-AUG-24 as class: AUXILIARY PROCEDURES)% % This fnctn should return the same results as the output of Meshlab from % http://vcg.isti.cnr.it% (Status of: 2018-08-24)% % Introduced first in SolidGeometry 4.3% % See also: SGchecker, VLFLchecknonmanifoldedges, % VLFLchecknonmanifoldvertices, SGchecknonmanifoldedges% % [vvi,fi,VL,FL]=SGchecknonmanifoldvertices(SG)% === INPUT PARAMETERS ===% SG: Solid Geoemtry% === OUTPUT RESULTS ======% vvi: Index list of non manifold vertices / multiple used vertices% fi: index list of faces attached to non manifold vertices% VL: Vertex list of SG% FL: Facet list of SG% % EXAMPLE: % loadweb JACO_robot.mat;% SG=JC3; SGchecknonmanifoldvertices(SG);% % % See also: SGchecker, VLFLchecknonmanifoldedges, % VLFLchecknonmanifoldvertices, SGchecknonmanifoldedges% % % Copyright 2018 Tim C. Lueth
###### SGchecknonmanifoldedges(SG)- returns the edges and facets with non manifold edges
 % SGchecknonmanifoldedges(SG) - returns the edges and facets with non manifold edges% (by Tim Lueth, VLFL-Lib, 2018-AUG-24 as class: AUXILIARY PROCEDURES)% % This fnctn should return the same results as the output of Meshlab from % http://vcg.isti.cnr.it% (Status of: 2018-08-24)% % Introduced first in SolidGeometry 4.3% % See also: SGchecker, VLFLchecknonmanifoldedges, % VLFLchecknonmanifoldvertices, SGchecknonmanifoldvertices% % [NMEL,FLi,VL,FL]=SGchecknonmanifoldedges(SG)% === INPUT PARAMETERS ===% SG: Solid Geoemtry% === OUTPUT RESULTS ======% NMEL: Edge list of non manifold eges% FLi: facet index list of problematic facets% VL: Vertex list of SG% FL: Facet List of SG% % EXAMPLE: % SG=SGsample(14); SGchecknonmanifoldedges(SG)% SG=SGsample(35); SGchecknonmanifoldedges(SG)% % See also: SGchecker, VLFLchecknonmanifoldedges, % VLFLchecknonmanifoldvertices, SGchecknonmanifoldvertices% % % Copyright 2018 Tim C. Lueth
###### SGmeshlab (SG)- opens a solid geoemtry in an STL viewer
 % SGmeshlab (SG) - opens a solid geoemtry in an STL viewer% (by Tim Lueth, VLFL-Lib, 2018-AUG-24 as class: AUXILIARY PROCEDURES)% % This fnctn is used to compare checking results of the SG toolbox with % the results of the meshalb STL viewer (Status of: 2018-08-24)% % Introduced first in SolidGeometry 4.3% % See also: SGchecker, VLFLchecknonmanifoldedges, % VLFLchecknonmanifoldvertices, SGchecknonmanifoldedges, % SGchecknonmanifoldvertices% % SGmeshlab(SG)% === INPUT PARAMETERS ===% SG: Solid Geometry% % EXAMPLE: % SG=SGsample(35); SGmeshlab(SG); VLFLchecknonmanifoldedges(SG.VL,SG.FL);% % See also: SGchecker, VLFLchecknonmanifoldedges, % VLFLchecknonmanifoldvertices, SGchecknonmanifoldedges, % SGchecknonmanifoldvertices% % % Copyright 2018 Tim C. Lueth
###### VLFLchecknonmanifoldvertices(VL,FL);- returns the non manifold vertices, i.e. identical points used in separated surfaces
 % VLFLchecknonmanifoldvertices(VL,FL); - returns the non manifold vertices, i.e. identical points used in separated surfaces% (by Tim Lueth, VLFL-Lib, 2018-AUG-24 as class: AUXILIARY PROCEDURES)% % This fnctn should return the same results as the output of Meshlab from % http://vcg.isti.cnr.it% (Status of: 2018-08-24)% % Introduced first in SolidGeometry 4.3% % See also: SGchecker, VLFLchecknonmanifoldedges% % [vvi,fi]=VLFLchecknonmanifoldvertices(VL,FL);% === INPUT PARAMETERS ===% VL: Vertex list% FL: Facet list% === OUTPUT RESULTS ======% vvi: Index list of non manifold vertices / multiple used vertices% fi: index list of faces attached to non manifold vertices% % EXAMPLE: % loadweb JACO_robot.mat;% SG=JC3; VLFLchecknonmanifoldvertices(SG.VL,SG.FL);% % % See also: SGchecker, VLFLchecknonmanifoldedges% % % Copyright 2018 Tim C. Lueth
###### VLFLchecknonmanifoldedges(VL,FL);- returns the edges and facets with non manifold edges
 % VLFLchecknonmanifoldedges(VL,FL); - returns the edges and facets with non manifold edges% (by Tim Lueth, VLFL-Lib, 2018-AUG-24 as class: AUXILIARY PROCEDURES)% % This fnctn should return the same results as the output of Meshlab from % http://vcg.isti.cnr.it (Status of: 2018-08-24)% % Introduced first in SolidGeometry 4.3% % See also: SGchecker, VLFLchecknonmanifoldvertices% % [NMEL,FLi]=VLFLchecknonmanifoldedges(VL,FL);% === INPUT PARAMETERS ===% VL: Vertex list% FL: Facet list% === OUTPUT RESULTS ======% NMEL: Edge list of non manifold eges% FLi: facet index list of problematic facets% % EXAMPLE: % SG=SGsample(14); VLFLchecknonmanifoldedges(SG.VL,SG.FL)% SG=SGsample(35); VLFLchecknonmanifoldedges(SG.VL,SG.FL)% % See also: SGchecker, VLFLchecknonmanifoldvertices% % % Copyright 2018 Tim C. Lueth
###### exp_2018_08_17_ATMEGA256- SCRIPT for analyzing drilling holes in an STL printed circuit board based on image projection
 % exp_2018_08_17_ATMEGA256 - SCRIPT for analyzing drilling holes in an STL printed circuit board based on image projection% (by Tim Lueth, VLFL-Lib, 2018-AUG-17 as class: EXPERIMENTS)% % Introduced first in SolidGeometry 4.3% % exp_2018_08_17_ATMEGA256% % % Copyright 2018 Tim C. Lueth