View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0032968||Community||OCCT:Data Exchange||public||2022-05-11 20:48||2022-05-14 21:47|
|Reporter||mr baley||Assigned To||bugmaster|
|Priority||normal||Severity||just a question|
|Status||closed||Resolution||no change required|
|Summary||0032968: TopLoc_Location::IsEqual and BRep_CurveOnSurface::IsCurveOnSurface seem to not match with each other|
|Description||I'm trying to use BRep_Tool::CurveOnSurface to retrieve a Handle(Geom2d_Curve).|
I'm working with a step model i imported using STEPControl_Reader.
The model is correctly displayed.
I also checked the TopoDS_Edge and the TopoDS_Face i'm passing to BRep_Tool::CurveOnSurface with BRepCheck_Analyzer and it returns IsValid() == true for both.
When debugging i can see that the BRep_TEdge contains four BRep_CurveRepresentation, a BRep_Curve3D, two BRep_CurveOnSurface and a BRep_CurveOn2Surfaces.
BRep_Tool::CurveOnSurface iterates through all BRep_CurveRepresentation of the TopoDS_Edge and calls BRep_CurveOnSurface::IsCurveOnSurface for each BRep_CurveRepresentation.
BRep_CurveOnSurface::IsCurveOnSurface compares the surfaces by pointers and the TopLoc_Locations using this Equal implementation which, and this is the reason why in this case BRep_Tool::CurveOnSurface returns a null Handle, returns false if one returns true for IsIdentity().
I honestly don't know what's the reasoning behind this implementation.
I was thinking that maybe transformations are not supposed to be empty (because that's what TopLoc_Location::IsIdentity() checks) but STEPControl_Reader doesn't report any errors and BRepCheck_Analyzer says everything is valid.
I might be able to work around this by looping through all curves myself and replacing empty location with actual identity transformations but it feels wrong.
What am i missing?
|Steps To Reproduce||Iterate through all edges, take the first face of each, and try BRep_Tool::CurveOnSurface|
and documentation updates
|I'm unsure what's the better place; i also posted this here: https://dev.opencascade.org/content/toploclocationisequal-and-brepcurveonsurfaceiscurveonsurface-seem-not-match-each-other|
|Tags||No tags attached.|
|Test case number|
Question answered here: https://dev.opencascade.org/content/toploclocationisequal-and-brepcurveonsurfaceiscurveonsurface-seem-not-match-each-other
Sorry for the double post.
|2022-05-11 20:48||mr baley||New Issue|
|2022-05-11 20:48||mr baley||Assigned To||=> msv|
|2022-05-11 20:48||mr baley||File Added: problem.stp_.7z|
|2022-05-11 21:00||mr baley||File Deleted: problem.stp_.7z|
|2022-05-11 21:01||kgv||Category||OCCT:Modeling Data => OCCT:Data Exchange|
|2022-05-11 21:01||kgv||Product Version||7.7.0 => 7.6.0|
|2022-05-12 14:00||mr baley||Assigned To||msv => gka|
|2022-05-12 14:00||mr baley||Status||new => resolved|
|2022-05-12 14:00||mr baley||Note Added: 0108411|
|2022-05-12 15:59||kgv||Assigned To||gka => bugmaster|
|2022-05-12 15:59||kgv||Status||resolved => feedback|
|2022-05-14 21:47||azv||Status||feedback => closed|
|2022-05-14 21:47||azv||Resolution||open => no change required|