
Thu, 07/06/2017 - 16:01
Forums:
Helllo everyone,
I am trying to make a copy of my AIS_Shape created from Geom2d_Curve, like this:
gp_Pnt2d location(0.0, 0.0);
gp_Circ2d circ2d(gp::OX2d(), 10.0);
circ2d.SetLocation(location);
double staangle = 10 * UB_PI / 180;
double endangle = 100 * UB_PI / 180;
Handle(Geom2d_TrimmedCurve) arc = GCE2d_MakeArcOfCircle(circ2d, staangle, endangle);
Handle(AIS_Shape) shape = new AIS_Shape(BRepBuilderAPI_MakeEdge2d(arc));
BRepBuilderAPI_Copy copy;
copy.Perform(shape->Shape());
Handle(AIS_Shape) shapeCopy = new AIS_Shape(copy.Shape());
But I can't see the copy. What am I doing wrong ?
Thu, 07/06/2017 - 16:09
Are you sure both ais objects are not overlapping?
Thu, 07/06/2017 - 18:09
Hello Anton,
I have tried and saw that a BRepLib::BuildCurve3d(shape) is required after BRepBuilderAPI_MakeEdge2d.
Here is an example:
MakeCurve2D
Best regards,
Guido
Fri, 07/07/2017 - 05:04
Thank you for your help!
It's really strange that we have to call BuildCurve3d, because I can see the object, but can not see the copy.
P.S. Your website is great! =) Good work!
Fri, 07/07/2017 - 10:35
Yes indeed. Very dumb question: You are sure that you see the original, and not the copy, because they overlap?
Thanks!
Mon, 07/10/2017 - 04:56
Yes, I am sure.