I can't subtract one object from another

There are 2 solid objects. But for some reason, in one position, I can’t subtract one from the other. But if you significantly move one object lower, then everything turns out, what is the reason?


2solidintersect.skp (260.5 KB)

Scale it up .x10

SketchUp api solution

model = Sketchup.active_model
selection = model.selection
comp1 = selection[0]
comp2 = selection[1]
pt1 = ORIGIN.transform(comp1.transformation)
pt2 = ORIGIN.transform(comp2.transformation)
pt3 = [[pt1.x,pt2.x].min,[pt1.y,pt2.y].min,[pt1.z,pt2.z].min]
tr = Geom::Transformation.scaling(pt3, 10)
tr2 = Geom::Transformation.scaling(pt3, 0.1)
comp1.transformation = tr*comp1.transformation
comp2.transformation = tr*comp2.transformation
result=comp1.trim(comp2)
result.transformation = tr2*result.transformation
comp1.transformation = tr2*comp1.transformation