Skip to content

Commit f6fe1dc

Browse files
committed
// formatting
1 parent f5eb702 commit f6fe1dc

9 files changed

Lines changed: 71 additions & 90 deletions

src/ModelingData/TKBRep/BRepGraph/BRepGraph_LayerParam.hxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ public:
114114
const double theParameter);
115115

116116
Standard_EXPORT const TCollection_AsciiString& Name() const override;
117-
Standard_EXPORT void OnNodeRemoved(const BRepGraph_NodeId theNode,
118-
const BRepGraph_NodeId theReplacement) noexcept override;
119-
Standard_EXPORT void OnCompact(
120-
const NCollection_DataMap<BRepGraph_NodeId, BRepGraph_NodeId>& theRemapMap) noexcept override;
117+
Standard_EXPORT void OnNodeRemoved(const BRepGraph_NodeId theNode,
118+
const BRepGraph_NodeId theReplacement) noexcept override;
119+
Standard_EXPORT void OnCompact(
120+
const NCollection_DataMap<BRepGraph_NodeId, BRepGraph_NodeId>& theRemapMap) noexcept override;
121121
Standard_EXPORT void InvalidateAll() noexcept override;
122122
Standard_EXPORT void Clear() noexcept override;
123123

src/ModelingData/TKBRep/BRepGraph/BRepGraph_LayerRegularity.hxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ public:
8888
Standard_EXPORT void RemoveRegularities(const BRepGraph_EdgeId theEdge) noexcept;
8989

9090
Standard_EXPORT const TCollection_AsciiString& Name() const override;
91-
Standard_EXPORT void OnNodeRemoved(const BRepGraph_NodeId theNode,
92-
const BRepGraph_NodeId theReplacement) noexcept override;
93-
Standard_EXPORT void OnCompact(
94-
const NCollection_DataMap<BRepGraph_NodeId, BRepGraph_NodeId>& theRemapMap) noexcept override;
91+
Standard_EXPORT void OnNodeRemoved(const BRepGraph_NodeId theNode,
92+
const BRepGraph_NodeId theReplacement) noexcept override;
93+
Standard_EXPORT void OnCompact(
94+
const NCollection_DataMap<BRepGraph_NodeId, BRepGraph_NodeId>& theRemapMap) noexcept override;
9595
Standard_EXPORT void InvalidateAll() noexcept override;
9696
Standard_EXPORT void Clear() noexcept override;
9797

src/ModelingData/TKBRep/BRepGraph/BRepGraph_Tool.hxx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -620,9 +620,8 @@ public:
620620
//! @param[in] theGraph source graph
621621
//! @param[in] theWire typed wire definition identifier
622622
//! @return number of distinct EdgeDefIds reachable from the wire's CoEdgeRefIds
623-
[[nodiscard]] Standard_EXPORT static uint32_t NbDistinctEdges(
624-
const BRepGraph& theGraph,
625-
const BRepGraph_WireId theWire);
623+
[[nodiscard]] Standard_EXPORT static uint32_t NbDistinctEdges(const BRepGraph& theGraph,
624+
const BRepGraph_WireId theWire);
626625

627626
//! Returns the first owning face for this wire via the reverse-index table.
628627
//! Returns an invalid id if the wire has no owning face (free wire).

src/ModelingData/TKBRep/BRepGraph/BRepGraph_Validate.cxx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ void checkCrossReferenceBounds(const BRepGraph&
153153
// 2 CoEdges; if 2, they must have opposite Orientation.
154154
if (aCoEdge.EdgeDefId.IsValid() && aCoEdge.FaceDefId.IsValid())
155155
{
156-
uint32_t aSameFaceCount = 0;
156+
uint32_t aSameFaceCount = 0;
157157
bool aHasOppositeOnSameFace = false;
158158
for (BRepGraph_CoEdgesOfEdge anIt(theGraph,
159159
theGraph.Topo().Edges().CoEdges(aCoEdge.EdgeDefId));
@@ -172,17 +172,14 @@ void checkCrossReferenceBounds(const BRepGraph&
172172
}
173173
if (aSameFaceCount > 2)
174174
{
175-
theIssues.Append(
176-
Issue{Severity::Error,
177-
aCoEdgeId,
178-
"More than 2 CoEdges share the same (EdgeDefId, FaceDefId)"});
175+
theIssues.Append(Issue{Severity::Error,
176+
aCoEdgeId,
177+
"More than 2 CoEdges share the same (EdgeDefId, FaceDefId)"});
179178
}
180179
else if (aSameFaceCount == 2 && !aHasOppositeOnSameFace)
181180
{
182181
theIssues.Append(
183-
Issue{Severity::Error,
184-
aCoEdgeId,
185-
"Seam pair CoEdges have the same Orientation"});
182+
Issue{Severity::Error, aCoEdgeId, "Seam pair CoEdges have the same Orientation"});
186183
}
187184
}
188185
// Rep index bounds.

src/ModelingData/TKBRep/BRepGraphInc/BRepGraphInc_Populate.cxx

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,7 @@ static void extractEdgeInFace(ExtractedEdge& theEdgeData,
946946
// The input theEdge carries the iterator's natural orientation, so the
947947
// extractor returns the matching PCurve (PCurve() for FORWARD, PCurve2() for
948948
// REVERSED on a closed surface). The opposite half is the *other* yield's
949-
// ExtractedEdge we don't need to fetch it here.
949+
// ExtractedEdge - we don't need to fetch it here.
950950
{
951951
double aPCFirst = 0.0, aPCLast = 0.0;
952952
extractStoredPCurves(theEdge,
@@ -1215,7 +1215,7 @@ void registerFaceData(BRepGraphInc_Storage& theStorage,
12151215
theStorage.TriangulationRep(aFaceDef.TriangulationRepId).Triangulation;
12161216
if (!aTri.IsNull())
12171217
{
1218-
TopLoc_Location aPolyTriLoc;
1218+
TopLoc_Location aPolyTriLoc;
12191219
occ::handle<Poly_PolygonOnTriangulation> aPolyOnTri =
12201220
BRep_Tool::PolygonOnTriangulation(anEdgeData.Shape, aTri, aPolyTriLoc);
12211221
if (!aPolyOnTri.IsNull())
@@ -1780,10 +1780,7 @@ void populateRegularityLayer(BRepGraphInc_Storage& theSt
17801780
{
17811781
continue;
17821782
}
1783-
theRegularityLayer->SetRegularity(anEdgeId,
1784-
*aFaceIdx,
1785-
*aFaceIdx,
1786-
aCRep->Continuity());
1783+
theRegularityLayer->SetRegularity(anEdgeId, *aFaceIdx, *aFaceIdx, aCRep->Continuity());
17871784
}
17881785
}
17891786
}
@@ -1991,13 +1988,14 @@ void populateOptionalLayers(BRepGraphInc_Storage& theSto
19911988

19921989
//=================================================================================================
19931990

1994-
void BRepGraphInc_Populate::Perform(BRepGraphInc_Storage& theStorage,
1995-
const TopoDS_Shape& theShape,
1996-
const bool theParallel,
1997-
const Options& theOptions,
1998-
const occ::handle<BRepGraph_LayerParam>& theParamLayer,
1999-
const occ::handle<BRepGraph_LayerRegularity>& theRegularityLayer,
2000-
const occ::handle<NCollection_BaseAllocator>& theTmpAlloc)
1991+
void BRepGraphInc_Populate::Perform(
1992+
BRepGraphInc_Storage& theStorage,
1993+
const TopoDS_Shape& theShape,
1994+
const bool theParallel,
1995+
const Options& theOptions,
1996+
const occ::handle<BRepGraph_LayerParam>& theParamLayer,
1997+
const occ::handle<BRepGraph_LayerRegularity>& theRegularityLayer,
1998+
const occ::handle<NCollection_BaseAllocator>& theTmpAlloc)
20011999
{
20022000
theStorage.Clear();
20032001

src/ModelingData/TKBRep/BRepGraphInc/BRepGraphInc_Populate.hxx

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,11 @@ public:
6868
//! @param[in] theRegularityLayer optional edge-regularity layer to populate
6969
//! @param[in] theTmpAlloc optional allocator for temporary scratch data
7070
static Standard_EXPORT void Perform(
71-
BRepGraphInc_Storage& theStorage,
72-
const TopoDS_Shape& theShape,
73-
const bool theParallel,
74-
const Options& theOptions = Options(),
75-
const occ::handle<BRepGraph_LayerParam>& theParamLayer =
76-
occ::handle<BRepGraph_LayerParam>(),
71+
BRepGraphInc_Storage& theStorage,
72+
const TopoDS_Shape& theShape,
73+
const bool theParallel,
74+
const Options& theOptions = Options(),
75+
const occ::handle<BRepGraph_LayerParam>& theParamLayer = occ::handle<BRepGraph_LayerParam>(),
7776
const occ::handle<BRepGraph_LayerRegularity>& theRegularityLayer =
7877
occ::handle<BRepGraph_LayerRegularity>(),
7978
const occ::handle<NCollection_BaseAllocator>& theTmpAlloc =
@@ -90,13 +89,12 @@ public:
9089
//! @param[in] theOptions optional post-pass controls
9190
//! @param[in] theTmpAlloc optional allocator for temporary scratch data
9291
static Standard_EXPORT void AppendFlattened(
93-
BRepGraphInc_Storage& theStorage,
94-
const TopoDS_Shape& theShape,
95-
const bool theParallel,
96-
NCollection_DynamicArray<BRepGraph_NodeId>& theAppendedRoots,
97-
const Options& theOptions = Options(),
98-
const occ::handle<BRepGraph_LayerParam>& theParamLayer =
99-
occ::handle<BRepGraph_LayerParam>(),
92+
BRepGraphInc_Storage& theStorage,
93+
const TopoDS_Shape& theShape,
94+
const bool theParallel,
95+
NCollection_DynamicArray<BRepGraph_NodeId>& theAppendedRoots,
96+
const Options& theOptions = Options(),
97+
const occ::handle<BRepGraph_LayerParam>& theParamLayer = occ::handle<BRepGraph_LayerParam>(),
10098
const occ::handle<BRepGraph_LayerRegularity>& theRegularityLayer =
10199
occ::handle<BRepGraph_LayerRegularity>(),
102100
const occ::handle<NCollection_BaseAllocator>& theTmpAlloc =
@@ -112,12 +110,11 @@ public:
112110
//! @param[in] theOptions optional post-pass controls
113111
//! @param[in] theTmpAlloc optional allocator for temporary scratch data
114112
static Standard_EXPORT void Append(
115-
BRepGraphInc_Storage& theStorage,
116-
const TopoDS_Shape& theShape,
117-
const bool theParallel,
118-
const Options& theOptions = Options(),
119-
const occ::handle<BRepGraph_LayerParam>& theParamLayer =
120-
occ::handle<BRepGraph_LayerParam>(),
113+
BRepGraphInc_Storage& theStorage,
114+
const TopoDS_Shape& theShape,
115+
const bool theParallel,
116+
const Options& theOptions = Options(),
117+
const occ::handle<BRepGraph_LayerParam>& theParamLayer = occ::handle<BRepGraph_LayerParam>(),
121118
const occ::handle<BRepGraph_LayerRegularity>& theRegularityLayer =
122119
occ::handle<BRepGraph_LayerRegularity>(),
123120
const occ::handle<NCollection_BaseAllocator>& theTmpAlloc =

src/ModelingData/TKBRep/GTests/BRepGraph_Polygon_Test.cxx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,9 @@ TEST(BRepGraph_PolygonTest, EdgeRegularity_ShapeGraphShape_RoundTrip)
469469

470470
// Walk both originals and reconstructed in lock-step (TopExp_Explorer order)
471471
// and verify every (edge, F1, F2) pair preserves its classical Continuity value.
472-
using ShapeMap =
473-
NCollection_IndexedDataMap<TopoDS_Shape, NCollection_List<TopoDS_Shape>, TopTools_ShapeMapHasher>;
472+
using ShapeMap = NCollection_IndexedDataMap<TopoDS_Shape,
473+
NCollection_List<TopoDS_Shape>,
474+
TopTools_ShapeMapHasher>;
474475
ShapeMap aOrigEdgeFaces, aReconEdgeFaces;
475476
TopExp::MapShapesAndAncestors(aOriginal, TopAbs_EDGE, TopAbs_FACE, aOrigEdgeFaces);
476477
TopExp::MapShapesAndAncestors(aReconstructed, TopAbs_EDGE, TopAbs_FACE, aReconEdgeFaces);
@@ -479,8 +480,8 @@ TEST(BRepGraph_PolygonTest, EdgeRegularity_ShapeGraphShape_RoundTrip)
479480
uint32_t aNbCheckedPairs = 0;
480481
for (int i = 1; i <= aOrigEdgeFaces.Extent(); ++i)
481482
{
482-
const TopoDS_Edge& aOrigEdge = TopoDS::Edge(aOrigEdgeFaces.FindKey(i));
483-
const TopoDS_Edge& aReconEdge = TopoDS::Edge(aReconEdgeFaces.FindKey(i));
483+
const TopoDS_Edge& aOrigEdge = TopoDS::Edge(aOrigEdgeFaces.FindKey(i));
484+
const TopoDS_Edge& aReconEdge = TopoDS::Edge(aReconEdgeFaces.FindKey(i));
484485
NCollection_List<TopoDS_Shape>& aOrigFaces = aOrigEdgeFaces.ChangeFromIndex(i);
485486
NCollection_List<TopoDS_Shape>& aReconFaces = aReconEdgeFaces.ChangeFromIndex(i);
486487
ASSERT_EQ(aOrigFaces.Size(), aReconFaces.Size());
@@ -492,7 +493,7 @@ TEST(BRepGraph_PolygonTest, EdgeRegularity_ShapeGraphShape_RoundTrip)
492493
const TopoDS_Face& aOrigF1 = TopoDS::Face(aOrigIt.Value());
493494
const TopoDS_Face& aReconF1 = TopoDS::Face(aReconIt.Value());
494495

495-
NCollection_List<TopoDS_Shape>::Iterator aOrigIt2 = aOrigIt;
496+
NCollection_List<TopoDS_Shape>::Iterator aOrigIt2 = aOrigIt;
496497
NCollection_List<TopoDS_Shape>::Iterator aReconIt2 = aReconIt;
497498
for (; aOrigIt2.More(); aOrigIt2.Next(), aReconIt2.Next())
498499
{

src/ModelingData/TKBRep/GTests/BRepGraph_ScenarioMatrix_Test.cxx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,8 +1023,7 @@ TEST(BRepGraph_ScenarioMatrix, Sphere_SeamCoEdgePair_Bidirectional)
10231023
++aNbPairedCoEdges;
10241024

10251025
// Symmetry: the partner's partner is us.
1026-
const BRepGraph_CoEdgeId aBackId =
1027-
BRepGraph_TestTools::SeamPairFromStorage(aStorage, aPairId);
1026+
const BRepGraph_CoEdgeId aBackId = BRepGraph_TestTools::SeamPairFromStorage(aStorage, aPairId);
10281027
EXPECT_EQ(aBackId, aCoEdgeId) << "Seam relation must be symmetric";
10291028
const BRepGraphInc::CoEdgeDef& aCoEdge = aStorage.CoEdge(aCoEdgeId);
10301029
const BRepGraphInc::CoEdgeDef& aPaired = aStorage.CoEdge(aPairId);
@@ -1188,8 +1187,7 @@ TEST(BRepGraph_ScenarioMatrix, Cylinder_SeamEdgeSplit_AuditStable)
11881187
aGraph.Topo().Edges().CoEdges(theEdgeId);
11891188
for (const BRepGraph_CoEdgeId& aCoEdgeId : aCoEdges)
11901189
{
1191-
const BRepGraph_CoEdgeId aPairId =
1192-
BRepGraph_Tool::CoEdge::SeamPair(aGraph, aCoEdgeId);
1190+
const BRepGraph_CoEdgeId aPairId = BRepGraph_Tool::CoEdge::SeamPair(aGraph, aCoEdgeId);
11931191
if (!aPairId.IsValid())
11941192
{
11951193
continue;

0 commit comments

Comments
 (0)