New in SG-Lib 3.2

publishTL(fname)- publishes the file in the pcode directory
publishTL(fname) % publishTL(fname) - publishes the file in the pcode directory
% (by Tim Lueth, VLFL-Lib, 2017-JAN-03 as class: FILE HANDLING)
%
% This fnctn moves temporarily into the pcodedirTL, deletes an potential
% pcode file, which would eliminate the figure output for unknown
% reasons, an creates inside a (Status of: 2017-01-04)
%
% See also: depuseString, depuseTL, depuseToolbox, pcodeTL, depfunTL,
% pcodedirTL
%
% publishTL(fname)
% === INPUT PARAMETERS ===
% fname: file name
%
% EXAMPLE: publishTL ('VLFL_EXP01')
%
pcodedirTL- creates a temporary directory for the creation of pcodes
pcodedirTL % pcodedirTL - creates a temporary directory for the creation of pcodes
% (by Tim Lueth, VLFL-Lib, 2017-JAN-03 as class: OBSOLETE PROCEDURES)
%
% works on MAC and PC (Status of: 2017-01-04)
%
% See also: pcodeTL, publishTL
%
% dname=pcodedirTL
% === OUTPUT RESULTS ======
% dname: directory name
%
-
% -
% (by Tim Lueth, VLFL-Lib, 2017-JAN-02 as class: SURFACES)
%
% *Repair non manifold vertices:* When two bodies with closed surfaces,
% i. Completely correctly modeled, use the same vertices, then it is
% so-called non-manifold vertices. This problem can be solved by shifting
% one of the points by 1e-6mm in the direction of its normal vector. The
% body becomes a bit windy but this can be ignored due to manufacturing
% accuracy. Afterwards there should be no nonmanifold-vertices. There is
% still a problem when surface models have exactly the same vertex normal
% vectors.
% (Status of: 2017-01-02)
%
%
%
strrepn(origStr,oldSubStr,newSubstr)- replaces several string elements by using strrep
strrepn(origStr,oldSubStr,newSubstr) % strrepn(origStr,oldSubStr,newSubstr) - replaces several string elements by using strrep
% (by Tim Lueth, VLFL-Lib, 2017-JAN-02 as class: AUXILIARY PROCEDURES)
%
% extension of strrep, with more than 1 pair of parameters. The exchange
% takes place in order of the pairs. (Status of: 2017-01-02)
%
% See also: strrep, strfind, strfindex
%
% S=strrepn(origStr,[oldSubStr,newSubstr])
% === INPUT PARAMETERS ===
% origStr: Original String
% oldSubStr: Substring to exchange
% newSubstr: New Substring
% === OUTPUT RESULTS ======
% S: Resulting string
%
% EXAMPLE:
% strrepn('abcdef','a','x','d','y')
%
phiofsr(s,R)- returns a angle difference to achieve a slot size
phiofsr(s,R) % phiofsr(s,R) - returns a angle difference to achieve a slot size
% (by Tim Lueth, VLFL-Lib, 2017-JAN-02 as class: ANALYTICAL GEOMETRY)
%
% phi of slot at radius: = s/r
% This is just a fnctn to remember the analytical background (Status of:
% 2017-01-02)
%
% See also: nofrd, dofn, sofrd
%
% phi=phiofsr(s,R)
% === INPUT PARAMETERS ===
% s: slot size
% R: minimal radius
% === OUTPUT RESULTS ======
% phi: angle to add
%
imageVideoImagePage(xy,I,ETitles,cols)- creates an coyright image for a video
imageVideoImagePage(xy,I,ETitles,cols) % imageVideoImagePage(xy,I,ETitles,cols) - creates an coyright image for a video
% (by Tim Lueth, Video-Lib, 2017-JAN-01)
%
% In case that no output parameter is defined, the fnctn creates a small
% 30 frames (1 second) video file "newvideoEndTitles.avi" in the
% desktopdir.
% ATTENTION: Use somewhere the copyright sign '©', otherwise Tim Lueth is
% named as author of the page (Status of: 2017-01-01)
%
% See also: imageVideoFrames, imageVideoTitle, imageVideoTextPage,
% imageVideoEndtitle, imageVideoWrite, videoCopyFrames, videoCopyCutMovies
%
% I=imageVideoImagePage(xy,I,[ETitles,cols])
% === INPUT PARAMETERS ===
% xy: [x y] or filenamepath of video
% I: Image to include
% ETitles: EndTitle single row!
% cols: ['w','k'] is default
% === OUTPUT RESULTS ======
% I: Image to write
%
% EXAMPLE:
% I=imageVideoTextPage('',smbDrawNow);
% imshow(I.cdata);show
%
videoWriteClipMovie (WName,ImageOrFile,cduration)- creates a video from images and videos without sound
videoWriteClipMovie (WName,ImageOrFile,cduration) % videoWriteClipMovie (WName,ImageOrFile,cduration) - creates a video from images and videos without sound
% (by Tim Lueth, Video-Lib, 2017-JAN-01 as class: AUXILIARY PROCEDURES)
%
% No sound support in 2016b (Status of: 2017-01-01)
%
% See also: imageVideoFrames, imageVideoTitle, imageVideoTextPage,
% imageVideoEndtitle, imageVideoWrite, videoCopyFrames, videoCopyCutMovies
%
% videoWriteClipMovie(WName,[ImageOrFile,cduration])
% === INPUT PARAMETERS ===
% WName: Filename; default is desktopdir
% ImageOrFile: Image or Filename
% cduration: number of seconds to display the image
%
tryuigetfile(xy,fselect)- give the user a try to select a file
tryuigetfile(xy,fselect) % tryuigetfile(xy,fselect) - give the user a try to select a file
% (by Tim Lueth, VLFL-Lib, 2017-JAN-01 as class: AUXILIARY PROCEDURES)
%
% This fnctn is useful if numerical parameter xy are generated by
% analyzing a file. If xy is not numerical or xy is empty or xy is a non
% existing file, an user dialog is opened to select a file. The final
% result is a valid file name or empty or the numerical parameter xy.
% The final result is only empty if no file was selected. (Status of:
% 2017-01-01)
%
% xy=tryuigetfile(xy,[fselect])
% === INPUT PARAMETERS ===
% xy: numerical parameter, empty or existing filename
% fselect: such as '*.avi;*.m4v;*.mp4;*.mov;*.mpg'; default is *.*
% === OUTPUT RESULTS ======
% xy: numerical parameter, empty or existing filename
%
% EXAMPLE:
% tryuigetfile(12)
% tryuigetfile('')
% tryuigetfile('notexistingfile.avi')
%
SGaddrelSG(SGA,SGB,rel,gap)- Spatial arrangement of a solid to another and combining both
SGaddrelSG(SGA,SGB,rel,gap) % SGaddrelSG(SGA,SGB,rel,gap) - Spatial arrangement of a solid to another and combining both
% (by Tim Lueth, VLFL-Lib, 2016-DEZ-31 as class: SURFACES)
%
% This fnctn arranges the position of a solid A relative to the position
% of a solid B. It uses SGtransrelSG for the spatial arrangement and cat2
% for combining.
% The fnctn supports also spatial arrangement relative to frames of SGB!
% (Status of: 2016-12-31)
%
% See also: SGtransrelSG, SGcat2
%
% SG=SGaddrelSG(SGA,SGB,[rel,gap])
% === INPUT PARAMETERS ===
% SGA: Solid A
% SGB: Solid B
% rel: spatial relations
% gap: gap, optional parameter after an relation command
% === OUTPUT RESULTS ======
% SG: Final solid geoemtry
%
% EXAMPLE: Align relative to geometry and relative to frames
% A=SGbox([30,20,10]); B=SGofCPLCVLR(4,[20 0 20 ]); SGaddrelSG(B,A)
% SGaddrelSG(SGA,SGB,'top','alignright',-5,alignback)
% SGaddrelSG(B,A,'alignT',{'B','B'})
%
exp_2016_12_31- Experiment to create a key and a keyhole
exp_2016_12_31 % exp_2016_12_31 - Experiment to create a key and a keyhole
% (by Tim Lueth, VLFL-Lib, 2016-DEZ-31 as class: EXPERIMENTS)
%
% This experiment produces two bodies: a key and a keyhole to realize an
% articulation with articulation stops, which can only be mounted in one
% position.
% 3D printing with the 3D printer "Formlab2" has shown that at 0.1mm
% layer spacing, it is necessary to choose 0.5mm distance between the
% opposing bodies (Status of: 2017-01-14)
%
% See also: exp_2017_01_14, SGmodelKeyhole, exp_2017_01_11, exp_2016_12_27
%
% exp_2016_12_31
%
imageVideoTextPage(xy,ETitles,cols)- creates a textpage image for a video
imageVideoTextPage(xy,ETitles,cols) % imageVideoTextPage(xy,ETitles,cols) - creates a textpage image for a video
% (by Tim Lueth, Video-Lib, 2016-DEZ-30)
%
% In case that no output parameter is defined, the fnctn creates a small
% 30 frames (1 second) video file "newvideoEndTitles.avi" in the
% desktopdir.
% ATTENTION: Use somewhere the copyright sign '©', otherwise Tim Lueth is
% named as author of the page (Status of: 2017-01-01)
%
% See also: imageVideoFrames, imageVideoTitle, imageVideoEndtitle,
% imageVideoWrite, videoCopyFrames, videoCopyCutMovies
%
% I=imageVideoTextPage(xy,[ETitles,cols])
% === INPUT PARAMETERS ===
% xy: [x y] or filenamepath of video
% ETitles: EndTitle single row!
% cols: ['w','k'] is default
% === OUTPUT RESULTS ======
% I: Image to write
%
% EXAMPLE:
% I=imageVideoTextPage('','Test');
% imshow(I.cdata);show
%
textHorizontalBlockAlign(ncol,A)- returns cell of strings which length are limited in length
textHorizontalBlockAlign(ncol,A) % textHorizontalBlockAlign(ncol,A) - returns cell of strings which length are limited in length
% (by Tim Lueth, Video-Lib, 2016-DEZ-30)
%
% The first part of the video shows joints without a boundary', 'The
% second part shows the automatic creation of a missing link between the
% revolute joint and cylindrical joint
% (Status of: 2016-12-30)
%
% See also: CPLoftext
%
% B=textHorizontalBlockAlign(ncol,A)
% === INPUT PARAMETERS ===
% ncol: maximum number of letters in a row [c r]
% A: cell of strings
% === OUTPUT RESULTS ======
% B: cell of string
%
% EXAMPLE: shorten the text to a maximum of 4 chars
% textHorizontalBlockAlign(4,'123456789-12456789-');
% textHorizontalBlockAlign (13,'123456789-123456789-123456789-');
% textHorizontalBlockAlign (13,{'123456789-123456789','-123456789-'});
% textHorizontalBlockAlign ([13 8],{'123456789-123456789','-123456789-'});
%
videoCopyCutMovies (WName,RName,style)- copies part of a video and creates titles and end title
videoCopyCutMovies (WName,RName,style) % videoCopyCutMovies (WName,RName,style) - copies part of a video and creates titles and end title
% (by Tim Lueth, Video-Lib, 2016-DEZ-29)
%
% See also: imageVideoFrames, imageVideoTitle, imageVideoTextPage,
% imageVideoEndtitle, imageVideoWrite, videoCopyFrames, openbydoubleclick
%
%
% videoCopyCutMovies([WName,RName,style])
% === INPUT PARAMETERS ===
% WName: Created Filename
% RName: {'REadfile',[0 inf],{'Titles'},{EndTitles},[0,1,2]}
% style: ['w' 'k' 'Bank Gothic' '0.8]
%
% EXAMPLE:
% videoCopyCutMovies('',{'','',{'SG-Lib Tutorial #24','Simulate Joint
% Models with Fixed Limits',...
% 'Tim C. Lueth (2016-12-19)'},'',[1,3]},'tum')
%
openbydoubleclick (fname)- opens/starts a file by the operating system
openbydoubleclick (fname) % openbydoubleclick (fname) - opens/starts a file by the operating system
% (by Tim Lueth, VLFL-Lib, 2016-DEZ-29 as class: AUXILIARY PROCEDURES)
%
% on mac the command is system(['open' ]);
% on pc the command is winopen();
% The search sequence is:
% a) if full path, use full path
% b) use which to find such a file in the search path
% (Status of: 2017-03-06)
%
% See also: openbydoubleclick, desktopdir, filesep, open
%
% openbydoubleclick(fname)
% === INPUT PARAMETERS ===
% fname: Filename; default is in the desktopdir
%
% EXAMPLE: Start a Video
% openbydoubleclick('/Users/lueth/Desktop/2013-02-17 Video Sophie FT.m4v')
%
videoCopyFrames(v,vr)- copies the frame from Videoreader to Videowriter
videoCopyFrames(v,vr) % videoCopyFrames(v,vr) - copies the frame from Videoreader to Videowriter
% (by Tim Lueth, Video-Lib, 2016-DEZ-28)
%
% If the format of the videoreader is not the same as the format of the
% videowriter, the frames are scaled by using imresize. (Status of:
% 2017-01-08)
%
% See also: imageVideoFrames, imageVideoTitle, imageVideoTextPage,
% imageVideoEndtitle, imageVideoWrite, videoCopyCutMovies
%
% videoCopyFrames(v,vr)
% === INPUT PARAMETERS ===
% v: videoWriter
% vr: videoReader
%
imageVideoWrite (v,I,n)- writes an image several times into an open videostream
imageVideoWrite (v,I,n) % imageVideoWrite (v,I,n) - writes an image several times into an open videostream
% (by Tim Lueth, Video-Lib, 2016-DEZ-28)
%
% if the image does not have the size of the videoWriter and is not the
% first part of the video, it is resized to fit into the video frame
% (Status of: 2017-01-08)
%
% See also: imageVideoFrames, imageVideoTitle, imageVideoTextPage,
% imageVideoEndtitle, videoCopyFrames, videoCopyCutMovies
%
% imageVideoWrite(v,I,n)
% === INPUT PARAMETERS ===
% v: videoWriter
% I: Image
% n: number of frames
%
% EXAMPLE:
% imageVideoWrite (v,I,2*get(vr,'FrameRate'));
%
imageVideoEndtitle(xy,ETitles,cols)- creates an endtitle image for a video
imageVideoEndtitle(xy,ETitles,cols) % imageVideoEndtitle(xy,ETitles,cols) - creates an endtitle image for a video
% (by Tim Lueth, Video-Lib, 2016-DEZ-28)
%
% In case that no output parameter is defined, the fnctn creates a small
% 30 frames (1 second) video file "newvideoEndTitles.avi" in the
% desktopdir. (Status of: 2017-01-01)
%
% See also: imageVideoFrames, imageVideoTitle, imageVideoTextPage,
% imageVideoWrite, videoCopyFrames, videoCopyCutMovies
%
% I=imageVideoEndtitle(xy,[ETitles,cols])
% === INPUT PARAMETERS ===
% xy: [x y] or filenamepath of video
% ETitles: EndTitle single row!
% cols: ['w','k'] is default
% === OUTPUT RESULTS ======
% I: Image to write
%
% EXAMPLE: Create an Header in Company Style
% imageVideoEndtitle('',{'ErgoSurg GmbH • Ismaning • Germany',
% '','www.ergosurg.com'},['k' 'w']);
% imshow(I.cdata)
%
imageVideoTitle(xy,STitles,cols,ptime)- returns a video titel image for a given existing video
imageVideoTitle(xy,STitles,cols,ptime) % imageVideoTitle(xy,STitles,cols,ptime) - returns a video titel image for a given existing video
% (by Tim Lueth, Video-Lib, 2016-DEZ-28)
%
% If several snapshots (ptime) are defined, the snapshots are positioned
% below the title in a row.
% In case that no output parameter is defined, the fnctn creates a small
% 60 frames (2 seconds) video file "newvideoTitles.avi" in the
% desktopdir. (Status of: 2017-01-01)
%
% See also: imageVideoFrames, imageVideoTextPage, imageVideoEndtitle,
% imageVideoWrite, videoCopyFrames, videoCopyCutMovies
%
% I=imageVideoTitle(xy,[STitles,cols,ptime])
% === INPUT PARAMETERS ===
% xy: [x y] or existing video filepath
% STitles: {'Title','Subtitle','Author','$Date'}
% cols: default is ['w' 'k']
% ptime: snapshot frame time; default is 0
% === OUTPUT RESULTS ======
% I: Titel Image
%
% EXAMPLE:
% I=imageVideoTitle('');
% imshow(I.cdata)
%
imageVideoFrames(xy,ptime)- extracts images from a video file
imageVideoFrames(xy,ptime) % imageVideoFrames(xy,ptime) - extracts images from a video file
% (by Tim Lueth, Video-Lib, 2016-DEZ-28)
%
% See also: imageVideoTitle, imageVideoTextPage, imageVideoEndtitle,
% imageVideoWrite, videoCopyFrames, videoCopyCutMovies
%
% [Ic,vr]=imageVideoFrames(xy,[ptime])
% === INPUT PARAMETERS ===
% xy: filename of the video file
% ptime: array or cells of time; default is 0
% === OUTPUT RESULTS ======
% Ic: cells of images
% vr: video reader object
%
% EXAMPLE:
% imageVideoFrames('/Users/lueth/Desktop/newfile.avi',[2,3]) % works
% imageVideoFrames('/Users/lueth/Desktop/newfile.avi',{2,3}) % works also
%
exp_2016_12_27- EXPERIMENT to create limited revolute link parts
exp_2016_12_27 % exp_2016_12_27 - EXPERIMENT to create limited revolute link parts
% (by Tim Lueth, VLFL-Lib, 2016-DEZ-27 as class: EXPERIMENTS)
%
% This fnctn also tests
% SGanalyzeGroupParts
% SGarrangeSG
% SGwriteSeparatedSTL (Status of: 2017-01-14)
%
% See also: exp_2017_01_14, SGmodelKeyhole, exp_2017_01_11, exp_2016_12_31
%
% exp_2016_12_27
%
SGwriteSeparatedSTL (SG,FNAME,ONAME)- writes solid geometry in different STL files
SGwriteSeparatedSTL (SG,FNAME,ONAME) % SGwriteSeparatedSTL (SG,FNAME,ONAME) - writes solid geometry in different STL files
% (by Tim Lueth, VLFL-Lib, 2016-DEZ-27 as class: FILE HANDLING)
%
% This fnctn separates penetrating parts and writes the parts into
% different STL files.
% Use SGsurfaces first if only independent surfaces should be printed in
% different files.
% SGsurfaces is much faster than SGanalyzeGroupParts (Status of:
% 2017-06-26)
%
% See also: SGwriteSTL, SGwriteMultipleSTL, SGreadSTL,
% SGanalyzeGroupParts, SGarrangeSG, SGsurfaceplot, SGpuzzlecut3D
%
% SGwriteSeparatedSTL(SG,[FNAME,ONAME])
% === INPUT PARAMETERS ===
% SG: Solid Geometry
% FNAME: File and Directory Name
% ONAME: Solid Name
%
% EXAMPLE:
% SGwriteSeparatedSTL(SGsurfaces(SGsample(17)))
% SGwriteSeparatedSTL(SGsample(17))
%
SGanalyzeGroupParts(SG)- returns parts of penetrating solids group colored
SGanalyzeGroupParts(SG) % SGanalyzeGroupParts(SG) - returns parts of penetrating solids group colored
% (by Tim Lueth, VLFL-Lib, 2016-DEZ-27 as class: SURFACES)
%
% Similar to fnctn SGanalyzePenetration, but it returs already a cell of
% part-solids.
% Each solid has a different color. (Status of: 2016-12-27)
%
% See also: SGanalyzeJointType, SGanalyzeJointFaces, SGanalyzePenetration
%
% SGc=SGanalyzeGroupParts(SG)
% === INPUT PARAMETERS ===
% SG: Solid Geometry of additive designed solids
% === OUTPUT RESULTS ======
% SGc: List of solids sorted by non overlapping parts
%
% EXAMPLE: Separate the parts of the link SGsample(17):
% SGanalyzeGroupParts(SGsample(17))
%
smbCreateStopJointC (Name,bound)- smb creates a joint with limits (fixed boundaries)
smbCreateStopJointC (Name,bound) % smbCreateStopJointC (Name,bound) - smb creates a joint with limits (fixed boundaries)
% (by Tim Lueth, SimMechanics, 2016-DEZ-26 as class: MODELING PROCEDURES)
%
% See also: smbCreateStopJointR
%
% smbCreateStopJointC([Name,bound])
% === INPUT PARAMETERS ===
% Name: Local Name of the joint in the diagram
% bound: boundaries; default is [-10mm +10mm]
%
ispath(npath)- returns wether a string is part of the path
ispath(npath) % ispath(npath) - returns wether a string is part of the path
% (by Tim Lueth, VLFL-Lib, 2016-DEZ-26 as class: AUXILIARY PROCEDURES)
%
% See also: addpath, path, rmpath
%
% l=ispath(npath)
% === INPUT PARAMETERS ===
% npath: name of path
% === OUTPUT RESULTS ======
% l: true or false
%
smbCopyConnections (B1,B2,opt)- smb copies all existing conntections of a block to another
smbCopyConnections (B1,B2,opt) % smbCopyConnections (B1,B2,opt) - smb copies all existing conntections
% of a block to another
% (by Tim Lueth, SimMechanics, 2016-DEZ-26 as class: MODELING PROCEDURES)
%
% This fnctn does only work if both blocks B1 and B2 are in the same open
% subsystem!
% Both blocks need to have exactly the same order of connection ports:
% LConn1, LConn2, ..., RConn1, RConn2, ...
% (Status of: 2016-12-27)
%
% See also: smbCreateConnection, smbCreateSG, smbCreateSGJoint,
% smbCreateSGNode, smbCreateStopJointC, smbCreateStopJointR,
% smbCreateDrive, smbCreateSineWave
%
% smbCopyConnections(B1,B2,[opt])
% === INPUT PARAMETERS ===
% B1: Block string top copy connections from
% B2: Block string to copy connections to
% opt: 'replace' deletes the Block B1 afterwards; default is ''
%
gcsb(bl)- get current system's block
gcsb(bl) % gcsb(bl) - get current system's block
% (by Tim Lueth, SimMechanics, 2016-DEZ-26 as class: AUXILIARY PROCEDURES)
%
% returns current system's block
% gcs ==> return the full path of the current system
% bdroot or bdroot(gcs) ==> return the root of the current system
% gcb ==> returns the current block path
% gcsb returns the block name in the current window-tab-system (Status
% of: 2016-12-26)
%
% See also: gcs, gcb, bdroot, gcsb
%
% s=gcsb([bl])
% === INPUT PARAMETERS ===
% bl: block; default is gcb
% === OUTPUT RESULTS ======
% s: name of block
%
smbNameofPort(b,ph)- returns the Connection of a Port
smbNameofPort(b,ph) % smbNameofPort(b,ph) - returns the Connection of a Port
% (by Tim Lueth, SimMechanics, 2016-DEZ-26 as class: AUXILIARY PROCEDURES)
%
% Auxiliary fnctn used in smbGetConnectedBlocks. The fnctns gets the real
% port handle and analyzses LConn and RConn wether the port handle is
% part of LConn or RConn (Status of: 2016-12-26)
%
% See also: smbGetConnectedBlocks, smbNameofPort
%
% s=smbNameofPort(b,ph)
% === INPUT PARAMETERS ===
% b: Block Name
% ph: Port Name used
% === OUTPUT RESULTS ======
% s: String
%
% EXAMPLE: Get the used connection for a known Port
% a=smbGetConnectedBlocks(smbWhich('N4'))
% smbNameofPort(a{2,3},a{2,4})
%
CVLplot(CVL,c,w)- plots a 2D polybool contour polygon in a 3D figure
CVLplot(CVL,c,w) % CVLplot(CVL,c,w) - plots a 2D polybool contour polygon in a 3D figure
% (by Tim Lueth, VLFL-Lib, 2016-DEZ-26 as class: VISUALIZATION)
%
% CVL is a nx3 point list with x/y/z coordinates separated by NaN NaN NaN
% the fnctn replaces the colors by the standard colors to show the
% separated contours (Status of: 2017-01-02)
%
% See also: VLFLcoatPCVL, TofPCVL, VLplot, PLplot
%
% h=CVLplot(CVL,[c,w])
% === INPUT PARAMETERS ===
% CVL: Point list of x/y coordinates nx2
% c: Color and symbol of points
% w: Width of the used line
% === OUTPUT RESULTS ======
% h: Handle to figure
%
CPLofSGslice3(SG,z)- returns CPL and CVL for different sliced heights and directions
CPLofSGslice3(SG,z) % CPLofSGslice3(SG,z) - returns CPL and CVL for different sliced heights and directions
% (by Tim Lueth, VLFL-Lib, 2016-DEZ-26 as class: CLOSED POLYGON LISTS)
%
% 3 dimensional slicing procedure.
% SG=CPLofSGslice3(SG,z) return one slize in height z
% CPLofSGslice3(SG,[0 1 0])
% (Status of: 2017-01-15)
%
% See also: CPLofSGslice, CPLofSGslice2
%
% [CPL,CVL]=CPLofSGslice3(SG,z)
% === INPUT PARAMETERS ===
% SG: Solid Geoemtry
% z: either a z value or a cell list of values
% === OUTPUT RESULTS ======
% CPL: Closed polygon list (n x 2) separated with NaN NaN
% CVL: Closed polygon vertex list (n x 2) separated with NaN NaN NaN
%
% EXAMPLE:
% CPLofSGslice3(SGsample(7),[4,6])
% CPLofSGslice3(SGbox([30,20,10]),[0 0 0.01; 0 0.1 0; 0.1 0 0])
% CPLofSGslice3(SGsample(7),[0 0 4; 0.1 4 0.1])
%
smbPosgcb (Nr)- sets the gcb to predefined position
smbPosgcb (Nr) % smbPosgcb (Nr) - sets the gcb to predefined position
% (by Tim Lueth, SimMechanics, 2016-DEZ-25 as class: AUXILIARY PROCEDURES)
%
% See also: smbSetPosition, smbNewGridPos
%
% smbPosgcb(Nr)
% === INPUT PARAMETERS ===
% Nr: Grid position
%
smbPSLibInstall- Installs a collection of additional blocks
smbPSLibInstall % smbPSLibInstall - Installs a collection of additional blocks
% (by Tim Lueth, SimMechanics, 2016-DEZ-25 as class: MODELING PROCEDURES)
%
% For many cases there are some special physical procedure help full.
% This is a collection of procedure blocks for a library that are
% generated at runtime and can be used afterwards (Status of: 2016-12-25)
%
% See also: smbPSLibCreateBlock, smbPSLibCompile;
%
% smbPSLibInstall
%
smbPSBlockname(block)- return the name of a block realtive to Library
smbPSBlockname(block) % smbPSBlockname(block) - return the name of a block realtive to Library
% (by Tim Lueth, SimMechanics, 2016-DEZ-25 as class: FILE HANDLING)
%
% search for "Rotational Friction Force"
% smbPSLibname =
% "/Users/lueth/Desktop/tmp_SG_LIB_EXP_23/+mechPS_Tim_Lueth/Rotational
% Friction Force"
% smbPSBlockname = "mechPS_Tim_Lueth_lib/Rotational Friction Force"
% (Status of: 2016-12-26)
%
% See also: smbPSLibname
%
% bn=smbPSBlockname(block)
% === INPUT PARAMETERS ===
% block: block description
% === OUTPUT RESULTS ======
% bn: Block path
%
smbPSLibCreateBlock(FString,Fext,FName)- Writes the code of a block as .ssc file
smbPSLibCreateBlock(FString,Fext,FName) % smbPSLibCreateBlock(FString,Fext,FName) - Writes the code of a block as .ssc file
% (by Tim Lueth, SimMechanics, 2016-DEZ-25 as class: FILE HANDLING)
%
% By using the fnctns smbPSLibCreateBlock and smbPSLibCompile it is
% possible during runtime to create additonal SimScape block_fnctns.
% (Status of: 2016-12-27)
%
% See also: smbNewSystem, smbFilename, smbPSLibname, smbPSLibCompile
%
%
% FName=smbPSLibCreateBlock(FString,[Fext,FName])
% === INPUT PARAMETERS ===
% FString: String of the code of a blockfuunction
% Fext: desired extension; default is '.ssc'
% FName: Filename to be used
% === OUTPUT RESULTS ======
% FName: Analyze Filename only if FName =''
%
% EXAMPLE: FName=smbPSLibCreateBlock (RFF);
% smbPSLibCreateBlock (RFF_SVG,'.svg',FName);
%
%
smbPSLibname(FName)- returns the name a SimMultiBody Library Directory
smbPSLibname(FName) % smbPSLibname(FName) - returns the name a SimMultiBody Library Directory
% (by Tim Lueth, SimMechanics, 2016-DEZ-25 as class: FILE HANDLING)
%
% If called without an argument, it returns the Library path
% If called with a fnctn name, it returns the file name path
% The directory is created in smbNewSystem. (Status of: 2016-12-27)
%
% See also: smbNewSystem, smbWhich, smbFilename, smbPSLibCompile
%
% fn=smbPSLibname([FName])
% === INPUT PARAMETERS ===
% FName: smb_fnctn name; default is
% === OUTPUT RESULTS ======
% fn: smb_fnctn file name;default is directory name
%
smbPSLibCompile- compiles the PS Library in the current smbPSLibname
smbPSLibCompile % smbPSLibCompile - compiles the PS Library in the current smbPSLibname
% (by Tim Lueth, SimMechanics, 2016-DEZ-25 as class: FILE HANDLING)
%
% See also: smbNewSystem, smbWhich, smbFilename, smbPSLibname
%
% smbPSLibCompile
%
smbCreateStopJointR (Name,bound)- smb creates a joint with limits (fixed boundaries)
smbCreateStopJointR (Name,bound) % smbCreateStopJointR (Name,bound) - smb creates a joint with limits (fixed boundaries)
% (by Tim Lueth, SimMechanics, 2016-DEZ-25 as class: MODELING PROCEDURES)
%
% See also: smbCreateStopJointC
%
% smbCreateStopJointR([Name,bound])
% === INPUT PARAMETERS ===
% Name: Local Name of the joint in the diagram
% bound: boundaries; default is [i2*pi +2*pi]
%
SGoftext(text,sz,t,radx,rady)- returns a solid for text optional bended
SGoftext(text,sz,t,radx,rady) % SGoftext(text,sz,t,radx,rady) - returns a solid for text optional bended
% (by Tim Lueth, VLFL-Lib, 2016-DEZ-23 as class: SURFACES)
%
% See also: SGtext, VLFLtextimage
%
% SG=SGoftext(text,[sz,t,radx,rady])
% === INPUT PARAMETERS ===
% text: string
% sz: size in [x y z]
% t: thichness of plate does reduce z; default is 0
% radx: radius in x; default is planar
% rady: radius in y; default is planar
% === OUTPUT RESULTS ======
% SG:
%
% EXAMPLE: Weihnachten on sphere with radius 40:
% SGoftext ('Weihnachten',[40 30 5],'',40,40)
%
exp_2016_12_22(pos)- EXPERIMENT to find the minimal slot distance for separated solids
exp_2016_12_22(pos) % exp_2016_12_22(pos) - EXPERIMENT to find the minimal slot distance for
% separated solids
% (by Tim Lueth, , 2016-DEZ-22)
%
% On Dec, 23rd, 2016, I made this experiment detecting, that with 25um
% Resolution in z and a slot distance of 0.4mm the parts can be separated
% by force and 0.5 or 0.6 leed to fully separated parts (Status of:
% 2016-12-23)
%
% SG=exp_2016_12_22([pos])
% === INPUT PARAMETERS ===
% pos: 'a' assembled or 's' separated
% === OUTPUT RESULTS ======
% SG: Final solid geometry
%
image2video (fname)- adding titles & end titles to video files
image2video (fname) % image2video (fname) - adding titles & end titles to video files
% (by Tim Lueth, VLFL-Lib, 2016-DEZ-22 as class: FILE HANDLING)
%
% OBSOLETE REPLACED BY videoCopyCutMovies
% (Status of: 2016-12-28)
%
% image2video([fname])
% === INPUT PARAMETERS ===
% fname: file name
%
exp_2016_12_22- Experiment for slot size using Formlab2
exp_2016_12_22 % exp_2016_12_22 - Experiment for slot size using Formlab2
% (by Tim Lueth, VLFL-Lib, 2016-DEZ-22 as class: EXPERIMENTS)
%
% exp_2016_12_22
%
SGof2T(TA,TB,elo,Rv,NCPL)- Creates a solid geometry between two frames
SGof2T(TA,TB,elo,Rv,NCPL) % SGof2T(TA,TB,elo,Rv,NCPL) - Creates a solid geometry between two frames
% (by Tim Lueth, VLFL-Lib, 2016-DEZ-21 as class: MODELING PROCEDURES)
%
% The solid is created starting at frame 1 ending at frame 2 considering
% a minimal radius of Rv.
% The solid is elongated starting before frame 1 and ends after frame 2
% to implement penetration of links. Optional, it is possible to extrude
% a contour. Please make sure that radius Rv is at least 2.5 time the
% maximum distance of NCPL from the origin.
% Base frame and Follower frame are added, but the base frame has its ez
% vector directing outside of the solid (Status of: 2017-03-19)
%
% See also: SGof2SGT, SGof2CVL, SGof2CPLz
%
% SG=SGof2T(TA,TB,[elo,Rv,NCPL])
% === INPUT PARAMETERS ===
% TA: Frame A
% TB: Frame B
% elo: elongation of the solid for penetration; default is 0.001
% Rv: Radius; default is 4
% NCPL: Optional Contour; Default is PLcircle(Rv)
% === OUTPUT RESULTS ======
% SG: Solid Geoemtry
%
connectofmat(CL,n)- return the element that have a connection in the matrix
connectofmat(CL,n) % connectofmat(CL,n) - return the element that have a connection in the matrix
% (by Tim Lueth, VLFL-Lib, 2016-DEZ-20 as class: AUXILIARY PROCEDURES)
%
% See also: SGanalyzePenetration, CPLsortinout
%
% no=connectofmat(CL,[n])
% === INPUT PARAMETERS ===
% CL: Connection matrix
% n: input connection value/list; default is ''
% === OUTPUT RESULTS ======
% no: vector of all row/vol that are somehow connected to input vector n
%
% EXAMPLE:
% [~,CC]=CPLsortinout(CPLsample(14)); c=connectofmat(CC)
%