View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0027011 | Community | OCCT:Visualization | public | 2015-12-17 15:21 | 2017-02-28 11:42 |
Reporter | hwliu11 | Assigned To | bugmaster | ||
Priority | low | Severity | minor | ||
Status | closed | Resolution | unable to reproduce | ||
Platform | Windows | OS | VC++ 2015 | ||
Product Version | 6.9.1 | ||||
Summary | 0027011: SelectMgr_RectangularFrustum bug cause select face failed | ||||
Description | VIS module use SelectMgr_RectangularFrustum to dective shape,but when change to select face,OBB data failed,so select none face.To fix it,should rewrite blew function NCollection_Handle<SelectMgr_BaseFrustum> SelectMgr_RectangularFrustum::ScaleAndTransform (const Standard_Integer theScaleFactor, const gp_Trsf& theTrsf) here if (!isToScale && !isToTrsf) return aRes ;//return a empty data,so test failed I think fixed it if (!isToScale && !isToTrsf) { aRes->myPixelTolerance=myPixelTolerance; aRes->myIsOrthographic=myIsOrthographic; aRes->myBuilder= myBuilder; aRes->myIsOrthographic = myIsOrthographic; aRes->myNearPickedPnt = myNearPickedPnt; aRes->myFarPickedPnt = myFarPickedPnt; aRes->myViewRayDir = myViewRayDir; aRes->myMousePos = myMousePos; for (int i = 0; i <6;++i) { aRes->myPlanes[i] = myPlanes[i]; } for (int i = 0; i < 6; ++i) { aRes->myVertices[i] = myVertices[i]; } for (int i = 0; i < 6; ++i) { aRes->myMaxVertsProjections[i] = myMaxVertsProjections[i]; } for (int i = 0; i < 6; ++i) { aRes->myMinVertsProjections[i] = myMinVertsProjections[i]; } for (int i = 0; i <3; ++i) { aRes->myMaxOrthoVertsProjections[i] = myMaxOrthoVertsProjections[i]; } for (int i = 0; i <3; ++i) { aRes->myMinOrthoVertsProjections[i] = myMinOrthoVertsProjections[i]; } for (int i = 0; i < 6; ++i) { aRes->myEdgeDirs[i] = myEdgeDirs[i]; } return NCollection_Handle<SelectMgr_BaseFrustum>(aRes); } any good idea? | ||||
Tags | No tags attached. | ||||
Test case number | |||||
|
Hello hwliu11, maybe you can share Draw test script or sequence of OCCT API function calls here to reproduce the issue? |
|
My application use VTK,lately add OCC to build geometry,so data render with VTK,include selected shape.My first OCC version is 6.7.0,then update to 6.9.1,then I found that detecting face failed,and found the problem where occurred via debugging. First call IVtkTools_ShapePicker::SetSelectionMode(GetDrawActor(), SM_Face, Standard_True) then using mouse to pick shape via class IVtkDraw_Interactor,whne mouse moving,highlight the target shape via function void IVtkDraw_Interactor::MoveTo (Standard_Integer theX, Standard_Integer theY) the call stack likes blew SelectMgr_RectangularFrustum::ScaleAndTransform line 327 C++ SelectMgr_SelectingVolumeManager::ScaleAndTransform line 57 C++ SelectMgr_ViewerSelector::computeFrustume line 279 C++ SelectMgr_ViewerSelector::traverseObject line 369 C++ SelectMgr_ViewerSelector::TraverseSensitives line 448 C++ IVtkOCC_ViewerSelector::Pick line 74 C++ IVtkOCC_ShapePickerAlgo::Pick line 208 C++ IVTKTools_ShapePicker::doPickImpl line 185 C++ IVTKTools_ShapePicker::pick line 156 C++ IVTKTools_ShapePicker::Pick line 107 C++ IVtkDraw_Interactor::MoveTo line 231 C++ IVtkDraw_Interactor::OnMouseMove line 941 C++ the bug only accurred when I load a file(STEP IGES or BREP),don't occur when I build a shape by parameters. Function ScaleAndTransform return an empty SelectMgr_RectangularFrustum,this cause SelectMgr_ViewerSelector::checkOverlap if (theEntity->Matches (theMgr, aPickResult)) not true,dective failed. Is my misused or a bug? |
|
Dear hwliu11, I have tried different BREP shapes from standard OCCT dataset, but still can not reproduce the bug using the following Draw script on both OCCT v6.9.1 and current master: pload ALL VIS ivtkinit restore $env(CASROOT)/data/occ/Bottom.brep b ivtkdisplay b ivtkfit ivtkmoveto 200 200 ivtkmoveto 0 0 ivtksetselmode b 4 1 ivtkmoveto 200 200 It would be great if you can share problematic shape or/and add missing details to the test case. In case if the shape is private, please give more details on following: - are you customizing sensitivity factor of entities using SelectBasics_SensitiveEntity::SetSensitivityFactor or AIS_InteractiveContext::SetPixelTolerance? - does problematic shape has any location transformations set? |
|
I Debug again,the loaded file(for example brep file etc),the function of SelectBasics_SensitiveEntitystruct,HasInitLocation return true,it means the shape has TopLoc_Location data,then in file SelectMgr_RectangularFrustum.cxx,function ScaleAndTransform,line 324, const Standard_Boolean isToScale = theScaleFactor != 1; const Standard_Boolean isToTrsf = theTrsf.Form() != gp_Identity; the result isToScale==1,and isToTrsf==1,then this function return an empty SelectMgr_RectangularFrustum,cause pick failed. |
|
Dear hwliu11, please provide complete reproducible test case, either for Draw Harness (preferable) or C++ code with all referred models available. |
|
May be It'a mis report,Just Close It.Sorry |
|
Dear bugmaster, please close the bug. |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-12-17 15:21 | hwliu11 | New Issue | |
2015-12-17 15:21 | hwliu11 | Assigned To | => kgv |
2015-12-17 18:01 |
|
Note Added: 0049250 | |
2015-12-17 18:01 |
|
Assigned To | kgv => hwliu11 |
2015-12-17 18:01 |
|
Status | new => feedback |
2015-12-18 12:56 | hwliu11 | Note Added: 0049279 | |
2015-12-18 13:07 | hwliu11 | Assigned To | hwliu11 => vpa |
2015-12-23 20:35 |
|
Note Added: 0049544 | |
2015-12-23 20:35 |
|
Assigned To | vpa => hwliu11 |
2015-12-23 20:38 |
|
Note Edited: 0049544 | |
2015-12-23 21:18 | kgv | Priority | normal => low |
2016-01-17 06:01 | hwliu11 | Note Added: 0049898 | |
2016-02-20 10:46 | hwliu11 | Assigned To | hwliu11 => vpa |
2016-11-15 09:49 | kgv | Note Added: 0060335 | |
2016-11-15 09:49 | kgv | Resolution | open => unable to reproduce |
2016-11-15 09:50 | kgv | Assigned To | vpa => hwliu11 |
2017-01-02 06:32 | hwliu11 | Note Added: 0062384 | |
2017-01-02 11:17 | kgv | Note Added: 0062385 | |
2017-01-02 11:17 | kgv | Assigned To | hwliu11 => bugmaster |
2017-01-03 06:32 | hwliu11 | Assigned To | bugmaster => hwliu11 |
2017-01-03 06:36 | hwliu11 | Assigned To | hwliu11 => bugmaster |
2017-02-28 11:42 | bugmaster | Status | feedback => closed |