1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-24 13:50:49 +03:00

0023881: BRepAlgoAPI_Section HasAncestorFaceOn1 returned False on the boundary(6.6.0 beta).

The methods HasAncestorFaceOn1() and HasAncestorFaceOn1() return true only in the case when their first argument is the new edge built from intersection curve and not an existing common edge.
PCurveOn1() and PCurveOn2() have been removed.
Methods PCurveOn1() and PCurveOn2() removed from BRepAlgo_Section class.
Added test case bugs/modalg_5/bug23881
This commit is contained in:
emv
2013-04-15 18:19:01 +04:00
parent 275e812f4a
commit 7a9d451a98
5 changed files with 34 additions and 174 deletions

View File

@@ -337,41 +337,6 @@ is
-- ancestor face: F is significant only if the returned
-- Boolean value equals true.
PCurveOn1(me; E : Shape from TopoDS)
returns Curve from Geom2d;
---Purpose: Returns the pcurve attached to section edge E, in the
-- parametric space of the first part
-- on which this algorithm has previously performed the
-- computation of a section.
-- Warning
-- - No pcurve is attached to an elementary edge of the
-- resulting section, and the function returns a null
-- handle, unless the function ComputePCurveOn1
-- or ComputePCurveOn2 was previously used to
-- define this sort of option of computation.
-- - A null handle is also returned if the edge E does
-- not belong to the last computed intersection, that is,
-- if it is not one of the elementary edges of the
-- compound object returned by the function Shape.
PCurveOn2(me; E : Shape from TopoDS)
returns Curve from Geom2d;
---Purpose: Returns the pcurve attached to section edge E, in the
-- parametric space of the second part
-- on which this algorithm has previously performed the
-- computation of a section.
-- Warning
-- - No pcurve is attached to an elementary edge of the
-- resulting section, and the function returns a null
-- handle, unless the function ComputePCurveOn1
-- or ComputePCurveOn2 was previously used to
-- define this sort of option of computation.
-- - A null handle is also returned if the edge E does
-- not belong to the last computed intersection, that is,
-- if it is not one of the elementary edges of the
-- compound object returned by the function Shape.
InitParameters(me : out)
---Level: Public
---Level: Private

View File

@@ -320,51 +320,6 @@ static TopoDS_Shape MakeShape(const Handle(Geom_Surface)& );
return res;
}
//=======================================================================
//function : PCurve1
//purpose :
//=======================================================================
Handle(Geom2d_Curve) BRepAlgo_Section::PCurveOn1(const TopoDS_Shape& E) const
{
Handle(Geom2d_Curve) PC;
const TopOpeBRepTool_GeomTool& GT = myHBuilder->BuildTool().GetGeomTool();
if (!GT.CompPC1()) return PC;
TopoDS_Shape F1,F2; Standard_Integer iC;
Standard_Boolean res = myHBuilder->EdgeCurveAncestors(E,F1,F2,iC);
if ( !res ) return PC;
const TopoDS_Edge& EE = TopoDS::Edge(E);
const TopoDS_Face& FF = TopoDS::Face(F1);
Standard_Real f,l; PC = BRep_Tool::CurveOnSurface(EE,FF,f,l);
Handle(Geom2d_TrimmedCurve) TC = new Geom2d_TrimmedCurve(PC,f,l);
return TC;
}
//=======================================================================
//function : PCurve2
//purpose :
//=======================================================================
Handle(Geom2d_Curve) BRepAlgo_Section::PCurveOn2(const TopoDS_Shape& E) const
{
Handle(Geom2d_Curve) PC;
const TopOpeBRepTool_GeomTool& GT = myHBuilder->BuildTool().GetGeomTool();
if (!GT.CompPC2()) return PC;
TopoDS_Shape F1,F2;
Standard_Integer iC;
Standard_Boolean res = myHBuilder->EdgeCurveAncestors(E,F1,F2,iC);
if ( !res ) return PC;
const TopoDS_Edge& EE = TopoDS::Edge(E);
const TopoDS_Face& FF = TopoDS::Face(F2);
Standard_Real f,l; PC = BRep_Tool::CurveOnSurface(EE,FF,f,l);
Handle(Geom2d_TrimmedCurve) TC = new Geom2d_TrimmedCurve(PC,f,l);
return TC;
}
//=======================================================================
//function : InitParameters
//purpose : initialize the fields of the class