View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0031707 | Open CASCADE | OCCT:Modeling Algorithms | public | 2020-08-11 13:16 | 2020-09-15 15:56 |
Reporter | Assigned To | bugmaster | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | no change required | ||
Target Version | 7.5.0 | ||||
Summary | 0031707: Wrong faces orientation in compound after mirror transformation | ||||
Description | The following peace of code gp_Trsf aTrsf; aTrsf.SetMirror(gp_Pnt(0, 0, 0)); aShape.Move(aTrsf); causes inversion of faces orientation if shape is a compound. | ||||
Steps To Reproduce | An example of such compound is attached. A C++ code for testing is following: char aFileName[] = "D:\\NewGeom\\Development\\symmetry.brep"; std::cout << "File name: " << aFileName << std::endl; TopoDS_Shape aShape; BRep_Builder aBuilder; BRepTools::Read(aShape, aFileName, aBuilder); gp_Pln aPln; gp_Dir aDir; std::cout << "Before move" << std::endl; for (TopExp_Explorer anExp(aShape, TopAbs_FACE); anExp.More(); anExp.Next()) { TopoDS_Face aFace = TopoDS::Face(anExp.Current()); Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace); GeomLib_IsPlanarSurface isPlanarSurf(aSurf); if (isPlanarSurf.IsPlanar()) { aPln = isPlanarSurf.Plan(); aDir = aPln.Axis().Direction(); std::cout << "X=" << aDir.X() << " Y=" << aDir.Y() << " Z=" << aDir.Z() << std::endl; } } gp_Trsf aTrsf; aTrsf.SetMirror(gp_Pnt(0, 0, 0)); aShape.Move(aTrsf); std::cout << "Aftert move" << std::endl; for (TopExp_Explorer anExp(aShape, TopAbs_FACE); anExp.More(); anExp.Next()) { TopoDS_Face aFace = TopoDS::Face(anExp.Current()); Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace); GeomLib_IsPlanarSurface isPlanarSurf(aSurf); if (isPlanarSurf.IsPlanar()) { aPln = isPlanarSurf.Plan(); aDir = aPln.Axis().Direction(); std::cout << "X=" << aDir.X() << " Y=" << aDir.Y() << " Z=" << aDir.Z() << std::endl; } } | ||||
Tags | No tags attached. | ||||
Test case number | |||||
2020-08-11 13:16 developer |
symmetry.brep (4,662 bytes) |
2020-08-11 13:26 developer |
symmetry.png (1,656 bytes) |
|
Not all kinds of transformations can be applied to shapes using the method TopoDS_Shape::Move(). Only transformations that contain translation and rotation are safe. Other kinds, including scale and mirror, can and will bring unsupported behavior to shapes. For such kinds of transformations a special class must be used BRepBuilderAPI_Transform. So, this bug can be closed as not a bug. |
|
Dear Mikhail, thank you very much for the clarification. Dear BugMaster, please, close this issue. We have used the correct way within the SHAPER's source code. |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-08-11 13:16 |
|
New Issue | |
2020-08-11 13:16 |
|
Assigned To | => msv |
2020-08-11 13:16 |
|
File Added: symmetry.brep | |
2020-08-11 13:21 |
|
Steps to Reproduce Updated | |
2020-08-11 13:26 |
|
File Added: symmetry.png | |
2020-09-15 11:36 |
|
Note Added: 0094815 | |
2020-09-15 11:49 |
|
Assigned To | msv => azv |
2020-09-15 15:54 |
|
Note Added: 0094851 | |
2020-09-15 15:54 |
|
Assigned To | azv => bugmaster |
2020-09-15 15:54 |
|
Status | new => feedback |
2020-09-15 15:56 | bugmaster | Status | feedback => closed |
2020-09-15 15:56 | bugmaster | Resolution | open => no change required |