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

0029392: Modeling data - Exception when getting UIso of offset surface of surface of linear extrusion

Added treatment for Geom_OffsetSurface::UIso() if basisSurface is Geom_SurfaceOfLinearExtrusion
This commit is contained in:
akaftasev
2020-11-19 14:42:18 +03:00
committed by bugmaster
parent 65eed8ff8e
commit 9ab58ebf65
3 changed files with 35 additions and 6 deletions

View File

@@ -46,6 +46,7 @@
#include <Geom_TrimmedCurve.hxx>
#include <Geom_UndefinedDerivative.hxx>
#include <Geom_UndefinedValue.hxx>
#include <GeomLProp_SLProps.hxx>
#include <GeomAbs_CurveType.hxx>
#include <GeomAbs_IsoType.hxx>
#include <GeomAbs_Shape.hxx>
@@ -530,14 +531,27 @@ void Geom_OffsetSurface_VIsoEvaluator::Evaluate(Standard_Integer *,/*Dimension*/
//=======================================================================
//function : UIso
//purpose : The Uiso or the VIso of an OffsetSurface can't be clearly
// exprimed as a curve from Geom. So, to extract the U or VIso
// an Approximation is needed. This approx always will return a
// BSplineCurve from Geom.
// exprimed as a curve from Geom (except some particular cases).
// So, to extract the U or VIso an Approximation is needed.
// This approx always will return a BSplineCurve from Geom.
//=======================================================================
Handle(Geom_Curve) Geom_OffsetSurface::UIso (const Standard_Real UU) const
{
if (equivSurf.IsNull()) {
GeomAdaptor_Surface aGAsurf (basisSurf);
if (aGAsurf.GetType() == GeomAbs_SurfaceOfExtrusion)
{
Handle(Geom_Curve) aL = basisSurf->UIso(UU);
GeomLProp_SLProps aSurfProps (basisSurf, UU, 0., 2, Precision::Confusion());
gp_Vec aDir;
aDir = aSurfProps.Normal();
aDir *= offsetValue;
aL->Translate(aDir);
return aL;
}
const Standard_Integer Num1 = 0, Num2 = 0, Num3 = 1;
Handle(TColStd_HArray1OfReal) T1, T2, T3 = new TColStd_HArray1OfReal(1,Num3);
T3->Init(Precision::Approximation());