For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

AIS_Trihedron and AIS_TexturedShape

angel's picture
Forums: 

Hi body,
If I use AIS_TexturedShape after using AIS_Trihedron, the Testure result is black. my test Code as following,

// Test1
Handle(AIS_Trihedron) aTrihedron;
Handle(Geom_Axis2Placement) aTrihedronAxis=new Geom_Axis2Placement(gp::XOY());
aTrihedron=new AIS_Trihedron(aTrihedronAxis);
aTrihedron->UnsetSize();
myAISContext->Display(aTrihedron);

Handle(AIS_TexturedShape) aFace = new AIS_TexturedShape(Face);
aFace->SetTextureFileName(aFile);
aFace->SetTextureMapOn();
aFace->SetDisplayMode(3);
myView->SetSurfaceDetail(V3d_TEX_ALL);
myAISContext->Display(aFace); // the result is black

// Test2
Handle(AIS_Trihedron) aTrihedron;
Handle(Geom_Axis2Placement) aTrihedronAxis=new Geom_Axis2Placement(gp::XOY());
aTrihedron=new AIS_Trihedron(aTrihedronAxis);
aTrihedron->UnsetSize();

Handle(AIS_TexturedShape) aFace = new AIS_TexturedShape(Face);
aFace->SetTextureFileName(aFile);
aFace->SetTextureMapOn();
aFace->SetDisplayMode(3);
myView->SetSurfaceDetail(V3d_TEX_ALL);
myAISContext->Display(aFace); // the result is ok
myAISContext->Display(aTrihedron);

Who can tell me what's going on? Because I need to use Texture mapping on the workspace which has Trihedron.

Sincerely,
Angel