Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed regression in processing IfcEdgeCurve with same EdgeStart and EdgeEnd #425

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion Xbim.Geometry.Engine/XbimCompound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,17 @@ namespace Xbim
builder.UpdateVertex(endVertex, trim2Tolerance);

BRepBuilderAPI_MakeEdge edgeMaker(sharedEdgeGeom, startVertex, endVertex, trimParam1, trimParam2);
/// in current official IFC documentation, the start and end can be the same, hence resulting the curve not getting trimmed
/// see https://standards.buildingsmart.org/IFC/RELEASE/IFC4/ADD2_TC1/HTML/schema/ifctopologyresource/lexical/ifcedge.htm
/// in "Attribute Definitions", for param 2 "EdgeEnd": The same vertex can be used for both EdgeStart and EdgeEnd.
/// this appears to be a regression comparing to older versions of this function (InitAdvancedFaces)
/// which uses XbimEdge to do the trimming and handled this situation
///
/// the fix: here we simply do not pass the trimming params to the edgeMaker and everything goes one just fine
if (foundP1 && foundP2 && trimParam1 == trimParam2)
{
edgeMaker = BRepBuilderAPI_MakeEdge(sharedEdgeGeom);
}
if (!edgeMaker.IsDone())
{
BRepBuilderAPI_EdgeError err = edgeMaker.Error();
Expand Down Expand Up @@ -2095,4 +2106,4 @@ namespace Xbim


}
}
}