[TD]fix centerline rotation
This commit is contained in:
@@ -353,3 +353,17 @@ TopoDS_Shape ShapeUtils::centerShapeXY(const TopoDS_Shape& inShape, const gp_Ax2
|
||||
Base::Vector3d centroid = DrawUtil::toVector3d(inputCenter);
|
||||
return ShapeUtils::moveShape(inShape, centroid * -1.0);
|
||||
}
|
||||
|
||||
std::pair<Base::Vector3d, Base::Vector3d> ShapeUtils::getEdgeEnds(TopoDS_Edge edge)
|
||||
{
|
||||
std::pair<Base::Vector3d, Base::Vector3d> result;
|
||||
TopoDS_Vertex tvFirst, tvLast;
|
||||
TopExp::Vertices(edge, tvFirst, tvLast);
|
||||
gp_Pnt gpFirst = BRep_Tool::Pnt(tvFirst);
|
||||
gp_Pnt gpLast = BRep_Tool::Pnt(tvLast);
|
||||
|
||||
result.first = DU::toVector3d(gpFirst);
|
||||
result.second = DU::toVector3d(gpLast);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user