
Wed, 10/09/2019 - 15:21
Forums:
Hello,
I have read step file and rotated all faces around an axis and then exploring edges belonging to a particular face with TopExp_Explorer.
gp_Trsf trsf;
trsf.setRotation(axis,angle);
BrepBuilderAPI_Transform transform(face,trsf);
face=TopoDS::Face(transform.Shape());
I rotated all the faces in my shape like this way. In the bottom code, axis info comes wrong. When i check circles axis info before rotation and after rotation nothing changes. However face vertices rotated correctly.
for(TopExp_Explorer exp(face,TopAbs_EDGE);exp.More();exp.Next())
{
TopoDS_Edge edge=TopoDS::Edge(exp.Current());
auto curve=Brep_Tool::Curve(edge,location,first,last);
Handle(Standard_Type) curveType=curve->DynamicType();
if(curveType==STANDARD_TYPE(Geom_Circle))
{
Handle(Geom_Circle) circle=Handle(Geom_Circle)::DownCast(curve);
auto axis=circle->Axis();
}
}
Wed, 10/09/2019 - 16:08
Can someone help me please?
Thu, 10/10/2019 - 05:32
May be the transform code should be
Thu, 10/10/2019 - 08:47
it works thank you so much