下图为Revit 2020 API文档,使用此行代码,可对Revit几何solid求其并集,交集或差集
此为代码实现段:
CurveLoop curveLoop = CurveLoop.Create(profile);
Solid cubic = GeometryCreationUtilities.CreateExtrusionGeometry(new CurveLoop[] { curveLoop }, XYZ.BasisZ, brickThick / 304.8);
Solid intersection = BooleanOperationsUtils.ExecuteBooleanOperation(cubic, FloorSolid, BooleanOperationsType.Intersect);
BooleanOperationsType提供三个枚举,分别为Difference(差集),Intersect(交集)、Union(并集)