[TD]fix perspective projection

- the logic for the perspective option with the precise
  HLR algo was inadvertently removed in the multithread
  modifications.
This commit is contained in:
wandererfan
2022-08-30 16:37:35 -04:00
committed by WandererFan
parent 5ea33e9c4b
commit 2b5452d19d

View File

@@ -163,17 +163,21 @@ void GeometryObject::projectShape(const TopoDS_Shape& inShape,
{
clear();
Handle(HLRBRep_Algo) brep_hlr;
try {
brep_hlr = new HLRBRep_Algo();
// brep_hlr->Debug(true);
brep_hlr->Add(inShape);
HLRAlgo_Projector projector( viewAxis );
brep_hlr->Projector(projector);
if (m_isPersp) {
double fLength = std::max(Precision::Confusion(), m_focus);
HLRAlgo_Projector projector( viewAxis, fLength );
brep_hlr->Projector(projector);
} else {
HLRAlgo_Projector projector( viewAxis );
brep_hlr->Projector(projector);
}
brep_hlr->Update();
brep_hlr->Hide();
}
catch (const Standard_Failure& e) {
Base::Console().Error("GO::projectShape - OCC error - %s - while projecting shape\n",