by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - ENG-Components
Introduced first in SolidGeometry 4.9, Creation date: 2020-08-02, Last change: 2025-09-14
SG=SGslidingcoverofCPLz(CPL,[w,T,op])
CPL: | Contour of a convex hull | |
w: | [w h e sl] wall thickness of the walls ; height of the plate | |
T: | Frame to align the cover; not supported yet | |
op: | [x y] for an opening slot at y-min |
SG: | cellPlate consisting of at least three parts |
SGslidingcoverofCPLz (PLsquare(10,20),[2 4]); % Contour with wall thickness 2 and desired height 4
%% Create a housing for a motor with an sliding cover
SGmotorSolExpert; M=ans; [C,~,CPL]=SGcapontop(M,[inf 2],'','simple'); SGplotalpha(C,'w',0.2);
SGslidingcoverofCPLz(CPL,[2 4]); P=ans; % Create a Slidung Cover
SGtransrelSG(P,C,'under'); P=ans; % Position Sliding Cover
SGanalyzeGroupParts({P,C}); SG=ans; % Fuse Parts
SGunion(SG.SG); SGanalyzeGroupParts(ans) % Show the new solids
SGslidingcoverofCPLz(CPLradialEdges(CPLofPL(PLsquare(20))),[1 4 2 ],'',[9 1]); % with opening