将Autodesk.Revit.DB.Element转换为Autodesk.Revit.DB.Solid
我已经试着从元素中提取出所有的固体,这很好,我有一个2-10个固体的列表。但问题是我不能用BooleanOperationsUtils.ExecuteBooleanOperation,将这些固体合并成一个,因为我捕捉到
Autodesk.Revit.Exceptions.InvalidOperationException:
// Failed to perform the Boolean operation for the two solids. This may be due to
// geometric inaccuracies in the solids, such as slightly misaligned faces or edges.
顺便说一句,我也看到了一些解决方案来交换固体的合并顺序,但当我有10个或更多的固体元素时(例如,一些瓶子、花瓶或复杂的椅子),这是行不通的。
也许有人知道这个问题能帮我吗?
发布于 2022-04-28 09:49:52
看看这个:https://github.com/Autodesk/revit-ifc/blob/master/Source/Revit.IFC.Import/Geometry/IFCGeometryUtil.cs您可以调整代码,其思想是将第二个实体稍微移动到一个选择的方向(例如Z),以撤消几何公差问题。它对我有用,picture2
https://stackoverflow.com/questions/71748265
复制相似问题