mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0030398: Modeling Algorithms - thrusection produces twisted solid
Change FirstBary to PrevBary to correct Offset calculation relative prev wire instead of first wire
This commit is contained in:
@@ -1585,7 +1585,7 @@ void BRepFill_CompatibleWires::ComputeOrigin(const Standard_Boolean /*polar*/ )
|
||||
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++)
|
||||
{
|
||||
@@ -1596,10 +1596,10 @@ void BRepFill_CompatibleWires::ComputeOrigin(const Standard_Boolean /*polar*/ )
|
||||
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;
|
||||
@@ -1804,6 +1804,8 @@ void BRepFill_CompatibleWires::ComputeOrigin(const Standard_Boolean /*polar*/ )
|
||||
newwire.Closed( Standard_True );
|
||||
newwire.Orientation( TopAbs_FORWARD );
|
||||
myWork(i) = newwire;
|
||||
|
||||
PrevBary = CurBary;
|
||||
}
|
||||
#ifdef OCCT_DEBUG_EFV
|
||||
|
||||
|
Reference in New Issue
Block a user