You may take a look at VComputeHLR command implementation in Draw Harness as a reference occt.git\src\ViewerTest\ViewerTest_ObjectCommands.cxx. There are also some HLR samples could be found in OCCT sample.
HLRBRep_HLRToShape returns not a single shape but a list of shapes in different categories via dedicated methods.
This class has badly written documentation, but one may deduce:
- visible sharp edges (of C0-continuity)
HLRBRep_HLRToShape::VCompound(); - hidden sharp edges (of C0-continuity)
HLRBRep_HLRToShape::HCompound(); - visible smooth edges (G1-continuity between two surfaces)
HLRBRep_HLRToShape::Rg1LineVCompound(); - hidden smooth edges (G1-continuity between two surfaces)
HLRBRep_HLRToShape::Rg1LineHCompound(); - visible sewn edges (of CN-continuity on one surface)
HLRBRep_HLRToShape::RgNLineVCompound(); - hidden sewn edges (of CN-continuity on one surface)
HLRBRep_HLRToShape::RgNLineHCompound(); - visible outline edges ("silhouette")
HLRBRep_HLRToShape::OutLineVCompound(); - hidden outline edges ("silhouette")
HLRBRep_HLRToShape::OutLineHCompound(); - visible isoparameters
HLRBRep_HLRToShape::IsoLineVCompound(); - hidden isoparameters
HLRBRep_HLRToShape::IsoLineHCompound().
In your sample, you are looking for sharp edges of a sphere, but it has no sharp edges at all! The HLR of a sphere will have "silhouette" edges HLRBRep_HLRToShape::OutLineVCompound().
pload MODELING VISUALIZATION
psphere s 10
box s 10 10 20
vinit View1
vcomputehlr s r -algoType algo 0 0 20 0 0 1 0 1 0
top
fit