
Mon, 11/04/2019 - 05:55
Forums:
//draw point
BRepBuilderAPI_MakeVertex ver(gp_Pnt(0,0,10));
TopoDS_Shape topo_shape = ver.Vertex();
Handle(AIS_Shape) pt_ais = new AIS_Shape(topo_shape);
mwin->myContext->Display(pt_ais,true);
//draw text
Handle(AIS_TextLabel) text_label = new AIS_TextLabel();
std::string text_ = "0.06";
TCollection_ExtendedString occ_text((Standard_CString)text_.data());
text_label->SetText(occ_text);
text_label->SetPostion(gp_Pnt(0,0,0));
mwin->myContext->Display(text_label,true);
the code before
when i show point first,the point and text can display both.
when i show text first,the text cannot display.
how can i do? I want display text after point.
Tue, 11/05/2019 - 11:22
I don't see the issue in the code from the first glance.
The Draw Harness script making similar thing works as expected:
So probably your issue is somewhere around and not exactly in quoted lines.
Wed, 11/06/2019 - 04:17
Hi:
You show the text first,the point second.This is right.
Can you show the point first,the text second?
The code like below:
Wed, 11/06/2019 - 10:09
I test opencascade7.3, it is OK
Opencascade 7.4 is wrong!
The Error is TKOpenGL | Type:Error|.........
This is a bug for occ7.4?
what can i do to solve this problem?
Thank you!
Wed, 11/06/2019 - 10:36
This is incomplete message.
Test script works in any direction within OCCT 7.4.0 on my workstation.
To make sure that this is OCCT bug, it is necessary to have a reproducer.
The error message may indicate a bug in application itself (for example - multi-threading issues).
Thu, 11/07/2019 - 06:19
Hi,
This problem might have something to do with my system!
I changed a computer,it is OK.
Thank you!
Wed, 03/22/2023 - 11:10
Hi:
I have a question is,if it is marked the text on a TopoDS_Shape,them,how to clear or erase the text?If I can clear the text,then,I can draw it agin on the other place.
thanks
Jason