MantisBT
Mantis Bug Tracker Workflow

View Revisions: Issue #23186 All Revisions ] Back to Issue ]
Summary 0023186: Unable to display Graphic3d_ArrayOfPoints after migrating from OCCT 6.5.2
Revision 2012-06-19 21:49 by san
Steps To Reproduce void AIS_MyIODerivedObject::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer aMode)
{
    // create an array
    Handle (Graphic3d_ArrayOfPoints) anArray = new Graphic3d_ArrayOfPoints (8);

    // add vertices to the array
    anArray->AddVertex (10.0, 10.0, 10.0);
    anArray->AddVertex (10.0, 10.0, 0.0);
    anArray->AddVertex (10.0, 0.0, 10.0);
    anArray->AddVertex (10.0, 0.0, 0.0);
    anArray->AddVertex ( 0.0, 10.0, 10.0);
    anArray->AddVertex ( 0.0, 10.0, 0.0);
    anArray->AddVertex ( 0.0, 0.0, 10.0);
    anArray->AddVertex ( 0.0, 0.0, 0.0);

    // add the array to the structure
    Handle (Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup (aPresentation);
    aGroup->BeginPrimitives ();
    aGroup->AddPrimitiveArray (anArray);
    aGroup->EndPrimitives ();
}

In DRAW:
vdrawparray a points 0 v 0 0 0 v 0 0 10 v 0 10 10 v 0 10 0
Revision 2012-06-19 21:41 by san
Steps To Reproduce void AIS_MyIODerivedObject::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer aMode)
{
    // create an array
    Handle (Graphic3d_ArrayOfPoints) anArray = new Graphic3d_ArrayOfPoints (8);

    // add vertices to the array
    anArray->AddVertex (10.0, 10.0, 10.0);
    anArray->AddVertex (10.0, 10.0, 0.0);
    anArray->AddVertex (10.0, 0.0, 10.0);
    anArray->AddVertex (10.0, 0.0, 0.0);
    anArray->AddVertex ( 0.0, 10.0, 10.0);
    anArray->AddVertex ( 0.0, 10.0, 0.0);
    anArray->AddVertex ( 0.0, 0.0, 10.0);
    anArray->AddVertex ( 0.0, 0.0, 0.0);

    // add the array to the structure
    Handle (Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup (aPresentation);
    aGroup->BeginPrimitives ();
    aGroup->AddPrimitiveArray (anArray);
    aGroup->EndPrimitives ();
}

In DRAW:
vdrawparray a points EnableVBO=0 v 0 0 0 v 0 0 10 v 0 10 10 v 0 10 0
Revision 2012-06-19 21:38 by san
Steps To Reproduce void AIS_MyIODerivedObject::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
const Handle(Prs3d_Presentation)& aPresentation,
const Standard_Integer aMode)
{
    // create an array
    Handle (Graphic3d_ArrayOfPoints) anArray = new Graphic3d_ArrayOfPoints (8);

    // add vertices to the array
    anArray->AddVertex (10.0, 10.0, 10.0);
    anArray->AddVertex (10.0, 10.0, 0.0);
    anArray->AddVertex (10.0, 0.0, 10.0);
    anArray->AddVertex (10.0, 0.0, 0.0);
    anArray->AddVertex ( 0.0, 10.0, 10.0);
    anArray->AddVertex ( 0.0, 10.0, 0.0);
    anArray->AddVertex ( 0.0, 0.0, 10.0);
    anArray->AddVertex ( 0.0, 0.0, 0.0);

    // add the array to the structure
    Handle (Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup (aPresentation);
    aGroup->BeginPrimitives ();
    aGroup->AddPrimitiveArray (anArray);
    aGroup->EndPrimitives ();
}


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker