Skip to content

Commit ed20837

Browse files
committed
0033703: Data Exchange, Step Export - Transfer edge speed improvement
Move optional code close to use case to avoid extra calculation
1 parent 2ab4e9e commit ed20837

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/TopoDSToStep/TopoDSToStep_MakeStepEdge.cxx

+3-4
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,6 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge,
134134
if ( count < 2 ) isSeam = Standard_False;
135135
}
136136

137-
BRepAdaptor_Curve CA = BRepAdaptor_Curve(aEdge);
138-
BRepAdaptor_Surface SA = BRepAdaptor_Surface(aTool.CurrentFace());
139-
140137
if (aEdge.Orientation() == TopAbs_INTERNAL ||
141138
aEdge.Orientation() == TopAbs_EXTERNAL ) {
142139
Handle(TransferBRep_ShapeMapper) errShape =
@@ -184,7 +181,7 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge,
184181
// ---------------------------------------
185182
// Translate 3D representation of the Edge
186183
// ---------------------------------------
187-
184+
BRepAdaptor_Curve CA = BRepAdaptor_Curve(aEdge);
188185
Handle(StepGeom_Curve) Gpms;
189186
Handle(Geom_Curve) C = CA.Curve().Curve();
190187

@@ -262,6 +259,8 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge,
262259
#ifdef OCCT_DEBUG
263260
std::cout << "Warning: TopoDSToStep_MakeStepEdge: edge without 3d curve; creating..." << std::endl;
264261
#endif
262+
BRepAdaptor_Surface SA = BRepAdaptor_Surface(aTool.CurrentFace());
263+
265264
if ((SA.GetType() == GeomAbs_Plane) &&
266265
(CA.GetType() == GeomAbs_Line)) {
267266
U1 = CA.FirstParameter();

0 commit comments

Comments
 (0)