creating and merging surfaces
Video explains the method of modeling in openSCAD with python python code: _______________________________________________________________________ from openscad4 import * a=circle(30,s=100) b=circle(4,cp=[-35,0],s=20) a1=two_cir_tarc(a,b,20,s=10) a2=two_cir_tarc(b,a,20,s=10) s1=concave_hull(a+b+a1+a2) s1=translate([0,0,50],offset(s1,3)) l1=cr3dt([[-42,0,50],[0,0,5,1.5],[3,0,0,2],[8,0,-10,20],[2,0,-10]],s=10) l2=cr3dt([[33,0,50],[0,0,5,1.5],[-3,0,0,1.5],[-3,0,-20]],s=10) l1=equidistant_path(l1,25) l2=equidistant_path(l2,25) s2=cir_3p_3d(arc_2p_3d([0,0,1],l1[-1],l2[-1],28),100) # sr1=solid_from_4_lines(s1,s2,l1,l2) s3=translate([0,0,-35],offset_3d(sr1[-1],-3)) s4=translate([0,0,-35],offset_3d(sr1[-1],-6)) l3=corner_n_radius_list_3d([sr1[-1][0],s3[0],s4[0]],[0,3,0],n=10) l4=corner_n_radius_list_3d([sr1[-1][57],s3[57],s4[57]],[0,3,0],n=10) sr2=solid_from_4_lines(sr1[-1],s4,l3,l4) sr2=[path2path1(sr1[-1],p) for p in sr2] sr3= sr1+sr2[1:] sr3=cpo([bezier(p,50) for p in cpo(sr3)]) sr4=surface_offset(sr3,0.5) sol1=flip(sr4)+sr3 fo(f''' {swp(sol1)} ''') _____________________________________________________________________ following libraries would be required: numpy, scipy, sympy, scikit-image need to download openscad4.py from here: https://github.com/sprabhakar2006/openSCAD/blob/main/openscad4.py also download and install software openSCAD: https://openscad.org/downloads.html preferably install the latest snapshot To run this python code, I use Jupyter Notebook
Download
1 formatsVideo Formats
Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.