function mp= Build_testCube() % Bulid mp obj (contains models and all arguments) %% init pace=2; Pst=[-2 0 -2]-pace*0.52; Ped=[2 4 2 ]; Ped=FCM_dV.round_Ped(Pst,Ped,pace); maxdeep=6; order=2; viewxy=[0 60]; Shape.accessThreshold(pace/maxdeep/2/2/2);% Oa=[0 0 0]; Ra=[0 0 0]; rvec=(Ped-Pst)/pace num_cells=rvec(1)*rvec(2)*rvec(3); fprintf("num_cells: %.0f\n",num_cells);% show num of cells %% add SS lib & python path % SuiteSparse_paths2(); additon_path=pwd; if count(py.sys.path,additon_path) == 0 insert(py.sys.path,int32(0),additon_path); end %% assemble c0 % c=CSG("STL",[pwd,'/SolidWoks Files/Piston28/piston28.STL'],'init'); c=CSG("Cube",'corner',[-2 0 -2],Ra,[4 4 4]); V0=1; % time and calculate Volume tic fcmv=FCM_V(Pst,Ped,pace,maxdeep,order,@c.calSDF,@(X) ones(size(X,1),1));% |||1 dV V0=fcmv.calIntegral_V(); fprintf('V0: %f ,Time: %f\n',V0,toc); %% build Dirichlet/Neumann boundary eepsD=3e-2; eepsN=1.5e-2; Dirich_csg=CSG("Cube",'corner',[-2 0 -2],Ra,[4 eps 4]); Dirich_csg.judge_func=@(X) abs(X(:,2))