0026570: Crash on attempt to rotate a shape.

An extended draw-command trotate (ttranslate, tmirror, ...) by an additional parameter "-copy".
New check of edge range is added in BRepCheck/BRepCheck_Edge.cxx
The same checking is added in ShapeAnalysis_Edge.cxx
Fixing this problem is added in ShapeFix_Wire.cxx
GeomLib::SameRange(...) and BRepTools_TrsfModification::NewCurve2d(...) are modified to avoid exception in TrimmedCurve
This commit is contained in:
vro
2015-08-19 10:25:11 +03:00
committed by bugmaster
parent 472433e2c7
commit 4e882c7153
13 changed files with 264 additions and 25 deletions

View File

@@ -115,6 +115,13 @@ static Standard_Integer transform(Draw_Interpretor& ,Standard_Integer n,const ch
const char* aName = a[0];
Standard_Boolean isBasic = Standard_False;
Standard_Boolean isCopy = Standard_False;
// Check "copy" flag.
if (!strcmp(a[n-1], "-copy")) {
isCopy = Standard_True;
last = --n;
}
if (!strcmp(aName,"reset")) {
}
@@ -176,7 +183,7 @@ static Standard_Integer transform(Draw_Interpretor& ,Standard_Integer n,const ch
return 1;
}
else {
trf.Perform(S);
trf.Perform(S, isCopy);
if (!trf.IsDone())
return 1;
DBRep::Set(a[i],trf.Shape());
@@ -1418,27 +1425,27 @@ void BRepTest::BasicCommands(Draw_Interpretor& theCommands)
transform,g);
theCommands.Add("tmove",
"tmove name1 name2 ... name, set location from name",
"tmove name1 name2 ... name, set location from name [-copy]",
__FILE__,
transform,g);
theCommands.Add("ttranslate",
"ttranslate name1 name2 ... dx dy dz",
"ttranslate name1 name2 ... dx dy dz [-copy]",
__FILE__,
transform,g);
theCommands.Add("trotate",
"trotate name1 name2 ... x y z dx dy dz angle",
"trotate name1 name2 ... x y z dx dy dz angle [-copy]",
__FILE__,
transform,g);
theCommands.Add("tmirror",
"tmirror name x y z dx dy dz",
"tmirror name x y z dx dy dz [-copy]",
__FILE__,
transform,g);
theCommands.Add("tscale",
"tscale name x y z scale",
"tscale name x y z scale [-copy]",
__FILE__,
transform,g);