View Issue Details

IDProjectCategoryView StatusLast Update
0028475CommunityOCCT:Modeling Algorithmspublic2019-10-06 11:39
ReporterWestermann Assigned Tojgv 
PrioritynormalSeverityminor 
Status assignedResolutionopen 
PlatformWindowsOSVC++ 2015 
Product Version7.1.0 
Summary0028475: HLR IN 7.1.0 DIFFERENT TO 7.0.0
Description try to use now 7.1.0 but the HLR is very different.

using HLRBRep_PolyAlgo myAlgo = HLRBRep_PolyAlgo();

TopoDS_Shape VCompound = aHLRToShape.VCompound(myShape());

you can see the differences in the attached PDF.
Steps To Reproducebool STDCALL TOccSolidManager::doHiddenLinePoly(TOccSolidBaseList* hard, double Rotatex, double Rotatez)
{
  try {
    if (hard && (hard->count() > 0)) {
      // Build The algorithm object
      HLRBRep_PolyAlgo myAlgo = HLRBRep_PolyAlgo();
      // Add Shapes into the algorithm

      for (int i = 0; i < hard->count(); i++) {
        TOccSolid* temp = (TOccSolid*)hard->getSolid(i);
        // TopoDS_Shape aShape = TopoDS_Shape(temp->getShape());
        TopoDS_Shape aShape = temp->getShape();
        myAlgo.Load(aShape);
      }

  // Create Rotation
      gp_Pnt aPnt(0, 0, 0);
      /* gp_Dir aDir(Direction.x, Direction.y, Direction.z);
      gp_Dir aDirX(DirectionX.x, DirectionX.y, DirectionX.z);*/

      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 :
      
      // TopoDS_Shape VCompound = aHLRToShape.VCompound();

      for (int i = 0; i < hard->count(); i++) {
        TOccSolid* temp = (TOccSolid*)hard->getSolid(i);
        // Clear previus data
        temp->clearHidden();
        // Visible Parts
        TopoDS_Shape VCompound = aHLRToShape.VCompound(temp->getShape());
        getEdges(temp, VCompound, false);
        VCompound = aHLRToShape.OutLineVCompound(temp->getShape());
        getEdges(temp, VCompound, false);
        VCompound = aHLRToShape.Rg1LineVCompound(temp->getShape());
        getEdges(temp, VCompound, false);
        VCompound = aHLRToShape.RgNLineVCompound(temp->getShape());
        getEdges(temp, VCompound, false);

        // Hidden Parts
        VCompound = aHLRToShape.HCompound(temp->getShape());
        getEdges(temp, VCompound, true);
        VCompound = aHLRToShape.OutLineHCompound(temp->getShape());
        getEdges(temp, VCompound, true);
        VCompound = aHLRToShape.Rg1LineHCompound(temp->getShape());
        getEdges(temp, VCompound, true);
        VCompound = aHLRToShape.RgNLineHCompound(temp->getShape());
        getEdges(temp, VCompound, true);
      
      }

      return true;
    }
    return false;
  }
  catch (...) {
    doLOG(L"Exception in calcHidden");
    return false;
  }
}
Additional information
and documentation updates
https://www.opencascade.com/content/hlr-710-different-700
TagsNo tags attached.
Test case number

Attached Files

  • OCC_7.1.pdf (17,809 bytes)
  • occ_problem.zip (781,022 bytes)
  • bug28475_solid118.brep (30,573 bytes)
  • bug28475_solid118.png (35,192 bytes)

Relationships

related to 0028242 closedapn [Regression] HLR Poly Algo has broken edges 

Activities

Westermann

2017-02-20 12:02

reporter  

OCC_7.1.pdf (17,809 bytes)

msv

2017-02-20 12:28

developer   ~0063910

Could you provide a sample of BRep file to reproduce the problem?

Westermann

2017-02-20 13:01

reporter  

occ_problem.zip (781,022 bytes)

Westermann

2017-02-20 13:02

reporter   ~0063912

Hope these Helps.
The only difference is the OCC Version

msv

2017-02-20 15:50

developer   ~0063921

Thank you for the shapes (though it would be easier for us to process it using one brep file containing compound shape).
We will take care of this bug if there are free resources or some investment.

abv

2017-02-20 17:03

manager   ~0063925

DRAW script to load all shapes in one compound:

set i 0
set ll {}
foreach f [glob *.brep] { restore $f a_[incr i]; lappend ll a_$i }
eval compound $ll c

DRAW script to reproduce HLR problem:

pload VISUALIZATION
restore [locate_data_file bug28475_solid118.brep] a
vdisplay a
vviewparams -scale 596 -proj 0.0307502 -0.82342 -0.566598 -up -0.0346066 -0.567403 0.822712 -eye 5.2557 -0.600219 -0.985466 -at 5.06152 4.5993 2.59234
vhlr on

abv

2017-02-20 17:04

manager  

bug28475_solid118.brep (30,573 bytes)

abv

2017-02-20 17:05

manager  

bug28475_solid118.png (35,192 bytes)

Westermann

2017-09-15 23:27

reporter   ~0070615

Reminder sent to: abv

This is still a valid problem in 7.2,
is there anything i can do for look at it?

Westermann

2018-05-03 15:46

reporter   ~0075781

Reminder sent to: jgv

I was looking with 7.3 Beta, the problem persists. Any chance to get it in 7.3?

Issue History

Date Modified Username Field Change
2017-02-20 12:02 Westermann New Issue
2017-02-20 12:02 Westermann Assigned To => oan
2017-02-20 12:02 Westermann File Added: OCC_7.1.pdf
2017-02-20 12:14 oan Category OCCT:Mesh => OCCT:Visualization
2017-02-20 12:15 oan Assigned To oan => jgv
2017-02-20 12:17 kgv Category OCCT:Visualization => OCCT:Modeling Algorithms
2017-02-20 12:17 kgv Assigned To jgv => msv
2017-02-20 12:28 msv Note Added: 0063910
2017-02-20 12:28 msv Assigned To msv => Westermann
2017-02-20 12:28 msv Status new => feedback
2017-02-20 13:01 Westermann File Added: occ_problem.zip
2017-02-20 13:02 Westermann Note Added: 0063912
2017-02-20 15:50 msv Note Added: 0063921
2017-02-20 15:52 msv Assigned To Westermann => jgv
2017-02-20 15:52 msv Status feedback => assigned
2017-02-20 17:03 abv Note Added: 0063925
2017-02-20 17:04 abv File Added: bug28475_solid118.brep
2017-02-20 17:05 abv File Added: bug28475_solid118.png
2017-09-15 23:27 Westermann Note Added: 0070615
2018-02-26 14:10 dipts Relationship added related to 0028242
2018-05-03 15:46 Westermann Note Added: 0075781