Cadquery is a massive pain to install. Most users use conda to get all the dependencies going which is a horrible monstrosity. That's my biggest warning.
Openscad is the best for working with existing STLs. Say you have a centered 30x10x10 mm part and you want to remove the central 10mm. My strategy could be:
1. import the part, translate it by 5mm in positive x direction, and subtract from it a centered cube larger than the part that is moved in positive x direction so that it ends at x=0:
difference(){
translate([5,0,0])import("file.stl");
translate([16,0,0])cube([32,12,12],center=true);
}
2. import the part again, translate it by 5mm in negative x direction, and subtract from it a centered cube larger than the part that is moved in negative x direction so that it ends at x=0. Because this is so similar, you can reuse the code:
for(dir=[-1,1])difference(){
translate([dir*5,0,0])import("file.stl");
translate([dir*16,0,0])cube([32,12,12],center=true);
}
3. Make a watertight join between the two - you want to make sure the two shapes overlap a tiny bit. So we change the cut cube to be out of the origin line by 0.05mm:
for(dir=[-1,1])difference(){
translate([dir*5,0,0])import("file.stl");
translate([dir*(16-0.05),0,0])cube([32,12,12],center=true);
}
protip: prefix a negative shape with # to see it in the preview - like in the above replace cube with #cube