by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - 4Bar/Linkages
Introduced first in SolidGeometry 4.6, Creation date: 2019-06-03, Last change: 2025-09-14
CPL=CPLofPosefourbarshaping(PS,[aps,SCPL,rel,XCPLW,XCPLA,XCPLR,XCPL1])
PS: | Pose and fourbar linkage struct including GPL and GAL | |
aps: | [solution, limiting order] | |
SCPL: | Contour to shape | |
rel: | CPL is moved relative to 'P'ose, 'C'rank, or 'Swing' or 'WORLD' | |
XCPLW: | Static obstacles in the environment | |
XCPLA: | Obstacle contours attached to Pose | |
XCPLR: | Obstacle contour moved with crank | |
XCPL1: | Obstacle contour moved with swing |
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