I don't know how to distinguish the specific shape of TopoDS_Edge that I picked up with the mouse, such as curve, line or circle?
Thank you!
luzius.koelling... Wed, 04/08/2020 - 14:53
Hi, I don't understand exactly what you are trying to do, but a TopoDS_Edge is a topologic element based on a geometric curve. You could obtain the Geom_Curve by using BRep_Tool::Curve(). Then maybe you can determine the type of Geom_Curve, such as Geom_Line or Geom_Circle.
Wed, 04/08/2020 - 14:53
Hi, I don't understand exactly what you are trying to do, but a TopoDS_Edge is a topologic element based on a geometric curve. You could obtain the Geom_Curve by using BRep_Tool::Curve(). Then maybe you can determine the type of Geom_Curve, such as Geom_Line or Geom_Circle.
Thu, 04/09/2020 - 05:16
Thanks for your reply.
I tried this method and found that I could only tell the Geom_BSplineCurve, but nothing happened to the Geom_TrimmedCurve.I don't know why.
TopoDS_Shape& aS;
double dF,dL;
Handle(Geom_Curve) aCur = BRep_Tool::Curve(TopoDS::Edge(aS),dF,dL);
if(aCur->IsKind(STANDARD_TYPE(Geom_BSplineCurve))) //It works here
{
...
}
else if(aCur->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) //but It doesn't work here
{
}
Thu, 04/09/2020 - 21:08
BRepAdaptor_Curve
https://dev.opencascade.org/doc/refman/html/class_b_rep_adaptor___curve.html