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

0028828: Modeling Algorithms - New functionalities of BRepFilletAPI_MakeChamfer algorithm

Two new functionalities have been added in BRepFilletAPI_MakeChamfer:
- constant throat (the section of chamfer is isosceles triangle, its height is constant in all sections - this is the "throat" of the weld);
- constant throat with penetration(the section of chamfer is right-angled triangle, the first of two surfaces (where is the top of the chamfer) is virtually moved inside the solid by offset operation, the apex of the section is on the intersection curve between moved surface and second surface, right angle is at the top of the chamfer, the length of the leg from apex to top is constant - this is the "throat" of the weld).

- New abstract classes BlendFunc_GenChamfer and BlendFunc_GenChamfInv have been added;
- Class BlendFunc_Chamfer is now descended from BlendFunc_GenChamfer, class BlendFunc_ChamfInv is now descended from BlendFunc_GenChamfInv.
- New class BlendFunc_ConstThroat is descended from BlendFunc_GenChamfer, new class BlendFund_ConstThroatInv is descended from BlendFunc_GenChamfInv.
- New class BlendFunc_ConstThroatWithPenetration is descended from BlendFunc_GenChamfer, new class BlendFund_ConstThroatWithPenetrationInv is descended from BlendFunc_GenChamfInv.
- Class ChFi3d_ChBuilder has now mode of chamfer that can be ClassicChamfer, ConstThroatChamfer and ConstThroatWithPenetrationChamfer.
- Two new DRAW Test Harness commands "chamf_throat" ant "chamf_throat_with_penetration" have been added for the second mode of ChBuilder.
- The interface of DRAW Test Harness command "chamf" changed for symmetric case.
This commit is contained in:
jgv
2017-06-14 16:28:15 +03:00
committed by apn
parent 364c88864b
commit 1d54b80764
83 changed files with 5471 additions and 1510 deletions

View File

@@ -963,7 +963,7 @@ void IntWalk_PWalking::Perform(const TColStd_Array1OfReal& ParDep,
LevelOfEmptyInmyIntersectionOn2S=0;
if(LevelOfIterWithoutAppend < 10)
{
aStatus = TestDeflection(ChoixIso);
aStatus = TestDeflection(ChoixIso, aStatus);
}
else
{
@@ -1755,7 +1755,7 @@ Standard_Boolean IntWalk_PWalking::ExtendLineInCommonZone(const IntImp_ConstIsop
return bOutOfTangentZone;
}
aStatus = TestDeflection(ChoixIso);
aStatus = TestDeflection(ChoixIso, aStatus);
if(aStatus == IntWalk_OK) {
@@ -2996,7 +2996,8 @@ namespace {
static const Standard_Real d = 7.0;
}
IntWalk_StatusDeflection IntWalk_PWalking::TestDeflection(const IntImp_ConstIsoparametric choixIso)
IntWalk_StatusDeflection IntWalk_PWalking::TestDeflection(const IntImp_ConstIsoparametric choixIso,
const IntWalk_StatusDeflection theStatus)
// test if vector is observed by calculating an increase of vector
// or the previous point and its tangent, the new calculated point and its
@@ -3391,7 +3392,8 @@ IntWalk_StatusDeflection IntWalk_PWalking::TestDeflection(const IntImp_ConstIso
const Standard_Real anInvSqAbsArcDeflMin = 4.0*anInvSqAbsArcDeflMax;
const Standard_Real aSinB2Min = 1.0 - 2.0/(1.0 + anInvSqAbsArcDeflMin);
if((aSinB2Min < 0.0) || (aCosBetweenTangent >= 2.0 * aSinB2Min * aSinB2Min - 1.0))
if (theStatus != IntWalk_PasTropGrand &&
((aSinB2Min < 0.0) || (aCosBetweenTangent >= 2.0 * aSinB2Min * aSinB2Min - 1.0)))
{//Real deflection is less than tolconf/2.0
aStatus = IntWalk_StepTooSmall;
}

View File

@@ -66,7 +66,12 @@ public:
//! border of one of the domains. If an open line
//! stops at the middle of a domain, one stops at the tangent point.
//! Epsilon is SquareTolerance of points confusion.
Standard_EXPORT IntWalk_PWalking(const Handle(Adaptor3d_HSurface)& Caro1, const Handle(Adaptor3d_HSurface)& Caro2, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment);
Standard_EXPORT IntWalk_PWalking(const Handle(Adaptor3d_HSurface)& Caro1,
const Handle(Adaptor3d_HSurface)& Caro2,
const Standard_Real TolTangency,
const Standard_Real Epsilon,
const Standard_Real Deflection,
const Standard_Real Increment);
//! Returns the intersection line containing the exact
//! point Poin. This line is a polygonal line.
@@ -81,7 +86,16 @@ public:
//! border of one of the domains. If an open line
//! stops at the middle of a domain, one stops at the tangent point.
//! Epsilon is SquareTolerance of points confusion.
Standard_EXPORT IntWalk_PWalking(const Handle(Adaptor3d_HSurface)& Caro1, const Handle(Adaptor3d_HSurface)& Caro2, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2);
Standard_EXPORT IntWalk_PWalking(const Handle(Adaptor3d_HSurface)& Caro1,
const Handle(Adaptor3d_HSurface)& Caro2,
const Standard_Real TolTangency,
const Standard_Real Epsilon,
const Standard_Real Deflection,
const Standard_Real Increment,
const Standard_Real U1,
const Standard_Real V1,
const Standard_Real U2,
const Standard_Real V2);
//! calculate the line of intersection
Standard_EXPORT void Perform (const TColStd_Array1OfReal& ParDep);
@@ -91,10 +105,19 @@ public:
//! v. (if this data is not presented as in the
//! previous method, the initial steps are calculated
//! starting from min and max uv of faces).
Standard_EXPORT void Perform (const TColStd_Array1OfReal& ParDep, const Standard_Real u1min, const Standard_Real v1min, const Standard_Real u2min, const Standard_Real v2min, const Standard_Real u1max, const Standard_Real v1max, const Standard_Real u2max, const Standard_Real v2max);
Standard_EXPORT void Perform (const TColStd_Array1OfReal& ParDep,
const Standard_Real u1min,
const Standard_Real v1min,
const Standard_Real u2min,
const Standard_Real v2min,
const Standard_Real u1max,
const Standard_Real v1max,
const Standard_Real u2max,
const Standard_Real v2max);
//! calculate the first point of a line of intersection
Standard_EXPORT Standard_Boolean PerformFirstPoint (const TColStd_Array1OfReal& ParDep, IntSurf_PntOn2S& FirstPoint);
Standard_EXPORT Standard_Boolean PerformFirstPoint (const TColStd_Array1OfReal& ParDep,
IntSurf_PntOn2S& FirstPoint);
//! Returns true if the calculus was successful.
Standard_Boolean IsDone() const;
@@ -126,11 +149,16 @@ public:
const gp_Dir& TangentAtLine (Standard_Integer& Index) const;
Standard_EXPORT IntWalk_StatusDeflection TestDeflection (const IntImp_ConstIsoparametric ChoixIso) ;
Standard_EXPORT IntWalk_StatusDeflection TestDeflection (const IntImp_ConstIsoparametric ChoixIso,
const IntWalk_StatusDeflection theStatus);
Standard_EXPORT Standard_Boolean TestArret (const Standard_Boolean DejaReparti, TColStd_Array1OfReal& Param, IntImp_ConstIsoparametric& ChoixIso);
Standard_EXPORT Standard_Boolean TestArret (const Standard_Boolean DejaReparti,
TColStd_Array1OfReal& Param,
IntImp_ConstIsoparametric& ChoixIso);
Standard_EXPORT void RepartirOuDiviser (Standard_Boolean& DejaReparti, IntImp_ConstIsoparametric& ChoixIso, Standard_Boolean& Arrive);
Standard_EXPORT void RepartirOuDiviser (Standard_Boolean& DejaReparti,
IntImp_ConstIsoparametric& ChoixIso,
Standard_Boolean& Arrive);
//! Inserts thePOn2S in the end of line
void AddAPoint (const IntSurf_PntOn2S& thePOn2S);
@@ -157,9 +185,12 @@ public:
line->RemovePoint(anIdx);
}
Standard_EXPORT Standard_Boolean PutToBoundary (const Handle(Adaptor3d_HSurface)& theASurf1, const Handle(Adaptor3d_HSurface)& theASurf2);
Standard_EXPORT Standard_Boolean PutToBoundary (const Handle(Adaptor3d_HSurface)& theASurf1,
const Handle(Adaptor3d_HSurface)& theASurf2);
Standard_EXPORT Standard_Boolean SeekAdditionalPoints (const Handle(Adaptor3d_HSurface)& theASurf1, const Handle(Adaptor3d_HSurface)& theASurf2, const Standard_Integer theMinNbPoints);
Standard_EXPORT Standard_Boolean SeekAdditionalPoints (const Handle(Adaptor3d_HSurface)& theASurf1,
const Handle(Adaptor3d_HSurface)& theASurf2,
const Standard_Integer theMinNbPoints);
Standard_Real MaxStep(Standard_Integer theIndex)
{