NbSamples = 4;
gp_Pln FirstPlane;
PlaneOfWire(TopoDS::Wire(myWork(ideb)), FirstPlane);
- gp_Pnt FirstBary = FirstPlane.Location();
+ gp_Pnt PrevBary = FirstPlane.Location();
gp_Vec NormalOfFirstPlane = FirstPlane.Axis().Direction();
for (i = ideb+1; i <= ifin; i++)
{
gp_Pln CurPlane;
PlaneOfWire(aWire, CurPlane);
gp_Pnt CurBary = CurPlane.Location();
- gp_Vec aVec(FirstBary, CurBary);
+ gp_Vec aVec(PrevBary, CurBary);
gp_Vec anOffsetProj = (aVec * NormalOfFirstPlane) * NormalOfFirstPlane;
CurBary.Translate(-anOffsetProj); //projected current bary center
- gp_Vec Offset(CurBary, FirstBary);
+ gp_Vec Offset(CurBary, PrevBary);
TopoDS_Wire newwire;
BRep_Builder BB;
newwire.Closed( Standard_True );
newwire.Orientation( TopAbs_FORWARD );
myWork(i) = newwire;
+
+ PrevBary = CurBary;
}
#ifdef OCCT_DEBUG_EFV
--- /dev/null
+puts "================================================="
+puts "0030398: Modeling Algorithms - thrusection produces twisted solid"
+puts "================================================="
+puts ""
+
+restore [locate_data_file bug30398.brep] a
+eval thrusections r 1 1 [explode a w]
+
+checkshape r
+checknbshapes r -shell 1 -face 630 -wire 630 -edge 1260
+
+smallview
+fit
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
\ No newline at end of file