Element a= Extrusion(7.2 * UorPerMas, 3.8 * UorPerMas, 0.4 * UorPerMas, 0.4 * UorPerMas, 1 * UorPerMas) ; Element b = Extrusion(7.0 * UorPerMas, 3.6 * UorPerMas, 0 * UorPerMas, 0.3 * UorPerMas, 1 * UorPerMas); SolidKernelEntity entityOut1 = null; SolidKernelEntity entityOut2 = null; Convert1.ElementToBody(out entityOut1, a, true, true, true); Convert1.ElementToBody(out entityOut2, b, true, true, true); SolidKernelEntity[] solidKerEnti = new SolidKernelEntity[1]; solidKerEnti[0] = entityOut2; if(BentleyStatus.Success == Modify.BooleanIntersect(ref entityOut1, ref solidKerEnti, 1)) { MessageBox.Show("boolean OK"); } Element eleResult; Convert1.BodyToElement(out eleResult, entityOut1, null, Session.Instance.GetActiveDgnModelRef()); eleResult.AddToModel();
能否把您生成的模型上传上来
是我太粗心了,把BooleanSubtract写成了BooleanIntersect,打扰老师了,实在不好意思