How to hide those black border wire? Then we can see the pure model

natalia

Moderator
Staff member
Hi, @jrzou

Please give details where do you find this 'DisplayShape' method? Unfortunatelly I can not find it neither in OCCT nor in AnalysisSitus or lessons. It would be useful to have a look at the implementation of it.

Have you tried loading other STL files using this method, e.g. files of OCCT, placed in OCCT/data/stl? It might help and give answer whether it's the specific of this file or parameters of Display.
 

jrzou

CAD practitioner
Hi, @jrzou

Please give details where do you find this 'DisplayShape' method? Unfortunatelly I can not find it neither in OCCT nor in AnalysisSitus or lessons. It would be useful to have a look at the implementation of it.

Have you tried loading other STL files using this method, e.g. files of OCCT, placed in OCCT/data/stl? It might help and give answer whether it's the specific of this file or parameters of Display.
from OCC.Display import OCCViewer
'DisplayShape' method is from PythonOCC library.
 

natalia

Moderator
Staff member
@jrzou, it seems the useful repository, thank you a lot)

After some investigating it (theoretically only), the idea is that the object is shown in ‘bounding box’ mode. You may see it in AIS_Shape::Compute when theMode == 2:

C++:
void AIS_Shape::Compute (const Handle(PrsMgr_PresentationManager)& ,
                         const Handle(Prs3d_Presentation)& thePrs,
                         const Standard_Integer theMode)
{
  ...   
    // Bounding box.
    case 2:
    {
      if (IsInfinite())
      {
        StdPrs_WFShape::Add (thePrs, myshape, myDrawer);
      }
      else
      {
        Prs3d_BndBox::Add (thePrs, BoundingBox(), myDrawer);
      }
    }
...
}

Also, if you give the ‘texture’ parameter in DisplayShape, you may be is in this mode in AIS_TexturedShape object. (I’m not sure because do not know which version of OCC and PythonOCC you use)

May you debug or put some message info to check this hypothesis?
 

jrzou

CAD practitioner
@jrzou, it seems the useful repository, thank you a lot)

After some investigating it (theoretically only), the idea is that the object is shown in ‘bounding box’ mode. You may see it in AIS_Shape::Compute when theMode == 2:

C++:
void AIS_Shape::Compute (const Handle(PrsMgr_PresentationManager)& ,
                         const Handle(Prs3d_Presentation)& thePrs,
                         const Standard_Integer theMode)
{
  ...  
    // Bounding box.
    case 2:
    {
      if (IsInfinite())
      {
        StdPrs_WFShape::Add (thePrs, myshape, myDrawer);
      }
      else
      {
        Prs3d_BndBox::Add (thePrs, BoundingBox(), myDrawer);
      }
    }
...
}

Also, if you give the ‘texture’ parameter in DisplayShape, you may be is in this mode in AIS_TexturedShape object. (I’m not sure because do not know which version of OCC and PythonOCC you use)

May you debug or put some message info to check this hypothesis?
First of all, I am sorry for took that long to reply you, casue I'm bother by something else.
I found the official example of PythonOCC.
There is the answer for this question, thanks you for your friendly replies.
1656396746657.png
As for the ‘texture’ parameter in DisplayShape, I believe it's about something else.
 
Top