0026341: Uninitialized field in ShapeFix_Face
authorabv <abv@opencascade.com>
Thu, 2 Jul 2015 11:33:54 +0000 (14:33 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 2 Jul 2015 11:35:05 +0000 (14:35 +0300)
Parameter RemoveSmallAreaFaceMode in ShapeFix_Face is properly initialized; some other minor corrections

src/ShapeFix/ShapeFix.cxx
src/ShapeFix/ShapeFix_Face.cdl
src/ShapeFix/ShapeFix_Face.cxx
src/XSTEPResource/STEP

index f1d6b54..000cf4f 100644 (file)
@@ -288,17 +288,17 @@ TopoDS_Shape ShapeFix::RemoveSmallEdges (TopoDS_Shape& Shape,
   Handle(ShapeFix_Shape) sfs = new ShapeFix_Shape;
   sfs->Init(Shape);
   sfs->SetPrecision(Tolerance);
-  Handle(ShapeFix_Face)::DownCast(sfs->FixFaceTool())->FixMissingSeamMode() = Standard_False;
-  Handle(ShapeFix_Face)::DownCast(sfs->FixFaceTool())->FixOrientationMode() = Standard_False;
-  Handle(ShapeFix_Face)::DownCast(sfs->FixFaceTool())->FixSmallAreaWireMode() = Standard_False;
+  sfs->FixFaceTool()->FixMissingSeamMode() = Standard_False;
+  sfs->FixFaceTool()->FixOrientationMode() = Standard_False;
+  sfs->FixFaceTool()->FixSmallAreaWireMode() = Standard_False;
   sfs->FixWireTool()->ModifyTopologyMode() = Standard_True;
   //sfs.FixWireTool().FixReorderMode() = Standard_False;
   sfs->FixWireTool()->FixConnectedMode() = Standard_False;
   sfs->FixWireTool()->FixEdgeCurvesMode() = Standard_False;
   sfs->FixWireTool()->FixDegeneratedMode() = Standard_False;
-  Handle(ShapeFix_Wire)::DownCast(sfs->FixWireTool())->FixSelfIntersectionMode() = Standard_False; 
-  Handle(ShapeFix_Wire)::DownCast(sfs->FixWireTool())->FixLackingMode() = Standard_False; 
-  Handle(ShapeFix_Wire)::DownCast(sfs->FixWireTool())->FixSmallMode() = Standard_True;
+  sfs->FixWireTool()->FixSelfIntersectionMode() = Standard_False; 
+  sfs->FixWireTool()->FixLackingMode() = Standard_False; 
+  sfs->FixWireTool()->FixSmallMode() = Standard_True;
   sfs->Perform();
   TopoDS_Shape result = sfs->Shape();
   context = sfs->Context();
index 62c4920..cd58951 100644 (file)
@@ -209,7 +209,7 @@ is
         --          missing seam edge
         --          Returns True if missing seam was added
 
-    FixSmallAreaWire (me: mutable; theIsRemoveSmallFace: Boolean = Standard_False) returns Boolean;
+    FixSmallAreaWire (me: mutable; theIsRemoveSmallFace: Boolean) returns Boolean;
         ---Purpose: Detects wires with small area (that is less than 
         --          100*Precision::PConfusion(). Removes these wires if they are internal.
         --  Returns : True if at least one small wire removed,
index ba90f6d..b1fecfd 100644 (file)
@@ -166,6 +166,7 @@ void ShapeFix_Face::ClearModes()
   myFixAddNaturalBoundMode   = -1;
   myFixMissingSeamMode       = -1;
   myFixSmallAreaWireMode     = -1;
+  myRemoveSmallAreaFaceMode  = -1;
   myFixIntersectingWiresMode = -1;
   myFixLoopWiresMode         = -1;
   myFixSplitFaceMode         = -1;
index 6f04a84..15858bb 100755 (executable)
@@ -26,6 +26,7 @@ FromSTEP.FixShape.FixOrientationMode          : -1
 FromSTEP.FixShape.FixAddNaturalBoundMode       : -1
 FromSTEP.FixShape.FixMissingSeamMode           : -1
 FromSTEP.FixShape.FixSmallAreaWireMode         : -1
+FromSTEP.FixShape.RemoveSmallAreaFaceMode      : -1
 FromSTEP.FixShape.FixIntersectingWiresMode     : -1
 FromSTEP.FixShape.FixLoopWiresMode              : -1
 FromSTEP.FixShape.FixSplitFaceMode              : -1