MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0028475Community[OCCT] OCCT:Modeling Algorithmspublic2017-02-20 12:022018-05-03 15:46
ReporterWestermann 
Assigned Tojgv 
PrioritynormalSeverityminor 
StatusassignedResolutionopen 
PlatformWindowsOSVC++ 2015OS Version64 bit
Product Version[OCCT] 7.1.0 
Target VersionFixed in Version 
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 Filespdf file icon OCC_7.1.pdf (17,809 bytes) 2017-02-20 12:02
zip file icon occ_problem.zip (781,022 bytes) 2017-02-20 13:01
? file icon bug28475_solid118.brep (30,573 bytes) 2017-02-20 17:04
png file icon bug28475_solid118.png (35,192 bytes) 2017-02-20 17:05

- Relationships
related to 0028242assignedjgv [Regression] HLR Poly Algo has broken edges 

-  Notes
(0063910)
msv (developer)
2017-02-20 12:28

Could you provide a sample of BRep file to reproduce the problem?
(0063912)
Westermann (reporter)
2017-02-20 13:02

Hope these Helps.
The only difference is the OCC Version
(0063921)
msv (developer)
2017-02-20 15:50

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.
(0063925)
abv (manager)
2017-02-20 17:03

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
(0070615)
Westermann (reporter)
2017-09-15 23:27

Reminder sent to: abv

This is still a valid problem in 7.2,
is there anything i can do for look at it?
(0075781)
Westermann (reporter)
2018-05-03 15:46

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-07 11:38 Westermann Note Added: 0070305
2017-09-15 23:26 Westermann Note Deleted: 0070305
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


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker