1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-05-26 11:05:31 +03:00

0024612: Wrong pcurve of the section curve

Main changes are in "IntWalk_IWalking::TestDeflection(...)" function (IntWalk_IWalking_5.gxx).

Some test cases were corrected according to their new behavior.
This commit is contained in:
nbv 2014-03-05 16:54:38 +04:00 committed by abv
parent 04270abac2
commit db71978148
19 changed files with 889 additions and 766 deletions

View File

@ -261,6 +261,38 @@ void GeomInt_LineConstructor::Perform(const Handle(IntPatch_Line)& L)
Standard_Boolean isMicro = aSQDist*100.0 < Tol;
if(isMicro)
{//3D-dimension is small. Checking 2D-dimension
aSQDist = 0.0;
Standard_Real u1f, v1f, u2f, v2f;
Standard_Real u1l, v1l, u2l, v2l;
Standard_Real u1m, v1m, u2m, v2m;
WLine->Point(RealToInt(firstp)).Parameters(u1f, v1f, u2f, v2f);
WLine->Point(RealToInt(lastp)).Parameters(u1l, v1l, u2l, v2l);
WLine->Point(pmid).Parameters(u1m, v1m, u2m, v2m);
Standard_Real aDelta = u1m - u1f;
aSQDist += aDelta*aDelta;
aDelta = v1m - v1f;
aSQDist += aDelta*aDelta;
aDelta = u2m - u2f;
aSQDist += aDelta*aDelta;
aDelta = v2m - v2f;
aSQDist += aDelta*aDelta;
aDelta = u1m - u1l;
aSQDist += aDelta*aDelta;
aDelta = v1m - v1l;
aSQDist += aDelta*aDelta;
aDelta = u2m - u2l;
aSQDist += aDelta*aDelta;
aDelta = v2m - v2l;
aSQDist += aDelta*aDelta;
isMicro = aSQDist*100.0 < Tol;
}
if((Abs(firstp-lastp)>Precision::PConfusion()) && !isMicro)
{
Pmid.Parameters(u1,v1,u2,v2);

View File

@ -1422,8 +1422,9 @@ static Standard_Integer surfpoints (Draw_Interpretor& /*di*/, Standard_Integer /
//function : intersect
//purpose :
//=======================================================================
static Standard_Integer intersection (Draw_Interpretor& di, Standard_Integer n, const char** a)
{
static Standard_Integer intersection (Draw_Interpretor& di,
Standard_Integer n, const char** a)
{
if (n < 4)
return 1;
@ -1635,7 +1636,7 @@ static Standard_Integer intersection (Draw_Interpretor& di, Standard_Integer n,
dout.Flush();
return 0;
}
}
//=======================================================================
//function : CurveCommands

View File

@ -1420,13 +1420,14 @@ void IntPatch_Intersection::GeomParamPerfom(const Handle(Adaptor3d_HSurface)& t
if (!empt)
{
for(Standard_Integer i = 1; i <= interip.NbLines(); i++)
const Standard_Integer aNbLines = interip.NbLines();
for(Standard_Integer i = 1; i <= aNbLines; i++)
{
if(interip.Line(i)->ArcType() != IntPatch_Walking)
slin.Append(interip.Line(i));
}
for(Standard_Integer i = 1; i <= interip.NbLines(); i++)
for(Standard_Integer i = 1; i <= aNbLines; i++)
{
if(interip.Line(i)->ArcType() == IntPatch_Walking)
slin.Append(interip.Line(i));

View File

@ -294,7 +294,5 @@ fields
previousd2d : Dir2d from gp;
seqAjout : SequenceOfInteger from TColStd;
lines : SequenceOfIWLine;
NbPointsConfondusConsecutifs: Integer from Standard;
EpsilonSembleTropGrand : Integer from Standard;
end IWalking;

View File

@ -31,9 +31,7 @@ IntWalk_IWalking::IntWalk_IWalking (const Standard_Real Epsilon,
epsilon(Epsilon*Epsilon),
wd1 (IntWalk_VectorOfWalkingData::allocator_type (new NCollection_IncAllocator)),
wd2 (wd1.get_allocator()),
nbMultiplicities (wd1.get_allocator()),
NbPointsConfondusConsecutifs(0),
EpsilonSembleTropGrand(0)
nbMultiplicities (wd1.get_allocator())
{
}
@ -161,9 +159,13 @@ void IntWalk_IWalking::Perform(const ThePOPIterator& Pnts1,
Func.Set(Caro);
// calculation of all open lines
if (nbPnts1 != 0) ComputeOpenLine(Umult,Vmult,Pnts1,Func,Rajout);
if (nbPnts1 != 0)
ComputeOpenLine(Umult,Vmult,Pnts1,Func,Rajout);
// calculation of all closed lines
if (nbPnts2 != 0) ComputeCloseLine(Umult,Vmult,Pnts1,Pnts2,Func,Rajout);
if (nbPnts2 != 0)
ComputeCloseLine(Umult,Vmult,Pnts1,Pnts2,Func,Rajout);
for (I = 1; I <= nbPnts1; I++) {
if (wd1[I].etat >0) seqSingle.Append(Pnts1(I));
}

View File

@ -138,7 +138,7 @@ void IntWalk_IWalking::ComputeOpenLine(const TColStd_SequenceOfReal& Umult,
}
// modified by NIZHNY-MKK Fri Oct 27 12:34:37 2000.END
// Modified by Sergey KHROMOV - Tue Nov 20 10:41:45 2001 Begin
// Modified by Sergey KHROMOV - Tue Nov 20 10:41:45 2001 Begin
wd1[I].etat = - abs(wd1[I].etat);
movementdirectioninfo[I] = (movementdirectioninfo[I]==0) ? StepSign : 0;
// Modified by Sergey KHROMOV - Tue Nov 20 10:41:56 2001 End
@ -161,9 +161,8 @@ void IntWalk_IWalking::ComputeOpenLine(const TColStd_SequenceOfReal& Umult,
StatusPrecedent = IntWalk_OK;
// modified by NIZHNY-MKK Fri Oct 27 12:39:37 2000
Standard_Integer IndexOfPathPointDoNotCheck=0;
Standard_Integer aNbIter = 10;
while (!Arrive) { // as one of stop tests is not checked
Cadre = Cadrage(BornInf,BornSup,UVap,PasC,StepSign);
// Border?
@ -229,7 +228,7 @@ void IntWalk_IWalking::ComputeOpenLine(const TColStd_SequenceOfReal& Umult,
if (!ArretAjout && Cadre) {
if (CurrentLine->NbPoints() == 1) break; // cancel the line
TestArretCadre(Umult, Vmult, CurrentLine, Func, UVap, N);
// if (N == 0) {
// if (N == 0) {
if (N <= 0) { // jag 941017
MakeWalkingPoint(2, UVap(1), UVap(2), Func, Psol);
Tgtend = Func.IsTangent();
@ -338,6 +337,10 @@ void IntWalk_IWalking::ComputeOpenLine(const TColStd_SequenceOfReal& Umult,
previousd2d = Func.Direction2d();
CurrentLine->AddPoint(previousPoint);
}
else if (Status == IntWalk_PointConfondu)
{
aNbIter --;
}
}
}
else { // no numerical solution
@ -353,6 +356,9 @@ void IntWalk_IWalking::ComputeOpenLine(const TColStd_SequenceOfReal& Umult,
seqAjout.Append(lines.Length() + 1);
}
}
if(aNbIter < 0)
break;
} // end of started line
if (Arrive) {
@ -372,7 +378,8 @@ void IntWalk_IWalking::ComputeOpenLine(const TColStd_SequenceOfReal& Umult,
((av!=I) &&
(av!=IndexOfPathPointDoNotCheck) &&
(wd1[av].etat < -11) &&
(movementdirectioninfo[av]!=0))) {
(movementdirectioninfo[av]!=0)))
{
// modified by NIZHNY-MKK Fri Oct 27 13:00:26 2000.END
Standard_Real Uav=wd1[av].ustart;
Standard_Real Vav=wd1[av].vstart;
@ -428,7 +435,6 @@ void IntWalk_IWalking::ComputeOpenLine(const TColStd_SequenceOfReal& Umult,
}
}
}
}
} //end of point processing
} //end of all points

View File

@ -79,8 +79,8 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
Standard_Integer nbLoop = Pnts2.Length();
for (I = 1;I<=nbLoop;I++) {
if (wd2[I].etat > 12) { // start point of closed line
if (wd2[I].etat > 12)
{ // start point of closed line
LoopPnt = Pnts2.Value(I);
previousPoint.SetValue(ThePointOfLoopTool::Value3d(LoopPnt),reversed,
wd2[I].ustart,wd2[I].vstart);
@ -117,6 +117,7 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
ArretAjout = Standard_False;
NbDivision = 0;
StatusPrecedent = IntWalk_OK;
Standard_Integer aNbIter = 10;
while (!Arrive) { // as no test of stop is passed
Cadre=Cadrage(BornInf,BornSup,Uvap,PasC, StepSign); // border?
#ifdef CHRONO
@ -163,7 +164,6 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
//in case if there is a frame and arrival at the same time
}
else { // modif jag 940615
if (Rajout) { // test on added points
ArretAjout =TestArretAjout(Func,Uvap,N,Psol);
if (ArretAjout) {
@ -181,7 +181,7 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
if (!ArretAjout&& Cadre) { // test on already marked points
if (CurrentLine->NbPoints() == 1) break; // cancel the line
TestArretCadre(Umult,Vmult,CurrentLine,Func,Uvap,N);
// if (N==0) {
// if (N==0) {
if (N <= 0) { // jag 941017
MakeWalkingPoint(2,Uvap(1),Uvap(2),Func,Psol);
Tgtend = Func.IsTangent(); // jag 940616
@ -192,6 +192,7 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
}
Status = TestDeflection(Func, Arrive,Uvap,StatusPrecedent,
NbDivision,PasC,StepSign);
StatusPrecedent = Status;
if (Status == IntWalk_PasTropGrand) {// division of the step
Arrive = Standard_False;
@ -237,7 +238,6 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
}
}
}
else if ( Status == IntWalk_ArretSurPointPrecedent) {
if (CurrentLine->NbPoints() == 1) { //cancel the line
Arrive = Standard_False;
@ -312,6 +312,10 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
previousd2d = Func.Direction2d();
CurrentLine->AddPoint(previousPoint);
}
else if (Status == IntWalk_PointConfondu)
{
aNbIter --;
}
}
}
else { //no numerical solution NotDone
@ -329,6 +333,9 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
seqAjout.Append(lines.Length()+1);
}
}
if(aNbIter < 0)
break;
}// end of started line
if (Arrive) {
CurrentLine->SetTangencyAtBegining(Tgtbeg);

View File

@ -58,39 +58,46 @@ IntWalk_StatusDeflection IntWalk_IWalking::TestDeflection
//-- if epsilon is great enough (1e-11). In this case one loops
//-- without ever changing the values sent to Rsnld.
//---------------------------------------------------------------------------------
Standard_Real Paramu, Paramv, StepU,StepV;
Standard_Real Cosi, Cosi2, Norme;
Standard_Real Paramu = 0.0, Paramv = 0.0;
if (!reversed) {
previousPoint.ParametersOnS2(Paramu, Paramv);
}
else
{
previousPoint.ParametersOnS1(Paramu, Paramv);
}
const Standard_Real Du = UV(1) - Paramu;
const Standard_Real Dv = UV(2) - Paramv;
const Standard_Real Duv = Du * Du + Dv * Dv;
gp_Vec Corde(previousPoint.Value(), sp.Point());
Norme = Corde.SquareMagnitude();
// if (Norme <= epsilon*epsilon) {
if ((++NbPointsConfondusConsecutifs < 10) && (Norme <= epsilon)) { // the square is already taken in the constructor
const Standard_Real Norme = Corde.SquareMagnitude(),
aTol = epsilon*Precision::PConfusion();
//if ((++NbPointsConfondusConsecutifs < 10) && (Norme <= epsilon)) { // the square is already taken in the constructor
if ((Norme <= epsilon) && ((Duv <= aTol) || (StatusPrecedent != IntWalk_OK)))
{ // the square is already taken in the constructor
Status = IntWalk_PointConfondu;
if (StatusPrecedent == IntWalk_PasTropGrand) {
return IntWalk_ArretSurPointPrecedent;
}
if(++EpsilonSembleTropGrand > 5 && NbPointsConfondusConsecutifs == 8) { //-- Temporary
if(epsilon>0.00000000001) epsilon*=0.5; //-- Temporary
EpsilonSembleTropGrand = 0; //-- Temporary
}
}
else {
NbPointsConfondusConsecutifs = 0; //-- Temporary
EpsilonSembleTropGrand = 0; //-- Temporary
if(Norme<1e-16) Norme = 1e-16; //-- Temporary
Standard_Real Cosi = Corde * previousd3d;
Standard_Real Cosi2 = 0.0;
Cosi = Corde * previousd3d;
if (Cosi*StepSign < 0.) { // angle 3d > pi/2 !!!!
Cosi2 = 0.;
}
else {
Cosi2 = Cosi * Cosi / previousd3d.SquareMagnitude() / Norme;
if (Cosi*StepSign >= 0.) {// angle 3d <= pi/2 !!!!
const Standard_Real aDiv = previousd3d.SquareMagnitude()*Norme;
if(aDiv == 0)
return Status;
Cosi2 = Cosi * Cosi / aDiv;
}
if (Cosi2 < CosRef3D) { //angle 3d too great
Step = Step /2.0;
StepU = Abs(Step*previousd2d.X());
Standard_Real StepU = Abs(Step*previousd2d.X()),
StepV = Abs(Step*previousd2d.Y());
if (StepU < tolerance(1) && StepV < tolerance(2))
Status = IntWalk_ArretSurPointPrecedent;
@ -100,37 +107,28 @@ IntWalk_StatusDeflection IntWalk_IWalking::TestDeflection
}
}
if (!reversed) {
previousPoint.ParametersOnS2(Paramu, Paramv);
}
else {
previousPoint.ParametersOnS1(Paramu, Paramv);
}
Standard_Real Du = UV(1) - Paramu;
Standard_Real Dv = UV(2) - Paramv;
Standard_Real Duv = Du * Du + Dv * Dv;
if (Abs(Du) < tolerance(1) && Abs(Dv) < tolerance(2))
return IntWalk_ArretSurPointPrecedent; //confused point 2d
Cosi = StepSign * (Du * previousd2d.X() +
Dv * previousd2d.Y());
Standard_Real Cosi = StepSign * (Du * previousd2d.X() + Dv * previousd2d.Y());
if (Cosi < 0 && Status == IntWalk_PointConfondu)
return IntWalk_ArretSurPointPrecedent; // leave as step back
// with confused point
if (sp.IsTangent())
return IntWalk_ArretSurPoint;
//if during routing one has subdivided more than MaxDivision for each
//previous step, bug on the square; do nothing (experience U4)
if (NbDivision < MaxDivision &&
Status != IntWalk_PointConfondu &&
StatusPrecedent!= IntWalk_PointConfondu ) {
Cosi2 = Cosi * Cosi / Duv;
if ((NbDivision < MaxDivision) && (Status != IntWalk_PointConfondu) &&
(StatusPrecedent!= IntWalk_PointConfondu))
{
Standard_Real Cosi2 = Cosi * Cosi / Duv;
if (Cosi2 < CosRef2D || Cosi < 0 ) {
Step = Step / 2.0;
StepU = Abs(Step*previousd2d.X());
Standard_Real StepU = Abs(Step*previousd2d.X()),
StepV = Abs(Step*previousd2d.Y());
if (StepU < tolerance(1) && StepV < tolerance(2))
@ -145,7 +143,7 @@ IntWalk_StatusDeflection IntWalk_IWalking::TestDeflection
Cosi2 = Cosi * Cosi / sp.Direction3d().SquareMagnitude() / Norme;
if (Cosi2 < CosRef3D ){ //angle 3d too great
Step = Step / 2.;
StepU = Abs(Step*previousd2d.X());
Standard_Real StepU = Abs(Step*previousd2d.X()),
StepV = Abs(Step*previousd2d.Y());
if (StepU < tolerance(1) && StepV < tolerance(2))
Status = IntWalk_ArretSurPoint;
@ -160,7 +158,7 @@ IntWalk_StatusDeflection IntWalk_IWalking::TestDeflection
sp.Direction2d() * previousd2d < 0) {
//angle 2d too great or change the side
Step = Step / 2.;
StepU = Abs(Step*previousd2d.X());
Standard_Real StepU = Abs(Step*previousd2d.X()),
StepV = Abs(Step*previousd2d.Y());
if (StepU < tolerance(1) && StepV < tolerance(2))
Status = IntWalk_ArretSurPointPrecedent;
@ -171,34 +169,35 @@ IntWalk_StatusDeflection IntWalk_IWalking::TestDeflection
}
if (!Finished) {
if (Status == IntWalk_PointConfondu) {
StepU = Min(Abs(1.5 * Du),pas*(UM-Um));
if (Status == IntWalk_PointConfondu)
{
Standard_Real StepU = Min(Abs(1.5 * Du),pas*(UM-Um)),
StepV = Min(Abs(1.5 * Dv),pas*(VM-Vm));
Standard_Real d2dx = Abs(previousd2d.X());
Standard_Real d2dy = Abs(previousd2d.Y());
if (d2dx < tolerance(1)) {
if (d2dx < tolerance(1))
{
Step = StepV/d2dy;
}
else if (d2dy < tolerance(2)) {
else if (d2dy < tolerance(2))
{
Step = StepU/d2dx;
}
else {
else
{
Step = Min(StepU/d2dx,StepV/d2dy);
}
}
else {
// estimate the current vector.
// if vector/2<=current vector<= vector it is considered that the criterion
// is observed.
// otherwise adjust the step depending on the previous step
else
{
// estimate the current vector.
// if vector/2<=current vector<= vector it is considered that the criterion
// is observed.
// otherwise adjust the step depending on the previous step
/*
/*
Standard_Real Dist = Sqrt(Norme)/3.;
TColgp_Array1OfPnt Poles(1,4);
gp_Pnt POnCurv,Milieu;
@ -210,9 +209,9 @@ IntWalk_StatusDeflection IntWalk_IWalking::TestDeflection
StepSign * Dist*sp.Direction3d().Normalized().XYZ();
BzCLib::PntPole(0.5,Poles,POnCurv);
Milieu = (Poles(1).XYZ() + Poles(4).XYZ())*0.5;
// FlecheCourante = Milieu.Distance(POnCurv);
// FlecheCourante = Milieu.Distance(POnCurv);
Standard_Real FlecheCourante = Milieu.SquareDistance(POnCurv);
*/
*/
// Direct calculation :
// POnCurv=(((p1+p2)/2.+(p2+p3)/2.)/2. + ((p2+p3)/2.+(p3+P4)/2.)/2.)/2.
@ -231,50 +230,59 @@ IntWalk_StatusDeflection IntWalk_IWalking::TestDeflection
// if (FlecheCourante <= 0.5*fleche) {
if (FlecheCourante <= 0.25*fleche*fleche) {
if (FlecheCourante <= 0.25*fleche*fleche)
{
Standard_Real d2dx = Abs(sp.Direction2d().X());
Standard_Real d2dy = Abs(sp.Direction2d().Y());
StepU = Min(Abs(1.5*Du),pas*(UM-Um));
Standard_Real StepU = Min(Abs(1.5*Du),pas*(UM-Um)),
StepV = Min(Abs(1.5*Dv),pas*(VM-Vm));
if (d2dx < tolerance(1)) {
if (d2dx < tolerance(1))
{
Step = StepV/d2dy;
}
else if (d2dy < tolerance(2)) {
else if (d2dy < tolerance(2))
{
Step = StepU/d2dx;
}
else {
else
{
Step = Min(StepU/d2dx,StepV/d2dy);
}
}
else {
// if (FlecheCourante > fleche) { // step too great
if (FlecheCourante > fleche*fleche) { // step too great
else
{
//if (FlecheCourante > fleche) { // step too great
if (FlecheCourante > fleche*fleche)
{ // step too great
Step = Step /2.;
StepU = Abs(Step*previousd2d.X());
Standard_Real StepU = Abs(Step*previousd2d.X()),
StepV = Abs(Step*previousd2d.Y());
if (StepU < tolerance(1) && StepV < tolerance(2))
Status = IntWalk_ArretSurPointPrecedent;
else
Status = IntWalk_PasTropGrand;
}
else {
else
{
Standard_Real d2dx = Abs(sp.Direction2d().X());
Standard_Real d2dy = Abs(sp.Direction2d().Y());
StepU = Min(Abs(1.5*Du),pas*(UM-Um));
Standard_Real StepU = Min(Abs(1.5*Du),pas*(UM-Um)),
StepV = Min(Abs(1.5*Dv),pas*(VM-Vm));
if (d2dx < tolerance(1)) {
if (d2dx < tolerance(1))
{
Step = Min(Step,StepV/d2dy);
}
else if (d2dy < tolerance(2)) {
else if (d2dy < tolerance(2))
{
Step = Min(Step,StepU/d2dx);
}
else {
else
{
Step = Min(Step,Min(StepU/d2dx,StepV/d2dy));
}
}

View File

@ -501,7 +501,7 @@ STATIC_PRECEDENT_INFLEXION(0)
}
else {
Standard_Real t = VM2-Vm2;
if(t<ThePSurfaceTool::UPeriod(Caro2)) {
if(t<ThePSurfaceTool::VPeriod(Caro2)) {
t=0.5*(ThePSurfaceTool::VPeriod(Caro2)-t);
t=(t>KELARG*pasuv[3])? KELARG*pasuv[3] : t;
VM2+=t;

View File

@ -1,8 +1,6 @@
puts "TODO #22911 ALL: Error : The area of the resulting shape is"
restore [locate_data_file CTO908_topo104-o1.brep] wheel
restore [locate_data_file CTO908_topo104-o2.brep] jante
bfuse result wheel jante
set square 0
set square 40059.9

View File

@ -1,8 +1,6 @@
puts "TODO #22911 ALL: Error : The area of the resulting shape is"
restore [locate_data_file CTO908_topo106-p.brep] poche
restore [locate_data_file CTO908_topo106-n.brep] nervure
bfuse result poche nervure
set square 0
set square 108943

View File

@ -1,6 +1,4 @@
# cts17861
#puts "TODO #22911 ALL: Faulty shapes in variables faulty_1 to faulty_"
puts "TODO #22911 ALL: Error : The area of the resulting shape is"
restore [locate_data_file CTO900_cts17861a.rle] a
restore [locate_data_file cts17861b.rle] b
@ -10,4 +8,4 @@ fsameparameter b
bfuse result a b
set square 0
set square 406803

View File

@ -1,9 +1,7 @@
puts "TODO #22911 ALL: Error : The area of the resulting shape is"
restore [locate_data_file a102] a
restore [locate_data_file b136] b
bop a b
boptuc result
set square 0
set square 9741.13

View File

@ -16,5 +16,5 @@ repeat 100 {
compound s_$i result result
incr i
}
set length 3961.04
set length 3854.34
set 2dviewer 0

View File

@ -10,7 +10,7 @@ pload QAcommands
restore [locate_data_file bug23952_s1.draw] a
restore [locate_data_file bug23952_s2.draw] b
set NbLines 5
set NbLines 6
set info [OCC23952intersect $NbLines a b]
if { [regexp "theNbSol: OK" $info] != 1 } {

View File

@ -0,0 +1,82 @@
puts "========="
puts "OCC24612"
puts "========="
puts ""
###########################################################
# Wrong pcurve of the section curve
###########################################################
set MaxTol 5.0e-7
set NbCurv_OK 1
restore [locate_data_file bug24612_b1.brep] b1
restore [locate_data_file bug24612_b2.brep] b2
mksurface s1 b1
bounds s1 U1f_exp U1l_exp V1f_exp V1l_exp
dval U1f_exp
dval U1l_exp
dval V1f_exp
dval V1l_exp
set log [bopcurves b1 b2 -2d]
regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log} full Toler NbCurv
if {${NbCurv} != ${NbCurv_OK}} {
puts "Error: ${NbCurv_OK} curve(s) expected, but ${NbCurv} found."
}
if {${Toler} > ${MaxTol}} {
puts "Error: Tolerance is too big!"
}
#Theoretically, c2d1_1 must cover V-diapason of surface s1 fully.
set log [dump c2d1_1]
regexp {Degree +([-0-9.+eE]+), +([-0-9.+eE]+) Poles, +([-0-9.+eE]+)} ${log} full Degree Poles KnotsPoles
puts "Degree=${Degree}"
puts "Poles=${Poles}"
puts "KnotsPoles=${KnotsPoles}"
puts ""
set Pole 1
set exp_string " +${Pole} : +(\[-0-9.+eE\]+), +(\[-0-9.+eE\]+)"
regexp ${exp_string} ${log} full U_begin V_begin
puts "Pole=${Pole}"
puts "U_begin=${U_begin}"
puts "V_begin=${V_begin}"
dset V_begin ${V_begin}
puts ""
set Pole ${Poles}
set exp_string " +${Pole} : +(\[-0-9.+eE\]+), +(\[-0-9.+eE\]+)"
regexp ${exp_string} ${log} full U_end V_end
puts "Pole=${Pole}"
puts "U_end=${U_end}"
puts "V_end=${V_end}"
dset V_end ${V_end}
puts ""
set delta_f [dval V1l_exp-V_begin]
#ATTENTION!!! V_begin must be strictly equal V1l_exp (without any tolerance)
if {${delta_f} != 0} {
puts "Error: Bad value. V_begin = [dval V_begin], Vlast = [dval V1l_exp]."
} else {
puts "OK: Good value. V_begin matches with Vlast of surface."
}
puts ""
set delta_l [dval V1f_exp-V_end]
#ATTENTION!!! V_end must be strictly equal V1f_exp (without any tolerance)
if {${delta_l} != 0} {
puts "Error: Bad value. V_end = [dval V_end], Vfirst = [dval V1f_exp]."
} else {
puts "OK: Good value. V_end matches with Vfirst of surface."
}

View File

@ -7,8 +7,6 @@ puts ""
## It is impossible to intersect two surfaces
##################################################
puts "TODO OCC24472 ALL: Error : Intersection was made WRONGLY"
restore [locate_data_file OCC13-1.draw] su1
############### checkshape su1 # is not a topological shape
restore [locate_data_file OCC13-2.draw] su2

View File

@ -2,10 +2,6 @@ restore [locate_data_file cylindre.rle] cyl
restore [locate_data_file contour.rle] cont
mkplane cont cont
nexplode cyl F
puts "*"
#puts "TODO OCC22810 All:Faulty .*"
puts "TODO OCC22810 ALL:Error : The area of the resulting shape is"
ttranslate cont 0 0 -100
#
@ -18,4 +14,4 @@ if { [catch { featperform prism result face face } ] != 0 } {
puts "Error in featperform"
}
set square 0
set square 82351.1