Skip to content

Commit

Permalink
0033703: Data Exchange, Step Export - Transfer edge speed improvement
Browse files Browse the repository at this point in the history
Move optional code close to use case to avoid extra calculation
  • Loading branch information
dpasukhi committed Sep 6, 2024
1 parent 2ab4e9e commit ed20837
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/TopoDSToStep/TopoDSToStep_MakeStepEdge.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,6 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge,
if ( count < 2 ) isSeam = Standard_False;
}

BRepAdaptor_Curve CA = BRepAdaptor_Curve(aEdge);
BRepAdaptor_Surface SA = BRepAdaptor_Surface(aTool.CurrentFace());

if (aEdge.Orientation() == TopAbs_INTERNAL ||
aEdge.Orientation() == TopAbs_EXTERNAL ) {
Handle(TransferBRep_ShapeMapper) errShape =
Expand Down Expand Up @@ -184,7 +181,7 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge,
// ---------------------------------------
// Translate 3D representation of the Edge
// ---------------------------------------

BRepAdaptor_Curve CA = BRepAdaptor_Curve(aEdge);
Handle(StepGeom_Curve) Gpms;
Handle(Geom_Curve) C = CA.Curve().Curve();

Expand Down Expand Up @@ -262,6 +259,8 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge,
#ifdef OCCT_DEBUG
std::cout << "Warning: TopoDSToStep_MakeStepEdge: edge without 3d curve; creating..." << std::endl;
#endif
BRepAdaptor_Surface SA = BRepAdaptor_Surface(aTool.CurrentFace());

if ((SA.GetType() == GeomAbs_Plane) &&
(CA.GetType() == GeomAbs_Line)) {
U1 = CA.FirstParameter();
Expand Down

0 comments on commit ed20837

Please sign in to comment.