Commit e642cbc1 by Christophe Geuzaine

Merge branch 'SimpleEdgeRecoveryProblem' into 'master'

Simple edge recovery problem

See merge request !100
parents 6f941c2f 8a7fbb40
Pipeline #1467 passed with stage
in 36 minutes 23 seconds
......@@ -381,12 +381,21 @@ BDS_Edge *BDS_Mesh::recover_edge(int num1, int num2, bool &_fatal,
return eee;
}
int ichoice = ix++ % intersected.size();
//bool success =
swap_edge(intersected[ichoice], BDS_SwapEdgeTestQuality(false, false));
// printf("trying to swop %d %d = %d (%d %d)\n", intersected[ichoice]->p1->iD,
// intersected[ichoice]->p2->iD, success, intersected[ichoice]->deleted,
// intersected[ichoice]->numfaces());
int ichoice = 0;
bool success = false;
while (!success && ichoice < intersected.size())
{
success = swap_edge(intersected[ichoice++], BDS_SwapEdgeTestQuality(false, false));
}
if (!success)
{
Msg::Debug("edge %d %d cannot be recovered at all\n", num1, num2);
_fatal = true;
return 0;
}
ix++;
}
return 0;
}
......
SetFactory("OpenCASCADE");
a() = ShapeFromFile("unable_to_recover_edge_2d-2.brep");
Field[1] = MathEval;
Field[1].F = "1504 + 794 * sin (x/500)";
Background Field = 1;
Mesh.Algorithm = 1;
Mesh 2;
nbtriangles = Mesh.NbTriangles;
If(nbtriangles == 0)
Error("No triangle elements created!");
EndIf
SetFactory("OpenCASCADE");
a() = ShapeFromFile("unable_to_recover_edge_2d.brep");
Mesh.Algorithm = 1;
lc = 500;
Mesh.CharacteristicLengthMin = lc;
Mesh.CharacteristicLengthMax = lc;
Mesh 2;
nbtriangles = Mesh.NbTriangles;
If(nbtriangles == 0)
Error("No triangle elements created!");
EndIf
This source diff could not be displayed because it is too large. You can view the blob instead.
DBRep_DrawableShape
CASCADE Topology V1, (c) Matra-Datavision
Locations 0
Curve2ds 18
1 -29.778817259984528 -725.06192913580185 0.043045098943428978 0.99907313018464805
1 -33.948305402213315 -725.00706101744174 0.044765408486837945 0.99899752662506958
8 -221.44781623134472 -185.86881667871017
1 46.836612078382984 225.672193404231 0.14984253672759779 -0.9887098736166432
8 -221.44781623134472 -185.86881667871017
1 -6.820505695993484 216.87576861927928 -0.1210686734418096 0.99264413377153471
8 -221.44781623134472 -185.86881667871017
1 46.836612078382984 225.672193404231 0.14984253672759779 -0.9887098736166432
8 -221.44781623134472 -185.86881667871017
1 -6.820505695993484 216.87576861927928 -0.1210686734418096 0.99264413377153471
8 -196.62738150714142 -179.69081409106283
1 51.618535909806191 227.63836532983493 0.17552323180342394 -0.98447528922633787
8 -196.62738150714142 -179.69081409106283
1 174.35415887929091 127.35742903769142 0.75133057943260673 0.65992602646771203
8 -196.62738150714142 -179.69081409106283
1 51.618535909806191 227.63836532983493 0.17552323180342394 -0.98447528922633787
8 -196.62738150714142 -179.69081409106283
1 174.35415887929091 127.35742903769142 0.75133057943260673 0.65992602646771203
8 -217.60568120056615 -167.19931668241779
1 -7.6740779973072462 202.23315237339983 -0.12716415183236313 -0.99188168573109359
1 -91.031589803845506 178.42844827137677 -0.52691321604271346 0.84991909189023684
8 -217.60568120056615 -167.19931668241779
1 -7.6740779973072462 202.23315237339983 -0.12716415183236313 -0.99188168573109359
1 -91.031589803845506 178.42844827137677 -0.52691321604271346 0.84991909189023684
8 -194.3715683137919 -128.05304902154288
1 -1.4517146319528031 201.08655627908834 -0.093910390262980134 -0.99558065399075268
8 -194.3715683137919 -128.05304902154288
1 125.58343858209481 156.6226972072516 0.55869739451849265 0.82937158219838214
8 -194.3715683137919 -128.05304902154288
1 -1.4517146319528031 201.08655627908834 -0.093910390262980134 -0.99558065399075268
8 -194.3715683137919 -128.05304902154288
1 125.58343858209481 156.6226972072516 0.55869739451849265 0.82937158219838214
Curves 5
1 -950 249.114147048288 -79.5464794714146 0.99898779714884955 -5.0252166170148405e-015 0.044982009155762122
1 0.66999552868013268 252.8568988826265 1.2606927987490408 -0.98870024433434023 0.019029729047963271 0.14869329596715897
1 2.6361483052646832 253.31697360012706 6.0204409101528302 -0.98446570118566668 0.021528278282568029 0.17425216332431032
1 -22.768817223715629 247.61686541985046 -52.9976529467679 -0.99187202555775256 -0.0081077432462526022 -0.12698090177429822
1 -23.915402151053101 248.23179973987808 -46.805747970070492 -0.99557095779227378 -0.0048320580962057024 -0.09388886630016155
Polygon3D 4
2 1
0.01
195.126765973082 249.114147048282 -27.9841852987318 192.625655689739 249.162286462917 -27.6080365784916
-196.67919731862 -194.149502097369
2 1
0.01
192.62565568974 249.162286462917 -27.6080365784917 185.460634370852 249.318971020507 -26.339815183295
-192.987431817743 -185.709350610588
2 1
0.01
185.460634370852 249.318971020507 -26.339815183295 164.093220301766 249.144309872048 -29.075302662692
-209.935804447631 -188.393293399322
2 1
0.01
164.093220301766 249.144309872048 -29.075302662692 157.878636216022 249.114147048282 -29.6613786724136
-188.845025039438 -182.602793848278
PolygonOnTriangulations 0
Surfaces 11
1 -224.99999999999989 249.25730108173732 -45.448012178106609 0.0044134322521063958 0.99517503432963805 -0.098016185718277832 3.3610267347050631e-017 0.098017140330687355 0.99518472667208591 0.99999026076045172 -0.0043921803694982756 0.00043259200839466071
1 -224.99999999999989 248.69018627715485 -48.299090831748366 0.01306970192222975 0.95685860135128786 -0.29025988340058528 5.5511151231257827e-017 0.29028467725401547 0.9569403357323446 0.99991458779821007 -0.012506924945380223 0.0037939342043005956
1 -224.99999999999989 249.25730108173732 -45.448012178106609 0.0044134322521063958 0.99517503432963805 -0.098016185718277832 3.3610267347050631e-017 0.098017140330687355 0.99518472667208591 0.99999026076045172 -0.0043921803694982756 0.00043259200839466071
1 213.80000000000001 267.30000000000001 -36.799999999999997 -0.14737757187486819 -0.30480616402678679 -0.94094264101460712 0.14691570272235813 -0.94752374564757069 0.28392697604770406 -0.9781081880865039 -0.09639478100640804 0.1844245607094209
1 213.80000000000001 267.30000000000001 -36.799999999999997 -0.14737757187486819 -0.30480616402678679 -0.94094264101460712 0.14691570272235813 -0.94752374564757069 0.28392697604770406 -0.9781081880865039 -0.09639478100640804 0.1844245607094209
1 213.80000000000001 267.30000000000001 -36.799999999999997 -0.17335302401338507 -0.27664326155073227 -0.94520750891219008 -0.72127562868872042 -0.61783687573723767 0.31311190082611096 -0.67060435170456945 0.73603403509472465 -0.092432151641470367
1 213.80000000000001 267.30000000000001 -36.799999999999997 -0.17335302401338507 -0.27664326155073227 -0.94520750891219008 -0.72127562868872042 -0.61783687573723767 0.31311190082611096 -0.67060435170456945 0.73603403509472465 -0.092432151641470367
1 175.30000000000001 265.80000000000001 -29.300000000000001 0.12715798968695199 -0.098872809307170753 -0.98694225425729998 0.51876072579403432 -0.84145440561867513 0.15113501460141202 -0.84541005141435344 -0.53120490476334092 -0.055706320314216753
1 175.30000000000001 265.80000000000001 -29.300000000000001 0.12715798968695199 -0.098872809307170753 -0.98694225425729998 0.51876072579403432 -0.84145440561867513 0.15113501460141202 -0.84541005141435344 -0.53120490476334092 -0.055706320314216753
1 175.30000000000001 265.80000000000001 -29.300000000000001 0.093982537472698302 -0.076627313281546275 -0.99262054054378945 -0.55821177590395865 -0.82962301531590543 0.011192216058224513 -0.82435847535665074 0.55304060187060133 -0.12074434475478095
1 175.30000000000001 265.80000000000001 -29.300000000000001 0.093982537472698302 -0.076627313281546275 -0.99262054054378945 -0.55821177590395865 -0.82962301531590543 0.011192216058224513 -0.82435847535665074 0.55304060187060133 -0.12074434475478095
Triangulations 0
TShapes 12
Ve
1.00000063552874e-007
157.878636216022 249.114147048282 -29.6613786724136
0 0
0101101
*
Ve
1.00000065122317e-007
195.126765973081 249.114147048282 -27.9841852987317
0 0
0101101
*
Ed
1e-007 1 1 0
1 1 0 1109.00117036259 1146.2870409842
2 1 2 0 1109.00117036259 1146.2870409842
2 2 1 0 1109.00117036259 1146.2870409842
0
0101000
+12 0 -11 0 *
Ve
1.00000029296428e-007
192.62565568974 249.162286462917 -27.6080365784917
0 0
0101101
*
Ed
1e-007 1 1 0
1 2 0 -196.67919731862 -194.149502097369
2 3 3 0 -196.67919731862 -194.149502097369
2 4 4 0 -196.67919731862 -194.149502097369
2 5 1 0 -196.67919731862 -194.149502097369
2 6 5 0 -196.67919731862 -194.149502097369
5 1 0
0
0101000
+11 0 -9 0 *
Ve
1.00000065122317e-007
185.460634370852 249.318971020507 -26.339815183295
0 0
0101101
*
Ed
1e-007 1 1 0
1 3 0 -192.987431817743 -185.709350610588
2 7 3 0 -192.987431817743 -185.709350610588
2 8 6 0 -192.987431817743 -185.709350610588
2 9 1 0 -192.987431817743 -185.709350610588
2 10 7 0 -192.987431817743 -185.709350610588
5 2 0
0
0101000
+9 0 -7 0 *
Ve
1.00000056954333e-007
164.093220301766 249.144309872048 -29.075302662692
0 0
0101101
*
Ed
1e-007 1 1 0
1 4 0 -209.935804447631 -188.393293399322
2 11 3 0 -209.935804447631 -188.393293399322
2 12 8 0 -209.935804447631 -188.393293399322
2 13 1 0 -209.935804447631 -188.393293399322
2 14 9 0 -209.935804447631 -188.393293399322
5 3 0
0
0101000
+7 0 -5 0 *
Ed
1e-007 1 1 0
1 5 0 -188.845025039438 -182.602793848278
2 15 3 0 -188.845025039438 -182.602793848278
2 16 10 0 -188.845025039438 -182.602793848278
2 17 1 0 -188.845025039438 -182.602793848278
2 18 11 0 -188.845025039438 -182.602793848278
5 4 0
0
0101000
+5 0 -12 0 *
Wi
0101100
-10 0 -8 0 -6 0 -4 0 -3 0 *
Fa
0 1e-007 1 0
0101000
+2 0 *
-1 0
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment