[TechDraw] Use templates instead of duplicate code: toGp
This commit is contained in:
@@ -327,8 +327,8 @@ TechDraw::BaseGeomPtr CenterLine::scaledAndRotatedGeometry(TechDraw::DrawViewPar
|
||||
|
||||
TopoDS_Edge newEdge;
|
||||
if (getType() == CLTYPE::FACE ) {
|
||||
gp_Pnt gp1(DU::togp_Pnt(p1));
|
||||
gp_Pnt gp2(DU::togp_Pnt(p2));
|
||||
gp_Pnt gp1(DU::to<gp_Pnt>(p1));
|
||||
gp_Pnt gp2(DU::to<gp_Pnt>(p2));
|
||||
TopoDS_Edge e = BRepBuilderAPI_MakeEdge(gp1, gp2);
|
||||
// Mirror shape in Y and scale
|
||||
TopoDS_Shape s = ShapeUtils::mirrorShape(e, gp_Pnt(0.0, 0.0, 0.0), scale);
|
||||
@@ -337,8 +337,8 @@ TechDraw::BaseGeomPtr CenterLine::scaledAndRotatedGeometry(TechDraw::DrawViewPar
|
||||
newEdge = TopoDS::Edge(s);
|
||||
} else if (getType() == CLTYPE::EDGE ||
|
||||
getType() == CLTYPE::VERTEX) {
|
||||
gp_Pnt gp1(DU::togp_Pnt(DU::invertY(p1 * scale)));
|
||||
gp_Pnt gp2(DU::togp_Pnt(DU::invertY(p2 * scale)));
|
||||
gp_Pnt gp1(DU::to<gp_Pnt>(DU::invertY(p1 * scale)));
|
||||
gp_Pnt gp2(DU::to<gp_Pnt>(DU::invertY(p2 * scale)));
|
||||
newEdge = BRepBuilderAPI_MakeEdge(gp1, gp2);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user