mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-03-15 17:51:27 +05:00
PAL7275: Gluing two cones. Fix done by PKV.
This commit is contained in:
parent
4603044419
commit
72706d9fde
@ -676,12 +676,16 @@ void GEOMAlgo_Gluer::MakeVertex(const TopTools_ListOfShape& aLV,
|
||||
void GEOMAlgo_Gluer::MakeEdge(const TopoDS_Edge& aE,
|
||||
TopoDS_Edge& aNewEdge)
|
||||
{
|
||||
//modified by NIZNHY-PKV Thu Dec 30 11:15:23 2004 f
|
||||
myErrorStatus=0;
|
||||
//
|
||||
Standard_Boolean bIsDE;
|
||||
Standard_Real aT1, aT2;
|
||||
TopoDS_Vertex aV1, aV2, aVR1, aVR2;
|
||||
TopoDS_Edge aEx;
|
||||
//
|
||||
bIsDE=BRep_Tool::Degenerated(aE);
|
||||
//
|
||||
aEx=aE;
|
||||
aEx.Orientation(TopAbs_FORWARD);
|
||||
//
|
||||
@ -695,8 +699,32 @@ void GEOMAlgo_Gluer::MakeEdge(const TopoDS_Edge& aE,
|
||||
aVR2=TopoDS::Vertex(myOrigins.Find(aV2));
|
||||
aVR2.Orientation(TopAbs_REVERSED);
|
||||
//
|
||||
if (bIsDE) {
|
||||
Standard_Real aTol;
|
||||
BRep_Builder aBB;
|
||||
TopoDS_Edge E;
|
||||
TopAbs_Orientation anOrE;
|
||||
//
|
||||
anOrE=aE.Orientation();
|
||||
aTol=BRep_Tool::Tolerance(aE);
|
||||
//
|
||||
E=aEx;
|
||||
E.EmptyCopy();
|
||||
//
|
||||
aBB.Add (E, aVR1);
|
||||
aBB.Add (E, aVR2);
|
||||
aBB.Range(E, aT1, aT2);
|
||||
aBB.Degenerated(E, Standard_True);
|
||||
aBB.UpdateEdge(E, aTol);
|
||||
//
|
||||
aNewEdge=E;
|
||||
}
|
||||
//
|
||||
else {
|
||||
BOPTools_Tools::MakeSplitEdge(aEx, aVR1, aT1, aVR2, aT2, aNewEdge);
|
||||
}
|
||||
//modified by NIZNHY-PKV Thu Dec 30 11:15:28 2004 t
|
||||
}
|
||||
//
|
||||
//=======================================================================
|
||||
//function : MakeFace
|
||||
@ -736,7 +764,9 @@ void GEOMAlgo_Gluer::MakeFace(const TopoDS_Face& aF,
|
||||
for (; aExpE.More(); aExpE.Next()) {
|
||||
const TopoDS_Edge& aE=TopoDS::Edge(aExpE.Current());
|
||||
aER=TopoDS::Edge(myOrigins.Find(aE));
|
||||
//
|
||||
aER.Orientation(TopAbs_FORWARD);
|
||||
if (!BRep_Tool::Degenerated(aER)) {//modified by NIZNHY-PKV Thu Dec 30 11:31:37 2004 ft
|
||||
// build p-curve
|
||||
if (bIsUPeriodic) {
|
||||
GEOMAlgo_Tools::RefinePCurveForEdgeOnFace(aER, aFFWD, aUMin, aUMax);
|
||||
@ -748,6 +778,10 @@ void GEOMAlgo_Gluer::MakeFace(const TopoDS_Face& aF,
|
||||
if (bIsToReverse) {
|
||||
aER.Reverse();
|
||||
}
|
||||
}
|
||||
else {
|
||||
aER.Orientation(aE.Orientation());
|
||||
}
|
||||
//
|
||||
aBB.Add(newWire, aER);
|
||||
}
|
||||
@ -772,10 +806,13 @@ Standard_Boolean GEOMAlgo_Gluer::IsToReverse(const TopoDS_Face& aFR,
|
||||
bRet=Standard_False;
|
||||
//
|
||||
aExp.Init(aF, TopAbs_EDGE);
|
||||
if (!aExp.More()) {
|
||||
return bRet;
|
||||
}
|
||||
for (; aExp.More(); aExp.Next()) {
|
||||
const TopoDS_Edge& aE=TopoDS::Edge(aExp.Current());
|
||||
//modified by NIZNHY-PKV Thu Dec 30 11:38:05 2004 f
|
||||
if (BRep_Tool::Degenerated(aE)) {
|
||||
continue;
|
||||
}
|
||||
//modified by NIZNHY-PKV Thu Dec 30 11:38:08 2004 t
|
||||
const TopoDS_Edge& aER=TopoDS::Edge(myOrigins.Find(aE));
|
||||
//
|
||||
aC3D=BRep_Tool::Curve(aE, aT1, aT2);
|
||||
@ -796,6 +833,8 @@ Standard_Boolean GEOMAlgo_Gluer::IsToReverse(const TopoDS_Face& aFR,
|
||||
aScPr=aDNF*aDNFR;
|
||||
return (aScPr<0.);
|
||||
}
|
||||
return bRet;
|
||||
}
|
||||
//
|
||||
|
||||
//
|
||||
|
@ -51,8 +51,8 @@ Standard_Integer GEOMAlgo_Tools::RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKey
|
||||
aNbE=aMPKLE.Extent();
|
||||
for (i=1; i<=aNbE; ++i) {
|
||||
TopTools_ListOfShape& aLSDE=aMPKLE.ChangeFromIndex(i);
|
||||
aMEE.Clear();
|
||||
//
|
||||
aMEE.Clear();
|
||||
iErr=GEOMAlgo_Tools::FindSDShapes(aLSDE, aTol, aMEE, aCtx);
|
||||
if (iErr) {
|
||||
return iErr;
|
||||
@ -107,11 +107,17 @@ Standard_Integer GEOMAlgo_Tools::FindSDShapes(const TopTools_ListOfShape& aLE,
|
||||
TopTools_ListOfShape aLESD;
|
||||
TopTools_ListIteratorOfListOfShape aIt, aIt1;
|
||||
TopTools_IndexedMapOfShape aMProcessed;
|
||||
TopAbs_ShapeEnum aType;
|
||||
//
|
||||
aNbE=aLE.Extent();
|
||||
if (!aNbE) {
|
||||
return 3; // Err
|
||||
}
|
||||
//modified by NIZNHY-PKV Thu Dec 30 10:56:52 2004 f
|
||||
if (aNbE==1) {
|
||||
return 0; // Nothing to do
|
||||
}
|
||||
//modified by NIZNHY-PKV Thu Dec 30 10:56:56 2004 t
|
||||
//
|
||||
while(1) {
|
||||
aNbEProcessed=aMProcessed.Extent();
|
||||
@ -122,10 +128,22 @@ Standard_Integer GEOMAlgo_Tools::FindSDShapes(const TopTools_ListOfShape& aLE,
|
||||
aIt.Initialize(aLE);
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
const TopoDS_Shape& aS=aIt.Value();
|
||||
//
|
||||
if (aMProcessed.Contains(aS)) {
|
||||
continue;
|
||||
}
|
||||
//
|
||||
//modified by NIZNHY-PKV Thu Dec 30 10:57:01 2004 f
|
||||
aType=aS.ShapeType();
|
||||
if (aType==TopAbs_EDGE) {
|
||||
const TopoDS_Edge& aE=TopoDS::Edge(aS);
|
||||
if (BRep_Tool::Degenerated(aE)) {
|
||||
aMProcessed.Add(aE);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
//modified by NIZNHY-PKV Thu Dec 30 10:57:03 2004 t
|
||||
//
|
||||
aLESD.Clear();
|
||||
iErr=GEOMAlgo_Tools::FindSDShapes(aS, aLE, aTol, aLESD, aCtx);
|
||||
if (iErr) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user