Skip to content

Commit bf4d910

Browse files
committed
Update documentation for OCCT 8.0.0: clarify usage of NCollection_HSequence and update method signatures in OCAF and Shape Healing sections
1 parent f56768a commit bf4d910

4 files changed

Lines changed: 29 additions & 27 deletions

File tree

dox/user_guides/foundation_classes/foundation_classes.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,16 +1021,18 @@ Let see an example of NCollection template class instantiation for a sequence of
10211021
typedef NCollection_Sequence<gp_Pnt> MyPackage_SequenceOfPnt;
10221022
~~~~
10231023

1024-
For the case when a sequence needs to be managed by handle, use `occ::handle<NCollection_Sequence<T>>` directly:
1024+
For the case when a sequence needs to be managed by handle, use `NCollection_HSequence<T>` (which inherits from both `NCollection_Sequence<T>` and `Standard_Transient`):
1025+
10251026
~~~~{.cpp}
1026-
#include <NCollection_Sequence.hxx>
1027+
#include <NCollection_HSequence.hxx>
10271028
#include <gp_Pnt.hxx>
10281029
typedef NCollection_Sequence<gp_Pnt> MyPackage_SequenceOfPnt;
1030+
typedef NCollection_HSequence<gp_Pnt> MyPackage_HSequenceOfPnt;
10291031
...
1030-
occ::handle<MyPackage_SequenceOfPnt> aSeq = new MyPackage_SequenceOfPnt();
1032+
occ::handle<MyPackage_HSequenceOfPnt> aSeq = new MyPackage_HSequenceOfPnt();
10311033
~~~~
10321034

1033-
The legacy `DEFINE_HSEQUENCE` macro is retained for compatibility with existing code, but new code should prefer direct use of `occ::handle<NCollection_Sequence<T>>`.
1035+
The legacy `DEFINE_HSEQUENCE` macro is removed in OCCT 8.0.0. Existing code using it should be migrated to `NCollection_HSequence<T>` (the `migrate_hcollections.py` script in `adm/` automates this conversion).
10341036

10351037
See more details about available collections in following sections.
10361038

dox/user_guides/modeling_algos/modeling_algos.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,7 @@ The algorithm will function with any class inheriting *Geom_Surface*.
927927
~~~~{.cpp}
928928
gp_Pnt P;
929929
occ::handle<Geom_Surface> aSurf = new Geom_BezierSurface(...);
930-
GeomAPI_ProjectPointOnSurf Proj (P, S);
930+
GeomAPI_ProjectPointOnSurf Proj (P, aSurf);
931931
~~~~
932932

933933
To restrict the search for normals within the given rectangular domain [U1, U2, V1, V2], use the constructor <i>GeomAPI_ProjectPointOnSurf Proj (P, S, U1, U2, V1, V2)</i>

dox/user_guides/ocaf/ocaf.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1640,30 +1640,30 @@ for (; anIterator.More(); anIterator.Next())
16401640

16411641
~~~~{.cpp}
16421642
1643-
// A virtual method ::Arguments() returns a list of arguments of the function.
1644-
CylinderDriver::Arguments( NCollection_List<TDF_Label>& args )
1645-
{
1643+
// A virtual method ::Arguments() returns a list of arguments of the function.
1644+
void CylinderDriver::Arguments( NCollection_List<TDF_Label>& args )
1645+
{
16461646
// The direct arguments, located at sub-leaves of the function, are collected (see picture 2)
1647-
TDF_ChildIterator cIterator( Label(), false );
1648-
for (; cIterator.More(); cIterator.Next() )
1649-
{
1650-
// Direct argument.
1651-
TDF_Label sublabel = cIterator.Value();
1652-
args.Append( sublabel );
1653-
1654-
// The references to the external data are checked.
1655-
occ::handle<TDF_Reference> ref;
1656-
if ( sublabel.FindAttribute( TDF_Reference::GetID(), ref ) )
1657-
{
1658-
args.Append( ref->Get() );
1647+
TDF_ChildIterator cIterator( Label(), false );
1648+
for (; cIterator.More(); cIterator.Next() )
1649+
{
1650+
// Direct argument.
1651+
TDF_Label sublabel = cIterator.Value();
1652+
args.Append( sublabel );
1653+
1654+
// The references to the external data are checked.
1655+
occ::handle<TDF_Reference> ref;
1656+
if ( sublabel.FindAttribute( TDF_Reference::GetID(), ref ) )
1657+
{
1658+
args.Append( ref->Get() );
16591659
}
16601660
}
1661-
1662-
// A virtual method ::Results() returns a list of result leaves.
1663-
CylinderDriver::Results( NCollection_List<TDF_Label>& res )
1664-
{
1665-
// The result is kept at the function label.
1666-
  res.Append( Label() );
1661+
1662+
// A virtual method ::Results() returns a list of result leaves.
1663+
void CylinderDriver::Results( NCollection_List<TDF_Label>& res )
1664+
{
1665+
// The result is kept at the function label.
1666+
res.Append( Label() );
16671667
}
16681668
16691669
// Execution of the function driver.

dox/user_guides/shape_healing/shape_healing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1320,7 +1320,7 @@ ShapeUpgrade_ShapeConvertToBezier aConvToBez (theShape);
13201320
aConvToBez.SetSurfaceConversion (true);
13211321
aConvToBez.SetPlaneMode (true);
13221322
aConvToBez.Perform();
1323-
if (aConvToBez.Status(ShapeExtend_DONE)
1323+
if (aConvToBez.Status(ShapeExtend_DONE))
13241324
{
13251325
TopoDS_Shape aResult = aConvToBez.Result();
13261326
}

0 commit comments

Comments
 (0)