1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-13 14:27:08 +03:00

Compare commits

..

4 Commits

Author SHA1 Message Date
kgv
e61aa824db 0032854: Documentation - minor clean-up of User Guide for XDE module
Applied minor formatting improvements to `xde.md`.
Fixed small misprints and artifacts in text.
Removed redundant section "Working with XDE".
2022-02-25 18:10:52 +03:00
vro
5a846a5d2c 0029219: Application Framework - XML document is written with CRLF on Windows
The last symbol of a line is synchronized with external products.
Also, XML ends by LF now.

Modified:
XML: XmlLDrivers_DocumentStorageDriver::Write() ends by LF
BREP: BRepTools::Write(), Draw_VariableCommands::save() ends by LF
STEP: StepSelect_WorkLibrary::WriteFile() ends by LF
IGES: IGESSelect_WorkLibrary::WriteFile(), IGESControl_Writer::Write(), XSDRAWIGES::WriteShape() ends by LF
VRML: VrmlAPI_Writer::write_v2() ends by LF

0029219: Application Framework - XML document is written with CRLF on Windows

The last symbol of a line is synchronized with external products.
Also, XML ends by LF now.

Modified:
XML: XmlLDrivers_DocumentStorageDriver::Write() ends by LF
BREP: BRepTools::Write(), Draw_VariableCommands::save() ends by LF
STEP: StepSelect_WorkLibrary::WriteFile() ends by LF
IGES: IGESSelect_WorkLibrary::WriteFile(), IGESControl_Writer::Write(), XSDRAWIGES::WriteShape() ends by LF
VRML: VrmlAPI_Writer::write_v2() ends by LF
STL: RWStl::WriteAscii() ends by CR LF (to synchronize with Blender)

0029219: Application Framework - XML document is written with CRLF on Windows

The last symbol of a line is synchronized with external products.
Also, XML ends by LF now.

Modified:
XML: XmlLDrivers_DocumentStorageDriver::Write() ends by LF
BREP: BRepTools::Write(), Draw_VariableCommands::save() ends by LF
STEP: StepSelect_WorkLibrary::WriteFile() ends by LF
IGES: IGESSelect_WorkLibrary::WriteFile(), IGESControl_Writer::Write(), XSDRAWIGES::WriteShape() ends by LF
VRML: VrmlAPI_Writer::write_v2() ends by LF
2022-02-22 20:25:47 +03:00
vro
b91e601442 0032785: Application Framework - CDF_Store::SetFolder incorrectly processes relative paths on Linux
The code is simplified - it checks the last character and if it is a folder separator, it removes it.

Modified file:
- CDF_Store.cxx, the method SetFolder().

0032785: Application Framework - CDF_Store::SetFolder incorrectly processes relative paths on Linux

The code is simplified - it checks the last character and if it is a folder separator, it removes it.

Modified file:
- CDF_Store.cxx, the method SetFolder().

0032785: Application Framework - CDF_Store::SetFolder incorrectly processes relative paths on Linux

The code is simplified - it checks the last character and if it is a folder separator, it removes it.
// Also, variable 'l' is renamed to 'aLen'.
// And a check on the number of characters is added to avoid removal of the root folder ('/').

Modified file:
- CDF_Store.cxx, the method SetFolder().
2022-02-22 20:23:29 +03:00
knosulko
cfde7eebb3 0024418: Modeling Algorithms - Wrong section curves when intersecting analytical surfaces
IntPatch_ALineToWLine.cxx - setting minimal number of points in a WLine depending on step size
IntPatch_WLineTool.cxx - fix WLines connecting check condition
test cases has been changed according to new behavior
2022-02-22 20:07:12 +03:00
61 changed files with 1076 additions and 895 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -695,7 +695,7 @@ Standard_Boolean BRepTools::Write (const TopoDS_Shape& theShape,
const Message_ProgressRange& theProgress)
{
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
std::shared_ptr<std::ostream> aStream = aFileSystem->OpenOStream (theFile, std::ios::out);
std::shared_ptr<std::ostream> aStream = aFileSystem->OpenOStream (theFile, std::ios::out | std::ios::binary);
if (aStream.get() == NULL || !aStream->good())
{
return Standard_False;

View File

@@ -217,7 +217,7 @@ void BndLib_Add3dCurve::Add( const Adaptor3d_Curve& C,
if(Bsaux->LastParameter() < U2 ) u2 = Bsaux->LastParameter();
// modified by NIZHNY-EAP Fri Dec 3 14:29:18 1999 ___END___
}
Standard_Real aSegmentTol = 2. * Precision::PConfusion();
Standard_Real aSegmentTol = Precision::PConfusion();
if (Abs(u2 - u1) < aSegmentTol)
aSegmentTol = Abs(u2 - u1) * 0.01;
Bsaux->Segment(u1, u2, aSegmentTol);

View File

@@ -78,19 +78,11 @@ Standard_Boolean CDF_Store::SetFolder(const Standard_ExtString aFolder) {
Standard_Boolean CDF_Store::SetFolder(const TCollection_ExtendedString& aFolder) {
TCollection_ExtendedString theFolder(aFolder);
Standard_Integer l = theFolder.Length();
Standard_Integer aLen = theFolder.Length();
// if the last character is the folder separator (which is always the first character)
// it is removed.
// This is correct for Unix systems but not for Windows! VMS and MAC? Thomas Haller, 23.11.01
if(l > 1) {
#ifndef _WIN32
if(theFolder.Value(l) == theFolder.Value(1)) theFolder.Trunc(l-1);
#else
if (theFolder.Value(l) == '/' || theFolder.Value(l) == '\\')
theFolder.Trunc(l-1);
#endif
}
// if the last character is the folder separator, remove it.
if (aLen > 1 && (theFolder.Value(aLen) == '/' || theFolder.Value(aLen) == '\\'))
theFolder.Trunc(aLen-1);
if(theMetaDataDriver->FindFolder(theFolder)) {
myCurrentDocument->SetRequestedFolder(theFolder);

View File

@@ -92,7 +92,7 @@ static Standard_Integer save (Draw_Interpretor& theDI,
const char* aName = theArgVec[2];
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
std::shared_ptr<std::ostream> aStream = aFileSystem->OpenOStream (aName, std::ios::out);
std::shared_ptr<std::ostream> aStream = aFileSystem->OpenOStream (aName, std::ios::out | std::ios::binary);
aStream->precision (15);
if (aStream.get() == NULL || !aStream->good())
{

View File

@@ -80,16 +80,11 @@ void GeomInt_IntSS::Perform(const Handle(Geom_Surface)& S1,
Handle(Adaptor3d_TopolTool) dom1 = new Adaptor3d_TopolTool(myHS1);
Handle(Adaptor3d_TopolTool) dom2 = new Adaptor3d_TopolTool(myHS2);
myLConstruct.Load(dom1,dom2,myHS1,myHS2);
Standard_Real TolArc = Tol;
Standard_Real TolTang = Tol;
Standard_Real UVMaxStep = IntPatch_Intersection::DefineUVMaxStep(myHS1, dom1, myHS2, dom2);
Standard_Real Deflection = 0.1;
if (myHS1->GetType() == GeomAbs_BSplineSurface && myHS2->GetType() == GeomAbs_BSplineSurface)
{
Deflection /= 10.;
}
myIntersector.SetTolerances(TolArc,TolTang,UVMaxStep,Deflection);

View File

@@ -254,7 +254,7 @@ Standard_Boolean IGESControl_Writer::Write
(const Standard_CString file, const Standard_Boolean fnes)
{
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
std::shared_ptr<std::ostream> aStream = aFileSystem->OpenOStream (file, std::ios::out);
std::shared_ptr<std::ostream> aStream = aFileSystem->OpenOStream (file, std::ios::out | std::ios::binary);
if (aStream.get() == NULL)
{
return Standard_False;

View File

@@ -102,7 +102,7 @@ static Handle(IGESData_FileProtocol) IGESProto;
if (igesmod.IsNull() || prot.IsNull()) return Standard_False;
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
std::shared_ptr<std::ostream> aStream = aFileSystem->OpenOStream (ctx.FileName(), std::ios::out);
std::shared_ptr<std::ostream> aStream = aFileSystem->OpenOStream (ctx.FileName(), std::ios::out | std::ios::binary);
if (aStream.get() == NULL)
{
ctx.CCheck(0)->AddFail("IGES File could not be created");

View File

@@ -433,10 +433,32 @@ void IntPatch_ALineToWLine::MakeWLine(const Handle(IntPatch_ALine)& theALine,
if(aStep < Epsilon(theLPar))
break;
Standard_Boolean isStepReduced = Standard_False;
Standard_Real aLPar = theLPar;
for (Standard_Integer i = aVertexParams.Lower(); i <= aVertexParams.Upper(); i++)
{
if (hasVertexBeenChecked(i))
continue;
aLPar = aVertexParams(i);
if (Abs(aLPar - aParameter) < aPrmTol)
continue;
break;
}
if ((aStep - (aLPar - aParameter) > aPrmTol) &&
(Abs(aLPar - aParameter) > aPrmTol))
{
aStep = Max((aLPar - aParameter) / 5, 1.e-5);
isStepReduced = Standard_True;
}
Standard_Integer aNewVertID = 0;
aLinOn2S = new IntSurf_LineOn2S;
const Standard_Real aStepMin = 0.1*aStep, aStepMax = 10.0*aStep;
Standard_Real aStepMin = 0.1 * aStep, aStepMax = 10.0 * aStep;
Standard_Boolean isLast = Standard_False;
Standard_Real aPrevParam = aParameter;
@@ -586,8 +608,12 @@ void IntPatch_ALineToWLine::MakeWLine(const Handle(IntPatch_ALine)& theALine,
{
if (isPointValid)
{
StepComputing(theALine, aPOn2S, theLPar, aParameter, aTgMagn,
aStepMin, aStepMax, myTol3D, aStep);
if (!isStepReduced)
{
StepComputing(theALine, aPOn2S, theLPar, aParameter, aTgMagn,
aStepMin, aStepMax, myTol3D, aStep);
}
AddPointIntoLine(aLinOn2S, anArrPeriods, aPOn2S);
aPrevLPoint = aPOn2S;
}
@@ -694,6 +720,38 @@ void IntPatch_ALineToWLine::MakeWLine(const Handle(IntPatch_ALine)& theALine,
if ((aPrePointExist != IntPatch_SPntNone) && (aLinOn2S->NbPoints() > 1))
break;
if (isStepReduced)
{
isStepReduced = Standard_False;
aStep = (theLPar - aParameter) / (Standard_Real)(myNbPointsInWline - 1);
if(aStep < Epsilon(theLPar))
break;
aLPar = aVertexParams(aNbVert);
for (Standard_Integer i = aVertexParams.Lower(); i <= aVertexParams.Upper(); i++)
{
if (hasVertexBeenChecked(i))
continue;
aLPar = aVertexParams(i);
if (Abs(aLPar - aParameter) < aPrmTol)
continue;
break;
}
if ((aStep - (aLPar - aParameter) > aPrmTol) &&
(Abs(aLPar - aParameter) > aPrmTol))
{
aStep = Max((aLPar - aParameter) / 5, 1.e-5);
isStepReduced = Standard_True;
}
aStepMin = 0.1 * aStep;
aStepMax = 10.0 * aStep;
}
}//for(; !isLast; aParameter += aStep)
if(aLinOn2S->NbPoints() < 2)

View File

@@ -1717,6 +1717,38 @@ void IntPatch_WLineTool::JoinWLines(IntPatch_SequenceOfLine& theSlin,
}
}
//=======================================================================
//function : IsNeedSkipWL
//purpose : Detect is WLine need to skip.
//=======================================================================
static Standard_Boolean IsNeedSkipWL(const Handle(IntPatch_WLine)& theWL,
const Bnd_Box2d& theBoxS1,
const Bnd_Box2d& theBoxS2,
const Standard_Real* const theArrPeriods)
{
Standard_Real aFirstp, aLastp;
Standard_Integer aNbVtx = theWL->NbVertex();
Standard_Boolean isNeedSkip = Standard_True;
for (Standard_Integer i = 1; i < aNbVtx; i++) {
aFirstp = theWL->Vertex (i).ParameterOnLine();
aLastp = theWL->Vertex (i + 1).ParameterOnLine();
Standard_Real aU1, aV1, aU2, aV2;
const Standard_Integer pmid = (Standard_Integer)((aFirstp + aLastp) / 2);
const IntSurf_PntOn2S& aPmid = theWL->Point (pmid);
aPmid.Parameters (aU1, aV1, aU2, aV2);
if (!IsOutOfDomain (theBoxS1, theBoxS2, aPmid, theArrPeriods))
{
isNeedSkip = Standard_False;
break;
}
}
return isNeedSkip;
}
//=======================================================================
//function : ExtendTwoWLines
//purpose : Performs extending theWLine1 and theWLine2 through their
@@ -1737,8 +1769,17 @@ void IntPatch_WLineTool::
gp_Vec aVec1, aVec2, aVec3;
unsigned int hasBeenJoinedCounter = 0;
for(Standard_Integer aNumOfLine1 = 1; aNumOfLine1 <= theSlin.Length(); aNumOfLine1++)
{
if (hasBeenJoinedCounter > 0)
{
aNumOfLine1--;
}
hasBeenJoinedCounter = 0;
Handle(IntPatch_WLine) aWLine1 (Handle(IntPatch_WLine)::
DownCast(theSlin.Value(aNumOfLine1)));
@@ -1761,6 +1802,11 @@ void IntPatch_WLineTool::
const IntSurf_PntOn2S& aPntLWL1 = aWLine1->Point(aNbPntsWL1);
const IntSurf_PntOn2S& aPntLm1WL1 = aWLine1->Point(aNbPntsWL1-1);
if (IsNeedSkipWL(aWLine1, theBoxS1, theBoxS2, theArrPeriods))
{
continue;
}
//Enable/Disable of some ckeck. Bit-mask is used for it.
//E.g. if 1st point of aWLine1 matches with
//1st point of aWLine2 then we do not need in check
@@ -1781,16 +1827,24 @@ void IntPatch_WLineTool::
const IntSurf_PntOn2S& aPntFWL2 = aWLine2->Point(1);
const IntSurf_PntOn2S& aPntLWL2 = aWLine2->Point(aWLine2->NbPnts());
if( aPntFWL1.IsSame(aPntFWL2, theToler3D) ||
aPntFWL1.IsSame(aPntLWL2, theToler3D) )
if (!(aPntFWL1.IsSame(aPntFWL2, theToler3D, Precision::PConfusion())) &&
!(aPntFWL1.IsSame(aPntLWL2, theToler3D, Precision::PConfusion())))
{
aCheckResult |= IntPatchWT_DisFirstFirst | IntPatchWT_DisFirstLast;
if (aPntFWL1.IsSame(aPntFWL2, theToler3D) ||
aPntFWL1.IsSame(aPntLWL2, theToler3D))
{
aCheckResult |= IntPatchWT_DisFirstFirst | IntPatchWT_DisFirstLast;
}
}
if( aPntLWL1.IsSame(aPntFWL2, theToler3D) ||
aPntLWL1.IsSame(aPntFWL2, theToler3D))
if (!(aPntLWL1.IsSame(aPntFWL2, theToler3D, Precision::PConfusion())) &&
!(aPntLWL1.IsSame(aPntLWL2, theToler3D, Precision::PConfusion())))
{
aCheckResult |= IntPatchWT_DisLastFirst | IntPatchWT_DisLastLast;
if (aPntLWL1.IsSame(aPntFWL2, theToler3D) ||
aPntLWL1.IsSame(aPntLWL2, theToler3D))
{
aCheckResult |= IntPatchWT_DisLastFirst | IntPatchWT_DisLastLast;
}
}
if (!theListOfCriticalPoints.IsEmpty())
@@ -1862,8 +1916,13 @@ void IntPatch_WLineTool::
const IntSurf_PntOn2S& aPntLWL2 = aWLine2->Point(aNbPntsWL2);
const IntSurf_PntOn2S& aPntLm1WL2 = aWLine2->Point(aNbPntsWL2-1);
//if(!(aCheckResult & IntPatchWT_DisFirstFirst))
if (IsNeedSkipWL(aWLine2, theBoxS1, theBoxS2, theArrPeriods))
{
continue;
}
if(!(aCheckResult & IntPatchWT_DisFirstFirst))
{// First/First
aVec1.SetXYZ(aPntFp1WL1.Value().XYZ() - aPntFWL1.Value().XYZ());
aVec2.SetXYZ(aPntFWL2.Value().XYZ() - aPntFp1WL2.Value().XYZ());
@@ -1909,6 +1968,7 @@ void IntPatch_WLineTool::
if(hasBeenJoined)
{
hasBeenJoinedCounter++;
theSlin.Remove(aNumOfLine2);
aNumOfLine2--;
}

View File

@@ -29,8 +29,12 @@
#include <NCollection_Map.hxx>
static Standard_Boolean IsAdvRequired(IntPolyh_PMaillageAffinage& theMaillage);
static Standard_Integer ComputeIntersection(IntPolyh_PMaillageAffinage& theMaillage);
static Standard_Boolean AnalyzeIntersection(IntPolyh_PMaillageAffinage& theMaillage);
//=======================================================================
//function : IntPolyh_Intersection
//purpose :
@@ -45,7 +49,6 @@ IntPolyh_Intersection::IntPolyh_Intersection(const Handle(Adaptor3d_Surface)& th
myNbSU2 = 10;
myNbSV2 = 10;
myIsDone = Standard_False;
myIsParallel = Standard_False;
mySectionLines.Init(1000);
myTangentZones.Init(10000);
Perform();
@@ -69,7 +72,6 @@ IntPolyh_Intersection::IntPolyh_Intersection(const Handle(Adaptor3d_Surface)& th
myNbSU2 = theNbSU2;
myNbSV2 = theNbSV2;
myIsDone = Standard_False;
myIsParallel = Standard_False;
mySectionLines.Init(1000);
myTangentZones.Init(10000);
Perform();
@@ -93,7 +95,6 @@ IntPolyh_Intersection::IntPolyh_Intersection(const Handle(Adaptor3d_Surface)& th
myNbSU2 = theUPars2.Length();
myNbSV2 = theVPars2.Length();
myIsDone = Standard_False;
myIsParallel = Standard_False;
mySectionLines.Init(1000);
myTangentZones.Init(10000);
Perform(theUPars1, theVPars1, theUPars2, theVPars2);
@@ -441,7 +442,7 @@ void IntPolyh_Intersection::MergeCouples(IntPolyh_ListOfCouples &anArrayFF,
// too small (less than 5 deg), the advanced intersection is required.
// Otherwise, the standard intersection is considered satisfactory.
//=======================================================================
Standard_Boolean IntPolyh_Intersection::IsAdvRequired(IntPolyh_PMaillageAffinage& theMaillage)
Standard_Boolean IsAdvRequired(IntPolyh_PMaillageAffinage& theMaillage)
{
if (!theMaillage)
return Standard_True;
@@ -451,7 +452,7 @@ Standard_Boolean IntPolyh_Intersection::IsAdvRequired(IntPolyh_PMaillageAffinage
// Number of interfering pairs
Standard_Integer aNbCouples = Couples.Extent();
// Flag to define whether advanced intersection is required or not
Standard_Boolean isAdvReq = (aNbCouples == 0) && !IsParallel();
Standard_Boolean isAdvReq = (aNbCouples == 0);
if (isAdvReq)
// No interfering triangles are found -> perform advanced intersection
return isAdvReq;
@@ -506,7 +507,7 @@ Standard_Integer ComputeIntersection(IntPolyh_PMaillageAffinage& theMaillage)
//function : AnalyzeIntersection
//purpose : Analyzes the intersection on the number of interfering triangles
//=======================================================================
Standard_Boolean IntPolyh_Intersection::AnalyzeIntersection(IntPolyh_PMaillageAffinage& theMaillage)
Standard_Boolean AnalyzeIntersection(IntPolyh_PMaillageAffinage& theMaillage)
{
if (!theMaillage)
return Standard_False;
@@ -527,9 +528,7 @@ Standard_Boolean IntPolyh_Intersection::AnalyzeIntersection(IntPolyh_PMaillageAf
if (npara >= theMaillage->GetArrayOfTriangles(1).NbItems() ||
npara >= theMaillage->GetArrayOfTriangles(2).NbItems())
{
Couples.Clear();
myIsParallel = Standard_True;
return Standard_True;
return Standard_False;
}
}
return Standard_True;

View File

@@ -83,12 +83,6 @@ public: //! @name Getting the results
return myIsDone;
}
//! Returns state of the operation
Standard_Boolean IsParallel() const
{
return myIsParallel;
}
//! Returns the number of section lines
Standard_Integer NbSectionLines() const
{
@@ -192,9 +186,6 @@ private: //! @name Performing the intersection
IntPolyh_ListOfCouples& theArrayRF,
IntPolyh_ListOfCouples& theArrayRR) const;
Standard_Boolean AnalyzeIntersection(IntPolyh_PMaillageAffinage& theMaillage);
Standard_Boolean IsAdvRequired(IntPolyh_PMaillageAffinage& theMaillage);
private: //! @name Fields
@@ -209,7 +200,6 @@ private: //! @name Fields
Standard_Boolean myIsDone; //!< State of the operation
IntPolyh_ArrayOfSectionLines mySectionLines; //!< Section lines
IntPolyh_ArrayOfTangentZones myTangentZones; //!< Tangent zones
Standard_Boolean myIsParallel;
};
#endif // _IntPolyh_Intersection_HeaderFile

View File

@@ -504,11 +504,7 @@ void IntTools_FaceFace::Perform (const TopoDS_Face& aF1,
{
const Standard_Real UVMaxStep = IntPatch_Intersection::DefineUVMaxStep(myHS1, dom1, myHS2, dom2);
Standard_Real Deflection = 0.1;
if (aType1 == GeomAbs_BSplineSurface && aType2 == GeomAbs_BSplineSurface)
{
Deflection /= 10.;
}
const Standard_Real Deflection = 0.1;
myIntersector.SetTolerances(TolArc, TolTang, UVMaxStep, Deflection);
}

View File

@@ -448,5 +448,5 @@ void IntTools_TopolTool::SamplePnts(const Standard_Real theDefl,
myV0 = myVPars->Value(1);
myDU = (myUPars->Value(myNbSmplU) - myU0)/(myNbSmplU-1);
myDV = (myVPars->Value(myNbSmplV) - myV0)/(myNbSmplV-1);
myDV = (myVPars->Value(myNbSmplV) - myU0)/(myNbSmplV-1);
}

View File

@@ -4183,77 +4183,6 @@ static Standard_Integer OCC32744(Draw_Interpretor& theDi, Standard_Integer theNb
return 0;
}
//=======================================================================
//function : OCC24472
//purpose :
//=======================================================================
static Standard_Integer OCC24472(Draw_Interpretor& theDI,
Standard_Integer theNArg,
const char ** theArgVal)
{
// Checks whether theCurve has a loop / bend
if (theNArg < 2)
{
theDI << "Use: " << theArgVal[0] << " CheckLoops curve [CosMaxAngle [theNbPoints]]" << "/n";
return 1;
}
Handle(Geom_Curve) aCurve = DrawTrSurf::GetCurve(theArgVal[1]);
if(aCurve.IsNull())
{
theDI << " " << theArgVal[1] << " : NULL curve" << "\n";
return 0;
}
Standard_Real aCosMaxAngle = .8;
Standard_Integer aNbPoints = 1000;
if (theNArg > 2)
{
aCosMaxAngle = Draw::Atof(theArgVal[2]);
}
if (theNArg > 3)
{
aNbPoints = Draw::Atoi(theArgVal[3]);
}
Standard_Real U1 = aCurve->FirstParameter(), U2 = aCurve->LastParameter();
if (Precision::IsInfinite(U1) || Precision::IsInfinite(U2))
{
theDI << "Infinite interval : " << U1 << " " << U2 << "\n";
return 0;
}
Standard_Real delta = (U2 - U1) / aNbPoints;
gp_Pnt aP;
gp_Vec aDC1, aDC2;
aCurve->D1(U1, aP, aDC1);
gp_Dir aD1(aDC1);
Standard_Real p;
for (p = U1; p <= U2; p += delta)
{
aCurve->D1(p, aP, aDC2);
gp_Dir aD2(aDC2);
Standard_Real aCos = Abs(aD1*aD2);
if (aCos < aCosMaxAngle)
{
theDI << "Error: The curve " << theArgVal[1] << " is possible to have a bend at parameter " << p << ". Please check carefully \n";
}
aD1 = aD2;
}
return 0;
}
void QABugs::Commands_20(Draw_Interpretor& theCommands) {
const char *group = "QABugs";
@@ -4346,10 +4275,5 @@ void QABugs::Commands_20(Draw_Interpretor& theCommands) {
__FILE__,
OCC32744, group);
theCommands.Add("OCC24472",
"CheckLoops curve [CosMaxAngle [theNbPoints]]",
__FILE__,
OCC24472, group);
return;
}

View File

@@ -99,7 +99,7 @@ Standard_Boolean StepSelect_WorkLibrary::WriteFile
if (stepmodel.IsNull() || stepro.IsNull()) return Standard_False;
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
std::shared_ptr<std::ostream> aStream = aFileSystem->OpenOStream (ctx.FileName(), std::ios::out | std::ios::trunc);
std::shared_ptr<std::ostream> aStream = aFileSystem->OpenOStream (ctx.FileName(), std::ios::out | std::ios::binary | std::ios::trunc);
if (aStream.get() == NULL) {
ctx.CCheck(0)->AddFail("Step File could not be created");

View File

@@ -226,7 +226,7 @@ Standard_Boolean VrmlAPI_Writer::write_v1(const TopoDS_Shape& aShape,const Stand
OSD_Path thePath(aFile);
TCollection_AsciiString theFile;thePath.SystemName(theFile);
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
std::shared_ptr<std::ostream> anOutFile = aFileSystem->OpenOStream (theFile, std::ios::out);
std::shared_ptr<std::ostream> anOutFile = aFileSystem->OpenOStream (theFile, std::ios::out | std::ios::binary);
if (anOutFile.get() == NULL)
{
return Standard_False;
@@ -370,7 +370,7 @@ Standard_Boolean VrmlAPI_Writer::write_v2(const TopoDS_Shape& aShape,const Stand
aConv.Convert(anExtFace, anExtEdge);
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
std::shared_ptr<std::ostream> anOutStream = aFileSystem->OpenOStream (aFile, std::ios::out);
std::shared_ptr<std::ostream> anOutStream = aFileSystem->OpenOStream (aFile, std::ios::out | std::ios::binary);
if (anOutStream.get() != NULL)
{
*anOutStream << aScene;
@@ -395,7 +395,7 @@ Standard_Boolean VrmlAPI_Writer::WriteDoc(
aConv.ConvertDocument(theDoc);
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
std::shared_ptr<std::ostream> anOutStream = aFileSystem->OpenOStream (theFile, std::ios::out);
std::shared_ptr<std::ostream> anOutStream = aFileSystem->OpenOStream (theFile, std::ios::out | std::ios::binary);
if (anOutStream.get() != NULL)
{
*anOutStream << aScene;

View File

@@ -76,7 +76,7 @@ void WriteShape(const TopoDS_Shape& shape, const Standard_Integer number)
{
char fname[110];
sprintf(fname, "Shape_%d",number);
std::ofstream f(fname,std::ios::out);
std::ofstream f(fname,std::ios::out | std::ios::binary);
std::cout << "Output file name : " << fname << std::endl;
f << "DBRep_DrawableShape\n";

View File

@@ -99,7 +99,7 @@ void XmlLDrivers_DocumentStorageDriver::Write (const Handle(CDM_Document)&
myFileName = theFileName;
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
std::shared_ptr<std::ostream> aFileStream = aFileSystem->OpenOStream (theFileName, std::ios::out);
std::shared_ptr<std::ostream> aFileStream = aFileSystem->OpenOStream (theFileName, std::ios::out | std::ios::binary);
if (aFileStream.get() != NULL && aFileStream->good())
{
Write (theDocument, *aFileStream, theRange);

View File

@@ -1,4 +1,4 @@
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
#jmu
#pro18457

View File

@@ -1,4 +1,4 @@
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "PRO15946"
puts "Fuse"

View File

@@ -22,5 +22,5 @@ checkprops result -s 66.672
checkshape result
# Analysis of "nbshapes res"
checknbshapes result -vertex 6 -edge 8 -wire 2 -face 2 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 21
checknbshapes result -vertex 5 -edge 7 -wire 2 -face 2 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 19
checkview -display result -2d -path ${imagedir}/${test_image}.png

View File

@@ -22,5 +22,5 @@ checkprops result -s 1450.22
checkshape result
# Analysis of "nbshapes res"
checknbshapes result -vertex 6 -edge 8 -wire 4 -face 4 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 25
checknbshapes result -vertex 5 -edge 7 -wire 4 -face 4 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 23
checkview -display result -2d -path ${imagedir}/${test_image}.png

View File

@@ -22,5 +22,5 @@ checkprops result -s 761.355
checkshape result
# Analysis of "nbshapes res"
checknbshapes result -vertex 6 -edge 8 -wire 3 -face 3 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 23
checknbshapes result -vertex 5 -edge 7 -wire 3 -face 3 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 21
checkview -display result -2d -path ${imagedir}/${test_image}.png

View File

@@ -22,5 +22,5 @@ checkprops result -s 755.54
checkshape result
# Analysis of "nbshapes res"
checknbshapes result -vertex 6 -edge 8 -wire 3 -face 3 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 23
checknbshapes result -vertex 5 -edge 7 -wire 3 -face 3 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 21
checkview -display result -2d -path ${imagedir}/${test_image}.png

View File

@@ -22,5 +22,5 @@ checkprops result -l 18.3861
checkshape result
checksection result
# Analysis of "nbshapes res"
checknbshapes result -vertex 4 -edge 4 -wire 0 -face 0 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 9
checknbshapes result -vertex 3 -edge 3 -wire 0 -face 0 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 7
checkview -display result -2d -path ${imagedir}/${test_image}.png

View File

@@ -22,5 +22,5 @@ checkprops result -l 122.816
checkshape result
checksection result
# Analysis of "nbshapes res"
checknbshapes result -vertex 6 -edge 6 -wire 0 -face 0 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 13
checknbshapes result -vertex 5 -edge 5 -wire 0 -face 0 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 11
checkview -display result -2d -path ${imagedir}/${test_image}.png

View File

@@ -1,4 +1,4 @@
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "============"
puts "OCC12918"

View File

@@ -33,6 +33,6 @@ Number of shapes in .*
"
checknbshapes result -ref $NbShapesRef
checkmaxtol result -ref 0.013928665225777443
checkmaxtol result -ref 2.0849512334752456e-05
checkview -display result -2d -path ${imagedir}/${test_image}.png

View File

@@ -33,7 +33,7 @@ Number of shapes in .*
checknbshapes result -ref $NbShapesRef
checkmaxtol result -ref 0.013928665225777443
checkmaxtol result -ref 2.0849512334752456e-05
checkview -display result -2d -path ${imagedir}/${test_image}_axo.png

View File

@@ -33,7 +33,7 @@ Number of shapes in .*
checknbshapes result -ref $NbShapesRef
checkmaxtol result -ref 0.013928665225777443
checkmaxtol result -ref 2.0849512334752456e-05
checkview -display result -2d -path ${imagedir}/${test_image}_axo.png

View File

@@ -32,7 +32,7 @@ Number of shapes in .*
"
checknbshapes result -ref $NbShapesRef
checkmaxtol result -ref 0.013928665225777443
checkmaxtol result -ref 2.0849512334752456e-05
checkview -display result -2d -path ${imagedir}/${test_image}_axo.png

View File

@@ -33,7 +33,7 @@ Number of shapes in .*
checknbshapes result -ref $NbShapesRef
checkmaxtol result -ref 0.013928665225777443
checkmaxtol result -ref 2.0849512334752456e-05
checkview -display result -2d -path ${imagedir}/${test_image}_axo.png

View File

@@ -1,4 +1,4 @@
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "============"
puts "OCC697"

View File

@@ -1,4 +1,4 @@
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "============"
puts "OCC697"

View File

@@ -1,4 +1,4 @@
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "============"
puts "OCC697"

View File

@@ -1,4 +1,4 @@
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "============"
puts "OCC697"

View File

@@ -1,4 +1,4 @@
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "=========="
puts "OCC22829"

View File

@@ -1,4 +1,4 @@
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "================"
puts "OCC24003"

View File

@@ -1,4 +1,4 @@
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "================"
puts "OCC25625"

View File

@@ -1,4 +1,3 @@
puts "TODO OCC24418 ALL: Error : is WRONG because number of"
puts "=========="
puts "OCC25715"
puts "=========="
@@ -11,6 +10,7 @@ puts ""
restore [locate_data_file bug25715_p02c3s1.brep] s1
restore [locate_data_file bug25715_p02c3s3.brep] s3
bfuse result s1 s3
unifysamedom result result +b
checknbshapes result -vertex 8 -edge 14 -wire 6 -face 5 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 36
checknbshapes result -vertex 6 -edge 9 -wire 5 -face 4 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 27
checkview -display result -2d -path ${imagedir}/${test_image}.png

View File

@@ -1,4 +1,4 @@
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "=========="
puts "OCC24161"

View File

@@ -1,4 +1,4 @@
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "========"
puts "OCC28283"

View File

@@ -20,7 +20,7 @@ bopsection result
checkshape result
checknbshapes result -edge 5 -vertex 6
checknbshapes result -edge 4 -vertex 5
checkmaxtol result -ref 6.02982e-007

View File

@@ -1,4 +1,4 @@
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO OCC21134 ALL: Error: checkshape command does not return faulty shapes"
puts "============"

View File

@@ -3,7 +3,7 @@ puts "0025082: bopcommon returns different result on Windows and Linux system"
puts "========"
puts ""
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
restore [locate_data_file bug25054_shape1.brep] b1
restore [locate_data_file bug25054_shape2.brep] b2

View File

@@ -3,7 +3,7 @@ puts "0025082: bopcommon returns different result on Windows and Linux system"
puts "========"
puts ""
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
restore [locate_data_file bug25054_shape1.brep] b1
restore [locate_data_file bug25054_shape2.brep] b2

View File

@@ -1,4 +1,4 @@
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "========"
puts "OCC28150"

View File

@@ -1,4 +1,4 @@
##puts "TODO CR29596 All: Intersection of pair of shapes has failed"
puts "TODO CR29596 All: Intersection of pair of shapes has failed"
puts "========"
puts "OCC29900: Invalid result of FUSE operation"

View File

@@ -1,4 +1,4 @@
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "============================================================================================="
puts "0030559: BOP Fuse: result is inconsistent"

View File

@@ -1,4 +1,4 @@
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "========"
puts "30760: Modeling Algorithms - Intersection fails in Occt 7.3.0"

View File

@@ -1,4 +1,4 @@
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "=========================================="
puts "0031890: Invalid result of common fuse BOP"

View File

@@ -1,4 +1,4 @@
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_"
puts "================"

View File

@@ -1,4 +1,4 @@
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_"
puts "================"

View File

@@ -1,5 +1,3 @@
puts "TODO OCC24418 ALL: Error in ii_2: T="
puts "========"
puts "OCC24418"
puts "========"

View File

@@ -6,9 +6,8 @@ puts ""
## Wrong section curves
###############################
pload QAcommands
##puts "TODO OCC29501 ALL: Error in ii12_22"
##puts "TODO OCC29501 All: Error: The curve ii12_22 is possible"
puts "TODO OCC29501 ALL: Error in ii12_22"
puts "TODO OCC29501 All: Error: The curve ii12_22 is possible"
set MaxToler 1.5e-4
restore [locate_data_file bug24472_Pipe_1.brep] b1
@@ -27,9 +26,6 @@ puts "First test"
intersect ii12 s1 s2
foreach c [directory ii12*] {
puts "Curve $c"
bounds $c U1 U2
if {[dval U2-U1] < 1.0e-9} {
@@ -37,7 +33,7 @@ foreach c [directory ii12*] {
}
# cos(~75.5deg)
OCC24472 $c 0.25
CheckLoops $c 0.25
xdistcs $c s1 U1 U2 10 $MaxToler
xdistcs $c s2 U1 U2 10 $MaxToler
@@ -59,9 +55,6 @@ puts "Third test"
intersect ii13 s1 s3
foreach c [directory ii13*] {
puts "Curve $c"
bounds $c U1 U2
if {[dval U2-U1] < 1.0e-9} {
@@ -69,7 +62,7 @@ foreach c [directory ii13*] {
}
# cos(~75.5deg)
OCC24472 $c 0.25
CheckLoops $c 0.25
xdistcs $c s1 U1 U2 10 $MaxToler
xdistcs $c s2 U1 U2 10 $MaxToler

View File

@@ -1,4 +1,4 @@
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO OCC11111 ALL: Error : is WRONG because number of "
puts "============"

View File

@@ -1,4 +1,4 @@
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO OCC11111 ALL: Error : is WRONG because number of "
puts "============"

View File

@@ -1,4 +1,4 @@
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO OCC11111 ALL: Error : is WRONG because number of "
puts "============"

View File

@@ -1,4 +1,4 @@
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO OCC11111 ALL: Error : is WRONG because number of "
puts "============"

View File

@@ -3,7 +3,7 @@ puts "0029329: Modeling Algorithms - Low performance of the General Fuse algorit
puts "========"
puts ""
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
restore [locate_data_file bug29329_objects.brep] a
restore [locate_data_file bug29329_tools.brep] b