- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello.
There was an error joining the solids.
“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. If so, eliminating the inaccuracies by making sure the solids are accurately aligned may solve the problem. This also may be due to one or both solids having complexities such as more than two faces geometrically meeting along a single edge, or two coincident edges, etc. Eliminating such conditions, or performing a sequence of Boolean operations in an order that avoids such conditions, may solve the problem.”
private Solid SolidUnion(Solid solid, Solid union)
{
★ return BooleanOperationsUtils.ExecuteBooleanOperation(solid, union, BooleanOperationsType.Union);
}private Solid GetSolid(Element element)
{
Solid solid = null;
var geometryElement = element.get_Geometry(new Options { IncludeNonVisibleObjects = true } );
if (geometryElement != null)
{
foreach (var geometryObject in geometryElement)
{
// Solid 추출
if (geometryObject is Solid geometrySolid && geometrySolid.Faces.Size > 0 && geometrySolid.Edges.Size > 0)
{
if(solid == null)
{
solid = geometrySolid;
}
else
{
solid = SolidUnion(solid, geometrySolid);
}
}
// Solid 변경
else if (geometryObject is GeometryInstance geometryInstance)
{
if (geometryInstance.GetSymbolGeometry() is GeometryElement instanceGeometryElement &&
geometryInstance.IsElementGeometry && geometryInstance.Transform.IsConformal)
{
foreach (var instanceGeometryObject in instanceGeometryElement)
{
if (instanceGeometryObject is Solid instanceGeometrySolid && instanceGeometrySolid.Faces.Size > 0 && instanceGeometrySolid.Edges.Size > 0)
{
if (solid == null)
{
solid = instanceGeometrySolid;
}
else
{
solid = SolidUnion(solid, instanceGeometrySolid);
}
}
}
}
}
}
}
return solid;
}
Please refer to the above source and attached file.
The red, orange, and yellow lines are different objects and are joined together.
However, an error occurs when only the orange Element is initially loaded. Is there a solution?
The reason for solid union was to try to perform an interference test because of the complex family, but this error appeared.
I don't know if there are any other categories other than walls with these symptoms.
Thanks.
Solved! Go to Solution.