by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - 4Bar/Linkages
Introduced first in SolidGeometry 5.1, Creation date: 2022-01-28, Last change: 2025-09-15
CPL=fourbarposeCPLshaping(PS,[aps,CPL,att,XCPLW,XCPLE,XCPLC,XCPLS,LEVEL,"R12","debug"])
PS: | Pose and fourbar linkage struct including GPL and GAL | |
aps: | [solution, limiting order] | |
CPL: | Contour to shape; if empty an simple contour is created | |
att: | Given CPL is moved relatively/is attached to 'E'ffector, 'C'rank, or 'Swing' or 'WORLD' | |
XCPLW: | Static obstacles in the environment and will cut the moving CPL | |
XCPLE: | Obstacle contours attached to Pose and will cut the moving CPL | |
XCPLC: | Obstacle contour moved with crank and will cut the moving CPL | |
XCPLS: | Obstacle contour moved with swing and will cut the moving CPL |
CPL: | Collision free contour |
PosereadAPD('/Volumes/LUETH-WIN/MATLAB_files_for_experiments/basecabinet_new.APD');PS=ans;
PS=checkfourbar3Poseattachpermutation(PS,'',20)
PS.CPLE=CPLfillinside(PS.CPLE);
CPLofPosefourbarshaping(PS,[546]) % Full path of the fourbar
CPLofPosefourbarshaping(PS,[546,123]) % limited to poses 123
%% TRY WITH 546 and 153
CPLofPosefourbarshaping(PS,[546,123],'','E',''); PS.CPLE=ans; % Shape of effektor
CPLofPosefourbarshaping(PS,[546,123],'','C','',PS.CPLE); PS.CPLC=ans; % Shape of crank
CPLofPosefourbarshaping(PS,[546,123],'','S','',PS.CPLE,PS.CPLC); PS.CPLS=ans; % Shape of swing
CPLofPosefourbarshaping(PS,[546,123],'','W','',PS.CPLE,PS.CPLC,PS.CPLS); % Work Space