mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0024023: Revamp the OCCT Handle -- ambiguity
Code corrected to avoid ambiguous situations due to changed implementation of Handle (overloaded methods accepting handles of different types). In Adaptor3d_CurveOnSurface added method Load() with two parameters, allowing to avoid ambiguity of cast of handles when calling separate methods Load() for curve and surface, replacing by single call. In DrawTrSurf and IGESData_IGESWriter, template variants of methods Set() and Send(), respectively, are added to avoid ambiguity when these methods are called with handles to derived types (using SFINAE). In NCollection_DefineHSequence, method Append() accepting handle to another HSequence is made template, to be available only if argument has compatible type.
This commit is contained in:
@@ -668,7 +668,7 @@ void BRepFeat_RibSlot::EdgeExtention(TopoDS_Edge& e,
|
||||
#endif
|
||||
Standard_Real f, l;
|
||||
Handle(Geom_Curve) cu = BRep_Tool::Curve(e, f, l);
|
||||
Handle(Geom_TrimmedCurve) C =
|
||||
Handle(Geom_BoundedCurve) C =
|
||||
new Geom_TrimmedCurve(cu, f, l);
|
||||
|
||||
TopoDS_Edge E;
|
||||
@@ -1105,7 +1105,8 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib,
|
||||
Standard_Real intpar;
|
||||
for(; ex1.More(); ex1.Next()) {
|
||||
const TopoDS_Face& f = TopoDS::Face(ex1.Current());
|
||||
inter.Init(f,curve, BRep_Tool::Tolerance(f));
|
||||
GeomAdaptor_Curve aGAC (curve);
|
||||
inter.Init (f, aGAC, BRep_Tool::Tolerance(f));
|
||||
if(!inter.More()) continue;
|
||||
for(; inter.More(); inter.Next()) {
|
||||
gp_Pnt thePoint = inter.Pnt();
|
||||
|
Reference in New Issue
Block a user