mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +03:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
e1b78718ca | ||
|
323aa4abba |
@@ -19,7 +19,6 @@
|
||||
#include <BRep_CurveOnClosedSurface.hxx>
|
||||
#include <BRep_CurveOnSurface.hxx>
|
||||
#include <BRep_CurveRepresentation.hxx>
|
||||
#include <BRep_GCurve.hxx>
|
||||
#include <BRep_Polygon3D.hxx>
|
||||
#include <BRep_PolygonOnSurface.hxx>
|
||||
#include <BRep_PolygonOnTriangulation.hxx>
|
||||
@@ -27,7 +26,6 @@
|
||||
#include <BRep_TFace.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRep_TVertex.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
#include <ElSLib.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
@@ -63,6 +61,7 @@
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
#include <TopTools_MapOfShape.hxx>
|
||||
#include <TopTools_ShapeMapHasher.hxx>
|
||||
#include <BRep_GCurve.hxx>
|
||||
|
||||
//modified by NIZNHY-PKV Fri Oct 17 14:13:29 2008f
|
||||
static
|
||||
@@ -1673,13 +1672,3 @@ Standard_Real BRep_Tool::MaxTolerance (const TopoDS_Shape& theShape,
|
||||
|
||||
return aTol;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Tolerance2d
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Real BRep_Tool::Tolerance2d(const TopoDS_Face& theFace, const Standard_Real theTolerance)
|
||||
{
|
||||
BRepAdaptor_Surface aAdaptorSurface(theFace);
|
||||
return Max(aAdaptorSurface.UResolution(theTolerance), aAdaptorSurface.VResolution(theTolerance));
|
||||
}
|
||||
|
@@ -297,11 +297,6 @@ public:
|
||||
//@param theSubShape - Search subshape, only Face, Edge or Vertex are supported.
|
||||
Standard_EXPORT static Standard_Real MaxTolerance (const TopoDS_Shape& theShape, const TopAbs_ShapeEnum theSubShape);
|
||||
|
||||
//! Returns the 2d tolerance.
|
||||
//@param theFace - the input face to find 2d tolerance
|
||||
//@param theTolerance - the input tolerance to calculate 2d tolerance.
|
||||
Standard_EXPORT static Standard_Real Tolerance2d(const TopoDS_Face& theFace, const Standard_Real theTolerance);
|
||||
|
||||
};
|
||||
|
||||
#endif // _BRep_Tool_HeaderFile
|
||||
|
@@ -441,6 +441,7 @@ static void PERFORM_C0(const TopoDS_Edge& S1, const TopoDS_Edge& S2,
|
||||
|
||||
gp_Pnt P1, Pt;
|
||||
Standard_Integer i, ii;
|
||||
BRepClass_FaceClassifier classifier;
|
||||
for (i = 1; i <= arrInter.Length(); i++)
|
||||
{
|
||||
const Standard_Real aParameter = arrInter(i);
|
||||
@@ -771,7 +772,7 @@ void BRepExtrema_DistanceSS::Perform(const TopoDS_Vertex& theS1,
|
||||
Standard_Real U, V;
|
||||
gp_Pnt Pt, P1 = BRep_Tool::Pnt(theS1);
|
||||
BRepClass_FaceClassifier classifier;
|
||||
const Standard_Real tol2d = BRep_Tool::Tolerance2d(theS2, BRep_Tool::Tolerance(theS2));
|
||||
const Standard_Real tol = BRep_Tool::Tolerance(theS2);
|
||||
|
||||
for (i = 1; i <= NbExtrema; i++)
|
||||
{
|
||||
@@ -783,7 +784,7 @@ void BRepExtrema_DistanceSS::Perform(const TopoDS_Vertex& theS1,
|
||||
// Check if the parameter does not correspond to a vertex
|
||||
Ext.Parameter(i, U, V);
|
||||
const gp_Pnt2d PUV(U, V);
|
||||
classifier.Perform(theS2, PUV, tol2d);
|
||||
classifier.Perform(theS2, PUV, tol);
|
||||
if (classifier.State() == TopAbs_IN)
|
||||
{
|
||||
if (myDstRef > Dstmin)
|
||||
@@ -921,7 +922,7 @@ void BRepExtrema_DistanceSS::Perform (const TopoDS_Edge& theS1, const TopoDS_Fac
|
||||
if ((Dstmin < myDstRef - myEps) || (fabs(Dstmin - myDstRef) < myEps))
|
||||
{
|
||||
Standard_Real U, V;
|
||||
const Standard_Real tol2d = BRep_Tool::Tolerance2d(theS2, BRep_Tool::Tolerance(theS2));
|
||||
const Standard_Real tol = BRep_Tool::Tolerance(theS2);
|
||||
|
||||
gp_Pnt Pt1, Pt2;
|
||||
const Standard_Real epsP = Precision::PConfusion();
|
||||
@@ -940,7 +941,7 @@ void BRepExtrema_DistanceSS::Perform (const TopoDS_Edge& theS1, const TopoDS_Fac
|
||||
{
|
||||
Ext.ParameterOnFace(i, U, V);
|
||||
const gp_Pnt2d PUV(U, V);
|
||||
classifier.Perform(theS2, PUV, tol2d);
|
||||
classifier.Perform(theS2, PUV, tol);
|
||||
if (classifier.State() == TopAbs_IN)
|
||||
{
|
||||
if (myDstRef > Dstmin)
|
||||
@@ -973,7 +974,7 @@ void BRepExtrema_DistanceSS::Perform (const TopoDS_Edge& theS1, const TopoDS_Fac
|
||||
|
||||
gp_Pnt Pt;
|
||||
Standard_Real U, V;
|
||||
const Standard_Real tol2d = BRep_Tool::Tolerance2d(theS2, BRep_Tool::Tolerance(theS2));
|
||||
const Standard_Real tol = BRep_Tool::Tolerance(theS2);
|
||||
|
||||
Standard_Integer i;
|
||||
for (i = 1; i <= arrInter.Length(); i++)
|
||||
@@ -1006,7 +1007,7 @@ void BRepExtrema_DistanceSS::Perform (const TopoDS_Edge& theS1, const TopoDS_Fac
|
||||
// Check if the parameter does not correspond to a vertex
|
||||
ExtPF.Parameter(ii, U, V);
|
||||
const gp_Pnt2d PUV(U, V);
|
||||
classifier.Perform(theS2, PUV, tol2d);
|
||||
classifier.Perform(theS2, PUV, tol);
|
||||
if (classifier.State() == TopAbs_IN)
|
||||
{
|
||||
if (myDstRef > Dstmin)
|
||||
@@ -1061,8 +1062,8 @@ void BRepExtrema_DistanceSS::Perform (const TopoDS_Face& theS1,
|
||||
Dstmin = sqrt(Dstmin);
|
||||
if ((Dstmin < myDstRef - myEps) || (fabs(Dstmin - myDstRef) < myEps))
|
||||
{
|
||||
const Standard_Real tol2d1 = BRep_Tool::Tolerance2d(theS1, BRep_Tool::Tolerance(theS1));
|
||||
const Standard_Real tol2d2 = BRep_Tool::Tolerance2d(theS2, BRep_Tool::Tolerance(theS2));
|
||||
const Standard_Real tol1 = BRep_Tool::Tolerance(theS1);
|
||||
const Standard_Real tol2 = BRep_Tool::Tolerance(theS2);
|
||||
|
||||
gp_Pnt Pt1, Pt2;
|
||||
gp_Pnt2d PUV;
|
||||
@@ -1080,12 +1081,12 @@ void BRepExtrema_DistanceSS::Perform (const TopoDS_Face& theS1,
|
||||
// Check if the parameter does not correspond to a vertex
|
||||
Ext.ParameterOnFace1(i, U1, V1);
|
||||
PUV.SetCoord(U1, V1);
|
||||
classifier.Perform(theS1, PUV, tol2d1);
|
||||
classifier.Perform(theS1, PUV, tol1);
|
||||
if (classifier.State() == TopAbs_IN)
|
||||
{
|
||||
Ext.ParameterOnFace2(i, U2, V2);
|
||||
PUV.SetCoord(U2, V2);
|
||||
classifier.Perform(theS2, PUV, tol2d2);
|
||||
classifier.Perform(theS2, PUV, tol2);
|
||||
if (classifier.State() == TopAbs_IN)
|
||||
{
|
||||
if (myDstRef > Dstmin)
|
||||
|
@@ -89,7 +89,7 @@ void BRepExtrema_ExtFF::Perform(const TopoDS_Face& F1, const TopoDS_Face& F2)
|
||||
{
|
||||
// Exploration of points and classification
|
||||
BRepClass_FaceClassifier classifier;
|
||||
const Standard_Real Tol2d2 = BRep_Tool::Tolerance2d(F2, BRep_Tool::Tolerance(F2));
|
||||
const Standard_Real Tol2 = BRep_Tool::Tolerance(F2);
|
||||
Extrema_POnSurf P1, P2;
|
||||
|
||||
Standard_Integer i;
|
||||
@@ -98,14 +98,13 @@ void BRepExtrema_ExtFF::Perform(const TopoDS_Face& F1, const TopoDS_Face& F2)
|
||||
myExtSS.Points(i, P1, P2);
|
||||
P1.Parameter(U1, U2);
|
||||
const gp_Pnt2d Puv1(U1, U2);
|
||||
const Standard_Real Tol2d1 = BRep_Tool::Tolerance2d(F1, Tol1);
|
||||
classifier.Perform(F1, Puv1, Tol2d1);
|
||||
classifier.Perform(F1, Puv1, Tol1);
|
||||
const TopAbs_State state1 = classifier.State();
|
||||
if (state1 == TopAbs_ON || state1 == TopAbs_IN)
|
||||
{
|
||||
P2.Parameter(U1, U2);
|
||||
const gp_Pnt2d Puv2(U1, U2);
|
||||
classifier.Perform(F2, Puv2, Tol2d2);
|
||||
classifier.Perform(F2, Puv2, Tol2);
|
||||
const TopAbs_State state2 = classifier.State();
|
||||
if (state2 == TopAbs_ON || state2 == TopAbs_IN)
|
||||
{
|
||||
|
@@ -85,12 +85,12 @@ void BRepExtrema_ExtPF::Perform(const TopoDS_Vertex& TheVertex, const TopoDS_Fac
|
||||
{
|
||||
BRepClass_FaceClassifier classifier;
|
||||
Standard_Real U1, U2;
|
||||
const Standard_Real Tol2d = BRep_Tool::Tolerance2d(TheFace, BRep_Tool::Tolerance(TheFace));
|
||||
const Standard_Real Tol = BRep_Tool::Tolerance(TheFace);
|
||||
for (Standard_Integer i = 1; i <= myExtPS.NbExt(); i++)
|
||||
{
|
||||
myExtPS.Point(i).Parameter(U1, U2);
|
||||
const gp_Pnt2d Puv(U1, U2);
|
||||
classifier.Perform(TheFace, Puv, Tol2d);
|
||||
classifier.Perform(TheFace, Puv, Tol);
|
||||
const TopAbs_State state = classifier.State();
|
||||
if(state == TopAbs_ON || state == TopAbs_IN)
|
||||
{
|
||||
|
@@ -719,7 +719,7 @@ void Draw::Load (Draw_Interpretor& theDI,
|
||||
}
|
||||
|
||||
void (*fp) (Draw_Interpretor&) = NULL;
|
||||
fp = (void (*)(Draw_Interpretor&) )aFunc;
|
||||
fp = (void (*)(Draw_Interpretor&) )(void*)aFunc;
|
||||
(*fp) (theDI);
|
||||
}
|
||||
|
||||
|
@@ -69,13 +69,9 @@ Storage_Error FSD_CmpFile::Open(const TCollection_AsciiString& aName, const Stor
|
||||
SetName(aName);
|
||||
|
||||
if (OpenMode() == Storage_VSNone) {
|
||||
std::ios_base::openmode anOpenMode = std::ios_base::openmode(0);
|
||||
std::ios_base::openmode anOpenMode;
|
||||
switch (aMode)
|
||||
{
|
||||
case Storage_VSNone:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case Storage_VSRead:
|
||||
{
|
||||
// std::ios::nocreate is not portable
|
||||
@@ -104,11 +100,13 @@ Storage_Error FSD_CmpFile::Open(const TCollection_AsciiString& aName, const Stor
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (anOpenMode != 0)
|
||||
case Storage_VSNone:
|
||||
default:
|
||||
{
|
||||
OSD_OpenStream(myStream, aName, anOpenMode);
|
||||
return Storage_VSOpenError;
|
||||
}
|
||||
}
|
||||
OSD_OpenStream(myStream, aName, anOpenMode);
|
||||
if (myStream.fail()) {
|
||||
result = Storage_VSOpenError;
|
||||
}
|
||||
|
@@ -51,9 +51,7 @@ FSD_File::FSD_File()
|
||||
Storage_Error FSD_File::IsGoodFileType(const TCollection_AsciiString& aName)
|
||||
{
|
||||
FSD_File f;
|
||||
Storage_Error s;
|
||||
|
||||
s = f.Open(aName,Storage_VSRead);
|
||||
Storage_Error s = f.Open(aName,Storage_VSRead);
|
||||
|
||||
if (s == Storage_VSOk) {
|
||||
TCollection_AsciiString l;
|
||||
@@ -84,13 +82,9 @@ Storage_Error FSD_File::Open(const TCollection_AsciiString& aName,const Storage_
|
||||
|
||||
if (OpenMode() == Storage_VSNone)
|
||||
{
|
||||
std::ios_base::openmode anOpenMode = std::ios_base::openmode(0);
|
||||
std::ios_base::openmode anOpenMode;
|
||||
switch (aMode)
|
||||
{
|
||||
case Storage_VSNone:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case Storage_VSRead:
|
||||
{
|
||||
// std::ios::nocreate is not portable
|
||||
@@ -107,11 +101,13 @@ Storage_Error FSD_File::Open(const TCollection_AsciiString& aName,const Storage_
|
||||
anOpenMode = std::ios::in | std::ios::out;
|
||||
break;
|
||||
}
|
||||
case Storage_VSNone:
|
||||
default:
|
||||
{
|
||||
return Storage_VSOpenError;
|
||||
}
|
||||
}
|
||||
if (anOpenMode != 0)
|
||||
{
|
||||
OSD_OpenStream (myStream, aName.ToCString(), anOpenMode);
|
||||
}
|
||||
OSD_OpenStream (myStream, aName.ToCString(), anOpenMode);
|
||||
if (myStream.fail()) {
|
||||
result = Storage_VSOpenError;
|
||||
}
|
||||
@@ -237,7 +233,7 @@ void FSD_File::WriteExtendedLine(const TCollection_ExtendedString& buffer)
|
||||
void FSD_File::ReadExtendedLine(TCollection_ExtendedString& buffer)
|
||||
{
|
||||
char c = '\0';
|
||||
Standard_ExtCharacter i = 0,j,count = 0;
|
||||
Standard_ExtCharacter i = 0,count = 0;
|
||||
Standard_Boolean fin = Standard_False;
|
||||
Standard_CString tg = ENDOFNORMALEXTENDEDSECTION;
|
||||
|
||||
@@ -249,7 +245,6 @@ void FSD_File::ReadExtendedLine(TCollection_ExtendedString& buffer)
|
||||
if (c == tg[count]) count++;
|
||||
else count = 0;
|
||||
if (count < SIZEOFNORMALEXTENDEDSECTION) {
|
||||
j = 0;
|
||||
i = (Standard_ExtCharacter)c;
|
||||
if (c == '\0') fin = Standard_True;
|
||||
i = (i << 8);
|
||||
@@ -258,7 +253,7 @@ void FSD_File::ReadExtendedLine(TCollection_ExtendedString& buffer)
|
||||
if (c == tg[count]) count++;
|
||||
else count = 0;
|
||||
if (count < SIZEOFNORMALEXTENDEDSECTION) {
|
||||
j = (Standard_ExtCharacter)c;
|
||||
Standard_ExtCharacter j = (Standard_ExtCharacter)c;
|
||||
if (c != '\n') {
|
||||
fin = Standard_False;
|
||||
i |= (0x00FF & j);
|
||||
|
@@ -1251,6 +1251,7 @@ bool Image_AlienPixMap::Save (Standard_Byte* theBuffer,
|
||||
}
|
||||
return true;
|
||||
#else
|
||||
(void)theLength;
|
||||
if (theBuffer != NULL)
|
||||
{
|
||||
Message::SendFail ("Error: no image library available");
|
||||
@@ -1450,6 +1451,8 @@ bool Image_AlienPixMap::Save (std::ostream& theStream, const TCollection_AsciiSt
|
||||
}
|
||||
return true;
|
||||
#else
|
||||
(void)theStream;
|
||||
(void)theExtension;
|
||||
Message::SendFail ("Error: no image library available");
|
||||
return false;
|
||||
#endif
|
||||
|
@@ -138,7 +138,6 @@ void Message_Msg::Set (const TCollection_ExtendedString& theMsg)
|
||||
aFormatType = Msg_StringType;
|
||||
break;
|
||||
default:
|
||||
aFormatType = Msg_IndefiniteType;
|
||||
continue;
|
||||
}
|
||||
mySeqOfFormats.Append (Standard_Integer(aFormatType)); // type
|
||||
|
@@ -223,7 +223,7 @@ void Message_PrinterOStream::SetConsoleTextColor (Standard_OStream* theOStream,
|
||||
return;
|
||||
}
|
||||
|
||||
const char* aCode = "\e[0m";
|
||||
const char* aCode;
|
||||
switch (theTextColor)
|
||||
{
|
||||
case Message_ConsoleColor_Default:
|
||||
|
@@ -459,7 +459,7 @@ void OSD_File::Build (const OSD_OpenMode theMode,
|
||||
throw Standard_ProgramError ("OSD_File::Build(): no name was given");
|
||||
}
|
||||
|
||||
const char* anFDOpenMode = "r";
|
||||
const char* anFDOpenMode;
|
||||
Standard_Integer anOpenMode = O_CREAT | O_TRUNC;
|
||||
switch (theMode)
|
||||
{
|
||||
@@ -622,7 +622,7 @@ void OSD_File::Open (const OSD_OpenMode theMode,
|
||||
throw Standard_ProgramError ("OSD_File::Open(): no name was given");
|
||||
}
|
||||
|
||||
const char* anFDOpenMode = "r";
|
||||
const char* anFDOpenMode;
|
||||
Standard_Integer anOpenMode = 0;
|
||||
switch (theMode)
|
||||
{
|
||||
|
@@ -1521,7 +1521,6 @@ TCollection_AsciiString OSD_Path::RelativePath(
|
||||
TCollection_AsciiString EmptyString = "" ;
|
||||
TCollection_AsciiString FilePath ;
|
||||
Standard_Integer len ;
|
||||
Standard_Integer i, n ;
|
||||
Standard_Boolean Wnt = 0 ;
|
||||
|
||||
FilePath = aAbsFilePath ;
|
||||
@@ -1554,14 +1553,14 @@ TCollection_AsciiString OSD_Path::RelativePath(
|
||||
TCollection_AsciiString DirToken, FileToken ;
|
||||
Standard_Boolean Sibling = 0 ;
|
||||
|
||||
for (i = n = 1 ;; n++) {
|
||||
for (Standard_Integer n = 1 ;; n++) {
|
||||
DirToken = aDirPath.Token("/\\",n) ;
|
||||
if (DirToken.IsEmpty())
|
||||
return FilePath ;
|
||||
|
||||
if (!Sibling) {
|
||||
len = FilePath.Length() ;
|
||||
i = FilePath.Search("/") ;
|
||||
Standard_Integer i = FilePath.Search("/") ;
|
||||
if (i > 0) {
|
||||
if (i == len)
|
||||
return EmptyString ;
|
||||
|
@@ -813,7 +813,7 @@ Standard_Boolean OpenGl_Context::SetSwapInterval (const Standard_Integer theInte
|
||||
&& myFuncs->glXSwapIntervalEXT != NULL)
|
||||
{
|
||||
typedef int (*glXSwapIntervalEXT_t_x)(Display* theDisplay, GLXDrawable theDrawable, int theInterval);
|
||||
glXSwapIntervalEXT_t_x aFuncPtr = (glXSwapIntervalEXT_t_x )myFuncs->glXSwapIntervalEXT;
|
||||
glXSwapIntervalEXT_t_x aFuncPtr = (glXSwapIntervalEXT_t_x )(void*)myFuncs->glXSwapIntervalEXT;
|
||||
aFuncPtr ((Display* )myDisplay, (GLXDrawable )myWindow, theInterval);
|
||||
return Standard_True;
|
||||
}
|
||||
|
@@ -94,9 +94,8 @@ Handle(Standard_Transient) Plugin::Load (const Standard_GUID& aGUID,
|
||||
}
|
||||
else
|
||||
f = theMapOfFunctions(pid);
|
||||
|
||||
Standard_Transient* (*fp) (const Standard_GUID&) = NULL;
|
||||
fp = (Standard_Transient* (*)(const Standard_GUID&)) f;
|
||||
fp = (Standard_Transient* (*)(const Standard_GUID&))(void*)f;
|
||||
Handle(Standard_Transient) theServiceFactory = (*fp) (aGUID);
|
||||
return theServiceFactory;
|
||||
|
||||
|
@@ -2134,12 +2134,11 @@ Standard_Boolean readPMIPresentation(const Handle(Standard_Transient)& thePresen
|
||||
return Standard_False;
|
||||
}
|
||||
Handle(Transfer_TransientProcess) aTP = theTR->TransientProcess();
|
||||
Handle(StepVisual_StyledItem) anAO;
|
||||
Handle(StepVisual_AnnotationOccurrence) anAO;
|
||||
NCollection_Vector<Handle(StepVisual_StyledItem)> anAnnotations;
|
||||
if (thePresentEntity->IsKind(STANDARD_TYPE(StepVisual_AnnotationOccurrence)) ||
|
||||
thePresentEntity->IsKind(STANDARD_TYPE(StepVisual_TessellatedAnnotationOccurrence)))
|
||||
if (thePresentEntity->IsKind(STANDARD_TYPE(StepVisual_AnnotationOccurrence)))
|
||||
{
|
||||
anAO = Handle(StepVisual_StyledItem)::DownCast(thePresentEntity);
|
||||
anAO = Handle(StepVisual_AnnotationOccurrence)::DownCast(thePresentEntity);
|
||||
if (!anAO.IsNull())
|
||||
{
|
||||
thePresentName = anAO->Name();
|
||||
@@ -4369,8 +4368,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadGDTs(const Handle(XSControl_WorkSess
|
||||
}
|
||||
}
|
||||
else if (anEnt->IsKind(STANDARD_TYPE(StepVisual_DraughtingCallout)) ||
|
||||
anEnt->IsKind(STANDARD_TYPE(StepVisual_AnnotationOccurrence)) ||
|
||||
anEnt->IsKind(STANDARD_TYPE(StepVisual_TessellatedAnnotationOccurrence)))
|
||||
anEnt->IsKind(STANDARD_TYPE(StepVisual_AnnotationOccurrence)))
|
||||
{
|
||||
// Protection against import presentation twice
|
||||
Handle(StepVisual_DraughtingCallout) aDC;
|
||||
|
@@ -44,10 +44,11 @@ Standard_Failure::StringRef* Standard_Failure::StringRef::allocate_message (cons
|
||||
}
|
||||
|
||||
const Standard_Size aLen = strlen (theString);
|
||||
StringRef* aStrPtr = (StringRef* )malloc (aLen + sizeof(Standard_Integer) + 1);
|
||||
StringRef* aStrPtr = (StringRef* )Standard::AllocateOptimal (aLen + sizeof(Standard_Integer) + 1);
|
||||
if (aStrPtr != NULL)
|
||||
{
|
||||
strcpy ((char* )&aStrPtr->Message[0], theString);
|
||||
strncpy ((char* )&aStrPtr->Message[0], theString, aLen);
|
||||
((char* )&aStrPtr->Message[0])[aLen] = '\0';
|
||||
aStrPtr->Counter = 1;
|
||||
}
|
||||
return aStrPtr;
|
||||
@@ -78,7 +79,7 @@ void Standard_Failure::StringRef::deallocate_message (Standard_Failure::StringRe
|
||||
{
|
||||
if (--theString->Counter == 0)
|
||||
{
|
||||
free ((void* )theString);
|
||||
Standard::Free((void* )theString);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -151,7 +151,8 @@ void StepFile_ReadData::CreateNewText(const char* theNewText, int theLenText)
|
||||
strcpy(myResText + (int)strlen(anOldResText), theNewText);
|
||||
return;
|
||||
}
|
||||
strcpy(myResText, theNewText);
|
||||
strncpy(myResText, theNewText, aLength);
|
||||
myResText[aLength] = '\0';
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@@ -298,7 +298,6 @@ void Units_UnitsDictionary::Creates()
|
||||
}
|
||||
|
||||
if(unit2[0]) {
|
||||
j = 0;
|
||||
for(j=1;j<=theunitssequence->Length();j++)
|
||||
if(theunitssequence->Value(j) == unit2)break;
|
||||
|
||||
|
@@ -52,7 +52,7 @@ void math_BissecNewton::Perform(math_FunctionWithDerivative& F,
|
||||
Standard_Boolean GOOD;
|
||||
Standard_Integer j;
|
||||
Standard_Real dxold, fh, fl;
|
||||
Standard_Real swap, temp, xh, xl;
|
||||
Standard_Real xh, xl;
|
||||
|
||||
GOOD = F.Values(Bound1, fl, df);
|
||||
if(!GOOD) {
|
||||
@@ -83,9 +83,6 @@ void math_BissecNewton::Perform(math_FunctionWithDerivative& F,
|
||||
else {
|
||||
xl = Bound2;
|
||||
xh = Bound1;
|
||||
swap = fl;
|
||||
fl = fh;
|
||||
fh = swap;
|
||||
}
|
||||
// Modified by Sergey KHROMOV - Wed Jan 22 12:06:49 2003 End
|
||||
x = 0.5 * (Bound1 + Bound2);
|
||||
@@ -112,7 +109,7 @@ void math_BissecNewton::Perform(math_FunctionWithDerivative& F,
|
||||
else {
|
||||
dxold = dx;
|
||||
dx = f / df;
|
||||
temp = x;
|
||||
Standard_Real temp = x;
|
||||
x -= dx;
|
||||
if(temp == x) {
|
||||
TheStatus = math_OK;
|
||||
@@ -133,11 +130,9 @@ void math_BissecNewton::Perform(math_FunctionWithDerivative& F,
|
||||
}
|
||||
if(f < 0.0) {
|
||||
xl = x;
|
||||
fl = f;
|
||||
}
|
||||
else if(f > 0.0) {
|
||||
xh = x;
|
||||
fh = f;
|
||||
}
|
||||
else {
|
||||
TheStatus = math_OK;
|
||||
|
@@ -92,7 +92,6 @@ void math_NewtonMinimum::Perform(math_MultipleVarFunctionWithHessian& F,
|
||||
math_Vector Point2(1, F.NbVariables());
|
||||
math_Vector* precedent = &Point1;
|
||||
math_Vector* suivant = &Point2;
|
||||
math_Vector* auxiliaire = precedent;
|
||||
|
||||
Standard_Boolean Ok = Standard_True;
|
||||
Standard_Integer NbConv = 0, ii, Nreduction;
|
||||
@@ -234,9 +233,7 @@ void math_NewtonMinimum::Perform(math_MultipleVarFunctionWithHessian& F,
|
||||
}
|
||||
|
||||
if (VItere <= VPrecedent) {
|
||||
auxiliaire = precedent;
|
||||
precedent = suivant;
|
||||
suivant = auxiliaire;
|
||||
std::swap(precedent, suivant);
|
||||
PreviousMinimum = VPrecedent;
|
||||
TheMinimum = VItere;
|
||||
Ok = (nbiter < Itermax);
|
||||
|
@@ -1,14 +0,0 @@
|
||||
puts "========================"
|
||||
puts "0033394: Modeling Algorithms - Wrong usage of BRepClass_FaceClassifier with 3d tolerance"
|
||||
puts "========================"
|
||||
puts ""
|
||||
|
||||
pload MODELING
|
||||
restore [locate_data_file bug33394.brep] fb
|
||||
vertex vert 1016.3915670000133 17180 -5689.3758362036951
|
||||
distmini aa fb vert
|
||||
set tolerance [checkmaxtol aa]
|
||||
|
||||
if { [dval aa_val] > ${tolerance} } {
|
||||
puts "Error: The distance should be 0"
|
||||
}
|
@@ -3,12 +3,12 @@ set filename bug29362_MMT200.stp
|
||||
|
||||
set ref_data {
|
||||
|
||||
NbOfDimensions : 4
|
||||
NbOfDimensions : 2
|
||||
NbOfDimensionalSize : 1
|
||||
NbOfDimensionalLocation: 1
|
||||
NbOfAngular : 0
|
||||
NbOfWithPath : 0
|
||||
NbOfCommonLabels : 1
|
||||
NbOfCommonLabels : 0
|
||||
NbOfTolerances : 0
|
||||
NbOfGTWithModifiers : 0
|
||||
NbOfGTWithMaxTolerance : 0
|
||||
|
@@ -1,92 +0,0 @@
|
||||
# !!!! This file is generated automatically, do not edit manually! See end script
|
||||
set filename bug33661_nist_ftc_08_asme1_ap242-e1-tg.stp
|
||||
|
||||
set ref_data {
|
||||
|
||||
NbOfDimensions : 60
|
||||
NbOfTolerances : 0
|
||||
NbOfDatumFeature : 0
|
||||
NbOfAttachedDatum : 0
|
||||
NbOfDatumTarget : 0
|
||||
|
||||
0:1:1:2:1 Shape.4
|
||||
0:1:4:32 Dimension.4.1 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:1:2:2 Shape.5
|
||||
0:1:4:4 Dimension.5.1 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:4:5 Dimension.5.2 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:1:2:4 Shape.7
|
||||
0:1:4:14 Dimension.7.1 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:4:18 Dimension.7.2 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:4:20 Dimension.7.3 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:1:2:14 Shape.17
|
||||
0:1:4:27 Dimension.17.1 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:1:2:62 Shape.65
|
||||
0:1:4:35 Dimension.65.1 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:1:2:65 Shape.68
|
||||
0:1:4:36 Dimension.68.1 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:1:2:72 Shape.75
|
||||
0:1:4:53 Dimension.75.1 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:1:2:84 Shape.87
|
||||
0:1:4:54 Dimension.87.1 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:1:2:90 Shape.93
|
||||
0:1:4:31 Dimension.93.1 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:4:33 Dimension.93.2 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:4:34 Dimension.93.3 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:1:2:94 Shape.97
|
||||
0:1:4:39 Dimension.97.1 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:4:40 Dimension.97.2 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:4:51 Dimension.97.3 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:4:52 Dimension.97.4 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:4:55 Dimension.97.5 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:1:2:96 Shape.99
|
||||
0:1:4:43 Dimension.99.1 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:4:44 Dimension.99.2 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:4:45 Dimension.99.3 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:4:46 Dimension.99.4 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:4:57 Dimension.99.5 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:1:2:98 Shape.101
|
||||
0:1:4:47 Dimension.101.1 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:4:48 Dimension.101.2 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:4:49 Dimension.101.3 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:4:50 Dimension.101.4 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:4:56 Dimension.101.5 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:1:2:100 Shape.103
|
||||
0:1:4:37 Dimension.103.1 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:4:38 Dimension.103.2 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:4:41 Dimension.103.3 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:4:42 Dimension.103.4 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:4:58 Dimension.103.5 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:1:2:102 Shape.105
|
||||
0:1:4:25 Dimension.105.1 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:4:26 Dimension.105.2 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:1:2:116 Shape.119
|
||||
0:1:4:24 Dimension.119.1 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:1:2:120 Shape.123
|
||||
0:1:4:23 Dimension.123.1 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:1:2:161 Shape.164
|
||||
0:1:4:15 Dimension.164.1 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:1:2:179 Shape.182
|
||||
0:1:4:1 Dimension.182.1 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:4:2 Dimension.182.2 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:4:3 Dimension.182.3 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:1:2:237 Shape.240
|
||||
0:1:4:17 Dimension.240.1 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:4:19 Dimension.240.2 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:1:2:246 Shape.249
|
||||
0:1:4:6 Dimension.249.1 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:4:8 Dimension.249.2 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:4:9 Dimension.249.3 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:1:2:248 Shape.251
|
||||
0:1:4:7 Dimension.251.1 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:4:10 Dimension.251.2 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:4:11 Dimension.251.3 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:1:2:250 Shape.253
|
||||
0:1:4:12 Dimension.253.1 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:4:13 Dimension.253.2 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:1:2:256 Shape.259
|
||||
0:1:4:28 Dimension.259.1 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:4:29 Dimension.259.2 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:4:30 Dimension.259.3 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
0:1:1:3:1 Shape.276
|
||||
0:1:4:16 Dimension.276.1 ( N "DGT:Dimension" T 31, V 0, P 0 )
|
||||
}
|
@@ -2,13 +2,7 @@
|
||||
set filename bug29362_MMT200.stp
|
||||
|
||||
set ref_data {
|
||||
Centre of mass: 13.412719368151439 6.1818909424750705 -13.415402720911091
|
||||
Mass: 252.25931515680639
|
||||
|
||||
}
|
||||
|
||||
set ref_data_write {
|
||||
Centre of mass: 13.412719368151233 6.1818909424748316 -13.415402720907935
|
||||
Mass: 252.25931515678892
|
||||
Centre of mass: 0 0 0
|
||||
Mass: 0
|
||||
|
||||
}
|
||||
|
@@ -1,16 +0,0 @@
|
||||
# !!!! This file is generated automatically, do not edit manually! See end script
|
||||
puts "TODO CR11111 ALL: Error on writing file"
|
||||
|
||||
set filename bug33661_nist_ftc_08_asme1_ap242-e1-tg.stp
|
||||
|
||||
set ref_data {
|
||||
Centre of mass: -62.99891835601813 78.203476181663817 20.269103705327481
|
||||
Mass: 47784.542040997127
|
||||
|
||||
}
|
||||
|
||||
set ref_data_write {
|
||||
Centre of mass: -261.12759307366923 196.9986700086933 -13.86055926862322
|
||||
Mass: 17568.06377585962
|
||||
|
||||
}
|
Reference in New Issue
Block a user