mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-24 13:50:49 +03:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
fecb042498 | ||
|
c194e1bc39 | ||
|
96815dec17 | ||
|
03e79361dc | ||
|
3a8f6b11e8 | ||
|
45ec28cf68 | ||
|
7aaaf5eb13 |
@@ -1356,9 +1356,7 @@ MF.Add(W);
|
||||
TopoDS_Face F = MF;
|
||||
~~~~~
|
||||
|
||||
More than one wire can be added to a face, provided that they do not cross each other and they define only one area on the surface. (Note that this is not checked). The edges on a Face must have a parametric curve description.
|
||||
|
||||
If there is no parametric curve for an edge of the wire on the Face it is computed by projection.
|
||||
More than one wire can be added to a face, provided that they do not cross each other and they define only one area on the surface. (Note that this is not checked).
|
||||
|
||||
For one wire, a simple syntax is provided to construct the face from the surface and the wire. The above lines could be written:
|
||||
|
||||
@@ -1366,6 +1364,8 @@ For one wire, a simple syntax is provided to construct the face from the surfac
|
||||
TopoDS_Face F = BRepBuilderAPI_MakeFace(C,W);
|
||||
~~~~~
|
||||
|
||||
The edges on a face must have a parametric curve description. If there is no parametric curve for an edge of the wire on the face it is computed by projection, moreover, the calculation is possible only for the planar face.
|
||||
|
||||
A planar face can be created from only a wire, provided this wire defines a plane. For example, to create a planar face from a set of points you can use *BRepBuilderAPI_MakePolygon* and *BRepBuilderAPI_MakeFace*.
|
||||
|
||||
~~~~~
|
||||
|
@@ -135,6 +135,9 @@ public:
|
||||
Standard_EXPORT BRepBuilderAPI_MakeFace(const gp_Torus& C, const TopoDS_Wire& W, const Standard_Boolean Inside = Standard_True);
|
||||
|
||||
//! Make a face from a Surface and a wire.
|
||||
//! If the surface S is not plane,
|
||||
//! it must contain pcurves for all edges in W,
|
||||
//! otherwise the wrong shape will be created.
|
||||
Standard_EXPORT BRepBuilderAPI_MakeFace(const Handle(Geom_Surface)& S, const TopoDS_Wire& W, const Standard_Boolean Inside = Standard_True);
|
||||
|
||||
//! Adds the wire <W> in the face <F>
|
||||
|
@@ -1450,6 +1450,10 @@ void BRepFill_PipeShell::BuildHistory(const BRepFill_Sweep& theSweep)
|
||||
for (Standard_Integer i = 1; i <= aVEdges->UpperRow(); i++)
|
||||
{
|
||||
const TopoDS_Shape& aVshape = aVEdges->Value(i, inde);
|
||||
if (aVshape.IsNull())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (aVshape.ShapeType() == TopAbs_EDGE ||
|
||||
aVshape.ShapeType() == TopAbs_FACE)
|
||||
ListVshapes->Append(aVshape);
|
||||
|
@@ -64,6 +64,7 @@
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <IntRes2d_IntersectionPoint.hxx>
|
||||
#include <IntRes2d_IntersectionSegment.hxx>
|
||||
#include <IntTools_Tools.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <TColGeom2d_SequenceOfCurve.hxx>
|
||||
#include <TColgp_Array1OfPnt2d.hxx>
|
||||
@@ -278,6 +279,14 @@ static void Store(const TopoDS_Edge& theEdge,
|
||||
Handle(BRepAlgo_AsDes) theAsDes2d,
|
||||
TopTools_IndexedDataMapOfShapeListOfShape& theDMVV)
|
||||
{
|
||||
// Update vertices
|
||||
TopTools_ListIteratorOfListOfShape aIt(theLV);
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
const TopoDS_Vertex& aV = TopoDS::Vertex(aIt.Value());
|
||||
BRep_Builder().UpdateVertex(aV, theTol);
|
||||
}
|
||||
|
||||
// Get vertices already added to the edge and check the distances to the new ones
|
||||
const TopTools_ListOfShape& aLVEx = theAsDes2d->Descendant(theEdge);
|
||||
if (!IsToUpdate && aLVEx.IsEmpty()) {
|
||||
if (theLV.Extent()) theAsDes2d->Add(theEdge, theLV);
|
||||
@@ -285,21 +294,23 @@ static void Store(const TopoDS_Edge& theEdge,
|
||||
}
|
||||
//
|
||||
GeomAPI_ProjectPointOnCurve aProjPC;
|
||||
Standard_Real aTolE = 0.0;
|
||||
if (IsToUpdate) {
|
||||
Standard_Real aT1, aT2;
|
||||
const Handle(Geom_Curve)& aC = BRep_Tool::Curve(theEdge, aT1, aT2);
|
||||
aProjPC.Init(aC, aT1, aT2);
|
||||
aTolE = BRep_Tool::Tolerance(theEdge);
|
||||
}
|
||||
//
|
||||
TopTools_MapOfShape aMV;
|
||||
TopTools_ListIteratorOfListOfShape aIt(theLV);
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
for (aIt.Init(theLV); aIt.More(); aIt.Next()) {
|
||||
const TopoDS_Vertex& aV = TopoDS::Vertex(aIt.Value());
|
||||
if (!aMV.Add(aV)) {
|
||||
continue;
|
||||
}
|
||||
//
|
||||
const gp_Pnt& aP = BRep_Tool::Pnt(aV);
|
||||
const Standard_Real aTol = BRep_Tool::Tolerance(aV);
|
||||
//
|
||||
TopTools_ListOfShape aLVC;
|
||||
TopTools_ListIteratorOfListOfShape aItEx(aLVEx);
|
||||
@@ -309,7 +320,8 @@ static void Store(const TopoDS_Edge& theEdge,
|
||||
break;
|
||||
}
|
||||
const gp_Pnt& aPEx = BRep_Tool::Pnt(aVEx);
|
||||
if (aP.IsEqual(aPEx, theTol)) {
|
||||
const Standard_Real aTolVEx = BRep_Tool::Tolerance(aVEx);
|
||||
if (aP.IsEqual(aPEx, aTol + aTolVEx)) {
|
||||
aLVC.Append(aVEx);
|
||||
}
|
||||
}
|
||||
@@ -325,16 +337,13 @@ static void Store(const TopoDS_Edge& theEdge,
|
||||
continue;
|
||||
}
|
||||
//
|
||||
if (aProjPC.LowerDistance() > theTol) {
|
||||
if (aProjPC.LowerDistance() > aTol + aTolE) {
|
||||
continue;
|
||||
}
|
||||
//
|
||||
Standard_Real aT = aProjPC.LowerDistanceParameter();
|
||||
TopoDS_Shape aLocalShape = aV.Oriented(TopAbs_INTERNAL);
|
||||
BRep_Builder().UpdateVertex(TopoDS::Vertex(aLocalShape), aT, theEdge, theTol);
|
||||
}
|
||||
else {
|
||||
BRep_Builder().UpdateVertex(aV, theTol);
|
||||
BRep_Builder().UpdateVertex(TopoDS::Vertex(aLocalShape), aT, theEdge, aTol);
|
||||
}
|
||||
//
|
||||
if (aLVC.Extent()) {
|
||||
@@ -672,7 +681,7 @@ static void RefEdgeInter(const TopoDS_Face& F,
|
||||
return;
|
||||
|
||||
Standard_Real f[3],l[3];
|
||||
Standard_Real TolDub = 1.e-7;
|
||||
Standard_Real TolDub = 1.e-7, TolLL = 0.0;
|
||||
Standard_Integer i;
|
||||
|
||||
//BRep_Tool::Range(E1, f[1], l[1]);
|
||||
@@ -689,9 +698,6 @@ static void RefEdgeInter(const TopoDS_Face& F,
|
||||
BRepLib::BuildCurve3d(E1);
|
||||
BRepLib::BuildCurve3d(E2);
|
||||
|
||||
Standard_Real TolSum = BRep_Tool::Tolerance(E1) + BRep_Tool::Tolerance(E2);
|
||||
TolSum = Max( TolSum, 1.e-5 );
|
||||
|
||||
TColgp_SequenceOfPnt ResPoints;
|
||||
TColStd_SequenceOfReal ResParamsOnE1, ResParamsOnE2;
|
||||
gp_Pnt DegPoint;
|
||||
@@ -721,11 +727,19 @@ static void RefEdgeInter(const TopoDS_Face& F,
|
||||
(GAC2.GetType() == GeomAbs_Line))
|
||||
{
|
||||
// Just quickly check if lines coincide
|
||||
if (GAC1.Line().Direction().IsParallel (GAC2.Line().Direction(), 1.e-8))
|
||||
Standard_Real anAngle = Abs(GAC1.Line().Direction().Angle(GAC2.Line().Direction()));
|
||||
if (anAngle <= 1.e-8 || M_PI - anAngle <= 1.e-8)
|
||||
{
|
||||
theCoincide = Standard_True;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Take into account the intersection range of line-line intersection
|
||||
// (the smaller angle between curves, the bigger range)
|
||||
TolLL = IntTools_Tools::ComputeIntRange(TolDub, TolDub, anAngle);
|
||||
TolLL = Min (TolLL, 1.e-5);
|
||||
}
|
||||
}
|
||||
|
||||
Geom2dInt_GInter Inter2d( GAC1, GAC2, TolDub, TolDub );
|
||||
@@ -943,10 +957,12 @@ static void RefEdgeInter(const TopoDS_Face& F,
|
||||
else
|
||||
theImageVV.Bind (theVref.Oriented(TopAbs_FORWARD), aNewVertex);
|
||||
}
|
||||
|
||||
|
||||
////-----------------------------------------------------
|
||||
Standard_Real TolStore = BRep_Tool::Tolerance(E1) + BRep_Tool::Tolerance(E2);
|
||||
TolStore = Max (TolStore, Tol);
|
||||
// Compare to Line-Line tolerance
|
||||
TolStore = Max (TolStore, TolLL);
|
||||
Store (E1,E2,LV1,LV2,TolStore,AsDes, aDMVV);
|
||||
}
|
||||
}
|
||||
|
@@ -195,6 +195,12 @@ static
|
||||
BRepOffset_DataMapOfShapeMapOfShape& theLocValidEdges,
|
||||
BRepOffset_DataMapOfShapeMapOfShape& theNeutralEdges);
|
||||
|
||||
static
|
||||
void MakeInvertedEdgesInvalid(const TopTools_ListOfShape& theLFOffset,
|
||||
const TopTools_IndexedDataMapOfShapeListOfShape& theFImages,
|
||||
const TopTools_MapOfShape& theInvertedEdges,
|
||||
TopTools_IndexedMapOfShape& theInvEdges);
|
||||
|
||||
static
|
||||
void FindInvalidFaces(TopTools_ListOfShape& theLFImages,
|
||||
const TopTools_IndexedMapOfShape& theInvEdges,
|
||||
@@ -1030,6 +1036,10 @@ void BuildSplitsOfFaces(const TopTools_ListOfShape& theLF,
|
||||
FindInvalidEdges (aLFDone, theFImages, theFacesOrigins, theAnalyse,
|
||||
theInvEdges, theValidEdges, aDMFMIE, aDMFMVE, aDMFMNE);
|
||||
|
||||
// Additional step to mark inverted edges located inside loops
|
||||
// of invalid edges as invalid as well
|
||||
MakeInvertedEdgesInvalid(aLFDone, theFImages, theInvertedEdges, theInvEdges);
|
||||
|
||||
#ifdef OFFSET_DEBUG
|
||||
// show invalid edges
|
||||
TopoDS_Compound aCEInv1;
|
||||
@@ -2180,6 +2190,82 @@ void FindInvalidEdges (const TopTools_ListOfShape& theLFOffset,
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : MakeInvertedEdgesInvalid
|
||||
//purpose : Makes inverted edges located inside loop of invalid edges, invalid as well
|
||||
//=======================================================================
|
||||
void MakeInvertedEdgesInvalid(const TopTools_ListOfShape& theLFOffset,
|
||||
const TopTools_IndexedDataMapOfShapeListOfShape& theFImages,
|
||||
const TopTools_MapOfShape& theInvertedEdges,
|
||||
TopTools_IndexedMapOfShape& theInvEdges)
|
||||
{
|
||||
if (theInvEdges.IsEmpty() || theInvertedEdges.IsEmpty())
|
||||
return;
|
||||
|
||||
// Map all invalid edges
|
||||
TopoDS_Compound aCBEInv;
|
||||
BRep_Builder().MakeCompound(aCBEInv);
|
||||
for (Standard_Integer i = 1; i <= theInvEdges.Extent(); ++i)
|
||||
{
|
||||
BRep_Builder().Add(aCBEInv, theInvEdges(i));
|
||||
}
|
||||
|
||||
// Make loops of invalid edges
|
||||
TopTools_ListOfShape aLCB;
|
||||
BOPTools_AlgoTools::MakeConnexityBlocks(aCBEInv, TopAbs_VERTEX, TopAbs_EDGE, aLCB);
|
||||
|
||||
// Analyze each loop on closeness and use only closed ones
|
||||
TopTools_DataMapOfShapeShape aDMVCB;
|
||||
|
||||
for (TopTools_ListOfShape::Iterator itLCB(aLCB); itLCB.More(); itLCB.Next())
|
||||
{
|
||||
const TopoDS_Shape& aCB = itLCB.Value();
|
||||
|
||||
TopTools_IndexedDataMapOfShapeListOfShape aDMVE;
|
||||
TopExp::MapShapesAndAncestors(aCB, TopAbs_VERTEX, TopAbs_EDGE, aDMVE);
|
||||
Standard_Boolean isClosed = Standard_True;
|
||||
for (Standard_Integer iV = 1; iV <= aDMVE.Extent(); ++iV)
|
||||
{
|
||||
if (aDMVE(iV).Extent() != 2)
|
||||
{
|
||||
isClosed = Standard_False;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!isClosed)
|
||||
continue;
|
||||
|
||||
// Bind loop to each vertex of the loop
|
||||
for (Standard_Integer iV = 1; iV <= aDMVE.Extent(); ++iV)
|
||||
{
|
||||
aDMVCB.Bind(aDMVE.FindKey(iV), aCB);
|
||||
}
|
||||
}
|
||||
|
||||
// Check if any inverted edges of offset faces are locked inside the loops of invalid edges.
|
||||
// Make such edges invalid as well.
|
||||
for (TopTools_ListOfShape::Iterator itLF(theLFOffset); itLF.More(); itLF.Next())
|
||||
{
|
||||
const TopTools_ListOfShape& aLFIm = theFImages.FindFromKey(itLF.Value());
|
||||
for (TopTools_ListOfShape::Iterator itLFIm(aLFIm); itLFIm.More(); itLFIm.Next())
|
||||
{
|
||||
for (TopExp_Explorer expE(itLFIm.Value(), TopAbs_EDGE); expE.More(); expE.Next())
|
||||
{
|
||||
const TopoDS_Edge& aE = TopoDS::Edge(expE.Current());
|
||||
if (!theInvEdges.Contains(aE) && theInvertedEdges.Contains(aE))
|
||||
{
|
||||
const TopoDS_Shape* pCB1 = aDMVCB.Seek (TopExp::FirstVertex(aE));
|
||||
const TopoDS_Shape* pCB2 = aDMVCB.Seek (TopExp::LastVertex(aE));
|
||||
if (pCB1 && pCB2 && pCB1->IsSame(*pCB2))
|
||||
{
|
||||
theInvEdges.Add(aE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : FindInvalidFaces
|
||||
//purpose : Looking for the invalid faces by analyzing their invalid edges
|
||||
|
@@ -560,6 +560,10 @@ static Standard_Integer setsweep(Draw_Interpretor& di,
|
||||
di << " -CN dx dy dz : BiNormal is given by dx dy dz\n";
|
||||
di << " -FX Tx Ty TZ [Nx Ny Nz] : Tangent and Normal are fixed\n";
|
||||
di << " -G guide 0|1(Plan|ACR) 0|1|2(no contact|contact|contact on border) : with guide\n";
|
||||
di << " -SM : Set the maximum degree of approximation\n";
|
||||
di << " paramvalue more then 0 (100 by default)\n";
|
||||
di << " -DM : Set the maximum number of span of approximation\n";
|
||||
di << " paramvalue [1; 14] (11 by default)\n";
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -630,6 +634,42 @@ static Standard_Integer setsweep(Draw_Interpretor& di,
|
||||
(BRepFill_TypeOfContact)KeepContact);
|
||||
}
|
||||
}
|
||||
else if (!strcmp(a[1], "-DM"))
|
||||
{
|
||||
if (n != 3)
|
||||
{
|
||||
di << "bad arguments !\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (Draw::Atoi(a[2]) > 0 && Draw::Atoi(a[2]) < 15)
|
||||
{
|
||||
Sweep->SetMaxDegree(Draw::Atoi(a[2]));
|
||||
}
|
||||
else
|
||||
{
|
||||
di << " -DM paramvalue must be [1; 14]\n";
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else if (!strcmp(a[1], "-SM"))
|
||||
{
|
||||
if (n != 3)
|
||||
{
|
||||
di << "bad arguments !\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (Draw::Atoi(a[2]) > 0)
|
||||
{
|
||||
Sweep->SetMaxSegments(Draw::Atoi(a[2]));
|
||||
}
|
||||
else
|
||||
{
|
||||
di << " -SM paramvalue must be more then 0\n";
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
di << "The option " << a[1] << " is unknown !\n";
|
||||
@@ -638,7 +678,6 @@ static Standard_Integer setsweep(Draw_Interpretor& di,
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// addsweep
|
||||
//=======================================================================
|
||||
@@ -985,9 +1024,9 @@ void BRepTest::SweepCommands(Draw_Interpretor& theCommands)
|
||||
theCommands.Add("errorsweep", "errorsweep: returns the summary error on resulting surfaces reached by Sweep",
|
||||
__FILE__, errorsweep, g);
|
||||
|
||||
theCommands.Add("simulsweep", "simulsweep r [n] [option]"
|
||||
theCommands.Add("simulsweep", "simulsweep r [n] [option]",
|
||||
__FILE__, simulsweep, g);
|
||||
theCommands.Add("geompipe", "geompipe r spineedge profileedge radius [byACR [byrotate]]"
|
||||
theCommands.Add("geompipe", "geompipe r spineedge profileedge radius [byACR [byrotate]]",
|
||||
__FILE__, geompipe, g);
|
||||
|
||||
theCommands.Add("middlepath", "middlepath res shape startshape endshape",
|
||||
|
@@ -882,7 +882,7 @@ Standard_Real GeomFill_CorrectedFrenet::GetAngleAT(const Standard_Real Param) co
|
||||
|
||||
frenet->Intervals(FrenetInt, S);
|
||||
EvolAroundT->Intervals(LawInt, S);
|
||||
GeomLib::FuseIntervals(FrenetInt, LawInt, Fusion);
|
||||
GeomLib::FuseIntervals(FrenetInt, LawInt, Fusion, Precision::PConfusion(), Standard_True);
|
||||
|
||||
return Fusion.Length()-1;
|
||||
}
|
||||
@@ -913,7 +913,7 @@ Standard_Real GeomFill_CorrectedFrenet::GetAngleAT(const Standard_Real Param) co
|
||||
|
||||
frenet->Intervals(FrenetInt, S);
|
||||
EvolAroundT->Intervals(LawInt, S);
|
||||
GeomLib::FuseIntervals(FrenetInt, LawInt, Fusion);
|
||||
GeomLib::FuseIntervals(FrenetInt, LawInt, Fusion, Precision::PConfusion(), Standard_True);
|
||||
|
||||
for(Standard_Integer i = 1; i <= Fusion.Length(); i++)
|
||||
T.ChangeValue(i) = Fusion.Value(i);
|
||||
|
@@ -692,7 +692,7 @@ Standard_Boolean
|
||||
myCurve->Intervals(TrimInt, tmpS);
|
||||
|
||||
TColStd_SequenceOfReal Fusion;
|
||||
GeomLib::FuseIntervals(TrimInt, mySngl->Array1(), Fusion);
|
||||
GeomLib::FuseIntervals(TrimInt, mySngl->Array1(), Fusion, Precision::PConfusion(), Standard_True);
|
||||
|
||||
return Fusion.Length() - 1;
|
||||
}
|
||||
@@ -726,7 +726,7 @@ Standard_Boolean
|
||||
myCurve->Intervals(TrimInt, tmpS);
|
||||
|
||||
TColStd_SequenceOfReal Fusion;
|
||||
GeomLib::FuseIntervals(TrimInt, mySngl->Array1(), Fusion);
|
||||
GeomLib::FuseIntervals(TrimInt, mySngl->Array1(), Fusion, Precision::PConfusion(), Standard_True);
|
||||
|
||||
for (Standard_Integer i = 1; i <= Fusion.Length(); i++)
|
||||
T.ChangeValue(i) = Fusion.Value(i);
|
||||
|
@@ -415,7 +415,8 @@ void GeomLib::DensifyArray1OfReal(const Standard_Integer MinNumPoints,
|
||||
void GeomLib::FuseIntervals(const TColStd_Array1OfReal& I1,
|
||||
const TColStd_Array1OfReal& I2,
|
||||
TColStd_SequenceOfReal& Seq,
|
||||
const Standard_Real Epspar)
|
||||
const Standard_Real Epspar,
|
||||
const Standard_Boolean IsAdjustToFirstInterval)
|
||||
{
|
||||
Standard_Integer ind1=1, ind2=1;
|
||||
Standard_Real v1, v2;
|
||||
@@ -432,7 +433,14 @@ void GeomLib::FuseIntervals(const TColStd_Array1OfReal& I1,
|
||||
v2 = I2(ind2);
|
||||
if (Abs(v1-v2)<= Epspar) {
|
||||
// Ici les elements de I1 et I2 conviennent .
|
||||
Seq.Append((v1+v2)/2);
|
||||
if (IsAdjustToFirstInterval)
|
||||
{
|
||||
Seq.Append(v1);
|
||||
}
|
||||
else
|
||||
{
|
||||
Seq.Append((v1 + v2) / 2);
|
||||
}
|
||||
ind1++;
|
||||
ind2++;
|
||||
}
|
||||
|
@@ -170,7 +170,19 @@ public:
|
||||
//! non decreasing
|
||||
Standard_EXPORT static void DensifyArray1OfReal (const Standard_Integer MinNumPoints, const TColStd_Array1OfReal& InParameters, Handle(TColStd_HArray1OfReal)& OutParameters);
|
||||
|
||||
Standard_EXPORT static void FuseIntervals (const TColStd_Array1OfReal& Interval1, const TColStd_Array1OfReal& Interval2, TColStd_SequenceOfReal& Fusion, const Standard_Real Confusion = 1.0e-9);
|
||||
//! This method fuse intervals Interval1 and Interval2 with specified Confusion
|
||||
//! @param Interval1 [in] first interval to fuse
|
||||
//! @param Interval2 [in] second interval to fuse
|
||||
//! @param Confision [in] tolerance to compare intervals
|
||||
//! @param IsAdjustToFirstInterval [in] flag to set method of fusion, if intervals are close
|
||||
//! if false, intervals are fusing by half-division methdod
|
||||
//! if true, intervals are fusing by selecting value from Interval1
|
||||
//! @param Fusion [out] output interval
|
||||
Standard_EXPORT static void FuseIntervals (const TColStd_Array1OfReal& Interval1,
|
||||
const TColStd_Array1OfReal& Interval2,
|
||||
TColStd_SequenceOfReal& Fusion,
|
||||
const Standard_Real Confusion = 1.0e-9,
|
||||
const Standard_Boolean IsAdjustToFirstInterval = Standard_False);
|
||||
|
||||
//! this will compute the maximum distance at the
|
||||
//! parameters given in the Parameters array by
|
||||
|
@@ -178,7 +178,8 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
|
||||
#ifdef CHRONO
|
||||
Chronrsnld.Stop();
|
||||
#endif
|
||||
|
||||
Standard_Boolean isOnDegeneratedBorder = Standard_False;
|
||||
|
||||
if (Cadre) { // update of limits.
|
||||
BornInf(1) = Um;BornSup(1) = UM;BornInf(2) = Vm;BornSup(2) = VM;
|
||||
}
|
||||
@@ -262,6 +263,7 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
|
||||
/ (uv[aCoordIdx - 1] - uvprev[aCoordIdx - 1]) );
|
||||
Standard_Integer aFixIdx = aCoordIdx == 1? 2 : 1; // Fixing index;
|
||||
Uvap(aFixIdx) = uv[aFixIdx - 1] + (uv[aFixIdx - 1] - uvprev[aFixIdx - 1]) * aScaleCoeff;
|
||||
isOnDegeneratedBorder = Standard_True;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -307,6 +309,8 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
|
||||
if (N <= 0) { // jag 941017
|
||||
MakeWalkingPoint(2,Uvap(1),Uvap(2),Func,Psol);
|
||||
Tgtend = Func.IsTangent(); // jag 940616
|
||||
if (isOnDegeneratedBorder)
|
||||
Tgtend = Standard_True;
|
||||
N = -N;
|
||||
}
|
||||
Arrive = (wd2[I].etat == 12); // the line is open
|
||||
@@ -315,6 +319,9 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult,
|
||||
aStatus = TestDeflection(Func, Arrive,Uvap,StatusPrecedent,
|
||||
NbDivision,PasC,StepSign);
|
||||
|
||||
if (isOnDegeneratedBorder && Tgtend)
|
||||
aStatus = IntWalk_ArretSurPoint;
|
||||
|
||||
StatusPrecedent = aStatus;
|
||||
if (aStatus == IntWalk_PasTropGrand) {// division of the step
|
||||
Arrive = Standard_False;
|
||||
|
@@ -35,7 +35,7 @@
|
||||
// Primary definitions
|
||||
#define OCC_VERSION_MAJOR 7
|
||||
#define OCC_VERSION_MINOR 5
|
||||
#define OCC_VERSION_MAINTENANCE 2
|
||||
#define OCC_VERSION_MAINTENANCE 3
|
||||
|
||||
//! This macro must be commented in official release, and set to non-empty
|
||||
//! string in other situations, to identify specifics of the version, e.g.:
|
||||
@@ -47,7 +47,7 @@
|
||||
// Derived (manually): version as real and string (major.minor)
|
||||
#define OCC_VERSION 7.5
|
||||
#define OCC_VERSION_STRING "7.5"
|
||||
#define OCC_VERSION_COMPLETE "7.5.2"
|
||||
#define OCC_VERSION_COMPLETE "7.5.3"
|
||||
|
||||
//! Derived: extended version as string ("major.minor.maintenance.dev")
|
||||
#ifdef OCC_VERSION_DEVELOPMENT
|
||||
|
@@ -19,16 +19,18 @@ checkprops result -s 8206.54
|
||||
set nbshapes_expected "
|
||||
Number of shapes in shape
|
||||
VERTEX : 5
|
||||
EDGE : 9
|
||||
EDGE : 8
|
||||
WIRE : 4
|
||||
FACE : 4
|
||||
SHELL : 1
|
||||
SOLID : 1
|
||||
COMPSOLID : 0
|
||||
COMPOUND : 1
|
||||
SHAPE : 25
|
||||
SHAPE : 24
|
||||
"
|
||||
checknbshapes result -ref ${nbshapes_expected} -t -m "Boolean operations common"
|
||||
|
||||
set tolres [checkmaxtol result]
|
||||
|
||||
checkview -display result -3d -path ${imagedir}/${test_image}-3d.png
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}-2d.png
|
||||
|
@@ -19,16 +19,18 @@ checkprops result -s 34566
|
||||
set nbshapes_expected "
|
||||
Number of shapes in shape
|
||||
VERTEX : 13
|
||||
EDGE : 21
|
||||
EDGE : 20
|
||||
WIRE : 8
|
||||
FACE : 8
|
||||
SHELL : 1
|
||||
SOLID : 1
|
||||
COMPSOLID : 0
|
||||
COMPOUND : 1
|
||||
SHAPE : 53
|
||||
SHAPE : 52
|
||||
"
|
||||
checknbshapes result -ref ${nbshapes_expected} -t -m "Boolean operations cut"
|
||||
|
||||
set tolres [checkmaxtol result]
|
||||
|
||||
checkview -display result -3d -path ${imagedir}/${test_image}-3d.png
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}-2d.png
|
||||
|
29
tests/bugs/modalg_7/bug32291
Normal file
29
tests/bugs/modalg_7/bug32291
Normal file
@@ -0,0 +1,29 @@
|
||||
puts "======================================================="
|
||||
puts " 0032291: General Fuse produces wrong number of solids"
|
||||
puts "======================================================="
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file bug32291.brep] s
|
||||
|
||||
explode s
|
||||
baddobjects s_1
|
||||
baddtools s_2 s_3 s_4 s_5 s_6 s_7 s_8
|
||||
bfillds
|
||||
bbuild result
|
||||
|
||||
checkshape result
|
||||
|
||||
checknbshapes result -vertex 79 -edge 176 -wire 112 -face 112 -shell 18 -solid 18
|
||||
|
||||
set tolres [checkmaxtol result]
|
||||
|
||||
if { ${tolres} > 7.e-5} {
|
||||
puts "Error: bad tolerance of result"
|
||||
}
|
||||
|
||||
axo
|
||||
clear
|
||||
explode result So
|
||||
fit
|
||||
|
||||
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
|
@@ -1,6 +1,6 @@
|
||||
puts "TODO OCC27414 ALL: Error : The area of result shape is"
|
||||
puts "TODO OCC27414 ALL: Error : The volume of result shape is"
|
||||
puts "TODO OCC27414 ALL: Error : is WRONG because number of"
|
||||
puts "TODO OCC27414 ALL: Error: The command cannot be built"
|
||||
puts "TODO OCC27414 ALL: gives an empty result"
|
||||
puts "TODO OCC27414 ALL: TEST INCOMPLETE"
|
||||
|
||||
puts "========"
|
||||
puts "0031307: Modeling Algorithms - Offset algorithm produces incorrect result in mode Complete join type Intersection"
|
||||
@@ -15,9 +15,8 @@ offsetonface s_9 7
|
||||
offsetperform result
|
||||
|
||||
checkprops result -s 222993 -v 1.87721e+06
|
||||
checknbshapes result -shell 1 -solid 1
|
||||
|
||||
unifysamedom result_unif result
|
||||
|
||||
checknbshapes result_unif -vertex 26 -edge 39 -wire 15 -face 15 -shell 1 -solid 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
#unifysamedom result_unif result
|
||||
#checknbshapes result_unif -vertex 26 -edge 39 -wire 15 -face 15 -shell 1 -solid 1
|
||||
#checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
|
34
tests/offset/shape_type_i_c/XY1
Normal file
34
tests/offset/shape_type_i_c/XY1
Normal file
@@ -0,0 +1,34 @@
|
||||
puts "============================================================================================="
|
||||
puts "0032088: Modeling Algorithms - Empty result of offset operation in mode \"Complete\" join type \"Intersection\""
|
||||
puts "============================================================================================="
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file bug32088_trimmed.brep] s
|
||||
|
||||
set ref_values { { 23829.6 171246 13 13 } \
|
||||
{ 25781.5 196049 14 14 } \
|
||||
{ 27762.8 222816 14 14 } \
|
||||
{ 29808.5 251596 12 12 } \
|
||||
{ 31919.5 282455 12 12 } \
|
||||
{ 34088.4 315454 12 12 } \
|
||||
{ 36315.3 350651 12 12 } \
|
||||
{ 38600 388104 12 12 } \
|
||||
{ 40942.8 427870 12 12 } \
|
||||
{ 43343.5 470009 12 12 } \
|
||||
{ 45802.1 514577 12 12 } \
|
||||
{ 48318.6 561632 12 12 } \
|
||||
{ 50893.1 611233 12 12 } \
|
||||
{ 53525.6 663438 12 12 } \
|
||||
{ 56215.9 718304 12 12 } \
|
||||
{ 58964.3 775889 12 12 } \
|
||||
{ 61770.5 836251 12 12 } \
|
||||
{ 64634.7 899449 12 12 } \
|
||||
{ 67556.9 965540 12 12 } \
|
||||
{ 70537 1.03458e+06 12 12 } }
|
||||
|
||||
perform_offset_increasing s 1 20 1 $ref_values
|
||||
|
||||
copy r5 result
|
||||
copy r5_unif result_unif
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
17
tests/offset/shape_type_i_c/XY2
Normal file
17
tests/offset/shape_type_i_c/XY2
Normal file
@@ -0,0 +1,17 @@
|
||||
puts "============================================================================================="
|
||||
puts "0032088: Modeling Algorithms - Empty result of offset operation in mode \"Complete\" join type \"Intersection\""
|
||||
puts "============================================================================================="
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file bug32088_input.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 5
|
||||
offsetperform result
|
||||
|
||||
checkprops result -s 3.47344e+06 -v 4.06389e+07
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -wire 962 -face 962 -shell 1 -solid 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
17
tests/offset/shape_type_i_c/XY3
Normal file
17
tests/offset/shape_type_i_c/XY3
Normal file
@@ -0,0 +1,17 @@
|
||||
puts "============================================================================================="
|
||||
puts "0032088: Modeling Algorithms - Empty result of offset operation in mode \"Complete\" join type \"Intersection\""
|
||||
puts "============================================================================================="
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file bug32088_input.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 8
|
||||
offsetperform result
|
||||
|
||||
checkprops result -s 3.35577e+06 -v 5.12413e+07
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -wire 755 -face 755 -shell 1 -solid 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
22
tests/offset/shape_type_i_c/XY4
Normal file
22
tests/offset/shape_type_i_c/XY4
Normal file
@@ -0,0 +1,22 @@
|
||||
puts "TODO CR32333 ALL: Error : The area of result shape is"
|
||||
puts "TODO CR32333 ALL: Error : The command is not valid."
|
||||
puts "TODO CR32333 ALL: Error : The volume of result shape is"
|
||||
puts "TODO CR32333 ALL: Error : is WRONG because number of"
|
||||
|
||||
puts "============================================================================================="
|
||||
puts "0032088: Modeling Algorithms - Empty result of offset operation in mode \"Complete\" join type \"Intersection\""
|
||||
puts "============================================================================================="
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file bug32088_input.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 10
|
||||
offsetperform result
|
||||
|
||||
checkprops result -s 3.1312e+06 -v 5.77267e+07
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -wire 492 -face 492 -shell 1 -solid 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
22
tests/offset/shape_type_i_c/XY5
Normal file
22
tests/offset/shape_type_i_c/XY5
Normal file
@@ -0,0 +1,22 @@
|
||||
puts "TODO OCC32333 ALL: Error: The command cannot be built"
|
||||
puts "TODO OCC32333 ALL: gives an empty result"
|
||||
puts "TODO OCC32333 ALL: TEST INCOMPLETE"
|
||||
|
||||
puts "============================================================================================="
|
||||
puts "0032088: Modeling Algorithms - Empty result of offset operation in mode \"Complete\" join type \"Intersection\""
|
||||
puts "============================================================================================="
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file bug32088_input.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 11
|
||||
offsetperform result
|
||||
|
||||
checkprops result -s 2.75287e+06 -v 6.08747e+07
|
||||
checknbshapes result -shell 1 -solid 1
|
||||
|
||||
#unifysamedom result_unif result
|
||||
#checknbshapes result_unif -wire 234 -face 234 -shell 1 -solid 1
|
||||
|
||||
#checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
17
tests/offset/shape_type_i_c/XY6
Normal file
17
tests/offset/shape_type_i_c/XY6
Normal file
@@ -0,0 +1,17 @@
|
||||
puts "============================================================================================="
|
||||
puts "0032088: Modeling Algorithms - Empty result of offset operation in mode \"Complete\" join type \"Intersection\""
|
||||
puts "============================================================================================="
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file bug32088_input.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 13
|
||||
offsetperform result
|
||||
|
||||
checkprops result -s 2.84681e+06 -v 6.64723e+07
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -wire 234 -face 234 -shell 1 -solid 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
17
tests/offset/shape_type_i_c/XY7
Normal file
17
tests/offset/shape_type_i_c/XY7
Normal file
@@ -0,0 +1,17 @@
|
||||
puts "============================================================================================="
|
||||
puts "0032088: Modeling Algorithms - Empty result of offset operation in mode \"Complete\" join type \"Intersection\""
|
||||
puts "============================================================================================="
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file bug32088_input.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 15
|
||||
offsetperform result
|
||||
|
||||
checkprops result -s 2.7281e+06 -v 7.20465e+07
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -wire 104 -face 104 -shell 1 -solid 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
17
tests/offset/shape_type_i_c/XZ1
Normal file
17
tests/offset/shape_type_i_c/XZ1
Normal file
@@ -0,0 +1,17 @@
|
||||
puts "============================================================================================="
|
||||
puts "0032307: Modeling Algorithms - Empty result of offset operation in mode \"Complete\" Joint type \"Intersection\""
|
||||
puts "============================================================================================="
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file bug32307.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 20
|
||||
offsetperform result
|
||||
|
||||
checkprops result -s 1.29992e+07 -v 8.09132e+08
|
||||
|
||||
# number of shapes should not change
|
||||
checknbshapes result -ref [nbshapes s]
|
||||
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
24
tests/offset/shape_type_i_c/XZ2
Normal file
24
tests/offset/shape_type_i_c/XZ2
Normal file
@@ -0,0 +1,24 @@
|
||||
puts "============================================================================================="
|
||||
puts "0032307: Modeling Algorithms - Empty result of offset operation in mode \"Complete\" Joint type \"Intersection\""
|
||||
puts "============================================================================================="
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file bug32307.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z
|
||||
if {abs($z) > 1.e-7 || (abs($y) < 1.e-7 && abs($x) > 1.e-7)} {
|
||||
offsetonface $f 20
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -s 1.20298e+07 -v 7.1394e+08
|
||||
|
||||
# number of shapes should not change
|
||||
checknbshapes result -ref [nbshapes s]
|
||||
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
@@ -1,4 +1,7 @@
|
||||
puts "TODO CR27414 ALL: Error : The volume of result shape is"
|
||||
#puts "TODO CR27414 ALL: Error : The volume of result shape is"
|
||||
puts "TODO OCC27414 ALL: Error: The command cannot be built"
|
||||
puts "TODO OCC27414 ALL: gives an empty result"
|
||||
puts "TODO OCC27414 ALL: TEST INCOMPLETE"
|
||||
|
||||
restore [locate_data_file bug26917_M2_trim16.brep] s
|
||||
|
||||
|
15
tests/pipe/bugs/bug29645
Normal file
15
tests/pipe/bugs/bug29645
Normal file
@@ -0,0 +1,15 @@
|
||||
puts "========"
|
||||
puts "0029645: Hang on making pipe shell using BRepOffsetAPI_MakePipeShell"
|
||||
puts "========"
|
||||
puts ""
|
||||
|
||||
restore [locate_data_file bug29645_spine.brep] spine
|
||||
restore [locate_data_file bug29645_profile.brep] profile
|
||||
|
||||
mksweep spine
|
||||
addsweep profile
|
||||
buildsweep result -S -C
|
||||
|
||||
puts "TEST COMPLETED"
|
||||
|
||||
|
35
tests/pipe/bugs/bug31147
Normal file
35
tests/pipe/bugs/bug31147
Normal file
@@ -0,0 +1,35 @@
|
||||
puts "============"
|
||||
puts "0031147: Modeling Algorithms - BRepOffsetAPI_MakePipeShell null access"
|
||||
puts "============"
|
||||
puts ""
|
||||
|
||||
pload VISUALIZATION
|
||||
|
||||
restore [locate_data_file bug31147.brep] s
|
||||
explode s e
|
||||
wire spine s_1
|
||||
wire profile s_2
|
||||
|
||||
mksweep spine
|
||||
addsweep profile
|
||||
setsweep -SM 1000
|
||||
setsweep -DM 14
|
||||
buildsweep result -S -C
|
||||
|
||||
set info1 [errorsweep]
|
||||
|
||||
set check [regexp {Tolerance on surfaces = ([0-9\-+Ee.]+)} $info1 str error]
|
||||
|
||||
if { $error > 1.e-4 } {
|
||||
puts "Error: bad tolerance of result"
|
||||
}
|
||||
|
||||
vinit
|
||||
vdisplay result
|
||||
vsetdispmode 1
|
||||
vfit
|
||||
|
||||
checkshape result
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
||||
|
||||
puts "TEST COMPLETED"
|
Reference in New Issue
Block a user