problem with HLRBRep_PolyAlgo

I have a problem with HLRBRep_PolyAlgo in Version 7.2  
in the attached PDF you will see the differences between 7.0 and 7.2, there is nothing else changed.
Is these a bug or do i something wrong?
The code i use to create these drawings is:

bool STDCALL OccShapeManager::doHiddenLinePoly(OccShapeListIntf* hiddenlist, double Rotatex, double Rotatez)
{
  try {
    if (hiddenlist && (hiddenlist->count() > 0)) { 
      // Build The algorithm object
      HLRBRep_PolyAlgo myAlgo = HLRBRep_PolyAlgo();
      // Add Shapes into the algorithm
      for (int i = 0; i < hiddenlist->count(); i++) {
        OccClassImpl* temp = (OccClassImpl*)hiddenlist->get(i);
        if (temp) {
          TopoDS_Shape aShape = temp->getShape();
          if (!aShape.IsNull())
            myAlgo.Load(aShape);
        }
      }

      if (myAlgo.NbShapes() == 0) return false;

  // Create Rotation
      gp_Pnt aPnt(0, 0, 0);
      gp_Dir zDir(0, 0, 1);
      gp_Dir xDir(1, 0, 0);

      gp_Ax2 anAx2d;
      anAx2d.Rotate(gp_Ax1(aPnt, xDir), Rotatez);
      anAx2d.Rotate(gp_Ax1(aPnt, zDir), -Rotatex);

      HLRAlgo_Projector myProjector = HLRAlgo_Projector(anAx2d);

      //// Set The Projector (myProjector is a HLRAlgo_Projector)
      myAlgo.Projector(myProjector);
      //// Build HLR
      myAlgo.Update();
        
      //// Build the extraction object :
      HLRBRep_PolyHLRToShape aHLRToShape = HLRBRep_PolyHLRToShape();
      aHLRToShape.Update(&myAlgo);

      //// extract the results :
     // Loop over all entries in hiddenlist and fill the Data
      for (int i = 0; i < hiddenlist->count(); i++) {
        OccClassImpl* temp = (OccClassImpl*)hiddenlist->get(i);
        if (temp) {
            // Clear previous data defined in OccClassImpl
            temp->clearHidden();
            // Pick up the Shape from Temp
            TopoDS_Shape internal = temp->getShape();
            if (!internal.IsNull()) {
                // Visible Parts
                TopoDS_Shape VCompound = aHLRToShape.VCompound(internal);
                insertHiddenData(temp, VCompound, false);
                VCompound = aHLRToShape.OutLineVCompound(internal);
                insertHiddenData(temp, VCompound, false);
                VCompound = aHLRToShape.Rg1LineVCompound(internal);
                insertHiddenData(temp, VCompound, false);
                VCompound = aHLRToShape.RgNLineVCompound(internal);
                insertHiddenData(temp, VCompound, false);

                // Hidden Parts
                VCompound = aHLRToShape.HCompound(internal);
                insertHiddenData(temp, VCompound, true);
                VCompound = aHLRToShape.OutLineHCompound(internal);
                insertHiddenData(temp, VCompound, true);
                VCompound = aHLRToShape.Rg1LineHCompound(internal);
                insertHiddenData(temp, VCompound, true);
                VCompound = aHLRToShape.RgNLineHCompound(internal);
                insertHiddenData(temp, VCompound, true);
            }
        }      
      }    
      return true;
    }
    return false;
  }
  catch (...) {
    doLOGError(L"Exception in calcHidden");
    return false;  
  }
}

 

Kirill Gavrilov's picture

There is a Bugtracker for registering bugs, if you think that this is an issue within OCCT and you are able providing a reproducible test case (preferrable using Draw Harness):
https://tracker.dev.opencascade.org/

Friedrich Westermann's picture

There is already a Bugtracker entry : 0028475
It was for 7.1 but is still valid.