Please implement - for 3D objects, create a function of logical subtraction

Please implement - for 3D objects, create a function of logical subtraction (for inserting built-in fireplaces, built-in lamps, niches, etc.).