mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +03:00
Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
feff48e050 | ||
|
359edc7d8a | ||
|
f9998f03ad | ||
|
c479c4f6d8 | ||
|
c51df6bfd2 | ||
|
5e43274280 | ||
|
efe960751c | ||
|
6b9e0dc3f8 | ||
|
2ef94c994e | ||
|
1dd4b902c0 | ||
|
a846d36326 |
@@ -103,7 +103,7 @@ public:
|
||||
private:
|
||||
|
||||
Quantity_NameOfColor myCol;
|
||||
Standard_Real myWid;
|
||||
Standard_Real myWid{};
|
||||
Standard_Boolean hasC;
|
||||
Standard_Boolean hasW;
|
||||
|
||||
|
@@ -14,6 +14,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <AIS_Axis.hxx>
|
||||
|
||||
#include <Aspect_TypeOfLine.hxx>
|
||||
@@ -71,7 +73,7 @@ myTypeOfAxis(anAxisType),
|
||||
myIsXYZAxis(Standard_True)
|
||||
{
|
||||
Handle (Prs3d_DatumAspect) DA = new Prs3d_DatumAspect();
|
||||
Standard_Real aLength;
|
||||
Standard_Real aLength = NAN;
|
||||
try {
|
||||
aLength = UnitsAPI::AnyToLS(100. ,"mm");
|
||||
} catch (Standard_Failure const&) {
|
||||
@@ -112,11 +114,11 @@ AIS_Axis::AIS_Axis(const Handle(Geom_Axis1Placement)& anAxis)
|
||||
//=======================================================================
|
||||
AIS_Axis::AIS_Axis (const gp_Ax1& theAxis, const Standard_Real theLength)
|
||||
: myComponent (new Geom_Line (theAxis)),
|
||||
myTypeOfAxis (AIS_TOAX_ZAxis),
|
||||
myIsXYZAxis (Standard_True)
|
||||
myPfirst(theAxis.Location()), myTypeOfAxis (AIS_TOAX_ZAxis),
|
||||
myIsXYZAxis (Standard_True), myDir(theAxis.Direction())
|
||||
{
|
||||
myDir = theAxis.Direction();
|
||||
myPfirst = theAxis.Location();
|
||||
|
||||
|
||||
if (theLength <= 0 && theLength != -1)
|
||||
{
|
||||
throw Standard_NumericError ("AIS_Axis::AIS_Axis : invalid value for theLength parameter");
|
||||
@@ -274,7 +276,7 @@ void AIS_Axis::ComputeFields()
|
||||
const gp_Dir& oX = anAxis.XDirection();
|
||||
const gp_Dir& oY = anAxis.YDirection();
|
||||
const gp_Dir& oZ = anAxis.Direction();
|
||||
Standard_Real xo,yo,zo,x = 0.,y = 0.,z = 0.;
|
||||
Standard_Real xo = NAN,yo = NAN,zo = NAN,x = 0.,y = 0.,z = 0.;
|
||||
Orig.Coord(xo,yo,zo);
|
||||
myPfirst.SetCoord(xo,yo,zo);
|
||||
|
||||
|
@@ -124,8 +124,8 @@ private:
|
||||
AIS_TypeOfAxis myTypeOfAxis;
|
||||
Standard_Boolean myIsXYZAxis;
|
||||
gp_Dir myDir;
|
||||
Standard_Real myVal;
|
||||
Standard_CString myText;
|
||||
Standard_Real myVal{};
|
||||
Standard_CString myText{};
|
||||
Handle(Prs3d_LineAspect) myLineAspect;
|
||||
|
||||
};
|
||||
|
@@ -28,9 +28,9 @@ IMPLEMENT_STANDARD_RTTIEXT(AIS_BadEdgeFilter,SelectMgr_Filter)
|
||||
//function : AIS_BadEdgeFilter
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
AIS_BadEdgeFilter::AIS_BadEdgeFilter()
|
||||
AIS_BadEdgeFilter::AIS_BadEdgeFilter() : myContour(0)
|
||||
{
|
||||
myContour=0;
|
||||
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@@ -37,7 +37,7 @@ AIS_C0RegularityFilter::AIS_C0RegularityFilter(const TopoDS_Shape& aShape)
|
||||
{
|
||||
TopTools_IndexedDataMapOfShapeListOfShape SubShapes;
|
||||
TopExp::MapShapesAndAncestors(aShape,TopAbs_EDGE,TopAbs_FACE,SubShapes);
|
||||
Standard_Boolean Ok;
|
||||
Standard_Boolean Ok = 0;
|
||||
for (Standard_Integer i = 1; i <= SubShapes.Extent(); i++) {
|
||||
Ok = Standard_False;
|
||||
TopTools_ListIteratorOfListOfShape it(SubShapes(i));
|
||||
@@ -56,7 +56,7 @@ AIS_C0RegularityFilter::AIS_C0RegularityFilter(const TopoDS_Shape& aShape)
|
||||
}
|
||||
}
|
||||
if (Ok) {
|
||||
TopoDS_Shape curEdge = SubShapes.FindKey( i );
|
||||
const TopoDS_Shape& curEdge = SubShapes.FindKey( i );
|
||||
myMapOfEdges.Add(curEdge);
|
||||
}
|
||||
}
|
||||
|
@@ -511,7 +511,7 @@ void AIS_InteractiveContext::Load (const Handle(AIS_InteractiveObject)& theIObj,
|
||||
setContextToObject (theIObj);
|
||||
if (!myObjects.IsBound (theIObj))
|
||||
{
|
||||
Standard_Integer aDispMode, aHiMod, aSelModeDef;
|
||||
Standard_Integer aDispMode = 0, aHiMod = 0, aSelModeDef = 0;
|
||||
GetDefModes (theIObj, aDispMode, aHiMod, aSelModeDef);
|
||||
setObjectStatus (theIObj, PrsMgr_DisplayStatus_Erased, aDispMode, theSelMode != -1 ? theSelMode : aSelModeDef);
|
||||
theIObj->ViewAffinity()->SetVisible (true); // reset view affinity mask
|
||||
@@ -945,7 +945,7 @@ void AIS_InteractiveContext::Redisplay (const AIS_KindOfInteractive theKOI,
|
||||
Standard_Boolean isRedisplayed = Standard_False;
|
||||
for (AIS_DataMapIteratorOfDataMapOfIOStatus anObjIter (myObjects); anObjIter.More(); anObjIter.Next())
|
||||
{
|
||||
Handle(AIS_InteractiveObject) anObj = anObjIter.Key();
|
||||
const Handle(AIS_InteractiveObject)& anObj = anObjIter.Key();
|
||||
if (anObj->Type() != theKOI)
|
||||
{
|
||||
continue;
|
||||
@@ -1155,7 +1155,7 @@ void AIS_InteractiveContext::SetDisplayMode(const Standard_Integer theMode,
|
||||
continue;
|
||||
}
|
||||
|
||||
Handle(AIS_GlobalStatus) aStatus = anObjIter.Value();
|
||||
const Handle(AIS_GlobalStatus)& aStatus = anObjIter.Value();
|
||||
aStatus->SetDisplayMode (theMode);
|
||||
|
||||
if (anObj->DisplayStatus() == PrsMgr_DisplayStatus_Displayed)
|
||||
@@ -2251,7 +2251,7 @@ Bnd_Box AIS_InteractiveContext::BoundingBoxOfSelection (const Handle(V3d_View)&
|
||||
|
||||
for (AIS_MapIteratorOfMapOfObjectOwners anIter (anObjectOwnerMap); anIter.More(); anIter.Next())
|
||||
{
|
||||
const Handle(SelectMgr_SelectableObject) anObject = anIter.Key();
|
||||
const Handle(SelectMgr_SelectableObject)& anObject = anIter.Key();
|
||||
Bnd_Box aTmpBox = anObject->BndBoxOfSelected (anIter.ChangeValue());
|
||||
aBndSelected.Add (aTmpBox);
|
||||
}
|
||||
@@ -3228,6 +3228,30 @@ void AIS_InteractiveContext::ClearSelected (const Standard_Boolean theToUpdateVi
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : isDetected
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean AIS_InteractiveContext::isDetected (const Handle(AIS_InteractiveObject)& theObject)
|
||||
{
|
||||
for (Standard_Integer aDetIter = myDetectedSeq.Lower(); aDetIter <= myDetectedSeq.Upper(); aDetIter++)
|
||||
{
|
||||
Handle(SelectMgr_EntityOwner) aPicked = MainSelector()->Picked(myDetectedSeq(aDetIter));
|
||||
Handle(AIS_InteractiveObject) anObj;
|
||||
if (!aPicked.IsNull())
|
||||
{
|
||||
anObj = Handle(AIS_InteractiveObject)::DownCast(aPicked->Selectable());
|
||||
}
|
||||
|
||||
if (!anObj.IsNull()
|
||||
&& anObj == theObject)
|
||||
{
|
||||
return Standard_True;
|
||||
}
|
||||
}
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetSelected
|
||||
//purpose : Sets the whole object as selected and highlights it with selection color
|
||||
@@ -3288,7 +3312,8 @@ void AIS_InteractiveContext::SetSelected (const Handle(AIS_InteractiveObject)& t
|
||||
}
|
||||
|
||||
// added to avoid untimely viewer update...
|
||||
mySelection->ClearAndSelect (anOwner);
|
||||
const Handle(AIS_InteractiveObject) anObj = Handle(AIS_InteractiveObject)::DownCast (anOwner->Selectable());
|
||||
mySelection->ClearAndSelect (anOwner, myFilters, isDetected (anObj));
|
||||
|
||||
if (myAutoHilight)
|
||||
{
|
||||
@@ -3350,7 +3375,7 @@ void AIS_InteractiveContext::SetSelected (const Handle(SelectMgr_EntityOwner)& t
|
||||
unhighlightSelected();
|
||||
}
|
||||
|
||||
mySelection->ClearAndSelect (theOwner);
|
||||
mySelection->ClearAndSelect (theOwner, myFilters, isDetected (anObject));
|
||||
if (myAutoHilight)
|
||||
{
|
||||
Handle(Prs3d_Drawer) aCustomStyle;
|
||||
@@ -3401,16 +3426,17 @@ void AIS_InteractiveContext::AddOrRemoveSelected (const Handle(SelectMgr_EntityO
|
||||
return;
|
||||
}
|
||||
|
||||
if (!myFilters->IsOk(theOwner) && !theOwner->IsSelected())
|
||||
if (!myFilters->IsOk (theOwner) && !theOwner->IsSelected())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
mySelection->Select (theOwner);
|
||||
AIS_SelectionScheme aSelScheme = theOwner->IsSelected() ? AIS_SelectionScheme_Remove : AIS_SelectionScheme_Add;
|
||||
const Handle(AIS_InteractiveObject) anObj = Handle(AIS_InteractiveObject)::DownCast (theOwner->Selectable());
|
||||
mySelection->Select (theOwner, myFilters, aSelScheme, isDetected (anObj));
|
||||
|
||||
if (myAutoHilight)
|
||||
{
|
||||
const Handle(AIS_InteractiveObject) anObj = Handle(AIS_InteractiveObject)::DownCast (theOwner->Selectable());
|
||||
Handle(AIS_GlobalStatus)* aStatusPtr = myObjects.ChangeSeek (anObj);
|
||||
if (!aStatusPtr)
|
||||
{
|
||||
@@ -3469,7 +3495,8 @@ Standard_Boolean AIS_InteractiveContext::SetSelectedState (const Handle(SelectMg
|
||||
}
|
||||
else
|
||||
{
|
||||
const AIS_SelectStatus aSelStatus = mySelection->Select (theEntity);
|
||||
const Handle(AIS_InteractiveObject) anObj = Handle(AIS_InteractiveObject)::DownCast(theEntity->Selectable());
|
||||
const AIS_SelectStatus aSelStatus = mySelection->Select (theEntity, myFilters, AIS_SelectionScheme_Remove, isDetected (anObj));
|
||||
theEntity->SetSelected (false);
|
||||
return aSelStatus == AIS_SS_Removed;
|
||||
}
|
||||
|
@@ -1302,6 +1302,9 @@ protected: //! @name internal methods
|
||||
Standard_EXPORT AIS_StatusOfDetection moveTo (const Handle(V3d_View)& theView,
|
||||
const Standard_Boolean theToRedrawOnUpdate);
|
||||
|
||||
//! Returns True if the object is detected.
|
||||
Standard_EXPORT Standard_Boolean isDetected (const Handle(AIS_InteractiveObject)& theObject);
|
||||
|
||||
//! Helper function to unhighlight all entity owners currently highlighted with seleciton color.
|
||||
Standard_EXPORT void unselectOwners (const Handle(AIS_InteractiveObject)& theObject);
|
||||
|
||||
@@ -1450,7 +1453,7 @@ protected: //! @name internal fields
|
||||
Handle(SelectMgr_SelectionManager) mgrSelector;
|
||||
Handle(PrsMgr_PresentationManager) myMainPM;
|
||||
Handle(V3d_Viewer) myMainVwr;
|
||||
V3d_View* myLastActiveView;
|
||||
V3d_View* myLastActiveView{};
|
||||
Handle(SelectMgr_EntityOwner) myLastPicked;
|
||||
Standard_Boolean myToHilightSelected;
|
||||
Handle(AIS_Selection) mySelection;
|
||||
|
@@ -256,7 +256,7 @@ protected:
|
||||
Handle(Graphic3d_AspectLine3d) myArrowLineAspectShadow; //!< arrow shadow style
|
||||
Handle(Graphic3d_MarkerImage) myMarkerImages[2]; //!< icon of disabled (0) and enabled (1) light
|
||||
Handle(Select3D_SensitiveSphere) mySensSphere; //!< sensitive sphere of directional light source
|
||||
Aspect_TypeOfMarker myMarkerTypes[2]; //!< icon of disabled (0) and enabled (1) light
|
||||
Aspect_TypeOfMarker myMarkerTypes[2]{}; //!< icon of disabled (0) and enabled (1) light
|
||||
Aspect_TypeOfMarker myCodirMarkerType; //!< icon of arrow co-directional to camera direction (look from)
|
||||
Aspect_TypeOfMarker myOpposMarkerType; //!< icon of arrow opposite to camera direction (look at)
|
||||
|
||||
|
@@ -89,7 +89,7 @@ namespace
|
||||
ManipSensRotation (theCircle.Position().Direction()) {}
|
||||
|
||||
//! Checks whether the circle overlaps current selecting volume
|
||||
virtual Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr,
|
||||
Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr,
|
||||
SelectBasics_PickResult& thePickResult) Standard_OVERRIDE
|
||||
{
|
||||
return isValidRay (theMgr)
|
||||
@@ -108,7 +108,7 @@ namespace
|
||||
ManipSensRotation (thePlaneNormal) {}
|
||||
|
||||
//! Checks whether the circle overlaps current selecting volume
|
||||
virtual Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr,
|
||||
Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr,
|
||||
SelectBasics_PickResult& thePickResult) Standard_OVERRIDE
|
||||
{
|
||||
return isValidRay (theMgr)
|
||||
|
@@ -14,6 +14,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <AIS_Plane.hxx>
|
||||
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
@@ -421,7 +423,7 @@ void AIS_Plane::SetMinimumSize (const Standard_Real theValue)
|
||||
UnsetMinimumSize();
|
||||
return;
|
||||
}
|
||||
Standard_Real aX, anY;
|
||||
Standard_Real aX = NAN, anY = NAN;
|
||||
Size (aX, anY);
|
||||
SetTransformPersistence (new Graphic3d_TransformPersScaledAbove (Min (aX, anY) / theValue, myCenter));
|
||||
}
|
||||
@@ -518,7 +520,7 @@ void AIS_Plane::ComputeFrame()
|
||||
{
|
||||
|
||||
const Handle(Geom_Plane)& pl = myComponent;
|
||||
Standard_Real U,V;
|
||||
Standard_Real U = NAN,V = NAN;
|
||||
|
||||
if (myAutomaticPosition) {
|
||||
ElSLib::Parameters(pl->Pln(),myCenter,U,V);
|
||||
@@ -551,7 +553,7 @@ void AIS_Plane::ComputeFields()
|
||||
gp_Dir oY = myAx2->Ax2().YDirection();
|
||||
gp_Dir oZ = myAx2->Ax2().Direction();
|
||||
myCenter = Orig;
|
||||
Standard_Real xo,yo,zo,x1,y1,z1,x2,y2,z2,x3,y3,z3,x4=0,y4=0,z4=0;
|
||||
Standard_Real xo = NAN,yo = NAN,zo = NAN,x1 = NAN,y1 = NAN,z1 = NAN,x2 = NAN,y2 = NAN,z2 = NAN,x3 = NAN,y3 = NAN,z3 = NAN,x4=0,y4=0,z4=0;
|
||||
Standard_Real x5=0,y5=0,z5=0;
|
||||
Orig.Coord(xo,yo,zo);
|
||||
oX.Coord(x1,y1,z1);
|
||||
|
@@ -169,7 +169,7 @@ private:
|
||||
Standard_Boolean myAutomaticPosition;
|
||||
AIS_TypeOfPlane myTypeOfPlane;
|
||||
Standard_Boolean myIsXYZPlane;
|
||||
Standard_Boolean myHasOwnSize;
|
||||
Standard_Boolean myHasOwnSize{};
|
||||
Select3D_TypeOfSensitivity myTypeOfSensitivity;
|
||||
|
||||
};
|
||||
|
@@ -18,6 +18,8 @@
|
||||
// + (-1) selection mode token into account
|
||||
// (SAMTECH specific)
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <AIS_Line.hxx>
|
||||
#include <AIS_PlaneTrihedron.hxx>
|
||||
#include <AIS_Point.hxx>
|
||||
@@ -153,7 +155,7 @@ void AIS_PlaneTrihedron::Compute (const Handle(PrsMgr_PresentationManager)& ,
|
||||
gp_Dir xDir = myPlane->Position().Ax2().XDirection();
|
||||
|
||||
gp_Pnt orig = myPlane->Position().Ax2().Location();
|
||||
Standard_Real xo,yo,zo,x,y,z;
|
||||
Standard_Real xo = NAN,yo = NAN,zo = NAN,x = NAN,y = NAN,z = NAN;
|
||||
orig.Coord( xo, yo, zo );
|
||||
xDir.Coord( x, y, z );
|
||||
first.SetCoord( xo, yo, zo );
|
||||
@@ -188,7 +190,7 @@ void AIS_PlaneTrihedron::Compute (const Handle(PrsMgr_PresentationManager)& ,
|
||||
void AIS_PlaneTrihedron::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
|
||||
const Standard_Integer aMode)
|
||||
{
|
||||
Standard_Integer Prior;
|
||||
Standard_Integer Prior = 0;
|
||||
Handle(SelectMgr_EntityOwner) eown;
|
||||
TColgp_Array1OfPnt PP(1,4),PO(1,4);
|
||||
// ExtremityPoints(PP);
|
||||
|
@@ -55,24 +55,38 @@ void AIS_Selection::Clear()
|
||||
//function : Select
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
AIS_SelectStatus AIS_Selection::Select (const Handle(SelectMgr_EntityOwner)& theObject)
|
||||
AIS_SelectStatus AIS_Selection::Select (const Handle(SelectMgr_EntityOwner)& theOwner,
|
||||
const Handle(SelectMgr_Filter)& theFilter,
|
||||
const AIS_SelectionScheme theSelScheme,
|
||||
const Standard_Boolean theIsDetected)
|
||||
{
|
||||
if (theObject.IsNull()
|
||||
|| !theObject->HasSelectable())
|
||||
if (theOwner.IsNull()
|
||||
|| !theOwner->HasSelectable())
|
||||
{
|
||||
return AIS_SS_NotDone;
|
||||
}
|
||||
|
||||
if (!myResultMap.IsBound (theObject))
|
||||
const Standard_Boolean isDetected = theIsDetected
|
||||
&& (theFilter.IsNull() || theFilter->IsOk (theOwner));
|
||||
|
||||
const Standard_Boolean wasSelected = theOwner->IsSelected();
|
||||
const Standard_Boolean toSelect = theOwner->Select (theSelScheme, isDetected);
|
||||
|
||||
if (toSelect && !wasSelected)
|
||||
{
|
||||
AIS_NListOfEntityOwner::Iterator aListIter;
|
||||
myresult.Append (theObject, aListIter);
|
||||
myResultMap.Bind (theObject, aListIter);
|
||||
theObject->SetSelected (Standard_True);
|
||||
myresult.Append (theOwner, aListIter);
|
||||
myResultMap.Bind (theOwner, aListIter);
|
||||
theOwner->SetSelected (Standard_True);
|
||||
return AIS_SS_Added;
|
||||
}
|
||||
|
||||
AIS_NListOfEntityOwner::Iterator aListIter = myResultMap.Find (theObject);
|
||||
if (!toSelect && !wasSelected)
|
||||
{
|
||||
return AIS_SS_NotDone;
|
||||
}
|
||||
|
||||
AIS_NListOfEntityOwner::Iterator aListIter = myResultMap.Find (theOwner);
|
||||
if (myIterator == aListIter)
|
||||
{
|
||||
if (myIterator.More())
|
||||
@@ -88,14 +102,14 @@ AIS_SelectStatus AIS_Selection::Select (const Handle(SelectMgr_EntityOwner)& the
|
||||
// In the mode of advanced mesh selection only one owner is created for all selection modes.
|
||||
// It is necessary to check the current detected entity
|
||||
// and remove the owner from map only if the detected entity is the same as previous selected (IsForcedHilight call)
|
||||
if (theObject->IsForcedHilight())
|
||||
if (theOwner->IsForcedHilight())
|
||||
{
|
||||
return AIS_SS_Added;
|
||||
}
|
||||
|
||||
myresult.Remove (aListIter);
|
||||
myResultMap.UnBind (theObject);
|
||||
theObject->SetSelected (Standard_False);
|
||||
myResultMap.UnBind (theOwner);
|
||||
theOwner->SetSelected (Standard_False);
|
||||
|
||||
// update list iterator for next object in <myresult> list if any
|
||||
if (aListIter.More())
|
||||
@@ -142,86 +156,39 @@ void AIS_Selection::SelectOwners (const AIS_NArray1OfEntityOwner& thePickedOwner
|
||||
const Standard_Boolean theToAllowSelOverlap,
|
||||
const Handle(SelectMgr_Filter)& theFilter)
|
||||
{
|
||||
(void )theToAllowSelOverlap;
|
||||
switch (theSelScheme)
|
||||
(void)theToAllowSelOverlap;
|
||||
|
||||
if (theSelScheme == AIS_SelectionScheme_ReplaceExtra
|
||||
&& thePickedOwners.Size() == myresult.Size())
|
||||
{
|
||||
case AIS_SelectionScheme_UNKNOWN:
|
||||
// If picked owners is equivalent to the selected then just clear selected.
|
||||
Standard_Boolean isTheSame = Standard_True;
|
||||
for (AIS_NArray1OfEntityOwner::Iterator aPickedIter (thePickedOwners); aPickedIter.More(); aPickedIter.Next())
|
||||
{
|
||||
return;
|
||||
}
|
||||
case AIS_SelectionScheme_ReplaceExtra:
|
||||
{
|
||||
// If picked owners is equivalent to the selected then just clear selected
|
||||
// Else go to AIS_SelectionScheme_Replace
|
||||
if (thePickedOwners.Size() == myresult.Size())
|
||||
if (!myResultMap.IsBound (aPickedIter.Value()))
|
||||
{
|
||||
Standard_Boolean isTheSame = Standard_True;
|
||||
for (AIS_NArray1OfEntityOwner::Iterator aSelIter (thePickedOwners); aSelIter.More(); aSelIter.Next())
|
||||
{
|
||||
if (!myResultMap.IsBound (aSelIter.Value()))
|
||||
{
|
||||
isTheSame = Standard_False;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (isTheSame)
|
||||
{
|
||||
Clear();
|
||||
return;
|
||||
}
|
||||
isTheSame = Standard_False;
|
||||
break;
|
||||
}
|
||||
}
|
||||
Standard_FALLTHROUGH
|
||||
case AIS_SelectionScheme_Replace:
|
||||
if (isTheSame)
|
||||
{
|
||||
Clear();
|
||||
for (AIS_NArray1OfEntityOwner::Iterator aSelIter (thePickedOwners); aSelIter.More(); aSelIter.Next())
|
||||
{
|
||||
appendOwner (aSelIter.Value(), theFilter);
|
||||
}
|
||||
Clear();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
case AIS_SelectionScheme_Add:
|
||||
{
|
||||
for (AIS_NArray1OfEntityOwner::Iterator aSelIter (thePickedOwners); aSelIter.More(); aSelIter.Next())
|
||||
{
|
||||
appendOwner (aSelIter.Value(), theFilter);
|
||||
}
|
||||
return;
|
||||
}
|
||||
case AIS_SelectionScheme_Remove:
|
||||
{
|
||||
for (AIS_NArray1OfEntityOwner::Iterator aSelIter (thePickedOwners); aSelIter.More(); aSelIter.Next())
|
||||
{
|
||||
if (myResultMap.IsBound (aSelIter.Value()))
|
||||
{
|
||||
Select (aSelIter.Value());
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
case AIS_SelectionScheme_XOR:
|
||||
{
|
||||
for (AIS_NArray1OfEntityOwner::Iterator aSelIter (thePickedOwners); aSelIter.More(); aSelIter.Next())
|
||||
{
|
||||
const Handle(SelectMgr_EntityOwner)& anOwner = aSelIter.Value();
|
||||
if (anOwner.IsNull()
|
||||
|| !anOwner->HasSelectable()
|
||||
|| !theFilter->IsOk (anOwner))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (theSelScheme == AIS_SelectionScheme_Replace
|
||||
|| theSelScheme == AIS_SelectionScheme_ReplaceExtra
|
||||
|| theSelScheme == AIS_SelectionScheme_Clear)
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
Select (anOwner);
|
||||
}
|
||||
return;
|
||||
}
|
||||
case AIS_SelectionScheme_Clear:
|
||||
{
|
||||
Clear();
|
||||
return;
|
||||
}
|
||||
for (AIS_NArray1OfEntityOwner::Iterator aPickedIter (thePickedOwners); aPickedIter.More(); aPickedIter.Next())
|
||||
{
|
||||
const Handle(SelectMgr_EntityOwner)& anOwner = aPickedIter.Value();
|
||||
Select (anOwner, theFilter, theSelScheme, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -34,23 +34,36 @@ public:
|
||||
|
||||
//! creates a new selection.
|
||||
Standard_EXPORT AIS_Selection();
|
||||
|
||||
|
||||
//! removes all the object of the selection.
|
||||
Standard_EXPORT virtual void Clear();
|
||||
|
||||
|
||||
//! if the object is not yet in the selection, it will be added.
|
||||
//! if the object is already in the selection, it will be removed.
|
||||
Standard_EXPORT virtual AIS_SelectStatus Select (const Handle(SelectMgr_EntityOwner)& theObject);
|
||||
|
||||
//! @param[in] theOwner element to change selection state
|
||||
//! @param[in] theFilter context filter
|
||||
//! @param[in] theSelScheme selection scheme
|
||||
//! @param[in] theIsDetected flag of object detection
|
||||
//! @return result of selection
|
||||
Standard_EXPORT virtual AIS_SelectStatus Select (const Handle(SelectMgr_EntityOwner)& theOwner,
|
||||
const Handle(SelectMgr_Filter)& theFilter,
|
||||
const AIS_SelectionScheme theSelScheme,
|
||||
const Standard_Boolean theIsDetected);
|
||||
|
||||
//! the object is always add int the selection.
|
||||
//! faster when the number of objects selected is great.
|
||||
Standard_EXPORT virtual AIS_SelectStatus AddSelect (const Handle(SelectMgr_EntityOwner)& theObject);
|
||||
|
||||
//! clears the selection and adds the object in the selection.
|
||||
virtual void ClearAndSelect (const Handle(SelectMgr_EntityOwner)& theObject)
|
||||
//! @param[in] theObject element to change selection state
|
||||
//! @param[in] theFilter context filter
|
||||
//! @param[in] theIsDetected flag of object detection
|
||||
virtual void ClearAndSelect (const Handle(SelectMgr_EntityOwner)& theObject,
|
||||
const Handle(SelectMgr_Filter)& theFilter,
|
||||
const Standard_Boolean theIsDetected)
|
||||
{
|
||||
Clear();
|
||||
Select (theObject);
|
||||
Select (theObject, theFilter, AIS_SelectionScheme_Add, theIsDetected);
|
||||
}
|
||||
|
||||
//! checks if the object is in the selection.
|
||||
|
@@ -14,6 +14,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <AIS_Shape.hxx>
|
||||
|
||||
#include <AIS_GraphicTool.hxx>
|
||||
@@ -856,7 +858,7 @@ void AIS_Shape::SetOwnDeviationAngle (const Standard_Real theAngle)
|
||||
|
||||
void AIS_Shape::SetAngleAndDeviation ( const Standard_Real anAngle )
|
||||
{
|
||||
Standard_Real OutAngl,OutDefl;
|
||||
Standard_Real OutAngl = NAN,OutDefl = NAN;
|
||||
HLRBRep::PolyHLRAngleAndDeflection(anAngle,OutAngl,OutDefl);
|
||||
SetOwnDeviationAngle(anAngle) ;
|
||||
SetOwnDeviationCoefficient(OutDefl) ;
|
||||
|
@@ -12,6 +12,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <AIS_TextLabel.hxx>
|
||||
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
@@ -292,7 +294,7 @@ void AIS_TextLabel::Compute (const Handle(PrsMgr_PresentationManager)& ,
|
||||
}
|
||||
|
||||
gp_Pnt aCenterOfLabel;
|
||||
Standard_Real aWidth, aHeight;
|
||||
Standard_Real aWidth = NAN, aHeight = NAN;
|
||||
|
||||
Standard_Boolean isInit = calculateLabelParams (aPosition, aCenterOfLabel, aWidth, aHeight);
|
||||
if (myHasOrientation3D)
|
||||
@@ -363,7 +365,7 @@ void AIS_TextLabel::ComputeSelection (const Handle(SelectMgr_Selection)& theSele
|
||||
}
|
||||
|
||||
gp_Pnt aCenterOfLabel;
|
||||
Standard_Real aWidth, aHeight;
|
||||
Standard_Real aWidth = NAN, aHeight = NAN;
|
||||
|
||||
if (!calculateLabelParams (aPosition, aCenterOfLabel, aWidth, aHeight))
|
||||
{
|
||||
|
@@ -13,6 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <AIS_TexturedShape.hxx>
|
||||
|
||||
#include <AIS_GraphicTool.hxx>
|
||||
@@ -266,8 +268,8 @@ void AIS_TexturedShape::updateAttributes (const Handle(Prs3d_Presentation)& theP
|
||||
myAspect = new Graphic3d_AspectFillArea3d (*myDrawer->ShadingAspect()->Aspect());
|
||||
if (HasPolygonOffsets())
|
||||
{
|
||||
Standard_Integer aMode;
|
||||
Standard_ShortReal aFactor, aUnits;
|
||||
Standard_Integer aMode = 0;
|
||||
Standard_ShortReal aFactor = NAN, aUnits = NAN;
|
||||
PolygonOffsets (aMode, aFactor, aUnits);
|
||||
myAspect->SetPolygonOffsets (aMode, aFactor, aUnits);
|
||||
}
|
||||
|
@@ -27,12 +27,12 @@
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(AIS_Triangulation,AIS_InteractiveObject)
|
||||
|
||||
AIS_Triangulation::AIS_Triangulation(const Handle(Poly_Triangulation)& Triangulation)
|
||||
AIS_Triangulation::AIS_Triangulation(const Handle(Poly_Triangulation)& Triangulation) : myTriangulation(Triangulation), myNbNodes(Triangulation->NbNodes()), myNbTriangles(Triangulation->NbTriangles()), myFlagColor(0)
|
||||
{
|
||||
myTriangulation = Triangulation;
|
||||
myNbNodes = Triangulation->NbNodes();
|
||||
myNbTriangles = Triangulation->NbTriangles();
|
||||
myFlagColor = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@@ -241,7 +241,7 @@ protected:
|
||||
Standard_Boolean myHasOwnArrowColor;
|
||||
|
||||
TCollection_ExtendedString myLabels[Prs3d_DatumParts_NB];
|
||||
Standard_Integer mySelectionPriority[Prs3d_DatumParts_NB];
|
||||
Standard_Integer mySelectionPriority[Prs3d_DatumParts_NB]{};
|
||||
|
||||
Handle(Graphic3d_Group) myPartToGroup[Prs3d_DatumParts_NB];
|
||||
NCollection_List<Prs3d_DatumParts> mySelectedParts;
|
||||
|
@@ -43,7 +43,7 @@ public:
|
||||
}
|
||||
|
||||
//! Image reader.
|
||||
virtual Handle(Image_PixMap) GetImage (const Handle(Image_SupportedFormats)& theSupported) Standard_OVERRIDE
|
||||
Handle(Image_PixMap) GetImage (const Handle(Image_SupportedFormats)& theSupported) Standard_OVERRIDE
|
||||
{
|
||||
return myImageSource->ReadImage (theSupported);
|
||||
}
|
||||
|
@@ -36,9 +36,9 @@ static Handle(TCollection_HAsciiString) nulstr;
|
||||
static Handle(Interface_HArray1OfHAsciiString) nularr;
|
||||
|
||||
APIHeaderSection_MakeHeader::APIHeaderSection_MakeHeader
|
||||
(const Handle(StepData_StepModel)& model)
|
||||
(const Handle(StepData_StepModel)& model) : done(Standard_True)
|
||||
{
|
||||
done = Standard_True;
|
||||
|
||||
if (model->HasHeaderEntity (STANDARD_TYPE(HeaderSection_FileName))) {
|
||||
fn = GetCasted(HeaderSection_FileName,
|
||||
model->HeaderEntity(STANDARD_TYPE(HeaderSection_FileName)));
|
||||
@@ -384,7 +384,7 @@ void APIHeaderSection_MakeHeader::AddSchemaIdentifier(const Handle(TCollection_H
|
||||
Handle(Interface_HArray1OfHAsciiString) idents = fs->SchemaIdentifiers();
|
||||
|
||||
// check that requested subschema is already in the list
|
||||
Standard_Integer i;
|
||||
Standard_Integer i = 0;
|
||||
for ( i=1; ! idents.IsNull() && i <= idents->Length(); i++ ) {
|
||||
if ( aSchem->IsSameString ( idents->Value(i) ) ) return;
|
||||
}
|
||||
|
@@ -185,7 +185,7 @@ private:
|
||||
|
||||
|
||||
|
||||
Standard_Boolean done;
|
||||
Standard_Boolean done{};
|
||||
Handle(HeaderSection_FileName) fn;
|
||||
Handle(HeaderSection_FileSchema) fs;
|
||||
Handle(HeaderSection_FileDescription) fd;
|
||||
|
@@ -224,7 +224,7 @@ void Adaptor2d_OffsetCurve::Intervals(TColStd_Array1OfReal& TI,
|
||||
Standard_Integer last = nbInter+1;
|
||||
while (T(last) >= myLast) last--;
|
||||
|
||||
Standard_Integer i = TI.Lower(), j;
|
||||
Standard_Integer i = TI.Lower(), j = 0;
|
||||
for (j = first-1; j <= last+1; j++) {
|
||||
TI(i) = T(j);
|
||||
i++;
|
||||
|
@@ -14,6 +14,8 @@
|
||||
#define No_Standard_OutOfRange
|
||||
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <Adaptor3d_CurveOnSurface.hxx>
|
||||
|
||||
#include <Adaptor2d_Curve2d.hxx>
|
||||
@@ -242,9 +244,9 @@ static void Locate1Coord(const Standard_Integer Index,
|
||||
const Handle(Geom_BSplineCurve)& BSplC,
|
||||
gp_Pnt2d& LeftBot, gp_Pnt2d& RightTop)
|
||||
{
|
||||
Standard_Real Comp1=0, DComp1=0, cur, f = 0.0, l = 0.0;
|
||||
Standard_Real Comp1=0, DComp1=0, cur = NAN, f = 0.0, l = 0.0;
|
||||
Standard_Real Tol = Precision::PConfusion()/10;
|
||||
Standard_Integer i = 1, Bnd1, Bnd2;
|
||||
Standard_Integer i = 1, Bnd1 = 0, Bnd2 = 0;
|
||||
Standard_Boolean DIsNull= Standard_False;
|
||||
TColStd_Array1OfReal Arr(1,BSplC->NbKnots()); BSplC->Knots(Arr);
|
||||
|
||||
@@ -346,7 +348,7 @@ static void Locate1Coord(const Standard_Integer Index,
|
||||
{
|
||||
Standard_Real Comp1=0,DComp1=0;
|
||||
Standard_Real Tol = Precision::PConfusion()/10;
|
||||
Standard_Integer i=1, Up=0, Up1, Up2, Down=0, Down1, Down2;
|
||||
Standard_Integer i=1, Up=0, Up1 = 0, Up2 = 0, Down=0, Down1 = 0, Down2 = 0;
|
||||
Standard_Real cur = 0.;
|
||||
|
||||
DIsNull= Standard_False;
|
||||
@@ -875,7 +877,7 @@ Standard_Integer Adaptor3d_CurveOnSurface::NbIntervals (const GeomAbs_Shape S) c
|
||||
if(S == myIntCont && !myIntervals.IsNull())
|
||||
return myIntervals->Length()-1;
|
||||
|
||||
Standard_Integer nu,nv,nc;
|
||||
Standard_Integer nu = 0,nv = 0,nc = 0;
|
||||
nu=mySurface->NbUIntervals(S);
|
||||
nv=mySurface->NbVIntervals(S);
|
||||
nc=myCurve->NbIntervals(S);
|
||||
@@ -887,7 +889,7 @@ Standard_Integer Adaptor3d_CurveOnSurface::NbIntervals (const GeomAbs_Shape S) c
|
||||
TColStd_Array1OfReal TabC(TabBuf(nu + nv + 3), 1, nc+1);
|
||||
|
||||
Standard_Integer NbSample = 20;
|
||||
Standard_Real U,V,Tdeb,Tfin;
|
||||
Standard_Real U = NAN,V = NAN,Tdeb = NAN,Tfin = NAN;
|
||||
Tdeb=myCurve->FirstParameter();
|
||||
Tfin=myCurve->LastParameter();
|
||||
|
||||
@@ -1234,7 +1236,7 @@ gp_Vec Adaptor3d_CurveOnSurface::DN
|
||||
Standard_Real Adaptor3d_CurveOnSurface::Resolution
|
||||
(const Standard_Real R3d) const
|
||||
{
|
||||
Standard_Real ru,rv;
|
||||
Standard_Real ru = NAN,rv = NAN;
|
||||
ru = mySurface->UResolution(R3d);
|
||||
rv = mySurface->VResolution(R3d);
|
||||
return myCurve->Resolution(Min(ru,rv));
|
||||
@@ -1648,7 +1650,7 @@ void Adaptor3d_CurveOnSurface::EvalKPart()
|
||||
|
||||
void Adaptor3d_CurveOnSurface::EvalFirstLastSurf()
|
||||
{
|
||||
Standard_Real FirstPar,LastPar;
|
||||
Standard_Real FirstPar = NAN,LastPar = NAN;
|
||||
gp_Pnt2d UV, LeftBot, RightTop;
|
||||
gp_Vec2d DUV;
|
||||
Standard_Real Tol= Precision::PConfusion()/10;
|
||||
@@ -1756,7 +1758,7 @@ Standard_Boolean Adaptor3d_CurveOnSurface::LocatePart_RevExt(const gp_Pnt2d& UV,
|
||||
Locate2Coord(1,UV,DUV,S->FirstUParameter(),S->LastUParameter(),LeftBot,RightTop);
|
||||
}
|
||||
|
||||
Standard_Real u1,u2,v1,v2;
|
||||
Standard_Real u1 = NAN,u2 = NAN,v1 = NAN,v2 = NAN;
|
||||
ReverseParam(LeftBot.X(),RightTop.X(),u1,u2);
|
||||
LeftBot.SetX(u1);
|
||||
RightTop.SetX(u2);
|
||||
|
@@ -13,6 +13,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <Adaptor3d_HSurfaceTool.hxx>
|
||||
|
||||
#include <Adaptor3d_Curve.hxx>
|
||||
@@ -102,7 +104,7 @@ Standard_Boolean Adaptor3d_HSurfaceTool::IsSurfG1(const Handle(Adaptor3d_Surface
|
||||
const Standard_Boolean theAlongU,
|
||||
const Standard_Real theAngTol)
|
||||
{
|
||||
Standard_Real aUf, aUl, aVf, aVl;
|
||||
Standard_Real aUf = NAN, aUl = NAN, aVf = NAN, aVl = NAN;
|
||||
aUf = theSurf->FirstUParameter();
|
||||
aUl = theSurf->LastUParameter();
|
||||
aVf = theSurf->FirstVParameter();
|
||||
|
@@ -14,6 +14,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <Adaptor3d_InterFunc.hxx>
|
||||
|
||||
#include <Adaptor2d_Curve2d.hxx>
|
||||
@@ -40,7 +42,7 @@ Standard_Boolean Adaptor3d_InterFunc::Value(const Standard_Real X , Standard_Rea
|
||||
}
|
||||
Standard_Boolean Adaptor3d_InterFunc::Derivative(const Standard_Real X , Standard_Real& D)
|
||||
{
|
||||
Standard_Real F;
|
||||
Standard_Real F = NAN;
|
||||
return Values(X,F,D);
|
||||
}
|
||||
Standard_Boolean Adaptor3d_InterFunc::Values(const Standard_Real X , Standard_Real& F,Standard_Real& D)
|
||||
|
@@ -11,6 +11,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <Adaptor3d_IsoCurve.hxx>
|
||||
|
||||
#include <Adaptor3d_Curve.hxx>
|
||||
@@ -312,7 +314,7 @@ void Adaptor3d_IsoCurve::Intervals(TColStd_Array1OfReal& TI,
|
||||
Standard_Integer last = nbInter+1;
|
||||
while (T(last) >= myLast) last--;
|
||||
|
||||
Standard_Integer i = TI.Lower(), j;
|
||||
Standard_Integer i = TI.Lower(), j = 0;
|
||||
for (j = first-1; j <= last+1; j++) {
|
||||
TI(i) = T(j);
|
||||
i++;
|
||||
@@ -675,7 +677,7 @@ static void computeHR(const gp_Ax3& axes,
|
||||
gp_Circ Adaptor3d_IsoCurve::Circle() const
|
||||
{
|
||||
gp_Ax3 axes;
|
||||
Standard_Real radius,h = 0.;
|
||||
Standard_Real radius = NAN,h = 0.;
|
||||
|
||||
switch (mySurface->GetType()) {
|
||||
|
||||
|
@@ -11,6 +11,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <Adaptor3d_TopolTool.hxx>
|
||||
|
||||
#include <Adaptor2d_Line2d.hxx>
|
||||
@@ -58,7 +60,7 @@ void Adaptor3d_TopolTool::Initialize ()
|
||||
|
||||
void Adaptor3d_TopolTool::Initialize (const Handle(Adaptor3d_Surface)& S)
|
||||
{
|
||||
Standard_Real pinf,psup,deltap;
|
||||
Standard_Real pinf = NAN,psup = NAN,deltap = NAN;
|
||||
//Adaptor2d_Line2d * Line2dPtr ;
|
||||
|
||||
myNbSamplesU=-1;
|
||||
@@ -216,7 +218,7 @@ void Adaptor3d_TopolTool::Initialize(const Handle(Adaptor2d_Curve2d)& C)
|
||||
{
|
||||
nbVtx = 0;
|
||||
idVtx = 0;
|
||||
Standard_Real theUinf,theUsup;
|
||||
Standard_Real theUinf = NAN,theUsup = NAN;
|
||||
theUinf = C->FirstParameter();
|
||||
theUsup = C->LastParameter();
|
||||
// if (!Precision::IsNegativeInfinite(theUinf)) {
|
||||
@@ -280,7 +282,7 @@ TopAbs_State Adaptor3d_TopolTool::Classify(const gp_Pnt2d& P,
|
||||
return TopAbs_IN;
|
||||
}
|
||||
else {
|
||||
Standard_Boolean dansu,dansv,surumin,surumax,survmin,survmax;
|
||||
Standard_Boolean dansu = 0,dansv = 0,surumin = 0,surumax = 0,survmin = 0,survmax = 0;
|
||||
if (Precision::IsNegativeInfinite(Uinf) &&
|
||||
Precision::IsPositiveInfinite(Usup)) {
|
||||
dansu = Standard_True;
|
||||
@@ -415,7 +417,7 @@ Standard_Boolean Adaptor3d_TopolTool::IsThePointOn(const gp_Pnt2d& P,
|
||||
return(Standard_False);
|
||||
}
|
||||
else {
|
||||
Standard_Boolean dansu,dansv,surumin,surumax,survmin,survmax;
|
||||
Standard_Boolean dansu = 0,dansv = 0,surumin = 0,surumax = 0,survmin = 0,survmax = 0;
|
||||
if (Precision::IsNegativeInfinite(Uinf) &&
|
||||
Precision::IsPositiveInfinite(Usup)) {
|
||||
dansu = Standard_True;
|
||||
@@ -569,7 +571,7 @@ static void Analyse(const TColgp_Array2OfPnt& array2,
|
||||
Standard_Integer& myNbSamplesU,
|
||||
Standard_Integer& myNbSamplesV) {
|
||||
gp_Vec Vi,Vip1;
|
||||
Standard_Integer sh,nbch,i,j;
|
||||
Standard_Integer sh = 0,nbch = 0,i = 0,j = 0;
|
||||
|
||||
sh = 1;
|
||||
nbch = 0;
|
||||
@@ -638,7 +640,7 @@ void Adaptor3d_TopolTool::ComputeSamplePoints()
|
||||
{
|
||||
const Standard_Integer aMaxNbSample = 50;
|
||||
|
||||
Standard_Real uinf,usup,vinf,vsup;
|
||||
Standard_Real uinf = NAN,usup = NAN,vinf = NAN,vsup = NAN;
|
||||
uinf = myS->FirstUParameter(); usup = myS->LastUParameter();
|
||||
vinf = myS->FirstVParameter(); vsup = myS->LastVParameter();
|
||||
if (usup < uinf) { Standard_Real temp=uinf; uinf=usup; usup=temp; }
|
||||
@@ -651,7 +653,7 @@ void Adaptor3d_TopolTool::ComputeSamplePoints()
|
||||
else if (vinf == RealFirst()) { vinf=vsup-2.e5; }
|
||||
else if (vsup == RealLast()) { vsup=vinf+2.e5; }
|
||||
|
||||
Standard_Integer nbsu,nbsv;
|
||||
Standard_Integer nbsu = 0,nbsv = 0;
|
||||
GeomAbs_SurfaceType typS = myS->GetType();
|
||||
switch(typS) {
|
||||
case GeomAbs_Plane: { nbsv=2; nbsu=2; } break;
|
||||
@@ -756,8 +758,8 @@ void Adaptor3d_TopolTool::SamplePoint(const Standard_Integer i,
|
||||
gp_Pnt2d& P2d,
|
||||
gp_Pnt& P3d)
|
||||
{
|
||||
Standard_Integer iu, iv;
|
||||
Standard_Real u, v;
|
||||
Standard_Integer iu = 0, iv = 0;
|
||||
Standard_Real u = NAN, v = NAN;
|
||||
if (myUPars.IsNull())
|
||||
{
|
||||
Standard_Real myDU=(Usup-Uinf)/(myNbSamplesU+1);
|
||||
@@ -846,7 +848,7 @@ void Adaptor3d_TopolTool::SamplePnts(const Standard_Real theDefl,
|
||||
const Standard_Integer theNUmin,
|
||||
const Standard_Integer theNVmin)
|
||||
{
|
||||
Standard_Real uinf,usup,vinf,vsup;
|
||||
Standard_Real uinf = NAN,usup = NAN,vinf = NAN,vsup = NAN;
|
||||
uinf = myS->FirstUParameter(); usup = myS->LastUParameter();
|
||||
vinf = myS->FirstVParameter(); vsup = myS->LastVParameter();
|
||||
if (usup < uinf) { Standard_Real temp=uinf; uinf=usup; usup=temp; }
|
||||
@@ -906,8 +908,8 @@ void Adaptor3d_TopolTool::SamplePnts(const Standard_Real theDefl,
|
||||
|
||||
myUPars = new TColStd_HArray1OfReal(1, myNbSamplesU);
|
||||
myVPars = new TColStd_HArray1OfReal(1, myNbSamplesV);
|
||||
Standard_Integer i;
|
||||
Standard_Real t, dt = (usup - uinf)/(myNbSamplesU - 1);
|
||||
Standard_Integer i = 0;
|
||||
Standard_Real t = NAN, dt = (usup - uinf)/(myNbSamplesU - 1);
|
||||
myUPars->SetValue(1, uinf);
|
||||
myUPars->SetValue(myNbSamplesU, usup);
|
||||
for(i = 2, t = uinf+dt; i < myNbSamplesU; ++i, t += dt) {
|
||||
@@ -936,12 +938,12 @@ void Adaptor3d_TopolTool::BSplSamplePnts(const Standard_Real theDefl,
|
||||
{
|
||||
const Standard_Integer aMaxPnts = 1001;
|
||||
const Handle(Geom_BSplineSurface)& aBS = myS->BSpline();
|
||||
Standard_Real uinf,usup,vinf,vsup;
|
||||
Standard_Real uinf = NAN,usup = NAN,vinf = NAN,vsup = NAN;
|
||||
uinf = myS->FirstUParameter(); usup = myS->LastUParameter();
|
||||
vinf = myS->FirstVParameter(); vsup = myS->LastVParameter();
|
||||
|
||||
Standard_Integer i, k, j = 1;
|
||||
Standard_Real t1, t2, dt;
|
||||
Standard_Integer i = 0, k = 0, j = 1;
|
||||
Standard_Real t1 = NAN, t2 = NAN, dt = NAN;
|
||||
Standard_Integer ui1 = aBS->FirstUKnotIndex();
|
||||
Standard_Integer ui2 = aBS->LastUKnotIndex();
|
||||
Standard_Integer vi1 = aBS->FirstVKnotIndex();
|
||||
@@ -982,7 +984,7 @@ void Adaptor3d_TopolTool::BSplSamplePnts(const Standard_Real theDefl,
|
||||
|
||||
//modified by NIZHNY-EMV Mon Jun 10 14:19:04 2013
|
||||
if (nbsu < theNUmin || nbsv < theNVmin) {
|
||||
Standard_Integer aNb;
|
||||
Standard_Integer aNb = 0;
|
||||
if (nbsu < nbsv) {
|
||||
aNb = (Standard_Integer)(nbsv * ((Standard_Real)theNUmin)/((Standard_Real)nbsu));
|
||||
aNb = Min(aNb, 30);
|
||||
@@ -1096,7 +1098,7 @@ void Adaptor3d_TopolTool::BSplSamplePnts(const Standard_Real theDefl,
|
||||
|
||||
Standard_Real aDefl2 = Max(theDefl*theDefl, 1.e-9);
|
||||
Standard_Real tol = Max(0.01*aDefl2, 1.e-9);
|
||||
Standard_Integer l;
|
||||
Standard_Integer l = 0;
|
||||
|
||||
anUFlg(1) = Standard_True;
|
||||
anUFlg(nbsu) = Standard_True;
|
||||
@@ -1270,7 +1272,7 @@ void Adaptor3d_TopolTool::BSplSamplePnts(const Standard_Real theDefl,
|
||||
//
|
||||
//modified by NIZNHY-PKV Fri Dec 16 10:05:01 2011f
|
||||
//
|
||||
Standard_Boolean bFlag;
|
||||
Standard_Boolean bFlag = 0;
|
||||
//
|
||||
// U
|
||||
bFlag=(myNbSamplesU < theNUmin);
|
||||
|
@@ -157,22 +157,22 @@ public:
|
||||
protected:
|
||||
|
||||
Handle(Adaptor3d_Surface) myS;
|
||||
Standard_Integer myNbSamplesU;
|
||||
Standard_Integer myNbSamplesV;
|
||||
Standard_Integer myNbSamplesU{};
|
||||
Standard_Integer myNbSamplesV{};
|
||||
Handle(TColStd_HArray1OfReal) myUPars;
|
||||
Handle(TColStd_HArray1OfReal) myVPars;
|
||||
|
||||
private:
|
||||
|
||||
Standard_Integer nbRestr;
|
||||
Standard_Integer idRestr;
|
||||
Standard_Real Uinf;
|
||||
Standard_Real Usup;
|
||||
Standard_Real Vinf;
|
||||
Standard_Real Vsup;
|
||||
Standard_Integer nbRestr{};
|
||||
Standard_Integer idRestr{};
|
||||
Standard_Real Uinf{};
|
||||
Standard_Real Usup{};
|
||||
Standard_Real Vinf{};
|
||||
Standard_Real Vsup{};
|
||||
Handle(Adaptor2d_Line2d) myRestr[4];
|
||||
Standard_Integer nbVtx;
|
||||
Standard_Integer idVtx;
|
||||
Standard_Integer nbVtx{};
|
||||
Standard_Integer idVtx{};
|
||||
Handle(Adaptor3d_HVertex) myVtx[2];
|
||||
|
||||
};
|
||||
|
@@ -14,6 +14,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <AdvApp2Var_ApproxAFunc2Var.hxx>
|
||||
#include <AdvApp2Var_EvaluatorFunc2Var.hxx>
|
||||
#include <AdvApp2Var_Criterion.hxx>
|
||||
@@ -171,7 +173,7 @@ AdvApp2Var_ApproxAFunc2Var::AdvApp2Var_ApproxAFunc2Var(
|
||||
|
||||
void AdvApp2Var_ApproxAFunc2Var::Init()
|
||||
{
|
||||
Standard_Integer ifav,iu=0,iv=0,ndu,ndv;
|
||||
Standard_Integer ifav = 0,iu=0,iv=0,ndu = 0,ndv = 0;
|
||||
switch (myFavoriteIso) {
|
||||
case GeomAbs_IsoU :
|
||||
ifav = 1;
|
||||
@@ -239,7 +241,7 @@ void AdvApp2Var_ApproxAFunc2Var::Init()
|
||||
|
||||
void AdvApp2Var_ApproxAFunc2Var::InitGrid(const Standard_Integer NbInt)
|
||||
{
|
||||
Standard_Integer iu=myConditions.UOrder(),iv=myConditions.VOrder(),iint;
|
||||
Standard_Integer iu=myConditions.UOrder(),iv=myConditions.VOrder(),iint = 0;
|
||||
|
||||
Handle(AdvApp2Var_Patch) M0 = new AdvApp2Var_Patch (myFirstParInU,myLastParInU,myFirstParInV,myLastParInV,iu,iv);
|
||||
|
||||
@@ -346,10 +348,10 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice
|
||||
const AdvApprox_Cutting& VChoice,
|
||||
const AdvApp2Var_EvaluatorFunc2Var& Func)
|
||||
{
|
||||
Standard_Real Udec, Vdec;
|
||||
Standard_Boolean Umore, Vmore;
|
||||
Standard_Integer NbPatch, NbU, NbV, NumDec;
|
||||
Standard_Integer FirstNA;
|
||||
Standard_Real Udec = NAN, Vdec = NAN;
|
||||
Standard_Boolean Umore = 0, Vmore = 0;
|
||||
Standard_Integer NbPatch = 0, NbU = 0, NbV = 0, NumDec = 0;
|
||||
Standard_Integer FirstNA = 0;
|
||||
|
||||
while (myResult.FirstNotApprox(FirstNA)) {
|
||||
|
||||
@@ -437,10 +439,10 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice
|
||||
const AdvApp2Var_EvaluatorFunc2Var& Func,
|
||||
const AdvApp2Var_Criterion& Crit)
|
||||
{
|
||||
Standard_Real Udec, Vdec, CritValue, m1=0.;
|
||||
Standard_Boolean Umore, Vmore, CritAbs = (Crit.Type() == AdvApp2Var_Absolute);
|
||||
Standard_Integer NbPatch, NbU, NbV, NbInt, NumDec;
|
||||
Standard_Integer FirstNA, decision=0;
|
||||
Standard_Real Udec = NAN, Vdec = NAN, CritValue = NAN, m1=0.;
|
||||
Standard_Boolean Umore = 0, Vmore = 0, CritAbs = (Crit.Type() == AdvApp2Var_Absolute);
|
||||
Standard_Integer NbPatch = 0, NbU = 0, NbV = 0, NbInt = 0, NumDec = 0;
|
||||
Standard_Integer FirstNA = 0, decision=0;
|
||||
|
||||
while (myResult.FirstNotApprox(FirstNA)) {
|
||||
|
||||
@@ -551,9 +553,9 @@ void AdvApp2Var_ApproxAFunc2Var::ComputeConstraints(const AdvApprox_Cutting& UCh
|
||||
const AdvApprox_Cutting& VChoice,
|
||||
const AdvApp2Var_EvaluatorFunc2Var& Func)
|
||||
{
|
||||
Standard_Real dec;
|
||||
Standard_Boolean more;
|
||||
Standard_Integer ind1, ind2, NbPatch, NbU, NbV;
|
||||
Standard_Real dec = NAN;
|
||||
Standard_Boolean more = 0;
|
||||
Standard_Integer ind1 = 0, ind2 = 0, NbPatch = 0, NbU = 0, NbV = 0;
|
||||
Standard_Integer iu = myConditions.UOrder(), iv = myConditions.VOrder();
|
||||
AdvApp2Var_Node N1(iu,iv), N2(iu,iv);
|
||||
|
||||
@@ -638,10 +640,10 @@ void AdvApp2Var_ApproxAFunc2Var::ComputeConstraints(const AdvApprox_Cutting& UCh
|
||||
const AdvApp2Var_EvaluatorFunc2Var& Func,
|
||||
const AdvApp2Var_Criterion& Crit)
|
||||
{
|
||||
Standard_Real dec;
|
||||
Standard_Boolean more, CritRel = (Crit.Type() == AdvApp2Var_Relative);
|
||||
Standard_Integer ind1, ind2, NbPatch, NbU, NbV;
|
||||
Standard_Integer indN1, indN2;
|
||||
Standard_Real dec = NAN;
|
||||
Standard_Boolean more = 0, CritRel = (Crit.Type() == AdvApp2Var_Relative);
|
||||
Standard_Integer ind1 = 0, ind2 = 0, NbPatch = 0, NbU = 0, NbV = 0;
|
||||
Standard_Integer indN1 = 0, indN2 = 0;
|
||||
Standard_Integer iu = myConditions.UOrder(), iv = myConditions.VOrder();
|
||||
AdvApp2Var_Node N1(iu,iv), N2(iu,iv);
|
||||
|
||||
@@ -727,9 +729,9 @@ void AdvApp2Var_ApproxAFunc2Var::ComputeConstraints(const AdvApprox_Cutting& UCh
|
||||
void AdvApp2Var_ApproxAFunc2Var::Compute3DErrors()
|
||||
{
|
||||
|
||||
Standard_Integer iesp,ipat;
|
||||
Standard_Real error_max,error_moy,error_U0,error_V0,error_U1,error_V1;
|
||||
Standard_Real Tol,F1Tol,F2Tol,F3Tol,F4Tol;
|
||||
Standard_Integer iesp = 0,ipat = 0;
|
||||
Standard_Real error_max = NAN,error_moy = NAN,error_U0 = NAN,error_V0 = NAN,error_U1 = NAN,error_V1 = NAN;
|
||||
Standard_Real Tol = NAN,F1Tol = NAN,F2Tol = NAN,F3Tol = NAN,F4Tol = NAN;
|
||||
if ( myNumSubSpaces[2] > 0 ) {
|
||||
my3DMaxError = new (TColStd_HArray1OfReal) (1,myNumSubSpaces[2]);
|
||||
my3DAverageError = new (TColStd_HArray1OfReal) (1,myNumSubSpaces[2]);
|
||||
@@ -778,8 +780,8 @@ void AdvApp2Var_ApproxAFunc2Var::Compute3DErrors()
|
||||
void AdvApp2Var_ApproxAFunc2Var::ComputeCritError()
|
||||
{
|
||||
|
||||
Standard_Integer iesp,ipat;
|
||||
Standard_Real crit_max;
|
||||
Standard_Integer iesp = 0,ipat = 0;
|
||||
Standard_Real crit_max = NAN;
|
||||
if ( myNumSubSpaces[2] > 0 ) {
|
||||
for (iesp=1;iesp<=myNumSubSpaces[2];iesp++) {
|
||||
crit_max = 0.;
|
||||
@@ -808,7 +810,7 @@ void AdvApp2Var_ApproxAFunc2Var::ConvertBS()
|
||||
// Calculate resulting surfaces
|
||||
mySurfaces = new ( TColGeom_HArray1OfSurface) (1, myNumSubSpaces[2]);
|
||||
|
||||
Standard_Integer j;
|
||||
Standard_Integer j = 0;
|
||||
TColStd_Array1OfReal UKnots (1, myResult.NbPatchInU()+1);
|
||||
for (j=1; j<=UKnots.Length(); j++) { UKnots.SetValue(j, myResult.UParameter(j)); }
|
||||
|
||||
@@ -840,11 +842,11 @@ void AdvApp2Var_ApproxAFunc2Var::ConvertBS()
|
||||
Handle(TColStd_HArray1OfReal) Poly =
|
||||
new (TColStd_HArray1OfReal) (1, nmax * Size_eq);
|
||||
|
||||
Standard_Integer SSP, i;
|
||||
Standard_Integer SSP = 0, i = 0;
|
||||
for (SSP=1; SSP <= myNumSubSpaces[2]; SSP++) {
|
||||
|
||||
// Creation of the grid of polynoms
|
||||
Standard_Integer n=0,icf=1,ieq;
|
||||
Standard_Integer n=0,icf=1,ieq = 0;
|
||||
for (j=1; j<=myResult.NbPatchInV(); j++) {
|
||||
for (i=1; i<=myResult.NbPatchInU(); i++) {
|
||||
n++;
|
||||
@@ -1064,7 +1066,7 @@ Standard_Real
|
||||
|
||||
void AdvApp2Var_ApproxAFunc2Var::Dump(Standard_OStream& o) const
|
||||
{
|
||||
Standard_Integer iesp=1,NbKU,NbKV,ik;
|
||||
Standard_Integer iesp=1,NbKU = 0,NbKV = 0,ik = 0;
|
||||
o<<std::endl;
|
||||
if (!myHasResult) { o<<"No result"<<std::endl; }
|
||||
else {
|
||||
|
@@ -193,7 +193,7 @@ private:
|
||||
Standard_EXPORT void ConvertBS();
|
||||
|
||||
|
||||
Standard_Integer myNumSubSpaces[3];
|
||||
Standard_Integer myNumSubSpaces[3]{};
|
||||
Handle(TColStd_HArray1OfReal) my1DTolerances;
|
||||
Handle(TColStd_HArray1OfReal) my2DTolerances;
|
||||
Handle(TColStd_HArray1OfReal) my3DTolerances;
|
||||
|
@@ -11,6 +11,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <AdvApp2Var_SysBase.hxx>
|
||||
#include <AdvApp2Var_MathBase.hxx>
|
||||
#include <AdvApp2Var_Data_f2c.hxx>
|
||||
@@ -275,15 +277,15 @@ int mma1cdi_(integer *ndimen,
|
||||
integer c__1 = 1;
|
||||
|
||||
/* System generated locals */
|
||||
integer contr1_dim1, contr1_offset, contr2_dim1, contr2_offset,
|
||||
somtab_dim1, somtab_offset, diftab_dim1, diftab_offset,
|
||||
fpntab_dim1, fpntab_offset, hermit_dim1, hermit_offset, i__1,
|
||||
i__2, i__3;
|
||||
integer contr1_dim1 = 0, contr1_offset = 0, contr2_dim1 = 0, contr2_offset = 0,
|
||||
somtab_dim1 = 0, somtab_offset = 0, diftab_dim1 = 0, diftab_offset = 0,
|
||||
fpntab_dim1 = 0, fpntab_offset = 0, hermit_dim1 = 0, hermit_offset = 0, i__1 = 0,
|
||||
i__2 = 0, i__3 = 0;
|
||||
|
||||
/* Local variables */
|
||||
integer nroo2, ncfhe, nd, ii, kk;
|
||||
integer ibb, kkm, kkp;
|
||||
doublereal bid1, bid2, bid3 = 0.;
|
||||
integer nroo2 = 0, ncfhe = 0, nd = 0, ii = 0, kk = 0;
|
||||
integer ibb = 0, kkm = 0, kkp = 0;
|
||||
doublereal bid1 = NAN, bid2 = NAN, bid3 = 0.;
|
||||
|
||||
/* **********************************************************************
|
||||
*/
|
||||
@@ -495,13 +497,13 @@ int mma1cnt_(integer *ndimen,
|
||||
doublereal *crvjac)
|
||||
{
|
||||
/* System generated locals */
|
||||
integer contr1_dim1, contr1_offset, contr2_dim1, contr2_offset,
|
||||
hermit_dim1, hermit_offset, crvjac_dim1, crvjac_offset, i__1,
|
||||
i__2, i__3;
|
||||
integer contr1_dim1 = 0, contr1_offset = 0, contr2_dim1 = 0, contr2_offset = 0,
|
||||
hermit_dim1 = 0, hermit_offset = 0, crvjac_dim1 = 0, crvjac_offset = 0, i__1 = 0,
|
||||
i__2 = 0, i__3 = 0;
|
||||
|
||||
/* Local variables */
|
||||
integer nd, ii, jj, ibb;
|
||||
doublereal bid;
|
||||
integer nd = 0, ii = 0, jj = 0, ibb = 0;
|
||||
doublereal bid = NAN;
|
||||
|
||||
|
||||
/* ***********************************************************************
|
||||
@@ -632,16 +634,16 @@ int mma1fdi_(integer *ndimen,
|
||||
integer *iercod)
|
||||
{
|
||||
/* System generated locals */
|
||||
integer fpntab_dim1, somtab_dim1, somtab_offset, diftab_dim1,
|
||||
diftab_offset, contr1_dim1, contr1_offset, contr2_dim1,
|
||||
contr2_offset, i__1, i__2;
|
||||
doublereal d__1;
|
||||
integer fpntab_dim1 = 0, somtab_dim1 = 0, somtab_offset = 0, diftab_dim1 = 0,
|
||||
diftab_offset = 0, contr1_dim1 = 0, contr1_offset = 0, contr2_dim1 = 0,
|
||||
contr2_offset = 0, i__1 = 0, i__2 = 0;
|
||||
doublereal d__1 = NAN;
|
||||
|
||||
/* Local variables */
|
||||
integer ideb, ifin, nroo2, ideru, iderv;
|
||||
doublereal renor;
|
||||
integer ii, nd, ibb, iim, nbp, iip;
|
||||
doublereal bid1, bid2;
|
||||
integer ideb = 0, ifin = 0, nroo2 = 0, ideru = 0, iderv = 0;
|
||||
doublereal renor = NAN;
|
||||
integer ii = 0, nd = 0, ibb = 0, iim = 0, nbp = 0, iip = 0;
|
||||
doublereal bid1 = NAN, bid2 = NAN;
|
||||
|
||||
/* **********************************************************************
|
||||
*/
|
||||
@@ -962,11 +964,11 @@ int mma1fer_(integer *,//ndimen,
|
||||
integer *iercod)
|
||||
{
|
||||
/* System generated locals */
|
||||
integer crvjac_dim1, crvjac_offset, i__1, i__2;
|
||||
integer crvjac_dim1 = 0, crvjac_offset = 0, i__1 = 0, i__2 = 0;
|
||||
|
||||
/* Local variables */
|
||||
integer idim, ncfja, ncfnw, ndses, ii, kk, ibb, ier;
|
||||
integer nbr0;
|
||||
integer idim = 0, ncfja = 0, ncfnw = 0, ndses = 0, ii = 0, kk = 0, ibb = 0, ier = 0;
|
||||
integer nbr0 = 0;
|
||||
|
||||
|
||||
/* ***********************************************************************
|
||||
@@ -1156,10 +1158,10 @@ int AdvApp2Var_ApproxF2var::mma1her_(const integer *iordre,
|
||||
integer *iercod)
|
||||
{
|
||||
/* System generated locals */
|
||||
integer hermit_dim1, hermit_offset;
|
||||
integer hermit_dim1 = 0, hermit_offset = 0;
|
||||
|
||||
/* Local variables */
|
||||
integer ibb;
|
||||
integer ibb = 0;
|
||||
|
||||
|
||||
|
||||
@@ -1323,11 +1325,11 @@ int mma1jak_(integer *ndimen,
|
||||
integer *iercod)
|
||||
{
|
||||
/* System generated locals */
|
||||
integer somtab_dim1, somtab_offset, diftab_dim1, diftab_offset,
|
||||
crvjac_dim1, crvjac_offset;
|
||||
integer somtab_dim1 = 0, somtab_offset = 0, diftab_dim1 = 0, diftab_offset = 0,
|
||||
crvjac_dim1 = 0, crvjac_offset = 0;
|
||||
|
||||
/* Local variables */
|
||||
integer ibb;
|
||||
integer ibb = 0;
|
||||
|
||||
/* **********************************************************************
|
||||
*/
|
||||
@@ -1437,13 +1439,13 @@ int mma1noc_(doublereal *dfuvin,
|
||||
doublereal *cntout)
|
||||
{
|
||||
/* System generated locals */
|
||||
integer i__1;
|
||||
doublereal d__1;
|
||||
integer i__1 = 0;
|
||||
doublereal d__1 = NAN;
|
||||
|
||||
/* Local variables */
|
||||
doublereal rider, riord;
|
||||
integer nd, ibb;
|
||||
doublereal bid;
|
||||
doublereal rider = NAN, riord = NAN;
|
||||
integer nd = 0, ibb = 0;
|
||||
doublereal bid = NAN;
|
||||
/* **********************************************************************
|
||||
*/
|
||||
|
||||
@@ -1571,11 +1573,11 @@ int mma1nop_(integer *nbroot,
|
||||
|
||||
{
|
||||
/* System generated locals */
|
||||
integer i__1;
|
||||
integer i__1 = 0;
|
||||
|
||||
/* Local variables */
|
||||
doublereal alinu, blinu, alinv, blinv;
|
||||
integer ii, ibb;
|
||||
doublereal alinu = NAN, blinu = NAN, alinv = NAN, blinv = NAN;
|
||||
integer ii = 0, ibb = 0;
|
||||
|
||||
/* ***********************************************************************
|
||||
*/
|
||||
@@ -1686,18 +1688,18 @@ int AdvApp2Var_ApproxF2var::mma2ac1_(integer const *ndimen,
|
||||
|
||||
{
|
||||
/* System generated locals */
|
||||
integer contr1_dim1, contr1_dim2, contr1_offset, contr2_dim1, contr2_dim2,
|
||||
contr2_offset, contr3_dim1, contr3_dim2, contr3_offset,
|
||||
contr4_dim1, contr4_dim2, contr4_offset, uhermt_dim1,
|
||||
uhermt_offset, vhermt_dim1, vhermt_offset, patjac_dim1,
|
||||
patjac_dim2, patjac_offset, i__1, i__2, i__3, i__4, i__5;
|
||||
integer contr1_dim1 = 0, contr1_dim2 = 0, contr1_offset = 0, contr2_dim1 = 0, contr2_dim2 = 0,
|
||||
contr2_offset = 0, contr3_dim1 = 0, contr3_dim2 = 0, contr3_offset = 0,
|
||||
contr4_dim1 = 0, contr4_dim2 = 0, contr4_offset = 0, uhermt_dim1 = 0,
|
||||
uhermt_offset = 0, vhermt_dim1 = 0, vhermt_offset = 0, patjac_dim1 = 0,
|
||||
patjac_dim2 = 0, patjac_offset = 0, i__1 = 0, i__2 = 0, i__3 = 0, i__4 = 0, i__5 = 0;
|
||||
|
||||
/* Local variables */
|
||||
logical ldbg;
|
||||
integer ndgu, ndgv;
|
||||
doublereal bidu1, bidu2, bidv1, bidv2;
|
||||
integer ioru1, iorv1, ii, nd, jj, ku, kv;
|
||||
doublereal cnt1, cnt2, cnt3, cnt4;
|
||||
logical ldbg = 0;
|
||||
integer ndgu = 0, ndgv = 0;
|
||||
doublereal bidu1 = NAN, bidu2 = NAN, bidv1 = NAN, bidv2 = NAN;
|
||||
integer ioru1 = 0, iorv1 = 0, ii = 0, nd = 0, jj = 0, ku = 0, kv = 0;
|
||||
doublereal cnt1 = NAN, cnt2 = NAN, cnt3 = NAN, cnt4 = NAN;
|
||||
|
||||
/* **********************************************************************
|
||||
*/
|
||||
@@ -1853,14 +1855,14 @@ int AdvApp2Var_ApproxF2var::mma2ac2_(const integer *ndimen,
|
||||
|
||||
{
|
||||
/* System generated locals */
|
||||
integer crbiv1_dim1, crbiv1_dim2, crbiv1_offset, crbiv2_dim1, crbiv2_dim2,
|
||||
crbiv2_offset, patjac_dim1, patjac_dim2, patjac_offset,
|
||||
vhermt_dim1, vhermt_offset, i__1, i__2, i__3, i__4;
|
||||
integer crbiv1_dim1 = 0, crbiv1_dim2 = 0, crbiv1_offset = 0, crbiv2_dim1 = 0, crbiv2_dim2 = 0,
|
||||
crbiv2_offset = 0, patjac_dim1 = 0, patjac_dim2 = 0, patjac_offset = 0,
|
||||
vhermt_dim1 = 0, vhermt_offset = 0, i__1 = 0, i__2 = 0, i__3 = 0, i__4 = 0;
|
||||
|
||||
/* Local variables */
|
||||
logical ldbg;
|
||||
integer ndgv1, ndgv2, ii, jj, nd, kk;
|
||||
doublereal bid1, bid2;
|
||||
logical ldbg = 0;
|
||||
integer ndgv1 = 0, ndgv2 = 0, ii = 0, jj = 0, nd = 0, kk = 0;
|
||||
doublereal bid1 = NAN, bid2 = NAN;
|
||||
|
||||
/* **********************************************************************
|
||||
*/
|
||||
@@ -1999,14 +2001,14 @@ int AdvApp2Var_ApproxF2var::mma2ac3_(const integer *ndimen,
|
||||
|
||||
{
|
||||
/* System generated locals */
|
||||
integer crbiu1_dim1, crbiu1_dim2, crbiu1_offset, crbiu2_dim1, crbiu2_dim2,
|
||||
crbiu2_offset, patjac_dim1, patjac_dim2, patjac_offset,
|
||||
uhermt_dim1, uhermt_offset, i__1, i__2, i__3, i__4;
|
||||
integer crbiu1_dim1 = 0, crbiu1_dim2 = 0, crbiu1_offset = 0, crbiu2_dim1 = 0, crbiu2_dim2 = 0,
|
||||
crbiu2_offset = 0, patjac_dim1 = 0, patjac_dim2 = 0, patjac_offset = 0,
|
||||
uhermt_dim1 = 0, uhermt_offset = 0, i__1 = 0, i__2 = 0, i__3 = 0, i__4 = 0;
|
||||
|
||||
/* Local variables */
|
||||
logical ldbg;
|
||||
integer ndgu1, ndgu2, ii, jj, nd, kk;
|
||||
doublereal bid1, bid2;
|
||||
logical ldbg = 0;
|
||||
integer ndgu1 = 0, ndgu2 = 0, ii = 0, jj = 0, nd = 0, kk = 0;
|
||||
doublereal bid1 = NAN, bid2 = NAN;
|
||||
|
||||
/* **********************************************************************
|
||||
*/
|
||||
@@ -2146,12 +2148,12 @@ int AdvApp2Var_ApproxF2var::mma2can_(const integer *ncfmxu,
|
||||
|
||||
{
|
||||
/* System generated locals */
|
||||
integer patjac_dim1, patjac_dim2, patjac_offset, patcan_dim1, patcan_dim2,
|
||||
patcan_offset, i__1, i__2;
|
||||
integer patjac_dim1 = 0, patjac_dim2 = 0, patjac_offset = 0, patcan_dim1 = 0, patcan_dim2 = 0,
|
||||
patcan_offset = 0, i__1 = 0, i__2 = 0;
|
||||
|
||||
/* Local variables */
|
||||
logical ldbg;
|
||||
integer ilon1, ilon2, ii, nd;
|
||||
logical ldbg = 0;
|
||||
integer ilon1 = 0, ilon2 = 0, ii = 0, nd = 0;
|
||||
|
||||
/* **********************************************************************
|
||||
*/
|
||||
@@ -2306,21 +2308,21 @@ int mma2cd1_(integer *ndimen,
|
||||
integer c__1 = 1;
|
||||
|
||||
/* System generated locals */
|
||||
integer contr1_dim1, contr1_dim2, contr1_offset, contr2_dim1, contr2_dim2,
|
||||
contr2_offset, contr3_dim1, contr3_dim2, contr3_offset,
|
||||
contr4_dim1, contr4_dim2, contr4_offset, uhermt_dim1,
|
||||
uhermt_offset, vhermt_dim1, vhermt_offset, fpntbu_dim1,
|
||||
fpntbu_offset, fpntbv_dim1, fpntbv_offset, sosotb_dim1,
|
||||
sosotb_dim2, sosotb_offset, diditb_dim1, diditb_dim2,
|
||||
diditb_offset, soditb_dim1, soditb_dim2, soditb_offset,
|
||||
disotb_dim1, disotb_dim2, disotb_offset, i__1, i__2, i__3, i__4,
|
||||
i__5;
|
||||
integer contr1_dim1 = 0, contr1_dim2 = 0, contr1_offset = 0, contr2_dim1 = 0, contr2_dim2 = 0,
|
||||
contr2_offset = 0, contr3_dim1 = 0, contr3_dim2 = 0, contr3_offset = 0,
|
||||
contr4_dim1 = 0, contr4_dim2 = 0, contr4_offset = 0, uhermt_dim1 = 0,
|
||||
uhermt_offset = 0, vhermt_dim1 = 0, vhermt_offset = 0, fpntbu_dim1 = 0,
|
||||
fpntbu_offset = 0, fpntbv_dim1 = 0, fpntbv_offset = 0, sosotb_dim1 = 0,
|
||||
sosotb_dim2 = 0, sosotb_offset = 0, diditb_dim1 = 0, diditb_dim2 = 0,
|
||||
diditb_offset = 0, soditb_dim1 = 0, soditb_dim2 = 0, soditb_offset = 0,
|
||||
disotb_dim1 = 0, disotb_dim2 = 0, disotb_offset = 0, i__1 = 0, i__2 = 0, i__3 = 0, i__4 = 0,
|
||||
i__5 = 0;
|
||||
|
||||
/* Local variables */
|
||||
integer ncfhu, ncfhv, nuroo, nvroo, nd, ii, jj, kk, ll, ibb, kkm,
|
||||
llm, kkp, llp;
|
||||
doublereal bid1, bid2, bid3, bid4;
|
||||
doublereal diu1, diu2, div1, div2, sou1, sou2, sov1, sov2;
|
||||
integer ncfhu = 0, ncfhv = 0, nuroo = 0, nvroo = 0, nd = 0, ii = 0, jj = 0, kk = 0, ll = 0, ibb = 0, kkm = 0,
|
||||
llm = 0, kkp = 0, llp = 0;
|
||||
doublereal bid1 = NAN, bid2 = NAN, bid3 = NAN, bid4 = NAN;
|
||||
doublereal diu1 = NAN, diu2 = NAN, div1 = NAN, div2 = NAN, sou1 = NAN, sou2 = NAN, sov1 = NAN, sov2 = NAN;
|
||||
|
||||
/* **********************************************************************
|
||||
*/
|
||||
@@ -2665,17 +2667,17 @@ int mma2cd2_(integer *ndimen,
|
||||
{
|
||||
integer c__1 = 1;
|
||||
/* System generated locals */
|
||||
integer sotbv1_dim1, sotbv1_dim2, sotbv1_offset, sotbv2_dim1, sotbv2_dim2,
|
||||
sotbv2_offset, ditbv1_dim1, ditbv1_dim2, ditbv1_offset,
|
||||
ditbv2_dim1, ditbv2_dim2, ditbv2_offset, fpntab_dim1,
|
||||
fpntab_offset, vhermt_dim1, vhermt_offset, sosotb_dim1,
|
||||
sosotb_dim2, sosotb_offset, diditb_dim1, diditb_dim2,
|
||||
diditb_offset, soditb_dim1, soditb_dim2, soditb_offset,
|
||||
disotb_dim1, disotb_dim2, disotb_offset, i__1, i__2, i__3, i__4;
|
||||
integer sotbv1_dim1 = 0, sotbv1_dim2 = 0, sotbv1_offset = 0, sotbv2_dim1 = 0, sotbv2_dim2 = 0,
|
||||
sotbv2_offset = 0, ditbv1_dim1 = 0, ditbv1_dim2 = 0, ditbv1_offset = 0,
|
||||
ditbv2_dim1 = 0, ditbv2_dim2 = 0, ditbv2_offset = 0, fpntab_dim1 = 0,
|
||||
fpntab_offset = 0, vhermt_dim1 = 0, vhermt_offset = 0, sosotb_dim1 = 0,
|
||||
sosotb_dim2 = 0, sosotb_offset = 0, diditb_dim1 = 0, diditb_dim2 = 0,
|
||||
diditb_offset = 0, soditb_dim1 = 0, soditb_dim2 = 0, soditb_offset = 0,
|
||||
disotb_dim1 = 0, disotb_dim2 = 0, disotb_offset = 0, i__1 = 0, i__2 = 0, i__3 = 0, i__4 = 0;
|
||||
|
||||
/* Local variables */
|
||||
integer ncfhv, nuroo, nvroo, ii, nd, jj, kk, ibb, jjm, jjp;
|
||||
doublereal bid1, bid2, bid3, bid4;
|
||||
integer ncfhv = 0, nuroo = 0, nvroo = 0, ii = 0, nd = 0, jj = 0, kk = 0, ibb = 0, jjm = 0, jjp = 0;
|
||||
doublereal bid1 = NAN, bid2 = NAN, bid3 = NAN, bid4 = NAN;
|
||||
|
||||
/* **********************************************************************
|
||||
*/
|
||||
@@ -2978,17 +2980,17 @@ int mma2cd3_(integer *ndimen,
|
||||
integer c__1 = 1;
|
||||
|
||||
/* System generated locals */
|
||||
integer sotbu1_dim1, sotbu1_dim2, sotbu1_offset, sotbu2_dim1, sotbu2_dim2,
|
||||
sotbu2_offset, ditbu1_dim1, ditbu1_dim2, ditbu1_offset,
|
||||
ditbu2_dim1, ditbu2_dim2, ditbu2_offset, fpntab_dim1,
|
||||
fpntab_offset, uhermt_dim1, uhermt_offset, sosotb_dim1,
|
||||
sosotb_dim2, sosotb_offset, diditb_dim1, diditb_dim2,
|
||||
diditb_offset, soditb_dim1, soditb_dim2, soditb_offset,
|
||||
disotb_dim1, disotb_dim2, disotb_offset, i__1, i__2, i__3, i__4;
|
||||
integer sotbu1_dim1 = 0, sotbu1_dim2 = 0, sotbu1_offset = 0, sotbu2_dim1 = 0, sotbu2_dim2 = 0,
|
||||
sotbu2_offset = 0, ditbu1_dim1 = 0, ditbu1_dim2 = 0, ditbu1_offset = 0,
|
||||
ditbu2_dim1 = 0, ditbu2_dim2 = 0, ditbu2_offset = 0, fpntab_dim1 = 0,
|
||||
fpntab_offset = 0, uhermt_dim1 = 0, uhermt_offset = 0, sosotb_dim1 = 0,
|
||||
sosotb_dim2 = 0, sosotb_offset = 0, diditb_dim1 = 0, diditb_dim2 = 0,
|
||||
diditb_offset = 0, soditb_dim1 = 0, soditb_dim2 = 0, soditb_offset = 0,
|
||||
disotb_dim1 = 0, disotb_dim2 = 0, disotb_offset = 0, i__1 = 0, i__2 = 0, i__3 = 0, i__4 = 0;
|
||||
|
||||
/* Local variables */
|
||||
integer ncfhu, nuroo, nvroo, ii, nd, jj, kk, ibb, kkm, kkp;
|
||||
doublereal bid1, bid2, bid3, bid4;
|
||||
integer ncfhu = 0, nuroo = 0, nvroo = 0, ii = 0, nd = 0, jj = 0, kk = 0, ibb = 0, kkm = 0, kkp = 0;
|
||||
doublereal bid1 = NAN, bid2 = NAN, bid3 = NAN, bid4 = NAN;
|
||||
|
||||
/* **********************************************************************
|
||||
*/
|
||||
@@ -3304,22 +3306,22 @@ int AdvApp2Var_ApproxF2var::mma2cdi_( integer *ndimen,
|
||||
integer c__8 = 8;
|
||||
|
||||
/* System generated locals */
|
||||
integer contr1_dim1, contr1_dim2, contr1_offset, contr2_dim1, contr2_dim2,
|
||||
contr2_offset, contr3_dim1, contr3_dim2, contr3_offset,
|
||||
contr4_dim1, contr4_dim2, contr4_offset, sosotb_dim1, sosotb_dim2,
|
||||
sosotb_offset, diditb_dim1, diditb_dim2, diditb_offset,
|
||||
soditb_dim1, soditb_dim2, soditb_offset, disotb_dim1, disotb_dim2,
|
||||
disotb_offset;
|
||||
integer contr1_dim1 = 0, contr1_dim2 = 0, contr1_offset = 0, contr2_dim1 = 0, contr2_dim2 = 0,
|
||||
contr2_offset = 0, contr3_dim1 = 0, contr3_dim2 = 0, contr3_offset = 0,
|
||||
contr4_dim1 = 0, contr4_dim2 = 0, contr4_offset = 0, sosotb_dim1 = 0, sosotb_dim2 = 0,
|
||||
sosotb_offset = 0, diditb_dim1 = 0, diditb_dim2 = 0, diditb_offset = 0,
|
||||
soditb_dim1 = 0, soditb_dim2 = 0, soditb_offset = 0, disotb_dim1 = 0, disotb_dim2 = 0,
|
||||
disotb_offset = 0;
|
||||
|
||||
/* Local variables */
|
||||
integer ilong;
|
||||
intptr_t iofwr;
|
||||
integer ilong = 0;
|
||||
intptr_t iofwr = 0;
|
||||
doublereal* wrkar = 0;
|
||||
doublereal* wrkar_off;
|
||||
integer iszwr;
|
||||
integer ibb, ier = 0;
|
||||
integer isz1, isz2, isz3, isz4;
|
||||
intptr_t ipt1, ipt2, ipt3;
|
||||
doublereal* wrkar_off = nullptr;
|
||||
integer iszwr = 0;
|
||||
integer ibb = 0, ier = 0;
|
||||
integer isz1 = 0, isz2 = 0, isz3 = 0, isz4 = 0;
|
||||
intptr_t ipt1 = 0, ipt2 = 0, ipt3 = 0;
|
||||
|
||||
|
||||
|
||||
@@ -3621,20 +3623,20 @@ int AdvApp2Var_ApproxF2var::mma2ce1_(integer *numdec,
|
||||
integer c__8 = 8;
|
||||
|
||||
/* System generated locals */
|
||||
integer sosotb_dim1, sosotb_dim2, sosotb_offset, disotb_dim1, disotb_dim2,
|
||||
disotb_offset, soditb_dim1, soditb_dim2, soditb_offset,
|
||||
diditb_dim1, diditb_dim2, diditb_offset, patjac_dim1, patjac_dim2,
|
||||
patjac_offset;
|
||||
integer sosotb_dim1 = 0, sosotb_dim2 = 0, sosotb_offset = 0, disotb_dim1 = 0, disotb_dim2 = 0,
|
||||
disotb_offset = 0, soditb_dim1 = 0, soditb_dim2 = 0, soditb_offset = 0,
|
||||
diditb_dim1 = 0, diditb_dim2 = 0, diditb_offset = 0, patjac_dim1 = 0, patjac_dim2 = 0,
|
||||
patjac_offset = 0;
|
||||
|
||||
/* Local variables */
|
||||
logical ldbg;
|
||||
intptr_t iofwr;
|
||||
logical ldbg = 0;
|
||||
intptr_t iofwr = 0;
|
||||
doublereal* wrkar = 0;
|
||||
doublereal* wrkar_off;
|
||||
integer iszwr;
|
||||
integer ier;
|
||||
integer isz1, isz2, isz3, isz4, isz5, isz6, isz7;
|
||||
intptr_t ipt1, ipt2, ipt3, ipt4, ipt5, ipt6;
|
||||
doublereal* wrkar_off = nullptr;
|
||||
integer iszwr = 0;
|
||||
integer ier = 0;
|
||||
integer isz1 = 0, isz2 = 0, isz3 = 0, isz4 = 0, isz5 = 0, isz6 = 0, isz7 = 0;
|
||||
intptr_t ipt1 = 0, ipt2 = 0, ipt3 = 0, ipt4 = 0, ipt5 = 0, ipt6 = 0;
|
||||
|
||||
|
||||
|
||||
@@ -3902,20 +3904,20 @@ int mma2ce2_(integer *numdec,
|
||||
|
||||
{
|
||||
/* System generated locals */
|
||||
integer sosotb_dim1, sosotb_dim2, sosotb_offset, disotb_dim1, disotb_dim2,
|
||||
disotb_offset, soditb_dim1, soditb_dim2, soditb_offset,
|
||||
diditb_dim1, diditb_dim2, diditb_offset, gssutb_dim1, gssvtb_dim1,
|
||||
chpair_dim1, chpair_dim2, chpair_offset, chimpr_dim1,
|
||||
chimpr_dim2, chimpr_offset, patjac_dim1, patjac_dim2,
|
||||
patjac_offset, vecerr_dim1, vecerr_offset, i__1, i__2, i__3, i__4;
|
||||
integer sosotb_dim1 = 0, sosotb_dim2 = 0, sosotb_offset = 0, disotb_dim1 = 0, disotb_dim2 = 0,
|
||||
disotb_offset = 0, soditb_dim1 = 0, soditb_dim2 = 0, soditb_offset = 0,
|
||||
diditb_dim1 = 0, diditb_dim2 = 0, diditb_offset = 0, gssutb_dim1 = 0, gssvtb_dim1 = 0,
|
||||
chpair_dim1 = 0, chpair_dim2 = 0, chpair_offset = 0, chimpr_dim1 = 0,
|
||||
chimpr_dim2 = 0, chimpr_offset = 0, patjac_dim1 = 0, patjac_dim2 = 0,
|
||||
patjac_offset = 0, vecerr_dim1 = 0, vecerr_offset = 0, i__1 = 0, i__2 = 0, i__3 = 0, i__4 = 0;
|
||||
|
||||
/* Local variables */
|
||||
logical ldbg;
|
||||
integer idim, igsu, minu, minv, maxu, maxv, igsv;
|
||||
logical ldbg = 0;
|
||||
integer idim = 0, igsu = 0, minu = 0, minv = 0, maxu = 0, maxv = 0, igsv = 0;
|
||||
doublereal vaux[3];
|
||||
integer i2rdu, i2rdv, ndses, nd, ii, jj, kk, nu, nv;
|
||||
doublereal zu, zv;
|
||||
integer nu1, nv1;
|
||||
integer i2rdu = 0, i2rdv = 0, ndses = 0, nd = 0, ii = 0, jj = 0, kk = 0, nu = 0, nv = 0;
|
||||
doublereal zu = NAN, zv = NAN;
|
||||
integer nu1 = 0, nv1 = 0;
|
||||
|
||||
/* **********************************************************************
|
||||
*/
|
||||
@@ -4671,13 +4673,13 @@ int mma2cfu_(integer *ndujac,
|
||||
|
||||
{
|
||||
/* System generated locals */
|
||||
integer sosotb_dim1, disotb_dim1, disotb_offset, soditb_dim1,
|
||||
soditb_offset, diditb_dim1, i__1, i__2;
|
||||
integer sosotb_dim1 = 0, disotb_dim1 = 0, disotb_offset = 0, soditb_dim1 = 0,
|
||||
soditb_offset = 0, diditb_dim1 = 0, i__1 = 0, i__2 = 0;
|
||||
|
||||
/* Local variables */
|
||||
logical ldbg;
|
||||
integer nptu2, nptv2, ii, jj;
|
||||
doublereal bid0, bid1, bid2;
|
||||
logical ldbg = 0;
|
||||
integer nptu2 = 0, nptv2 = 0, ii = 0, jj = 0;
|
||||
doublereal bid0 = NAN, bid1 = NAN, bid2 = NAN;
|
||||
|
||||
/* **********************************************************************
|
||||
*/
|
||||
@@ -4887,13 +4889,13 @@ int mma2cfv_(integer *ndvjac,
|
||||
|
||||
{
|
||||
/* System generated locals */
|
||||
integer chpair_dim1, chpair_offset, chimpr_dim1, chimpr_offset,
|
||||
patjac_offset, i__1, i__2;
|
||||
integer chpair_dim1 = 0, chpair_offset = 0, chimpr_dim1 = 0, chimpr_offset = 0,
|
||||
patjac_offset = 0, i__1 = 0, i__2 = 0;
|
||||
|
||||
/* Local variables */
|
||||
logical ldbg;
|
||||
integer nptv2, ii, jj;
|
||||
doublereal bid1;
|
||||
logical ldbg = 0;
|
||||
integer nptv2 = 0, ii = 0, jj = 0;
|
||||
doublereal bid1 = NAN;
|
||||
|
||||
/* **********************************************************************
|
||||
*/
|
||||
@@ -5043,15 +5045,15 @@ int AdvApp2Var_ApproxF2var::mma2ds1_(integer *ndimen,
|
||||
|
||||
{
|
||||
/* System generated locals */
|
||||
integer sosotb_dim1, sosotb_dim2, sosotb_offset, disotb_dim1, disotb_dim2,
|
||||
disotb_offset, soditb_dim1, soditb_dim2, soditb_offset,
|
||||
diditb_dim1, diditb_dim2, diditb_offset, fpntab_dim1,
|
||||
fpntab_offset, i__1;
|
||||
integer sosotb_dim1 = 0, sosotb_dim2 = 0, sosotb_offset = 0, disotb_dim1 = 0, disotb_dim2 = 0,
|
||||
disotb_offset = 0, soditb_dim1 = 0, soditb_dim2 = 0, soditb_offset = 0,
|
||||
diditb_dim1 = 0, diditb_dim2 = 0, diditb_offset = 0, fpntab_dim1 = 0,
|
||||
fpntab_offset = 0, i__1 = 0;
|
||||
|
||||
/* Local variables */
|
||||
logical ldbg;
|
||||
integer ibid1, ibid2, iuouv, nd;
|
||||
integer isz1, isz2;
|
||||
logical ldbg = 0;
|
||||
integer ibid1 = 0, ibid2 = 0, iuouv = 0, nd = 0;
|
||||
integer isz1 = 0, isz2 = 0;
|
||||
|
||||
/* **********************************************************************
|
||||
*/
|
||||
@@ -5364,18 +5366,18 @@ int mma2ds2_(integer *ndimen,
|
||||
{
|
||||
integer c__0 = 0;
|
||||
/* System generated locals */
|
||||
integer sosotb_dim1, sosotb_dim2, sosotb_offset, disotb_dim1, disotb_dim2,
|
||||
disotb_offset, soditb_dim1, soditb_dim2, soditb_offset,
|
||||
diditb_dim1, diditb_dim2, diditb_offset, fpntab_dim1,
|
||||
fpntab_offset, i__1, i__2, i__3;
|
||||
integer sosotb_dim1 = 0, sosotb_dim2 = 0, sosotb_offset = 0, disotb_dim1 = 0, disotb_dim2 = 0,
|
||||
disotb_offset = 0, soditb_dim1 = 0, soditb_dim2 = 0, soditb_offset = 0,
|
||||
diditb_dim1 = 0, diditb_dim2 = 0, diditb_offset = 0, fpntab_dim1 = 0,
|
||||
fpntab_offset = 0, i__1 = 0, i__2 = 0, i__3 = 0;
|
||||
|
||||
/* Local variables */
|
||||
integer jdec;
|
||||
logical ldbg;
|
||||
doublereal alinu, blinu, alinv, blinv, tcons;
|
||||
integer jdec = 0;
|
||||
logical ldbg = 0;
|
||||
doublereal alinu = NAN, blinu = NAN, alinv = NAN, blinv = NAN, tcons = NAN;
|
||||
doublereal dbfn1[2], dbfn2[2];
|
||||
integer nuroo, nvroo, id, iu, iv;
|
||||
doublereal um, up;
|
||||
integer nuroo = 0, nvroo = 0, id = 0, iu = 0, iv = 0;
|
||||
doublereal um = NAN, up = NAN;
|
||||
|
||||
|
||||
/* **********************************************************************
|
||||
@@ -5742,15 +5744,15 @@ int mma2er1_(integer *ndjacu,
|
||||
|
||||
{
|
||||
/* System generated locals */
|
||||
integer patjac_dim1, patjac_dim2, patjac_offset, i__1, i__2, i__3;
|
||||
doublereal d__1;
|
||||
integer patjac_dim1 = 0, patjac_dim2 = 0, patjac_offset = 0, i__1 = 0, i__2 = 0, i__3 = 0;
|
||||
doublereal d__1 = NAN;
|
||||
|
||||
/* Local variables */
|
||||
logical ldbg;
|
||||
integer minu, minv;
|
||||
logical ldbg = 0;
|
||||
integer minu = 0, minv = 0;
|
||||
doublereal vaux[2];
|
||||
integer ii, nd, jj;
|
||||
doublereal bid0, bid1;
|
||||
integer ii = 0, nd = 0, jj = 0;
|
||||
doublereal bid0 = NAN, bid1 = NAN;
|
||||
|
||||
/* **********************************************************************
|
||||
*/
|
||||
@@ -5908,16 +5910,16 @@ int mma2er2_(integer *ndjacu,
|
||||
|
||||
{
|
||||
/* System generated locals */
|
||||
integer patjac_dim1, patjac_dim2, patjac_offset, i__1, i__2;
|
||||
doublereal d__1;
|
||||
integer patjac_dim1 = 0, patjac_dim2 = 0, patjac_offset = 0, i__1 = 0, i__2 = 0;
|
||||
doublereal d__1 = NAN;
|
||||
|
||||
/* Local variables */
|
||||
logical ldbg;
|
||||
logical ldbg = 0;
|
||||
doublereal vaux[2];
|
||||
integer i2rdu, i2rdv;
|
||||
doublereal errnu, errnv;
|
||||
integer ii, nd, jj, nu, nv;
|
||||
doublereal bid0, bid1;
|
||||
integer i2rdu = 0, i2rdv = 0;
|
||||
doublereal errnu = NAN, errnv = NAN;
|
||||
integer ii = 0, nd = 0, jj = 0, nu = 0, nv = 0;
|
||||
doublereal bid0 = NAN, bid1 = NAN;
|
||||
|
||||
/* **********************************************************************
|
||||
*/
|
||||
@@ -6155,31 +6157,31 @@ int AdvApp2Var_ApproxF2var::mma2fnc_(integer *ndimen,
|
||||
integer c__8 = 8;
|
||||
|
||||
/* System generated locals */
|
||||
integer courbe_dim1, courbe_dim2, courbe_offset, somtab_dim1, somtab_dim2,
|
||||
somtab_offset, diftab_dim1, diftab_dim2, diftab_offset,
|
||||
contr1_dim1, contr1_dim2, contr1_offset, contr2_dim1, contr2_dim2,
|
||||
contr2_offset, errmax_dim1, errmax_offset, errmoy_dim1,
|
||||
errmoy_offset, i__1;
|
||||
doublereal d__1;
|
||||
integer courbe_dim1 = 0, courbe_dim2 = 0, courbe_offset = 0, somtab_dim1 = 0, somtab_dim2 = 0,
|
||||
somtab_offset = 0, diftab_dim1 = 0, diftab_dim2 = 0, diftab_offset = 0,
|
||||
contr1_dim1 = 0, contr1_dim2 = 0, contr1_offset = 0, contr2_dim1 = 0, contr2_dim2 = 0,
|
||||
contr2_offset = 0, errmax_dim1 = 0, errmax_offset = 0, errmoy_dim1 = 0,
|
||||
errmoy_offset = 0, i__1 = 0;
|
||||
doublereal d__1 = NAN;
|
||||
|
||||
/* Local variables */
|
||||
integer ideb;
|
||||
doublereal tmil;
|
||||
integer ideb1, ibid1, ibid2, ncfja, ndgre, ilong,
|
||||
ndwrk;
|
||||
integer ideb = 0;
|
||||
doublereal tmil = NAN;
|
||||
integer ideb1 = 0, ibid1 = 0, ibid2 = 0, ncfja = 0, ndgre = 0, ilong = 0,
|
||||
ndwrk = 0;
|
||||
doublereal* wrkar = 0;
|
||||
doublereal* wrkar_off;
|
||||
integer nupil;
|
||||
intptr_t iofwr;
|
||||
doublereal* wrkar_off = nullptr;
|
||||
integer nupil = 0;
|
||||
intptr_t iofwr = 0;
|
||||
doublereal uvpav[4] /* was [2][2] */;
|
||||
integer nd, ii;
|
||||
integer ibb;
|
||||
integer nd = 0, ii = 0;
|
||||
integer ibb = 0;
|
||||
integer ier = 0;
|
||||
doublereal uv11[4] /* was [2][2] */;
|
||||
integer ncb1;
|
||||
doublereal eps3;
|
||||
integer isz1, isz2, isz3, isz4, isz5;
|
||||
intptr_t ipt1, ipt2, ipt3, ipt4,iptt, jptt;
|
||||
integer ncb1 = 0;
|
||||
doublereal eps3 = NAN;
|
||||
integer isz1 = 0, isz2 = 0, isz3 = 0, isz4 = 0, isz5 = 0;
|
||||
intptr_t ipt1 = 0, ipt2 = 0, ipt3 = 0, ipt4 = 0,iptt = 0, jptt = 0;
|
||||
|
||||
/* **********************************************************************
|
||||
*/
|
||||
@@ -6707,16 +6709,16 @@ int AdvApp2Var_ApproxF2var::mma2fx6_(integer *ncfmxu,
|
||||
|
||||
{
|
||||
/* System generated locals */
|
||||
integer epsfro_dim1, epsfro_offset, patcan_dim1, patcan_dim2, patcan_dim3,
|
||||
patcan_dim4, patcan_offset, errmax_dim1, errmax_dim2,
|
||||
errmax_offset, ncoefu_dim1, ncoefu_offset, ncoefv_dim1,
|
||||
ncoefv_offset, i__1, i__2, i__3, i__4, i__5;
|
||||
doublereal d__1, d__2;
|
||||
integer epsfro_dim1 = 0, epsfro_offset = 0, patcan_dim1 = 0, patcan_dim2 = 0, patcan_dim3 = 0,
|
||||
patcan_dim4 = 0, patcan_offset = 0, errmax_dim1 = 0, errmax_dim2 = 0,
|
||||
errmax_offset = 0, ncoefu_dim1 = 0, ncoefu_offset = 0, ncoefv_dim1 = 0,
|
||||
ncoefv_offset = 0, i__1 = 0, i__2 = 0, i__3 = 0, i__4 = 0, i__5 = 0;
|
||||
doublereal d__1 = NAN, d__2 = NAN;
|
||||
|
||||
/* Local variables */
|
||||
integer idim, ncfu, ncfv, id, ii, nd, jj, ku, kv, ns, ibb;
|
||||
doublereal bid;
|
||||
doublereal tol;
|
||||
integer idim = 0, ncfu = 0, ncfv = 0, id = 0, ii = 0, nd = 0, jj = 0, ku = 0, kv = 0, ns = 0, ibb = 0;
|
||||
doublereal bid = NAN;
|
||||
doublereal tol = NAN;
|
||||
|
||||
/* **********************************************************************
|
||||
*/
|
||||
@@ -7142,12 +7144,12 @@ int AdvApp2Var_ApproxF2var::mma2jmx_(integer *ndgjac,
|
||||
2.71238965987606292679677228666411 };
|
||||
|
||||
/* System generated locals */
|
||||
integer i__1;
|
||||
integer i__1 = 0;
|
||||
|
||||
/* Local variables */
|
||||
logical ldbg;
|
||||
integer numax, ii;
|
||||
doublereal bid;
|
||||
logical ldbg = 0;
|
||||
integer numax = 0, ii = 0;
|
||||
doublereal bid = NAN;
|
||||
|
||||
|
||||
/* **********************************************************************
|
||||
@@ -7246,12 +7248,12 @@ int mma2moy_(integer *ndgumx,
|
||||
doublereal *errmoy)
|
||||
{
|
||||
/* System generated locals */
|
||||
integer patjac_dim1, patjac_dim2, patjac_offset, i__1, i__2, i__3;
|
||||
integer patjac_dim1 = 0, patjac_dim2 = 0, patjac_offset = 0, i__1 = 0, i__2 = 0, i__3 = 0;
|
||||
|
||||
/* Local variables */
|
||||
logical ldbg;
|
||||
integer minu, minv, idebu, idebv, ii, nd, jj;
|
||||
doublereal bid0, bid1;
|
||||
logical ldbg = 0;
|
||||
integer minu = 0, minv = 0, idebu = 0, idebv = 0, ii = 0, nd = 0, jj = 0;
|
||||
doublereal bid0 = NAN, bid1 = NAN;
|
||||
|
||||
|
||||
/* **********************************************************************
|
||||
@@ -7393,10 +7395,10 @@ int AdvApp2Var_ApproxF2var::mma2roo_(integer *nbpntu,
|
||||
doublereal *vrootl)
|
||||
{
|
||||
/* System generated locals */
|
||||
integer i__1;
|
||||
integer i__1 = 0;
|
||||
|
||||
/* Local variables */
|
||||
integer ii, ibb;
|
||||
integer ii = 0, ibb = 0;
|
||||
|
||||
/* **********************************************************************
|
||||
*/
|
||||
@@ -7498,13 +7500,13 @@ int mmmapcoe_(integer *ndim,
|
||||
|
||||
{
|
||||
/* System generated locals */
|
||||
integer somtab_dim1, somtab_offset, diftab_dim1, diftab_offset,
|
||||
crvjac_dim1, crvjac_offset, gsstab_dim1, i__1, i__2, i__3;
|
||||
integer somtab_dim1 = 0, somtab_offset = 0, diftab_dim1 = 0, diftab_offset = 0,
|
||||
crvjac_dim1 = 0, crvjac_offset = 0, gsstab_dim1 = 0, i__1 = 0, i__2 = 0, i__3 = 0;
|
||||
|
||||
/* Local variables */
|
||||
integer igss, ikdeb;
|
||||
doublereal bidon;
|
||||
integer nd, ik, ir, nbroot, ibb;
|
||||
integer igss = 0, ikdeb = 0;
|
||||
doublereal bidon = NAN;
|
||||
integer nd = 0, ik = 0, ir = 0, nbroot = 0, ibb = 0;
|
||||
|
||||
/* **********************************************************************
|
||||
*/
|
||||
@@ -7660,12 +7662,12 @@ int mmaperm_(integer *ncofmx,
|
||||
doublereal *errmoy)
|
||||
{
|
||||
/* System generated locals */
|
||||
integer crvjac_dim1, crvjac_offset, i__1, i__2;
|
||||
integer crvjac_dim1 = 0, crvjac_offset = 0, i__1 = 0, i__2 = 0;
|
||||
|
||||
/* Local variables */
|
||||
doublereal bidj;
|
||||
integer i__, ia, nd, ncfcut, ibb;
|
||||
doublereal bid;
|
||||
doublereal bidj = NAN;
|
||||
integer i__ = 0, ia = 0, nd = 0, ncfcut = 0, ibb = 0;
|
||||
doublereal bid = NAN;
|
||||
|
||||
/* **********************************************************************
|
||||
*/
|
||||
@@ -7769,10 +7771,10 @@ int AdvApp2Var_ApproxF2var::mmapptt_(const integer *ndgjac,
|
||||
integer *iercod)
|
||||
{
|
||||
/* System generated locals */
|
||||
integer cgauss_dim1, i__1;
|
||||
integer cgauss_dim1 = 0, i__1 = 0;
|
||||
|
||||
/* Local variables */
|
||||
integer kjac, iptt, ipdb0, infdg, iptdb, mxjac, ilong, ibb;
|
||||
integer kjac = 0, iptt = 0, ipdb0 = 0, infdg = 0, iptdb = 0, mxjac = 0, ilong = 0, ibb = 0;
|
||||
|
||||
/* **********************************************************************
|
||||
*/
|
||||
@@ -8071,12 +8073,12 @@ int mmjacpt_(const integer *ndimen,
|
||||
doublereal *ptccan)
|
||||
{
|
||||
/* System generated locals */
|
||||
integer ptccan_dim1, ptccan_dim2, ptccan_offset, ptclgd_dim1, ptclgd_dim2,
|
||||
ptclgd_offset, ptcaux_dim1, ptcaux_dim2, ptcaux_dim3,
|
||||
ptcaux_offset, i__1, i__2, i__3;
|
||||
integer ptccan_dim1 = 0, ptccan_dim2 = 0, ptccan_offset = 0, ptclgd_dim1 = 0, ptclgd_dim2 = 0,
|
||||
ptclgd_offset = 0, ptcaux_dim1 = 0, ptcaux_dim2 = 0, ptcaux_dim3 = 0,
|
||||
ptcaux_offset = 0, i__1 = 0, i__2 = 0, i__3 = 0;
|
||||
|
||||
/* Local variables */
|
||||
integer kdim, nd, ii, jj, ibb;
|
||||
integer kdim = 0, nd = 0, ii = 0, jj = 0, ibb = 0;
|
||||
|
||||
/* ***********************************************************************
|
||||
*/
|
||||
|
@@ -15,6 +15,8 @@
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <AdvApp2Var_ApproxF2var.hxx>
|
||||
#include <AdvApp2Var_Context.hxx>
|
||||
#include <Standard_ConstructionError.hxx>
|
||||
@@ -108,7 +110,7 @@ myNb2DSS(nb2Dss),
|
||||
myNb3DSS(nb3Dss)
|
||||
{
|
||||
Standard_Integer ErrorCode=0,NbPntU=0,JDegU=0,NbPntV=0,JDegV=0;
|
||||
Standard_Integer ncfl;
|
||||
Standard_Integer ncfl = 0;
|
||||
|
||||
// myNbURoot,myJDegU
|
||||
ncfl = nlimu;
|
||||
@@ -120,7 +122,7 @@ myJDegU = JDegU;
|
||||
if (iu>-1) NbPntU = myNbURoot - 2;
|
||||
|
||||
// myJMaxU
|
||||
Standard_Integer i,j,size = JDegU-2*iu-1;
|
||||
Standard_Integer i = 0,j = 0,size = JDegU-2*iu-1;
|
||||
Handle (TColStd_HArray1OfReal) JMaxU =
|
||||
new TColStd_HArray1OfReal(1,size);
|
||||
Standard_Real *JU_array =
|
||||
@@ -223,7 +225,7 @@ for (j=1;j<=4;j++) {
|
||||
}
|
||||
}
|
||||
if (iu>-1||iv>-1) {
|
||||
Standard_Real tolmin, poids, hmax[4];
|
||||
Standard_Real tolmin = NAN, poids = NAN, hmax[4];
|
||||
hmax[0] = 0;
|
||||
hmax[1] = 1;
|
||||
hmax[2] = 1.5;
|
||||
|
@@ -45,11 +45,11 @@ AdvApp2Var_Framework::AdvApp2Var_Framework()
|
||||
|
||||
AdvApp2Var_Framework::AdvApp2Var_Framework(const AdvApp2Var_SequenceOfNode& Frame,
|
||||
const AdvApp2Var_SequenceOfStrip& UFrontier,
|
||||
const AdvApp2Var_SequenceOfStrip& VFrontier)
|
||||
const AdvApp2Var_SequenceOfStrip& VFrontier) : myNodeConstraints(Frame), myUConstraints(UFrontier), myVConstraints(VFrontier)
|
||||
{
|
||||
myNodeConstraints = Frame;
|
||||
myUConstraints = UFrontier;
|
||||
myVConstraints = VFrontier;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//==========================================================================================
|
||||
@@ -92,7 +92,7 @@ Standard_Integer AdvApp2Var_Framework::FirstNode(const GeomAbs_IsoType Type,
|
||||
const Standard_Integer IndexIso,
|
||||
const Standard_Integer IndexStrip) const
|
||||
{
|
||||
Standard_Integer NbIso,Index;
|
||||
Standard_Integer NbIso = 0,Index = 0;
|
||||
NbIso = myUConstraints.Length()+1;
|
||||
if (Type==GeomAbs_IsoU) {
|
||||
Index = NbIso * (IndexStrip-1) + IndexIso;
|
||||
@@ -113,7 +113,7 @@ Standard_Integer AdvApp2Var_Framework::LastNode(const GeomAbs_IsoType Type,
|
||||
const Standard_Integer IndexIso,
|
||||
const Standard_Integer IndexStrip) const
|
||||
{
|
||||
Standard_Integer NbIso,Index;
|
||||
Standard_Integer NbIso = 0,Index = 0;
|
||||
NbIso = myUConstraints.Length()+1;
|
||||
if (Type==GeomAbs_IsoU) {
|
||||
Index = NbIso * IndexStrip + IndexIso;
|
||||
|
@@ -116,9 +116,9 @@ void AdvApp2Var_Iso::MakeApprox(const AdvApp2Var_Context& Conditions,
|
||||
AdvApp2Var_Node& NodeEnd)
|
||||
{
|
||||
// fixed values
|
||||
Standard_Integer NBCRMX=1, NBCRBE;
|
||||
Standard_Integer NBCRMX=1, NBCRBE = 0;
|
||||
// data stored in the Context
|
||||
Standard_Integer NDIMEN, NBSESP, NDIMSE;
|
||||
Standard_Integer NDIMEN = 0, NBSESP = 0, NDIMSE = 0;
|
||||
NDIMEN = Conditions.TotalDimension();
|
||||
NBSESP = Conditions.TotalNumberSSP();
|
||||
// Attention : works only in 3D
|
||||
@@ -176,7 +176,7 @@ void AdvApp2Var_Iso::MakeApprox(const AdvApp2Var_Context& Conditions,
|
||||
|
||||
// data relative to the position of iso (front or cut line)
|
||||
Handle (TColStd_HArray1OfReal) HEPSAPR = new TColStd_HArray1OfReal(1,NBSESP);
|
||||
Standard_Integer iesp;
|
||||
Standard_Integer iesp = 0;
|
||||
switch(myPosition) {
|
||||
case 0 :
|
||||
for (iesp=1;iesp<=NBSESP;iesp++) {
|
||||
@@ -247,7 +247,7 @@ void AdvApp2Var_Iso::MakeApprox(const AdvApp2Var_Context& Conditions,
|
||||
// the approximations
|
||||
//
|
||||
Standard_Integer IERCOD=0, NCOEFF=0;
|
||||
Standard_Integer iapp,ncfapp,ierapp;
|
||||
Standard_Integer iapp = 0,ncfapp = 0,ierapp = 0;
|
||||
// Standard_Integer id,ic,ideb;
|
||||
for (iapp=0;iapp<=IDERIV;iapp++) {
|
||||
// approximation of the derivative of order iapp
|
||||
@@ -291,7 +291,7 @@ void AdvApp2Var_Iso::MakeApprox(const AdvApp2Var_Context& Conditions,
|
||||
if (NCOEFF<=ncfapp) NCOEFF=ncfapp;
|
||||
if (ierapp==-1) IERCOD = -1;
|
||||
// return constraints of order 0 to IORDRE of extremities
|
||||
Standard_Integer ider, jpos=HCONTR1->Lower();
|
||||
Standard_Integer ider = 0, jpos=HCONTR1->Lower();
|
||||
for (ider=0; ider<=IORDRE;ider++) {
|
||||
gp_Pnt pt(HCONTR1->Value(jpos),
|
||||
HCONTR1->Value(jpos+1),
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -39,11 +39,11 @@ AdvApp2Var_Network::AdvApp2Var_Network()
|
||||
|
||||
AdvApp2Var_Network::AdvApp2Var_Network(const AdvApp2Var_SequenceOfPatch& Net,
|
||||
const TColStd_SequenceOfReal& TheU,
|
||||
const TColStd_SequenceOfReal& TheV)
|
||||
const TColStd_SequenceOfReal& TheV) : myNet(Net), myUParameters(TheU), myVParameters(TheV)
|
||||
{
|
||||
myNet=Net;
|
||||
myUParameters=TheU;
|
||||
myVParameters=TheV;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//==========================================================================================
|
||||
@@ -75,7 +75,7 @@ void AdvApp2Var_Network::UpdateInU(const Standard_Real CuttingValue)
|
||||
{
|
||||
|
||||
// insertion du nouveau parametre de decoupe
|
||||
Standard_Integer i=1,j;
|
||||
Standard_Integer i=1,j = 0;
|
||||
while (myUParameters.Value(i)<CuttingValue) {
|
||||
i++;
|
||||
}
|
||||
|
@@ -22,6 +22,8 @@
|
||||
// by: Joelle CHAUVET / Jean-Marc LACHAUME
|
||||
// Initialisation de myCritValue pour OSF
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <AdvApp2Var_ApproxF2var.hxx>
|
||||
#include <AdvApp2Var_Context.hxx>
|
||||
#include <AdvApp2Var_Criterion.hxx>
|
||||
@@ -109,21 +111,21 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions,
|
||||
{
|
||||
|
||||
// data stored in the Context
|
||||
Standard_Integer NDIMEN, ISOFAV;
|
||||
Standard_Integer NDIMEN = 0, ISOFAV = 0;
|
||||
NDIMEN = Conditions.TotalDimension();
|
||||
// Attention : works only for 3D
|
||||
ISOFAV = Conditions.FavorIso();
|
||||
|
||||
// data related to the patch to be discretized
|
||||
Standard_Integer NBPNTU, NBPNTV;
|
||||
Standard_Integer NBPNTU = 0, NBPNTV = 0;
|
||||
Standard_Integer IORDRU = myOrdInU, IORDRV = myOrdInV;
|
||||
Handle (TColStd_HArray1OfReal) HUROOT = Conditions.URoots();
|
||||
Handle (TColStd_HArray1OfReal) HVROOT = Conditions.VRoots();
|
||||
Standard_Real * UROOT;
|
||||
Standard_Real * UROOT = nullptr;
|
||||
UROOT = (Standard_Real *) &HUROOT ->ChangeArray1()(HUROOT ->Lower());
|
||||
NBPNTU = (Conditions.URoots())->Length();
|
||||
if (myOrdInU>-1) NBPNTU -= 2;
|
||||
Standard_Real * VROOT;
|
||||
Standard_Real * VROOT = nullptr;
|
||||
VROOT = (Standard_Real *) &HVROOT ->ChangeArray1()(HVROOT ->Lower());
|
||||
NBPNTV = (Conditions.VRoots())->Length();
|
||||
if (myOrdInV>-1) NBPNTV -= 2;
|
||||
@@ -135,8 +137,8 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions,
|
||||
new TColStd_HArray1OfReal(1,SIZE*4);
|
||||
HCOINS->Init(0.);
|
||||
|
||||
Standard_Integer iu,iv;
|
||||
Standard_Real du=(myU1-myU0)/2,dv=(myV1-myV0)/2,rho,valnorm;
|
||||
Standard_Integer iu = 0,iv = 0;
|
||||
Standard_Real du=(myU1-myU0)/2,dv=(myV1-myV0)/2,rho = NAN,valnorm = NAN;
|
||||
|
||||
for (iu=0;iu<=myOrdInU;iu++) {
|
||||
for (iv=0;iv<=myOrdInV;iv++) {
|
||||
@@ -209,7 +211,7 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions,
|
||||
( (Constraints.IsoU(myU1,myV0,myV1)).DifTab() ) ->Array1();
|
||||
|
||||
// normalization
|
||||
Standard_Integer ideb1,ideb2,ideb3,ideb4,jj;
|
||||
Standard_Integer ideb1 = 0,ideb2 = 0,ideb3 = 0,ideb4 = 0,jj = 0;
|
||||
for (iu=1;iu<=IORDRU;iu++) {
|
||||
rho = pow(du,iu);
|
||||
ideb1 = HSU0->Lower() + iu*SIZE -1;
|
||||
@@ -402,8 +404,8 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
|
||||
const AdvApp2Var_Framework& Constraints)
|
||||
{
|
||||
// data stored in the Context
|
||||
Standard_Integer NDIMEN;
|
||||
Standard_Integer IERCOD, NCFLMU, NCFLMV, NDegU, NDegV;
|
||||
Standard_Integer NDIMEN = 0;
|
||||
Standard_Integer IERCOD = 0, NCFLMU = 0, NCFLMV = 0, NDegU = 0, NDegV = 0;
|
||||
NDIMEN = Conditions.TotalDimension();
|
||||
// Attention : works only for 3D
|
||||
NCFLMU = Conditions.ULimit();
|
||||
@@ -443,9 +445,9 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
|
||||
HCFU1->Init( (Constraints.IsoU(myU1,myV0,myV1)).NbCoeff() );
|
||||
|
||||
// normalization of Isos U
|
||||
Standard_Integer iu,iv;
|
||||
Standard_Real du=(myU1-myU0)/2,dv=(myV1-myV0)/2,rho,valnorm;
|
||||
Standard_Integer ideb0,ideb1,jj;
|
||||
Standard_Integer iu = 0,iv = 0;
|
||||
Standard_Real du=(myU1-myU0)/2,dv=(myV1-myV0)/2,rho = NAN,valnorm = NAN;
|
||||
Standard_Integer ideb0 = 0,ideb1 = 0,jj = 0;
|
||||
|
||||
for (iu=1;iu<=IORDRU;iu++) {
|
||||
rho = pow(du,iu);
|
||||
@@ -532,7 +534,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
|
||||
}
|
||||
|
||||
// add constraints at the corners
|
||||
Standard_Integer ideb;
|
||||
Standard_Integer ideb = 0;
|
||||
SIZE=NDIMEN*(IORDRU+2)*(IORDRV+2);
|
||||
Handle (TColStd_HArray1OfReal) HCOINS =
|
||||
new TColStd_HArray1OfReal(1,SIZE*4);
|
||||
@@ -590,8 +592,8 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
|
||||
Standard_Real *FACT =
|
||||
(Standard_Real *) &HFACT ->ChangeArray1()(HFACT ->Lower());
|
||||
|
||||
Standard_Integer idim,ncf0,ncf1,iun=1;
|
||||
Standard_Real *Is;
|
||||
Standard_Integer idim = 0,ncf0 = 0,ncf1 = 0,iun=1;
|
||||
Standard_Real *Is = nullptr;
|
||||
|
||||
// add extremities of isos U
|
||||
for (iu=1;iu<=IORDRU+1;iu++) {
|
||||
@@ -656,10 +658,10 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
|
||||
|
||||
void AdvApp2Var_Patch::AddErrors(const AdvApp2Var_Framework& Constraints)
|
||||
{
|
||||
Standard_Integer NBSESP = 1, iesp;
|
||||
Standard_Integer iu,iv;
|
||||
Standard_Integer NBSESP = 1, iesp = 0;
|
||||
Standard_Integer iu = 0,iv = 0;
|
||||
|
||||
Standard_Real errU,errV,error,hmax[4];
|
||||
Standard_Real errU = NAN,errV = NAN,error = NAN,hmax[4];
|
||||
hmax[0] = 0;
|
||||
hmax[1] = 1;
|
||||
hmax[2] = 1.5;
|
||||
@@ -718,7 +720,7 @@ void AdvApp2Var_Patch::AddErrors(const AdvApp2Var_Framework& Constraints)
|
||||
((Constraints.IsoU(myU1,myV0,myV1)).MaxErrors())->Value(iesp,1));
|
||||
|
||||
// calculate max errors at the corners
|
||||
Standard_Real emax1=0.,emax2=0.,emax3=0.,emax4=0.,err1,err2,err3,err4;
|
||||
Standard_Real emax1=0.,emax2=0.,emax3=0.,emax4=0.,err1 = NAN,err2 = NAN,err3 = NAN,err4 = NAN;
|
||||
for (iu=0;iu<=myOrdInU;iu++) {
|
||||
for (iv=0;iv<=myOrdInV;iv++) {
|
||||
error = (Constraints.Node(myU0,myV0))->Error(iu,iv);
|
||||
@@ -766,9 +768,9 @@ void AdvApp2Var_Patch::MakeApprox(const AdvApp2Var_Context& Conditions,
|
||||
{
|
||||
|
||||
// data stored in the Context
|
||||
Standard_Integer NDIMEN, NBSESP, NDIMSE;
|
||||
Standard_Integer NBPNTU, NBPNTV, NCFLMU, NCFLMV, NDJACU, NDJACV;
|
||||
Standard_Integer NDegU, NDegV, NJacU, NJacV;
|
||||
Standard_Integer NDIMEN = 0, NBSESP = 0, NDIMSE = 0;
|
||||
Standard_Integer NBPNTU = 0, NBPNTV = 0, NCFLMU = 0, NCFLMV = 0, NDJACU = 0, NDJACV = 0;
|
||||
Standard_Integer NDegU = 0, NDegV = 0, NJacU = 0, NJacV = 0;
|
||||
NDIMEN = Conditions.TotalDimension();
|
||||
NBSESP = Conditions.TotalNumberSSP();
|
||||
NDIMSE = 3;
|
||||
@@ -787,7 +789,7 @@ void AdvApp2Var_Patch::MakeApprox(const AdvApp2Var_Context& Conditions,
|
||||
|
||||
// data relative to the processed patch
|
||||
Standard_Integer IORDRU = myOrdInU, IORDRV = myOrdInV,
|
||||
NDMINU = 1, NDMINV = 1, NCOEFU, NCOEFV;
|
||||
NDMINU = 1, NDMINV = 1, NCOEFU = 0, NCOEFV = 0;
|
||||
// NDMINU and NDMINV depend on the nb of coeff of neighboring isos
|
||||
// and of the required order of continuity
|
||||
NDMINU = Max(1,2*IORDRU+1);
|
||||
@@ -807,7 +809,7 @@ void AdvApp2Var_Patch::MakeApprox(const AdvApp2Var_Context& Conditions,
|
||||
new TColStd_HArray1OfReal(1,NBSESP);
|
||||
Handle (TColStd_HArray1OfReal) HEPSFRO =
|
||||
new TColStd_HArray1OfReal(1,NBSESP*8);
|
||||
Standard_Integer iesp;
|
||||
Standard_Integer iesp = 0;
|
||||
for (iesp=1;iesp<=NBSESP;iesp++) {
|
||||
HEPSAPR->SetValue(iesp,(Conditions.IToler())->Value(iesp));
|
||||
HEPSFRO->SetValue(iesp,(Conditions.FToler())->Value(iesp,1));
|
||||
@@ -937,7 +939,7 @@ void AdvApp2Var_Patch::MakeApprox(const AdvApp2Var_Context& Conditions,
|
||||
&myNbCoeffInV);
|
||||
|
||||
// transposition (NCFLMU,NCFLMV,NDIMEN)Fortran-C++
|
||||
Standard_Integer aIU, aIN, dim, ii, jj;
|
||||
Standard_Integer aIU = 0, aIN = 0, dim = 0, ii = 0, jj = 0;
|
||||
for (dim=1; dim<=NDIMEN; dim++){
|
||||
aIN = (dim-1)*NCFLMU*NCFLMV;
|
||||
for (ii=1; ii<=NCFLMU; ii++) {
|
||||
|
@@ -14,6 +14,7 @@
|
||||
// AdvApp2Var_SysBase.cxx
|
||||
#include <assert.h>
|
||||
#include <cmath>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include <AdvApp2Var_SysBase.hxx>
|
||||
#include <AdvApp2Var_Data.hxx>
|
||||
@@ -273,7 +274,7 @@ int AdvApp2Var_SysBase::macrai4_(integer *nbelem,
|
||||
/* ***********************************************************************
|
||||
*/
|
||||
|
||||
integer iunit;
|
||||
integer iunit = 0;
|
||||
|
||||
|
||||
iunit = sizeof(integer);
|
||||
@@ -372,10 +373,10 @@ int macrbrk_()
|
||||
int AdvApp2Var_SysBase::macrchk_()
|
||||
{
|
||||
/* System generated locals */
|
||||
integer i__1;
|
||||
integer i__1 = 0;
|
||||
|
||||
/* Local variables */
|
||||
integer i__, j;
|
||||
integer i__ = 0, j = 0;
|
||||
|
||||
/* ***********************************************************************
|
||||
*/
|
||||
@@ -557,7 +558,7 @@ int AdvApp2Var_SysBase::macrdi4_(integer *nbelem,
|
||||
/* > */
|
||||
/* ***********************************************************************
|
||||
*/
|
||||
integer iunit;
|
||||
integer iunit = 0;
|
||||
|
||||
iunit = sizeof(integer);
|
||||
/* Function Body */
|
||||
@@ -713,7 +714,7 @@ int macrgfl_(intptr_t *iadfld,
|
||||
integer ifois = 1;
|
||||
|
||||
char cbid[1] = {};
|
||||
integer ibid, ienr;
|
||||
integer ibid = 0, ienr = 0;
|
||||
integer novfl = 0;
|
||||
|
||||
/* ***********************************************************************
|
||||
@@ -849,7 +850,7 @@ int macrmsg_(const char *,//crout,
|
||||
{
|
||||
|
||||
/* Local variables */
|
||||
integer inum;
|
||||
integer inum = 0;
|
||||
char /*cfm[80],*/ cln[3];
|
||||
|
||||
/* ***********************************************************************
|
||||
@@ -1152,7 +1153,7 @@ int magtlog_(const char *cnmlog,
|
||||
|
||||
/* Local variables */
|
||||
char cbid[255];
|
||||
integer ibid, ier;
|
||||
integer ibid = 0, ier = 0;
|
||||
|
||||
|
||||
/* **********************************************************************
|
||||
@@ -1307,12 +1308,12 @@ int AdvApp2Var_SysBase::maitbr8_(integer *itaill,
|
||||
};
|
||||
|
||||
/* System generated locals */
|
||||
integer i__1;
|
||||
integer i__1 = 0;
|
||||
|
||||
/* Local variables */
|
||||
integer i__;
|
||||
integer i__ = 0;
|
||||
doublereal buffx[63];
|
||||
integer nbfois, noffst, nreste, nufois;
|
||||
integer nbfois = 0, noffst = 0, nreste = 0, nufois = 0;
|
||||
|
||||
/* ***********************************************************************
|
||||
*/
|
||||
@@ -1552,7 +1553,7 @@ int maostrb_()
|
||||
//=======================================================================
|
||||
int maostrd_()
|
||||
{
|
||||
integer imod;
|
||||
integer imod = 0;
|
||||
|
||||
/* ***********************************************************************
|
||||
*/
|
||||
@@ -1615,12 +1616,12 @@ int maoverf_(integer *nbentr,
|
||||
integer ifois = 0;
|
||||
|
||||
/* System generated locals */
|
||||
integer i__1;
|
||||
integer i__1 = 0;
|
||||
|
||||
/* Local variables */
|
||||
integer ibid;
|
||||
integer ibid = 0;
|
||||
doublereal buff[63];
|
||||
integer ioct, indic, nrest, icompt;
|
||||
integer ioct = 0, indic = 0, nrest = 0, icompt = 0;
|
||||
|
||||
/* ***********************************************************************
|
||||
*/
|
||||
@@ -1789,7 +1790,7 @@ int maoverf_(integer *nbentr,
|
||||
/* Loop. The upper limit is the integer value of the logarithm of base 2
|
||||
*/
|
||||
/* of NBENTR/NLONGR. */
|
||||
i__1 = (integer) (log((real) (*nbentr) / (float)63.) / log((float)2.))
|
||||
i__1 = (integer) (std::log((real) (*nbentr) / (float)63.) / std::log((float)2.))
|
||||
;
|
||||
for (ibid = 1; ibid <= i__1; ++ibid) {
|
||||
|
||||
@@ -1943,14 +1944,14 @@ int mcrcomm_(integer *kop,
|
||||
integer ntab = 0;
|
||||
|
||||
/* System generated locals */
|
||||
integer i__1, i__2;
|
||||
integer i__1 = 0, i__2 = 0;
|
||||
|
||||
/* Local variables */
|
||||
intptr_t ideb;
|
||||
intptr_t ideb = 0;
|
||||
doublereal dtab[32000];
|
||||
intptr_t itab[160] /* was [4][40] */;
|
||||
intptr_t ipre;
|
||||
integer i__, j, k;
|
||||
intptr_t ipre = 0;
|
||||
integer i__ = 0, j = 0, k = 0;
|
||||
|
||||
|
||||
/************************************************************************
|
||||
@@ -2118,12 +2119,12 @@ int AdvApp2Var_SysBase::mcrdelt_(integer *iunit,
|
||||
integer *iercod)
|
||||
|
||||
{
|
||||
integer ibid;
|
||||
doublereal xbid;
|
||||
integer noct, iver, ksys, i__, n, nrang,
|
||||
ibyte, ier;
|
||||
intptr_t iadfd, iadff, iaddr, loc; /* Les adrresses en long*/
|
||||
integer kop;
|
||||
integer ibid = 0;
|
||||
doublereal xbid = NAN;
|
||||
integer noct = 0, iver = 0, ksys = 0, i__ = 0, n = 0, nrang = 0,
|
||||
ibyte = 0, ier = 0;
|
||||
intptr_t iadfd = 0, iadff = 0, iaddr = 0, loc = 0; /* Les adrresses en long*/
|
||||
integer kop = 0;
|
||||
|
||||
/* ***********************************************************************
|
||||
*/
|
||||
@@ -2516,14 +2517,14 @@ int AdvApp2Var_SysBase::mcrlist_(integer *ier) const
|
||||
|
||||
{
|
||||
/* System generated locals */
|
||||
integer i__1;
|
||||
integer i__1 = 0;
|
||||
|
||||
/* Builtin functions */
|
||||
|
||||
/* Local variables */
|
||||
char cfmt[1];
|
||||
doublereal dfmt;
|
||||
integer ifmt, i__, nufmt, ntotal;
|
||||
doublereal dfmt = NAN;
|
||||
integer ifmt = 0, i__ = 0, nufmt = 0, ntotal = 0;
|
||||
char subrou[7];
|
||||
|
||||
|
||||
@@ -2664,15 +2665,15 @@ int AdvApp2Var_SysBase::mcrrqst_(integer *iunit,
|
||||
|
||||
{
|
||||
|
||||
integer i__1, i__2;
|
||||
integer i__1 = 0, i__2 = 0;
|
||||
|
||||
/* Local variables */
|
||||
doublereal dfmt;
|
||||
integer ifmt, iver;
|
||||
doublereal dfmt = NAN;
|
||||
integer ifmt = 0, iver = 0;
|
||||
char subr[7];
|
||||
integer ksys , ibyte, irest, ier;
|
||||
intptr_t iadfd, iadff, iaddr,lofset, loc;
|
||||
integer izu;
|
||||
integer ksys = 0 , ibyte = 0, irest = 0, ier = 0;
|
||||
intptr_t iadfd = 0, iadff = 0, iaddr = 0,lofset = 0, loc = 0;
|
||||
integer izu = 0;
|
||||
|
||||
|
||||
/* **********************************************************************
|
||||
@@ -3064,7 +3065,7 @@ void AdvApp2Var_SysBase::miraz_(integer *taille,
|
||||
//=======================================================================
|
||||
integer AdvApp2Var_SysBase::mnfndeb_()
|
||||
{
|
||||
integer ret_val;
|
||||
integer ret_val = 0;
|
||||
ret_val = 0;
|
||||
return ret_val;
|
||||
} /* mnfndeb_ */
|
||||
@@ -3077,7 +3078,7 @@ int AdvApp2Var_SysBase::msifill_(integer *nbintg,
|
||||
integer *ivecin,
|
||||
integer *ivecou)
|
||||
{
|
||||
integer nocte;
|
||||
integer nocte = 0;
|
||||
|
||||
/* ***********************************************************************
|
||||
*/
|
||||
@@ -3132,7 +3133,7 @@ int AdvApp2Var_SysBase::msrfill_(integer *nbreel,
|
||||
doublereal *vecent,
|
||||
doublereal * vecsor)
|
||||
{
|
||||
integer nocte;
|
||||
integer nocte = 0;
|
||||
|
||||
|
||||
/* ***********************************************************************
|
||||
@@ -3309,7 +3310,7 @@ void AdvApp2Var_SysBase::mvriraz_(integer *taille,
|
||||
void *adt)
|
||||
|
||||
{
|
||||
integer offset;
|
||||
integer offset = 0;
|
||||
offset = *taille * 8 ;
|
||||
/* printf(" adt %d long %d\n",adt,offset); */
|
||||
memset(adt , '\0' , offset) ;
|
||||
|
@@ -140,7 +140,7 @@ private:
|
||||
mitem icore[MAX_ALLOC_NB];
|
||||
integer ncore;
|
||||
unsigned char lprot;
|
||||
} mcrgene_;
|
||||
} mcrgene_{};
|
||||
|
||||
/* Contains statistics on allocation requests.
|
||||
Index 0 corresponds to static_allocation, 1 - to heap allocation.
|
||||
@@ -151,7 +151,7 @@ private:
|
||||
*/
|
||||
struct {
|
||||
integer nrqst[2], ndelt[2], nbyte[2], mbyte[2];
|
||||
} mcrstac_;
|
||||
} mcrstac_{};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -21,6 +21,8 @@
|
||||
// facilement approchable ont de petites erreurs.
|
||||
// Modified PMN 15/04/1997 : Gestion fine de la continuite aux lieux de decoupes
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <AdvApprox_ApproxAFunction.hxx>
|
||||
#include <AdvApprox_DichoCutting.hxx>
|
||||
#include <AdvApprox_EvaluatorFunction.hxx>
|
||||
@@ -138,13 +140,13 @@ static void PrepareConvert(const Standard_Integer NumCurves,
|
||||
|
||||
{
|
||||
// Declaration
|
||||
Standard_Boolean isCi;
|
||||
Standard_Integer icurve, idim, iordre, ii,
|
||||
Standard_Boolean isCi = 0;
|
||||
Standard_Integer icurve = 0, idim = 0, iordre = 0, ii = 0,
|
||||
Dimension=Num1DSS + 2*Num2DSS + 3*Num3DSS,
|
||||
NbSpace = Num1DSS + Num2DSS + Num3DSS;
|
||||
Standard_Real diff, moy, facteur1, facteur2, normal1, normal2, eps;
|
||||
Standard_Real *Res1, *Res2, *Val1, *Val2;
|
||||
Standard_Real *Coef1, *Coef2;
|
||||
Standard_Real diff = NAN, moy = NAN, facteur1 = NAN, facteur2 = NAN, normal1 = NAN, normal2 = NAN, eps = NAN;
|
||||
Standard_Real *Res1 = nullptr, *Res2 = nullptr, *Val1 = nullptr, *Val2 = nullptr;
|
||||
Standard_Real *Coef1 = nullptr, *Coef2 = nullptr;
|
||||
Standard_Integer RealDegree = Max(MaxDegree + 1, 2 * ContinuityOrder + 2);
|
||||
|
||||
gp_Vec V1,V2;
|
||||
@@ -194,7 +196,7 @@ static void PrepareConvert(const Standard_Integer NumCurves,
|
||||
Standard_Real f2_dividend = PolynomialIntervals(icurve+1,2)-PolynomialIntervals(icurve+1,1);
|
||||
Standard_Real f1_divizor = TrueIntervals(icurve+1)-TrueIntervals(icurve);
|
||||
Standard_Real f2_divizor = TrueIntervals(icurve+2)-TrueIntervals(icurve+1);
|
||||
Standard_Real fract1, fract2;
|
||||
Standard_Real fract1 = NAN, fract2 = NAN;
|
||||
|
||||
if( Abs(f1_divizor) < Toler ) // this is to avoid divizion by zero
|
||||
//in this case fract1 = 5.14755758946803e-85
|
||||
@@ -419,7 +421,7 @@ void AdvApprox_ApproxAFunction::Approximation(
|
||||
Standard_Integer& ErrorCode)
|
||||
{
|
||||
// Standard_Real EpsPar = Precision::Confusion();
|
||||
Standard_Integer IDIM, NUPIL,TheDeg;
|
||||
Standard_Integer IDIM = 0, NUPIL = 0,TheDeg = 0;
|
||||
#ifdef OCCT_DEBUG
|
||||
Standard_Integer NDIMEN = TotalDimension;
|
||||
#endif
|
||||
@@ -465,7 +467,7 @@ void AdvApprox_ApproxAFunction::Approximation(
|
||||
//--> NDJAC est le degre de "travail" dans la base orthogonale.
|
||||
|
||||
|
||||
Standard_Integer NbGaussPoints, WorkDegree;
|
||||
Standard_Integer NbGaussPoints = 0, WorkDegree = 0;
|
||||
|
||||
PLib::JacobiParameters(Continuity, NumMaxCoeffs-1, code_precis,
|
||||
NbGaussPoints, WorkDegree);
|
||||
@@ -483,8 +485,8 @@ void AdvApprox_ApproxAFunction::Approximation(
|
||||
//C**********************************************************************
|
||||
Handle(PLib_JacobiPolynomial) JacobiBase = new (PLib_JacobiPolynomial) (WorkDegree, Continuity);
|
||||
//Portage HP le compilateur refuse le debranchement
|
||||
Standard_Integer IS ;
|
||||
Standard_Boolean goto_fin_de_boucle;
|
||||
Standard_Integer IS = 0 ;
|
||||
Standard_Boolean goto_fin_de_boucle = 0;
|
||||
Standard_Integer MaxDegree = NumMaxCoeffs-1;
|
||||
AdvApprox_SimpleApprox Approx (TotalDimension, TotalNumSS,
|
||||
Continuity,
|
||||
@@ -531,8 +533,8 @@ void AdvApprox_ApproxAFunction::Approximation(
|
||||
else
|
||||
{
|
||||
//-> ...sinon on essai de decouper l' intervalle courant en 2...
|
||||
Standard_Real TMIL;
|
||||
Standard_Boolean Large;
|
||||
Standard_Real TMIL = NAN;
|
||||
Standard_Boolean Large = 0;
|
||||
|
||||
Large = CutTool.Value(TABINT[NumCurves], TABINT[NumCurves+1],
|
||||
TMIL);
|
||||
@@ -581,7 +583,7 @@ void AdvApprox_ApproxAFunction::Approximation(
|
||||
TColStd_Array1OfReal Coefficients(0,(TheDeg+1)*TotalDimension-1);
|
||||
JacobiBase->ToCoefficients (TotalDimension, TheDeg,
|
||||
HJacCoeff->Array1(), Coefficients);
|
||||
Standard_Integer i,j, f = (TheDeg+1)*TotalDimension;
|
||||
Standard_Integer i = 0,j = 0, f = (TheDeg+1)*TotalDimension;
|
||||
for (i=0,j=(NumCurves-1)*TotalDimension*NumMaxCoeffs+1;
|
||||
i<f; i++, j++) {
|
||||
CoefficientArray.SetValue(j, Coefficients.Value(i));
|
||||
@@ -693,15 +695,15 @@ void AdvApprox_ApproxAFunction::Perform(const Standard_Integer Num1DSS,
|
||||
myNumSubSpaces[2] = Num3DSS ;
|
||||
Standard_Integer TotalNumSS =
|
||||
Num1DSS + Num2DSS + Num3DSS,
|
||||
ii,
|
||||
jj,
|
||||
kk,
|
||||
index,
|
||||
dim_index,
|
||||
local_index;
|
||||
ii = 0,
|
||||
jj = 0,
|
||||
kk = 0,
|
||||
index = 0,
|
||||
dim_index = 0,
|
||||
local_index = 0;
|
||||
Standard_Integer TotalDimension =
|
||||
myNumSubSpaces[0] + 2 * myNumSubSpaces[1] + 3 * myNumSubSpaces[2] ;
|
||||
Standard_Real error_value ;
|
||||
Standard_Real error_value = NAN ;
|
||||
|
||||
Standard_Integer ContinuityOrder=0 ;
|
||||
switch (myContinuity) {
|
||||
@@ -754,7 +756,7 @@ void AdvApprox_ApproxAFunction::Perform(const Standard_Integer Num1DSS,
|
||||
//
|
||||
|
||||
Standard_Integer ErrorCode = 0,
|
||||
NumCurves,
|
||||
NumCurves = 0,
|
||||
size =
|
||||
myMaxSegments * NumMaxCoeffs * TotalDimension ;
|
||||
Handle(TColStd_HArray1OfInteger) NumCoeffPerCurvePtr =
|
||||
@@ -961,7 +963,7 @@ void AdvApprox_ApproxAFunction::Perform(const Standard_Integer Num1DSS,
|
||||
void AdvApprox_ApproxAFunction::Poles(const Standard_Integer Index,
|
||||
TColgp_Array1OfPnt& P) const
|
||||
{
|
||||
Standard_Integer ii ;
|
||||
Standard_Integer ii = 0 ;
|
||||
for (ii = P.Lower() ; ii <= P.Upper() ; ii++) {
|
||||
P.SetValue(ii,my3DPoles->Value(ii,Index)) ;
|
||||
}
|
||||
@@ -987,7 +989,7 @@ Standard_Integer AdvApprox_ApproxAFunction::NbPoles() const
|
||||
void AdvApprox_ApproxAFunction::Poles2d(const Standard_Integer Index,
|
||||
TColgp_Array1OfPnt2d& P) const
|
||||
{
|
||||
Standard_Integer ii ;
|
||||
Standard_Integer ii = 0 ;
|
||||
for (ii = P.Lower() ; ii <= P.Upper() ; ii++) {
|
||||
P.SetValue(ii,my2DPoles->Value(ii,Index)) ;
|
||||
}
|
||||
@@ -1000,7 +1002,7 @@ void AdvApprox_ApproxAFunction::Poles2d(const Standard_Integer Index,
|
||||
void AdvApprox_ApproxAFunction::Poles1d(const Standard_Integer Index,
|
||||
TColStd_Array1OfReal& P) const
|
||||
{
|
||||
Standard_Integer ii ;
|
||||
Standard_Integer ii = 0 ;
|
||||
for (ii = P.Lower() ; ii <= P.Upper() ; ii++) {
|
||||
P.SetValue(ii,my1DPoles->Value(ii,Index)) ;
|
||||
}
|
||||
@@ -1089,7 +1091,7 @@ Standard_Real AdvApprox_ApproxAFunction::AverageError(
|
||||
|
||||
void AdvApprox_ApproxAFunction::Dump(Standard_OStream& o) const
|
||||
{
|
||||
Standard_Integer ii;
|
||||
Standard_Integer ii = 0;
|
||||
o << "Dump of ApproxAFunction" << std::endl;
|
||||
if (myNumSubSpaces[0] > 0) {
|
||||
o << "Error(s) 1d = " << std::endl;
|
||||
|
@@ -138,7 +138,7 @@ private:
|
||||
Standard_EXPORT void Perform (const Standard_Integer Num1DSS, const Standard_Integer Num2DSS, const Standard_Integer Num3DSS, const AdvApprox_Cutting& CutTool);
|
||||
|
||||
|
||||
Standard_Integer myNumSubSpaces[3];
|
||||
Standard_Integer myNumSubSpaces[3]{};
|
||||
Handle(TColStd_HArray1OfReal) my1DTolerances;
|
||||
Handle(TColStd_HArray1OfReal) my2DTolerances;
|
||||
Handle(TColStd_HArray1OfReal) my3DTolerances;
|
||||
@@ -154,7 +154,7 @@ private:
|
||||
Handle(TColgp_HArray2OfPnt) my3DPoles;
|
||||
Handle(TColStd_HArray1OfReal) myKnots;
|
||||
Handle(TColStd_HArray1OfInteger) myMults;
|
||||
Standard_Integer myDegree;
|
||||
Standard_Integer myDegree{};
|
||||
Standard_Address myEvaluator;
|
||||
Handle(TColStd_HArray1OfReal) my1DMaxError;
|
||||
Handle(TColStd_HArray1OfReal) my1DAverageError;
|
||||
|
@@ -15,6 +15,8 @@
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <AdvApprox_PrefAndRec.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
@@ -22,12 +24,10 @@
|
||||
AdvApprox_PrefAndRec::AdvApprox_PrefAndRec(const TColStd_Array1OfReal& RecCut,
|
||||
const TColStd_Array1OfReal& PrefCut,
|
||||
const Standard_Real Weight):
|
||||
myRecCutting(1, RecCut.Length()),
|
||||
myPrefCutting(1, PrefCut.Length()),
|
||||
myRecCutting(RecCut),
|
||||
myPrefCutting(PrefCut),
|
||||
myWeight(Weight)
|
||||
{
|
||||
myRecCutting = RecCut;
|
||||
myPrefCutting = PrefCut;
|
||||
if (myWeight <= 1) { throw Standard_DomainError("PrefAndRec : Weight is too small");}
|
||||
}
|
||||
|
||||
@@ -37,8 +37,8 @@ Standard_Boolean AdvApprox_PrefAndRec::Value(const Standard_Real a,
|
||||
{
|
||||
// longueur minimum d'un intervalle parametrique : 10*PConfusion()
|
||||
Standard_Real lgmin = 10 * Precision::PConfusion();
|
||||
Standard_Integer i;
|
||||
Standard_Real cut, mil=(a+b)/2, dist;
|
||||
Standard_Integer i = 0;
|
||||
Standard_Real cut = NAN, mil=(a+b)/2, dist = NAN;
|
||||
Standard_Boolean isfound = Standard_False;
|
||||
|
||||
cut = mil;
|
||||
|
@@ -15,14 +15,14 @@
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <AdvApprox_PrefCutting.hxx>
|
||||
#include <Precision.hxx>
|
||||
|
||||
AdvApprox_PrefCutting::AdvApprox_PrefCutting(const TColStd_Array1OfReal& CutPnts):
|
||||
myPntOfCutting(1, CutPnts.Length())
|
||||
{
|
||||
myPntOfCutting = CutPnts;
|
||||
}
|
||||
myPntOfCutting(CutPnts)
|
||||
{}
|
||||
|
||||
Standard_Boolean AdvApprox_PrefCutting::Value(const Standard_Real a,
|
||||
const Standard_Real b,
|
||||
@@ -31,8 +31,8 @@ Standard_Boolean AdvApprox_PrefCutting::Value(const Standard_Real a,
|
||||
// longueur minimum d'un intervalle parametrique : PConfusion()
|
||||
// pour F(U,V) : EPS1=1.e-9 (cf.MMEPS1)
|
||||
Standard_Real lgmin = 10 * Precision::PConfusion();
|
||||
Standard_Integer i;
|
||||
Standard_Real cut, mil=(a+b)/2,
|
||||
Standard_Integer i = 0;
|
||||
Standard_Real cut = NAN, mil=(a+b)/2,
|
||||
dist = Abs((a-b)/2);
|
||||
cut = mil;
|
||||
for ( i=myPntOfCutting.Lower(); i<= myPntOfCutting.Upper(); i++) {
|
||||
|
@@ -16,6 +16,8 @@
|
||||
#define No_Standard_OutOfRange
|
||||
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <AdvApprox_EvaluatorFunction.hxx>
|
||||
#include <AdvApprox_SimpleApprox.hxx>
|
||||
#include <math_Vector.hxx>
|
||||
@@ -90,7 +92,7 @@ void AdvApprox_SimpleApprox::Perform(const TColStd_Array1OfInteger& LocalDimensi
|
||||
// ======= the computation of Pp(t) = Rr(t) + W(t)*Qq(t) =======
|
||||
|
||||
done = Standard_False;
|
||||
Standard_Integer i,idim,k,numss;
|
||||
Standard_Integer i = 0,idim = 0,k = 0,numss = 0;
|
||||
|
||||
Standard_Integer Dimension = myTotalDimension;
|
||||
AdvApprox_EvaluatorFunction& Evaluator =
|
||||
@@ -106,10 +108,10 @@ void AdvApprox_SimpleApprox::Perform(const TColStd_Array1OfInteger& LocalDimensi
|
||||
FirstLast[1] = Last;
|
||||
|
||||
math_Vector Result(1,myTotalDimension);
|
||||
Standard_Integer ErrorCode,derive,i_idim;
|
||||
Standard_Integer ErrorCode = 0,derive = 0,i_idim = 0;
|
||||
Standard_Real Fact=(Last-First)/2;
|
||||
Standard_Real *pResult = (Standard_Real*) &Result.Value(1);
|
||||
Standard_Real param;
|
||||
Standard_Real param = NAN;
|
||||
|
||||
for (param = First, derive = myNivConstr;
|
||||
derive >= 0 ; derive--) {
|
||||
@@ -148,7 +150,7 @@ void AdvApprox_SimpleApprox::Perform(const TColStd_Array1OfInteger& LocalDimensi
|
||||
Standard_Real* Coef1 = (Standard_Real*) &(myCoeff->ChangeArray1().Value(0));
|
||||
|
||||
derive = 0;
|
||||
Standard_Real ti, tip, tin, alin = (Last-First)/2, blin = (Last+First)/2.;
|
||||
Standard_Real ti = NAN, tip = NAN, tin = NAN, alin = (Last-First)/2, blin = (Last+First)/2.;
|
||||
|
||||
i_idim = myTotalDimension;
|
||||
for (i=1; i<=myNbGaussPoints/2; i++) {
|
||||
@@ -234,8 +236,8 @@ void AdvApprox_SimpleApprox::Perform(const TColStd_Array1OfInteger& LocalDimensi
|
||||
// the computing of NewDegree
|
||||
TColStd_Array1OfReal JacCoeff(0, myTotalDimension*(myWorkDegree+1)-1);
|
||||
|
||||
Standard_Real MaxErr,AverageErr;
|
||||
Standard_Integer Dim, RangSS, RangCoeff, RangJacCoeff, RangDim, NewDegree, NewDegreeMax = 0;
|
||||
Standard_Real MaxErr = NAN,AverageErr = NAN;
|
||||
Standard_Integer Dim = 0, RangSS = 0, RangCoeff = 0, RangJacCoeff = 0, RangDim = 0, NewDegree = 0, NewDegreeMax = 0;
|
||||
|
||||
myMaxError = new TColStd_HArray1OfReal (1,myTotalNumSS);
|
||||
myAverageError = new TColStd_HArray1OfReal (1,myTotalNumSS);
|
||||
@@ -377,7 +379,7 @@ Standard_Real AdvApprox_SimpleApprox::AverageError(const Standard_Integer Index)
|
||||
|
||||
void AdvApprox_SimpleApprox::Dump(Standard_OStream& o) const
|
||||
{
|
||||
Standard_Integer ii;
|
||||
Standard_Integer ii = 0;
|
||||
o << "Dump of SimpleApprox " << std::endl;
|
||||
for (ii=1; ii <= myTotalNumSS; ii++) {
|
||||
o << "Error " << MaxError(ii) << std::endl;
|
||||
|
@@ -101,7 +101,7 @@ private:
|
||||
Handle(TColStd_HArray1OfReal) myTabPoints;
|
||||
Handle(TColStd_HArray2OfReal) myTabWeights;
|
||||
Standard_Address myEvaluator;
|
||||
Standard_Integer myDegree;
|
||||
Standard_Integer myDegree{};
|
||||
Handle(TColStd_HArray1OfReal) myCoeff;
|
||||
Handle(TColStd_HArray2OfReal) myFirstConstr;
|
||||
Handle(TColStd_HArray2OfReal) myLastConstr;
|
||||
|
@@ -2070,7 +2070,7 @@ void InvMMatrix(const Standard_Integer classe,
|
||||
math_Matrix& InvM)
|
||||
{
|
||||
if (classe > 24) throw Standard_DimensionError("InvMMatrix: classe > 24");
|
||||
Standard_Integer i, j, k = 0, Som = 0;
|
||||
Standard_Integer i = 0, j = 0, k = 0, Som = 0;
|
||||
for (i = 2; i < classe; i++) {
|
||||
Som += (i)*(i);
|
||||
}
|
||||
|
@@ -416,7 +416,7 @@ void IBPMatrix(const Standard_Integer classe, math_Matrix& IBPMa)
|
||||
{
|
||||
if (classe > 26) throw Standard_DimensionError("IBPMatrix: classe > 26");
|
||||
// math_Matrix IBPMa(1, classe-2, 1, classe-2);
|
||||
Standard_Integer i, j, k = 0, Som = 0;
|
||||
Standard_Integer i = 0, j = 0, k = 0, Som = 0;
|
||||
for (i = 1; i < classe-2; i++) {
|
||||
Som += (i)*(i);
|
||||
}
|
||||
|
@@ -3277,7 +3277,7 @@ void MMatrix(const Standard_Integer classe,
|
||||
math_Matrix& M)
|
||||
{
|
||||
if (classe > 24) throw Standard_DimensionError("MMatrix: classe > 24");
|
||||
Standard_Integer i, j, k = 0, Som = 0;
|
||||
Standard_Integer i = 0, j = 0, k = 0, Som = 0;
|
||||
for (i = 2; i < classe; i++) {
|
||||
Som += (i)*(i);
|
||||
}
|
||||
|
@@ -354,7 +354,7 @@ void IBTMatrix(const Standard_Integer classe, math_Matrix& IBTMa)
|
||||
{
|
||||
if (classe > 26) throw Standard_DimensionError("IBTMatrix: classe > 26");
|
||||
// math_Matrix IBTMa(1, classe-4, 1, classe-4);
|
||||
Standard_Integer i, j, k = 0, Som = 0;
|
||||
Standard_Integer i = 0, j = 0, k = 0, Som = 0;
|
||||
for (i = 1; i < classe-4; i++) {
|
||||
Som += (i)*(i);
|
||||
}
|
||||
|
@@ -1238,11 +1238,11 @@ void VBernstein(const Standard_Integer classe,
|
||||
if (nbpoints > 24) throw Standard_DimensionError("VBernstein: nbpoints > 24");
|
||||
// math_Matrix VB(classe, nbpoints);
|
||||
|
||||
Standard_Integer i, j, k = 0, Som;
|
||||
Standard_Integer i = 0, j = 0, k = 0, Som = 0;
|
||||
// 300 = 1+2+ ... +24 points.
|
||||
Som = (Standard_Integer )( 300*((classe-1)*classe/2.-1) + classe * (nbpoints-1)*nbpoints/2.);
|
||||
|
||||
const Standard_Real *tmpVB;
|
||||
const Standard_Real *tmpVB = nullptr;
|
||||
tmpVB = VBMatrix + Som;
|
||||
for (i = 1; i <= classe; i++) {
|
||||
for (j = 1; j <= nbpoints; j++) {
|
||||
|
@@ -18,6 +18,8 @@
|
||||
#define No_Standard_OutOfRange
|
||||
#define No_Standard_RangeError
|
||||
#endif
|
||||
#include <math.h>
|
||||
|
||||
#include <AppCont_LeastSquare.hxx>
|
||||
|
||||
#include <math.hxx>
|
||||
@@ -42,7 +44,7 @@ void AppCont_LeastSquare::FixSingleBorderPoint(const AppCont_Function& the
|
||||
NCollection_Array1<gp_Pnt2d> aTabP2d(1, Max (myNbP2d, 1)), aPrevP2d(1, Max (myNbP2d, 1));
|
||||
Standard_Real aMult = ((theU - theU0) > (theU1 - theU)) ? 1.0: -1.0;
|
||||
Standard_Real aStartParam = theU,
|
||||
aCurrParam, aPrevDist = 1.0, aCurrDist = 1.0;
|
||||
aCurrParam = NAN, aPrevDist = 1.0, aCurrDist = 1.0;
|
||||
|
||||
Standard_Real du = -(theU1 - theU0) / 2.0 * aMult;
|
||||
Standard_Real eps = Epsilon(1.);
|
||||
@@ -103,14 +105,14 @@ AppCont_LeastSquare::AppCont_LeastSquare(const AppCont_Function& SSP,
|
||||
myPoles(1, Deg + 1, 1, 3 * SSP.GetNbOf3dPoints() + 2 * SSP.GetNbOf2dPoints(), 0.0),
|
||||
myParam(1, myNbPoints),
|
||||
myVB(1, Deg+1, 1, myNbPoints),
|
||||
myPerInfo(1, 3 * SSP.GetNbOf3dPoints() + 2 * SSP.GetNbOf2dPoints() )
|
||||
myPerInfo(1, 3 * SSP.GetNbOf3dPoints() + 2 * SSP.GetNbOf2dPoints() ), myDone(Standard_False), myDegre(Deg), myNbdiscret(myNbPoints)
|
||||
{
|
||||
myDone = Standard_False;
|
||||
myDegre = Deg;
|
||||
Standard_Integer i, j, k, c, i2;
|
||||
|
||||
|
||||
Standard_Integer i = 0, j = 0, k = 0, c = 0, i2 = 0;
|
||||
Standard_Integer classe = Deg + 1, cl1 = Deg;
|
||||
Standard_Real U, dU, Coeff, Coeff2;
|
||||
Standard_Real IBij, IBPij;
|
||||
Standard_Real U = NAN, dU = NAN, Coeff = NAN, Coeff2 = NAN;
|
||||
Standard_Real IBij = NAN, IBPij = NAN;
|
||||
|
||||
Standard_Integer FirstP = 1, LastP = myNbPoints;
|
||||
Standard_Integer nbcol = 3 * SSP.GetNbOf3dPoints() + 2 * SSP.GetNbOf2dPoints();
|
||||
@@ -119,8 +121,8 @@ AppCont_LeastSquare::AppCont_LeastSquare(const AppCont_Function& SSP,
|
||||
AppParCurves_Constraint myFirstC = FirstCons, myLastC = LastCons;
|
||||
SSP.GetNumberOfPoints(myNbP, myNbP2d);
|
||||
|
||||
Standard_Integer i2plus1, i2plus2;
|
||||
myNbdiscret = myNbPoints;
|
||||
Standard_Integer i2plus1 = 0, i2plus2 = 0;
|
||||
|
||||
NCollection_Array1<gp_Pnt> aTabP(1, Max (myNbP, 1));
|
||||
NCollection_Array1<gp_Pnt2d> aTabP2d(1, Max (myNbP2d, 1));
|
||||
NCollection_Array1<gp_Vec> aTabV(1, Max (myNbP, 1));
|
||||
@@ -133,7 +135,7 @@ AppCont_LeastSquare::AppCont_LeastSquare(const AppCont_Function& SSP,
|
||||
myPerInfo(aDimIdx).myPeriod);
|
||||
}
|
||||
|
||||
Standard_Boolean Ok;
|
||||
Standard_Boolean Ok = 0;
|
||||
if (myFirstC == AppParCurves_TangencyPoint)
|
||||
{
|
||||
Ok = SSP.D1(U0, aTabV2d, aTabV);
|
||||
@@ -469,7 +471,7 @@ AppCont_LeastSquare::AppCont_LeastSquare(const AppCont_Function& SSP,
|
||||
const AppParCurves_MultiCurve& AppCont_LeastSquare::Value()
|
||||
{
|
||||
|
||||
Standard_Integer i, j, j2;
|
||||
Standard_Integer i = 0, j = 0, j2 = 0;
|
||||
gp_Pnt Pt;
|
||||
gp_Pnt2d Pt2d;
|
||||
Standard_Integer ideb = 1, ifin = myDegre+1;
|
||||
@@ -504,8 +506,8 @@ void AppCont_LeastSquare::Error(Standard_Real& F,
|
||||
Standard_Real& MaxE3d,
|
||||
Standard_Real& MaxE2d) const
|
||||
{
|
||||
Standard_Integer i, j, k, c, i2, classe = myDegre + 1;
|
||||
Standard_Real Coeff, err3d = 0.0, err2d = 0.0;
|
||||
Standard_Integer i = 0, j = 0, k = 0, c = 0, i2 = 0, classe = myDegre + 1;
|
||||
Standard_Real Coeff = NAN, err3d = 0.0, err2d = 0.0;
|
||||
Standard_Integer ncol = myPoints.UpperCol() - myPoints.LowerCol() + 1;
|
||||
|
||||
math_Matrix MyPoints(1, myNbdiscret, 1, ncol);
|
||||
@@ -531,7 +533,7 @@ void AppCont_LeastSquare::Error(Standard_Real& F,
|
||||
}
|
||||
}
|
||||
|
||||
Standard_Real e1, e2, e3;
|
||||
Standard_Real e1 = NAN, e2 = NAN, e3 = NAN;
|
||||
for (i = 1; i <= myNbdiscret; i++)
|
||||
{
|
||||
i2 = 1;
|
||||
|
@@ -68,7 +68,7 @@ private:
|
||||
NCollection_Array1<PeriodicityInfo> myPerInfo;
|
||||
Standard_Boolean myDone;
|
||||
Standard_Integer myDegre;
|
||||
Standard_Integer myNbdiscret, myNbP, myNbP2d;
|
||||
Standard_Integer myNbdiscret, myNbP{}, myNbP2d{};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -15,6 +15,8 @@
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <AppDef_LinearCriteria.hxx>
|
||||
#include <AppDef_MultiLine.hxx>
|
||||
#include <AppDef_MyLineTool.hxx>
|
||||
@@ -218,7 +220,7 @@ Handle(FEmTool_HAssemblyTable) AppDef_LinearCriteria::AssemblyTable() const
|
||||
|
||||
Handle(TColStd_HArray1OfInteger) GlobIndex, Aux;
|
||||
|
||||
Standard_Integer i, el = 1, dim = 1, NbGlobVar = 0, gi0;
|
||||
Standard_Integer i = 0, el = 1, dim = 1, NbGlobVar = 0, gi0 = 0;
|
||||
|
||||
// For dim = 1
|
||||
// For first element (el = 1)
|
||||
@@ -288,7 +290,7 @@ Handle(TColStd_HArray2OfInteger) AppDef_LinearCriteria::DependenceTable() const
|
||||
|
||||
Handle(TColStd_HArray2OfInteger) DepTab =
|
||||
new TColStd_HArray2OfInteger(1, Dim, 1, Dim, 0);
|
||||
Standard_Integer i;
|
||||
Standard_Integer i = 0;
|
||||
for(i=1; i <= Dim; i++) DepTab->SetValue(i,i,1);
|
||||
|
||||
return DepTab;
|
||||
@@ -315,8 +317,8 @@ Standard_Integer AppDef_LinearCriteria::QualityValues(const Standard_Real J1min,
|
||||
TColStd_Array1OfReal& Knots = myCurve->Knots();
|
||||
Handle(TColStd_HArray2OfReal) Coeff;
|
||||
|
||||
Standard_Integer el, deg = 0, curdeg, i;
|
||||
Standard_Real UFirst, ULast;
|
||||
Standard_Integer el = 0, deg = 0, curdeg = 0, i = 0;
|
||||
Standard_Real UFirst = NAN, ULast = NAN;
|
||||
|
||||
J1 = J2 = J3 = 0.;
|
||||
for(el = 1; el <= NbElm; el++) {
|
||||
@@ -451,8 +453,8 @@ void AppDef_LinearCriteria::ErrorValues(Standard_Real& MaxError,
|
||||
gp_Pnt2d P2d;
|
||||
gp_Pnt P3d;
|
||||
|
||||
Standard_Integer i, ipnt, c0 = 0;
|
||||
Standard_Real SqrDist, Dist;
|
||||
Standard_Integer i = 0, ipnt = 0, c0 = 0;
|
||||
Standard_Real SqrDist = NAN, Dist = NAN;
|
||||
|
||||
MaxError = QuadraticError = AverageError = 0.;
|
||||
|
||||
@@ -510,11 +512,11 @@ void AppDef_LinearCriteria::Hessian(const Standard_Integer Element,
|
||||
math_Matrix AuxH(0, H.RowNumber()-1, 0, H.ColNumber()-1, 0.);
|
||||
|
||||
TColStd_Array1OfReal& Knots = myCurve->Knots();
|
||||
Standard_Real UFirst, ULast;
|
||||
Standard_Real UFirst = NAN, ULast = NAN;
|
||||
|
||||
UFirst = Knots(Element); ULast = Knots(Element + 1);
|
||||
|
||||
Standard_Integer icrit;
|
||||
Standard_Integer icrit = 0;
|
||||
|
||||
// Quality criterion part of Hessian
|
||||
|
||||
@@ -530,12 +532,12 @@ void AppDef_LinearCriteria::Hessian(const Standard_Integer Element,
|
||||
|
||||
AuxH.Init(0.);
|
||||
|
||||
Standard_Real coeff = (ULast - UFirst)/2., curcoeff, poid;
|
||||
Standard_Integer ipnt, ii, degH = 2 * Order+1;
|
||||
Standard_Real coeff = (ULast - UFirst)/2., curcoeff = NAN, poid = NAN;
|
||||
Standard_Integer ipnt = 0, ii = 0, degH = 2 * Order+1;
|
||||
|
||||
|
||||
Handle(PLib_Base) myBase = myCurve->Base();
|
||||
Standard_Integer k1, k2, i, j, i0 = H.LowerRow(), j0 = H.LowerCol(), i1, j1,
|
||||
Standard_Integer k1 = 0, k2 = 0, i = 0, j = 0, i0 = H.LowerRow(), j0 = H.LowerCol(), i1 = 0, j1 = 0,
|
||||
di = myPntWeight.Lower() - myParameters->Lower();
|
||||
|
||||
//BuilCache
|
||||
@@ -603,8 +605,8 @@ void AppDef_LinearCriteria::Gradient(const Standard_Integer Element,
|
||||
TColgp_Array1OfPnt TabP3d(1, Max(1,myNbP3d));
|
||||
TColgp_Array1OfPnt2d TabP2d(1, Max(1,myNbP2d));
|
||||
|
||||
Standard_Boolean In3d;
|
||||
Standard_Integer IndPnt, IndCrd;
|
||||
Standard_Boolean In3d = 0;
|
||||
Standard_Integer IndPnt = 0, IndCrd = 0;
|
||||
|
||||
if(Dimension <= 3*myNbP3d) {
|
||||
In3d = Standard_True;
|
||||
@@ -622,7 +624,7 @@ void AppDef_LinearCriteria::Gradient(const Standard_Integer Element,
|
||||
}
|
||||
|
||||
TColStd_Array1OfReal& Knots = myCurve->Knots();
|
||||
Standard_Real UFirst, ULast, Pnt;
|
||||
Standard_Real UFirst = NAN, ULast = NAN, Pnt = NAN;
|
||||
UFirst = Knots(Element); ULast = Knots(Element + 1);
|
||||
Standard_Real coeff = (ULast-UFirst)/2;
|
||||
|
||||
@@ -632,9 +634,9 @@ void AppDef_LinearCriteria::Gradient(const Standard_Integer Element,
|
||||
Handle(PLib_Base) myBase = myCurve->Base();
|
||||
Standard_Integer MxDeg = myBase->WorkDegree();
|
||||
|
||||
Standard_Real curcoeff;
|
||||
Standard_Real curcoeff = NAN;
|
||||
Standard_Integer degH = 2 * Order + 1;
|
||||
Standard_Integer ipnt, k, i, ii, i0 = G.Lower(),
|
||||
Standard_Integer ipnt = 0, k = 0, i = 0, ii = 0, i0 = G.Lower(),
|
||||
di = myPntWeight.Lower() - myParameters->Lower();
|
||||
|
||||
if (myE != Element) BuildCache(Element);
|
||||
@@ -686,7 +688,7 @@ void AppDef_LinearCriteria::InputVector(const math_Vector& X,
|
||||
|
||||
Handle(TColStd_HArray1OfInteger) GlobIndex;
|
||||
|
||||
Standard_Integer el, dim, i, i0 = X.Lower() - 1;
|
||||
Standard_Integer el = 0, dim = 0, i = 0, i0 = X.Lower() - 1;
|
||||
|
||||
for(el = 1; el <= NbElm; el++) {
|
||||
for(dim = 1; dim <= NbDim; dim++) {
|
||||
@@ -751,9 +753,9 @@ void AppDef_LinearCriteria::SetWeight(const TColStd_Array1OfReal& Weight)
|
||||
//=======================================================================
|
||||
void AppDef_LinearCriteria::BuildCache(const Standard_Integer Element)
|
||||
{
|
||||
Standard_Real t;
|
||||
Standard_Real UFirst, ULast;
|
||||
Standard_Integer ipnt;
|
||||
Standard_Real t = NAN;
|
||||
Standard_Real UFirst = NAN, ULast = NAN;
|
||||
Standard_Integer ipnt = 0;
|
||||
|
||||
UFirst = myCurve->Knots()(Element);
|
||||
ULast = myCurve->Knots()(Element + 1);
|
||||
@@ -770,7 +772,7 @@ void AppDef_LinearCriteria::BuildCache(const Standard_Integer Element)
|
||||
|
||||
if (IF != 0) {
|
||||
Handle(PLib_Base) myBase = myCurve->Base();
|
||||
Standard_Integer order = myBase->WorkDegree()+1, ii;
|
||||
Standard_Integer order = myBase->WorkDegree()+1, ii = 0;
|
||||
myCache = new TColStd_HArray1OfReal (1, (IL-IF+1)*(order));
|
||||
|
||||
ii =1;
|
||||
@@ -778,7 +780,7 @@ void AppDef_LinearCriteria::BuildCache(const Standard_Integer Element)
|
||||
Standard_Real * cache = &myCache->ChangeValue(ii);
|
||||
TColStd_Array1OfReal BasicValue(cache[0], 0, order-1);
|
||||
t = myParameters->Value(ipnt);
|
||||
Standard_Real coeff = 2./(ULast - UFirst), c0 = -(ULast + UFirst)/2., s;
|
||||
Standard_Real coeff = 2./(ULast - UFirst), c0 = -(ULast + UFirst)/2., s = NAN;
|
||||
s = (t + c0) * coeff;
|
||||
myBase->D0(s, BasicValue);
|
||||
}
|
||||
|
@@ -96,10 +96,10 @@ private:
|
||||
Handle(TColStd_HArray1OfReal) myParameters;
|
||||
Handle(TColStd_HArray1OfReal) myCache;
|
||||
Handle(FEmTool_ElementaryCriterion) myCriteria[3];
|
||||
Standard_Real myEstimation[3];
|
||||
Standard_Real myEstimation[3]{};
|
||||
Standard_Real myQuadraticWeight;
|
||||
Standard_Real myQualityWeight;
|
||||
Standard_Real myPercent[3];
|
||||
Standard_Real myPercent[3]{};
|
||||
TColStd_Array1OfReal myPntWeight;
|
||||
Handle(FEmTool_Curve) myCurve;
|
||||
Standard_Real myLength;
|
||||
|
@@ -31,20 +31,20 @@ AppDef_MultiLine::AppDef_MultiLine (const Standard_Integer NbMult)
|
||||
}
|
||||
|
||||
|
||||
AppDef_MultiLine::AppDef_MultiLine (const AppDef_Array1OfMultiPointConstraint& tabMultiP)
|
||||
AppDef_MultiLine::AppDef_MultiLine (const AppDef_Array1OfMultiPointConstraint& tabMultiP) : tabMult(new AppDef_HArray1OfMultiPointConstraint (1, tabMultiP.Length()))
|
||||
{
|
||||
tabMult = new AppDef_HArray1OfMultiPointConstraint (1, tabMultiP.Length());
|
||||
Standard_Integer i, Lower = tabMultiP.Lower();
|
||||
|
||||
Standard_Integer i = 0, Lower = tabMultiP.Lower();
|
||||
for (i = 1; i <= tabMultiP.Length(); i++) {
|
||||
tabMult->SetValue(i, tabMultiP.Value(Lower+i-1));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
AppDef_MultiLine::AppDef_MultiLine (const TColgp_Array1OfPnt& tabP3d)
|
||||
AppDef_MultiLine::AppDef_MultiLine (const TColgp_Array1OfPnt& tabP3d) : tabMult(new AppDef_HArray1OfMultiPointConstraint (1, tabP3d.Length()))
|
||||
{
|
||||
tabMult = new AppDef_HArray1OfMultiPointConstraint (1, tabP3d.Length());
|
||||
Standard_Integer i, Lower = tabP3d.Lower();
|
||||
|
||||
Standard_Integer i = 0, Lower = tabP3d.Lower();
|
||||
for (i = 1; i <= tabP3d.Length(); i++) {
|
||||
AppDef_MultiPointConstraint MP(1, 0);
|
||||
MP.SetPoint(1, tabP3d(Lower+i-1));
|
||||
@@ -54,10 +54,10 @@ AppDef_MultiLine::AppDef_MultiLine (const TColgp_Array1OfPnt& tabP3d)
|
||||
|
||||
|
||||
|
||||
AppDef_MultiLine::AppDef_MultiLine (const TColgp_Array1OfPnt2d& tabP2d)
|
||||
AppDef_MultiLine::AppDef_MultiLine (const TColgp_Array1OfPnt2d& tabP2d) : tabMult(new AppDef_HArray1OfMultiPointConstraint (1, tabP2d.Length()))
|
||||
{
|
||||
tabMult = new AppDef_HArray1OfMultiPointConstraint (1, tabP2d.Length());
|
||||
Standard_Integer i, Lower = tabP2d.Lower();
|
||||
|
||||
Standard_Integer i = 0, Lower = tabP2d.Lower();
|
||||
for (i = 1; i <= tabP2d.Length(); i++) {
|
||||
AppDef_MultiPointConstraint MP(0, 1);
|
||||
MP.SetPoint2d(1, tabP2d(Lower+i-1));
|
||||
|
@@ -77,7 +77,7 @@ AppDef_MultiPointConstraint::AppDef_MultiPointConstraint
|
||||
tabTang = new TColgp_HArray1OfVec(1, tabVec.Length());
|
||||
tabTang2d = new TColgp_HArray1OfVec2d(1, tabVec2d.Length());
|
||||
|
||||
Standard_Integer i, Lower = tabVec.Lower();
|
||||
Standard_Integer i = 0, Lower = tabVec.Lower();
|
||||
for (i = 1; i <= tabVec.Length(); i++) {
|
||||
tabTang->SetValue(i, tabVec.Value(Lower+i-1));
|
||||
}
|
||||
@@ -116,7 +116,7 @@ AppDef_MultiPointConstraint::AppDef_MultiPointConstraint
|
||||
tabTang = new TColgp_HArray1OfVec(1, tabVec.Length());
|
||||
tabTang2d = new TColgp_HArray1OfVec2d(1, tabVec2d.Length());
|
||||
|
||||
Standard_Integer i, Lower = tabVec.Lower();
|
||||
Standard_Integer i = 0, Lower = tabVec.Lower();
|
||||
for (i = 1; i <= tabVec.Length(); i++) {
|
||||
tabTang->SetValue(i, tabVec.Value(Lower+i-1));
|
||||
}
|
||||
@@ -139,7 +139,7 @@ AppDef_MultiPointConstraint::AppDef_MultiPointConstraint (
|
||||
|
||||
tabTang = new TColgp_HArray1OfVec(1, tabVec.Length());
|
||||
|
||||
Standard_Integer i, Lower = tabVec.Lower();
|
||||
Standard_Integer i = 0, Lower = tabVec.Lower();
|
||||
for (i = 1; i <= tabVec.Length(); i++) {
|
||||
tabTang->SetValue(i, tabVec.Value(Lower+i-1));
|
||||
}
|
||||
@@ -158,7 +158,7 @@ AppDef_MultiPointConstraint::AppDef_MultiPointConstraint
|
||||
}
|
||||
|
||||
tabTang = new TColgp_HArray1OfVec(1, tabVec.Length());
|
||||
Standard_Integer i, Lower = tabVec.Lower();
|
||||
Standard_Integer i = 0, Lower = tabVec.Lower();
|
||||
for (i = 1; i <= tabVec.Length(); i++) {
|
||||
tabTang->SetValue(i, tabVec.Value(Lower+i-1));
|
||||
}
|
||||
@@ -183,7 +183,7 @@ AppDef_MultiPointConstraint::AppDef_MultiPointConstraint
|
||||
}
|
||||
|
||||
tabTang2d = new TColgp_HArray1OfVec2d(1, tabVec2d.Length());
|
||||
Standard_Integer i, Lower = tabVec2d.Lower();
|
||||
Standard_Integer i = 0, Lower = tabVec2d.Lower();
|
||||
for (i = 1; i <= tabVec2d.Length(); i++) {
|
||||
tabTang2d->SetValue(i, tabVec2d.Value(Lower+i-1));
|
||||
}
|
||||
@@ -204,7 +204,7 @@ AppDef_MultiPointConstraint::AppDef_MultiPointConstraint
|
||||
}
|
||||
|
||||
tabTang2d = new TColgp_HArray1OfVec2d(1, tabVec2d.Length());
|
||||
Standard_Integer i, Lower = tabVec2d.Lower();
|
||||
Standard_Integer i = 0, Lower = tabVec2d.Lower();
|
||||
for (i = 1; i <= tabVec2d.Length(); i++) {
|
||||
tabTang2d->SetValue(i, tabVec2d.Value(Lower+i-1));
|
||||
}
|
||||
|
@@ -73,7 +73,7 @@ void AppDef_MyLineTool::Value(const AppDef_MultiLine& ML,
|
||||
TColgp_Array1OfPnt2d& tabPt2d)
|
||||
{
|
||||
AppDef_MultiPointConstraint MPC = ML.Value(MPointIndex);
|
||||
Standard_Integer i, nbp2d = MPC.NbPoints2d(), low2d = tabPt2d.Lower();
|
||||
Standard_Integer i = 0, nbp2d = MPC.NbPoints2d(), low2d = tabPt2d.Lower();
|
||||
Standard_Integer nbp3d = MPC.NbPoints(), low = tabPt.Lower();
|
||||
for (i = 1; i <= nbp3d; i++) {
|
||||
tabPt(i+low-1) = MPC.Point(i);
|
||||
@@ -123,7 +123,7 @@ Standard_Boolean AppDef_MyLineTool::Tangency(const AppDef_MultiLine& ML,
|
||||
{
|
||||
AppDef_MultiPointConstraint MPC = ML.Value(MPointIndex);
|
||||
if (MPC.IsTangencyPoint()) {
|
||||
Standard_Integer i, nbp3d = MPC.NbPoints(), low = tabV.Lower();
|
||||
Standard_Integer i = 0, nbp3d = MPC.NbPoints(), low = tabV.Lower();
|
||||
Standard_Integer nbp2d = MPC.NbPoints2d(), low2d = tabV2d.Lower();
|
||||
for (i = 1; i <= nbp3d; i++) {
|
||||
tabV(i+low-1) = MPC.Tang(i);
|
||||
@@ -204,7 +204,7 @@ Standard_Boolean AppDef_MyLineTool::Curvature(const AppDef_MultiLine& ML,
|
||||
{
|
||||
AppDef_MultiPointConstraint MPC = ML.Value(MPointIndex);
|
||||
if (MPC.IsCurvaturePoint()) {
|
||||
Standard_Integer i, nbp3d = MPC.NbPoints(), low = tabV.Lower();
|
||||
Standard_Integer i = 0, nbp3d = MPC.NbPoints(), low = tabV.Lower();
|
||||
Standard_Integer nbp2d = MPC.NbPoints2d(), low2d = tabV2d.Lower();
|
||||
for (i = 1; i <= nbp3d; i++) {
|
||||
tabV(i+low-1) = MPC.Curv(i);
|
||||
|
@@ -17,6 +17,8 @@
|
||||
// Approximation d une MultiLine de points decrite par le tool MLineTool.
|
||||
// avec criteres variationnels
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <AppDef_MultiLine.hxx>
|
||||
#include <AppDef_Variational.hxx>
|
||||
#include <AppParCurves_MultiBSpCurve.hxx>
|
||||
@@ -145,7 +147,7 @@ myWithCutting(WithCutting)
|
||||
//
|
||||
// Table of Points initialization
|
||||
//
|
||||
Standard_Integer ipoint,jp2d,jp3d,index;
|
||||
Standard_Integer ipoint = 0,jp2d = 0,jp3d = 0,index = 0;
|
||||
TColgp_Array1OfPnt TabP3d(1, Max(1,myNbP3d));
|
||||
TColgp_Array1OfPnt2d TabP2d(1, Max(1,myNbP2d));
|
||||
gp_Pnt2d P2d;
|
||||
@@ -212,8 +214,8 @@ myWithCutting(WithCutting)
|
||||
void AppDef_Variational::Init()
|
||||
{
|
||||
|
||||
Standard_Integer ipoint,jp2d,jp3d,index,jndex;
|
||||
Standard_Integer CurMultyPoint;
|
||||
Standard_Integer ipoint = 0,jp2d = 0,jp3d = 0,index = 0,jndex = 0;
|
||||
Standard_Integer CurMultyPoint = 0;
|
||||
TColgp_Array1OfVec TabV3d(1, Max(1,myNbP3d));
|
||||
TColgp_Array1OfVec2d TabV2d(1, Max(1,myNbP2d));
|
||||
TColgp_Array1OfVec TabV3dcurv(1, Max(1,myNbP3d));
|
||||
@@ -233,7 +235,7 @@ void AppDef_Variational::Init()
|
||||
|
||||
//
|
||||
// Table of types initialization
|
||||
Standard_Integer iconstr;
|
||||
Standard_Integer iconstr = 0;
|
||||
index=1;
|
||||
jndex=1;
|
||||
CurMultyPoint = 1;
|
||||
@@ -412,7 +414,7 @@ void AppDef_Variational::Init()
|
||||
CurMultyPoint += myNbP3d * 6 + myNbP2d * 2;
|
||||
}
|
||||
// OverConstraint Detection
|
||||
Standard_Integer MaxSeg;
|
||||
Standard_Integer MaxSeg = 0;
|
||||
if(myWithCutting == Standard_True) MaxSeg = myMaxSegment ;
|
||||
else MaxSeg = 1;
|
||||
if (((myMaxDegree-myNivCont)*MaxSeg-myNbPassPoints-2*myNbTangPoints-3*myNbCurvPoints) < 0 )
|
||||
@@ -439,7 +441,7 @@ void AppDef_Variational::Approximate()
|
||||
if (myIsCreated == Standard_False ) throw StdFail_NotDone();
|
||||
|
||||
|
||||
Standard_Real WQuadratic, WQuality;
|
||||
Standard_Real WQuadratic = NAN, WQuality = NAN;
|
||||
|
||||
TColStd_Array1OfReal Ecarts(myFirstPoint, myLastPoint);
|
||||
|
||||
@@ -459,7 +461,7 @@ void AppDef_Variational::Approximate()
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
Standard_Integer jp2d,jp3d,index,ipole,
|
||||
Standard_Integer jp2d = 0,jp3d = 0,index = 0,ipole = 0,
|
||||
NbElem = TheCurve->NbElements();
|
||||
|
||||
TColgp_Array1OfPnt TabP3d(1, Max(1,myNbP3d));
|
||||
@@ -490,7 +492,7 @@ void AppDef_Variational::Approximate()
|
||||
|
||||
TheCurve->GetPolynom(CoeffPtr->ChangeArray1());
|
||||
|
||||
Standard_Integer ii;
|
||||
Standard_Integer ii = 0;
|
||||
|
||||
for(ii = 1; ii <= NbElem; ii++)
|
||||
NbCoeffPtr->SetValue(ii, TheCurve->Degree(ii)+1);
|
||||
@@ -699,7 +701,7 @@ void AppDef_Variational::Distance(math_Matrix& mat)
|
||||
|
||||
{
|
||||
if (myIsDone == Standard_False) throw StdFail_NotDone();
|
||||
Standard_Integer ipoint,jp2d,jp3d,index;
|
||||
Standard_Integer ipoint = 0,jp2d = 0,jp3d = 0,index = 0;
|
||||
TColgp_Array1OfPnt TabP3d(1,Max(1,myNbP3d));
|
||||
TColgp_Array1OfPnt2d TabP2d(1, Max(1,myNbP2d));
|
||||
Standard_Integer j0 = mat.LowerCol() - myFirstPoint;
|
||||
@@ -1150,22 +1152,22 @@ void AppDef_Variational::TheMotor(
|
||||
|
||||
Handle(TColStd_HArray1OfReal) CurrentTi, NewTi, OldTi;
|
||||
Handle(TColStd_HArray2OfInteger) Dependence;
|
||||
Standard_Boolean lestim, lconst, ToOptim, iscut;
|
||||
Standard_Boolean lestim = 0, lconst = 0, ToOptim = 0, iscut = 0;
|
||||
Standard_Boolean isnear = Standard_False, again = Standard_True;
|
||||
Standard_Integer NbEst, ICDANA, NumPnt, Iter;
|
||||
Standard_Integer NbEst = 0, ICDANA = 0, NumPnt = 0, Iter = 0;
|
||||
Standard_Integer MaxNbEst =5;
|
||||
Standard_Real VOCRI[3] = {BigValue, BigValue, BigValue}, EROLD = BigValue,
|
||||
VALCRI[3], ERRMAX = BigValue, ERRMOY, ERRQUA;
|
||||
Standard_Real CBLONG, LNOLD;
|
||||
VALCRI[3], ERRMAX = BigValue, ERRMOY = NAN, ERRQUA = NAN;
|
||||
Standard_Real CBLONG = NAN, LNOLD = NAN;
|
||||
Standard_Integer NbrPnt = myLastPoint - myFirstPoint + 1;
|
||||
Standard_Integer NbrConstraint = myNbPassPoints + myNbTangPoints + myNbCurvPoints;
|
||||
Handle(FEmTool_Curve) CCurrent, COld, CNew;
|
||||
Standard_Real EpsLength = SmallValue;
|
||||
Standard_Real EpsDeg;
|
||||
Standard_Real EpsDeg = NAN;
|
||||
|
||||
Standard_Real e1, e2, e3;
|
||||
Standard_Real J1min, J2min, J3min;
|
||||
Standard_Integer iprog;
|
||||
Standard_Real e1 = NAN, e2 = NAN, e3 = NAN;
|
||||
Standard_Real J1min = NAN, J2min = NAN, J3min = NAN;
|
||||
Standard_Integer iprog = 0;
|
||||
|
||||
// (0) Init
|
||||
|
||||
@@ -1368,7 +1370,7 @@ void AppDef_Variational::TheMotor(
|
||||
if ( (ERRMAX > WQuality) && (ERRMAX > 2*EROLD)) iregre++;
|
||||
if ( (EROLD > WQuality) && (ERRMAX <= 0.5*EROLD)) iregre--;
|
||||
}
|
||||
Standard_Real E1, E2, E3;
|
||||
Standard_Real E1 = NAN, E2 = NAN, E3 = NAN;
|
||||
J->GetEstimation(E1, E2, E3);
|
||||
if ( (VALCRI[0] > E1) && (VALCRI[0] > 1.1*VOCRI[0])) iregre++;
|
||||
if ( (VALCRI[1] > E2) && (VALCRI[1] > 1.1*VOCRI[1])) iregre++;
|
||||
@@ -1413,7 +1415,7 @@ void AppDef_Variational::TheMotor(
|
||||
|
||||
if ((CurrentTi->Value(1)!= 0.) ||
|
||||
(CurrentTi->Value(NbrPnt)!= 1.)) {
|
||||
Standard_Real t, DelatT =
|
||||
Standard_Real t = NAN, DelatT =
|
||||
1.0 /(CurrentTi->Value(NbrPnt)-CurrentTi->Value(1));
|
||||
for (Standard_Integer ii=2; ii<NbrPnt; ii++) {
|
||||
t = (CurrentTi->Value(ii)-CurrentTi->Value(1))*DelatT;
|
||||
@@ -1489,7 +1491,7 @@ void AppDef_Variational::Optimization(Handle(AppDef_SmoothCriterion)& J,
|
||||
math_Matrix H(0, MxDeg, 0, MxDeg);
|
||||
math_Vector G(0, MxDeg), Sol(1, A.NbGlobVar());
|
||||
|
||||
Standard_Integer el, dim;
|
||||
Standard_Integer el = 0, dim = 0;
|
||||
|
||||
A.GetAssemblyTable(AssTable);
|
||||
Standard_Integer NbConstr = myNbPassPoints + myNbTangPoints + myNbCurvPoints;
|
||||
@@ -1532,8 +1534,8 @@ void AppDef_Variational::Optimization(Handle(AppDef_SmoothCriterion)& J,
|
||||
|
||||
// Updating Curve and reduction of degree
|
||||
|
||||
Standard_Integer Newdeg;
|
||||
Standard_Real MaxError;
|
||||
Standard_Integer Newdeg = 0;
|
||||
Standard_Real MaxError = NAN;
|
||||
|
||||
if(NbConstr == 0) {
|
||||
for(el = 1; el <= NbElm; el++) {
|
||||
@@ -1543,7 +1545,7 @@ void AppDef_Variational::Optimization(Handle(AppDef_SmoothCriterion)& J,
|
||||
else {
|
||||
|
||||
TColStd_Array1OfReal& TabInt = Curve->Knots();
|
||||
Standard_Integer Icnt = 1, p0 = Parameters.Lower() - myFirstPoint, point;
|
||||
Standard_Integer Icnt = 1, p0 = Parameters.Lower() - myFirstPoint, point = 0;
|
||||
for(el = 1; el <= NbElm; el++) {
|
||||
while((Icnt < NbConstr) &&
|
||||
(Parameters(p0 + myTypConstraints->Value(2 * Icnt - 1)) <= TabInt(el))) Icnt++;
|
||||
@@ -1573,11 +1575,11 @@ void AppDef_Variational::Project(const Handle(FEmTool_Curve)& C,
|
||||
|
||||
MaxErr = QuaErr = AveErr = 0.;
|
||||
|
||||
Standard_Integer Ipnt, NItCv, Iter, i, i0 = -myDimension, d0 = Distance.Lower() - 1;
|
||||
Standard_Integer Ipnt = 0, NItCv = 0, Iter = 0, i = 0, i0 = -myDimension, d0 = Distance.Lower() - 1;
|
||||
|
||||
Standard_Real TNew, Dist, T0, Dist0, F1, F2, Aux, DF, Ecart;
|
||||
Standard_Real TNew = NAN, Dist = NAN, T0 = NAN, Dist0 = NAN, F1 = NAN, F2 = NAN, Aux = NAN, DF = NAN, Ecart = NAN;
|
||||
|
||||
Standard_Boolean EnCour;
|
||||
Standard_Boolean EnCour = 0;
|
||||
|
||||
TColStd_Array1OfReal ValOfC(1, myDimension), FirstDerOfC(1, myDimension),
|
||||
SecndDerOfC(1, myDimension);
|
||||
@@ -1684,8 +1686,8 @@ void AppDef_Variational::ACR(Handle(FEmTool_Curve)& Curve,
|
||||
Standard_Integer NbrPnt = Ti.Length(), TiFirst = Ti.Lower(), TiLast = Ti.Upper(),
|
||||
KFirst = Knots.Lower(), KLast = Knots.Upper();
|
||||
|
||||
Standard_Real CbLong, DeltaT, VTest, UNew, UOld, DU, TPara, TOld, DTInv, Ratio;
|
||||
Standard_Integer ipnt, ii, IElm, IOld, POld, PCnt, ICnt=0;
|
||||
Standard_Real CbLong = NAN, DeltaT = NAN, VTest = NAN, UNew = NAN, UOld = NAN, DU = NAN, TPara = NAN, TOld = NAN, DTInv = NAN, Ratio = NAN;
|
||||
Standard_Integer ipnt = 0, ii = 0, IElm = 0, IOld = 0, POld = 0, PCnt = 0, ICnt=0;
|
||||
Standard_Integer NbCntr = myNbPassPoints + myNbTangPoints + myNbCurvPoints;
|
||||
|
||||
// (1) Calcul de la longueur de courbe
|
||||
@@ -1806,7 +1808,7 @@ static Standard_Integer NearIndex(const Standard_Real T,
|
||||
if(T < TabPar(Loi)) { Flag = -1; return Loi;}
|
||||
if(T > TabPar(Upi)) { Flag = 1; return Upi;}
|
||||
|
||||
Standard_Integer Ibeg = Loi, Ifin = Upi, Imidl;
|
||||
Standard_Integer Ibeg = Loi, Ifin = Upi, Imidl = 0;
|
||||
|
||||
while(Ibeg + 1 != Ifin) {
|
||||
Imidl = (Ibeg + Ifin) / 2;
|
||||
@@ -1840,9 +1842,9 @@ static void GettingKnots(const TColStd_Array1OfReal& TabPar,
|
||||
|
||||
TColStd_Array1OfReal& OldKnots = InCurve->Knots();
|
||||
Standard_Integer NbMaxOld = InCurve->NbElements();
|
||||
Standard_Integer NbMax = NewKnots.Upper(), Ipt, Ipt1, Ipt2;
|
||||
Standard_Integer el = 0, i1 = OldKnots.Lower(), i0 = i1 - 1, Flag;
|
||||
Standard_Real TPar;
|
||||
Standard_Integer NbMax = NewKnots.Upper(), Ipt = 0, Ipt1 = 0, Ipt2 = 0;
|
||||
Standard_Integer el = 0, i1 = OldKnots.Lower(), i0 = i1 - 1, Flag = 0;
|
||||
Standard_Real TPar = NAN;
|
||||
|
||||
while((NbElm < NbMax) && (el < NbMaxOld)) {
|
||||
|
||||
@@ -1904,7 +1906,7 @@ void AppDef_Variational::SplitCurve(const Handle(FEmTool_Curve)& InCurve,
|
||||
TColStd_Array1OfReal& OutKnots = OutCurve->Knots();
|
||||
TColStd_Array1OfReal& InKnots = InCurve->Knots();
|
||||
|
||||
Standard_Integer i, i0 = OutKnots.Lower();
|
||||
Standard_Integer i = 0, i0 = OutKnots.Lower();
|
||||
for(i = InKnots.Lower(); i <= InKnots.Upper(); i++) OutKnots(i) = InKnots(i);
|
||||
for(i = NbElmOld + 1; i <= NbElm; i++) OutKnots(i + i0) = NewKnots(i);
|
||||
|
||||
@@ -1927,13 +1929,13 @@ void AppDef_Variational::InitSmoothCriterion()
|
||||
|
||||
|
||||
|
||||
Standard_Real Length;
|
||||
Standard_Real Length = NAN;
|
||||
|
||||
InitParameters(Length);
|
||||
|
||||
mySmoothCriterion->SetParameters(myParameters);
|
||||
|
||||
Standard_Real E1, E2, E3;
|
||||
Standard_Real E1 = NAN, E2 = NAN, E3 = NAN;
|
||||
|
||||
InitCriterionEstimations(Length, E1, E2, E3);
|
||||
/*
|
||||
@@ -1946,7 +1948,7 @@ void AppDef_Variational::InitSmoothCriterion()
|
||||
mySmoothCriterion->EstLength() = Length;
|
||||
mySmoothCriterion->SetEstimation(E1, E2, E3);
|
||||
|
||||
Standard_Real WQuadratic, WQuality;
|
||||
Standard_Real WQuadratic = NAN, WQuality = NAN;
|
||||
|
||||
if(!myWithMinMax && myTolerance != 0.)
|
||||
WQuality = myTolerance;
|
||||
@@ -1968,7 +1970,7 @@ void AppDef_Variational::InitSmoothCriterion()
|
||||
|
||||
Handle(PLib_Base) TheBase = new PLib_HermitJacobi(myMaxDegree, myContinuity);
|
||||
Handle(FEmTool_Curve) TheCurve;
|
||||
Standard_Integer NbElem;
|
||||
Standard_Integer NbElem = 0;
|
||||
Standard_Real CurvTol = Eps2 * Length / myNbPoints;
|
||||
|
||||
// Decoupe de l'intervalle en fonction des contraintes
|
||||
@@ -2006,8 +2008,8 @@ void AppDef_Variational::InitParameters(Standard_Real& Length)
|
||||
|
||||
const Standard_Real Eps1 = Precision::Confusion() * .01;
|
||||
|
||||
Standard_Real aux, dist;
|
||||
Standard_Integer i, i0, i1 = 0, ipoint;
|
||||
Standard_Real aux = NAN, dist = NAN;
|
||||
Standard_Integer i = 0, i0 = 0, i1 = 0, ipoint = 0;
|
||||
|
||||
|
||||
Length = 0.;
|
||||
@@ -2136,7 +2138,7 @@ void AppDef_Variational::InitCriterionEstimations(const Standard_Real Length,
|
||||
Delta = .5 * (myParameters->Value(myLastPoint) - myParameters->Value(myLastPoint - 1));
|
||||
if(Delta <= Eps1) Delta = 1.;
|
||||
|
||||
Standard_Real aux;
|
||||
Standard_Real aux = NAN;
|
||||
|
||||
if(CurrPoint == 1) {
|
||||
|
||||
@@ -2179,7 +2181,7 @@ void AppDef_Variational::EstTangent(const Standard_Integer ipnt,
|
||||
math_Vector& VTang) const
|
||||
|
||||
{
|
||||
Standard_Integer i ;
|
||||
Standard_Integer i = 0 ;
|
||||
const Standard_Real Eps1 = Precision::Confusion() * .01;
|
||||
const Standard_Real EpsNorm = 1.e-9;
|
||||
|
||||
@@ -2207,7 +2209,7 @@ void AppDef_Variational::EstTangent(const Standard_Integer ipnt,
|
||||
Standard_Real V2 = 0.;
|
||||
if(V1 > Eps1) V2 = Pnt3.Subtracted(Pnt2).Norm();
|
||||
if(V2 > Eps1) {
|
||||
Standard_Real d = V1 / (V1 + V2), d1;
|
||||
Standard_Real d = V1 / (V1 + V2), d1 = NAN;
|
||||
d1 = 1. / (d * (1 - d)); d *= d;
|
||||
VTang = ((d - 1.) * Pnt1 + Pnt2 - d * Pnt3) * d1;
|
||||
}
|
||||
@@ -2240,7 +2242,7 @@ void AppDef_Variational::EstTangent(const Standard_Integer ipnt,
|
||||
Standard_Real V2 = 0.;
|
||||
if(V1 > Eps1) V2 = Pnt3.Subtracted(Pnt2).Norm();
|
||||
if(V2 > Eps1) {
|
||||
Standard_Real d = V1 / (V1 + V2), d1;
|
||||
Standard_Real d = V1 / (V1 + V2), d1 = NAN;
|
||||
d1 = 1. / (d * (1 - d)); d *= d - 2;
|
||||
VTang = ((d + 1.) * Pnt1 - Pnt2 - d * Pnt3) * d1;
|
||||
}
|
||||
@@ -2332,13 +2334,13 @@ void AppDef_Variational::EstSecnd(const Standard_Integer ipnt,
|
||||
const Standard_Real Length,
|
||||
math_Vector& VScnd) const
|
||||
{
|
||||
Standard_Integer i ;
|
||||
Standard_Integer i = 0 ;
|
||||
|
||||
const Standard_Real Eps = 1.e-9;
|
||||
|
||||
Standard_Real Wpnt = 1.;
|
||||
|
||||
Standard_Real aux;
|
||||
Standard_Real aux = NAN;
|
||||
|
||||
if(ipnt == myFirstPoint)
|
||||
aux = myParameters->Value(ipnt + 1) - myParameters->Value(ipnt);
|
||||
@@ -2411,7 +2413,7 @@ void AppDef_Variational::InitCutting(const Handle(PLib_Base)& aBase,
|
||||
{
|
||||
|
||||
// Definition of number of elements
|
||||
Standard_Integer ORCMx = -1, NCont = 0, i, kk, NbElem;
|
||||
Standard_Integer ORCMx = -1, NCont = 0, i = 0, kk = 0, NbElem = 0;
|
||||
Standard_Integer NbConstr = myNbPassPoints + myNbTangPoints + myNbCurvPoints;
|
||||
|
||||
for(i = 1; i <= NbConstr; i++) {
|
||||
@@ -2534,15 +2536,15 @@ void AppDef_Variational::Adjusting(
|
||||
|
||||
|
||||
/* Local variables */
|
||||
Standard_Integer iter, ipnt;
|
||||
Standard_Real ecart, emold, erold, tpara;
|
||||
Standard_Real vocri[4], j1cibl, vtest, vseuil;
|
||||
Standard_Integer i, numint, flag;
|
||||
Standard_Integer iter = 0, ipnt = 0;
|
||||
Standard_Real ecart = NAN, emold = NAN, erold = NAN, tpara = NAN;
|
||||
Standard_Real vocri[4], j1cibl = NAN, vtest = NAN, vseuil = NAN;
|
||||
Standard_Integer i = 0, numint = 0, flag = 0;
|
||||
TColStd_Array1OfReal tbpoid(myFirstPoint, myLastPoint);
|
||||
Standard_Boolean loptim, lrejet;
|
||||
Standard_Boolean loptim = 0, lrejet = 0;
|
||||
Handle(AppDef_SmoothCriterion) JNew;
|
||||
Handle(FEmTool_Curve) CNew;
|
||||
Standard_Real E1, E2, E3;
|
||||
Standard_Real E1 = NAN, E2 = NAN, E3 = NAN;
|
||||
|
||||
|
||||
/* (0.b) Initialisations */
|
||||
@@ -2694,12 +2696,12 @@ void AppDef_Variational::AssemblingConstraints(const Handle(FEmTool_Curve)& Curv
|
||||
V1((Standard_Real*)&G1(0), 0, MxDeg),
|
||||
V2((Standard_Real*)&G2(0), 0, MxDeg);
|
||||
|
||||
Standard_Integer IndexOfConstraint, Ng3d, Ng2d, NBeg2d, NPass, NgPC1,
|
||||
NTang3d, NTang2d,
|
||||
Point, TypOfConstr,
|
||||
Standard_Integer IndexOfConstraint = 0, Ng3d = 0, Ng2d = 0, NBeg2d = 0, NPass = 0, NgPC1 = 0,
|
||||
NTang3d = 0, NTang2d = 0,
|
||||
Point = 0, TypOfConstr = 0,
|
||||
p0 = Parameters.Lower() - myFirstPoint,
|
||||
curel = 1, el, i, ipnt, ityp, j, k, pnt, curdim,
|
||||
jt, Ntheta = 6 * myNbP3d + 2 * myNbP2d;
|
||||
curel = 1, el = 0, i = 0, ipnt = 0, ityp = 0, j = 0, k = 0, pnt = 0, curdim = 0,
|
||||
jt = 0, Ntheta = 6 * myNbP3d + 2 * myNbP2d;
|
||||
Standard_Integer NbConstr = myNbPassPoints + myNbTangPoints + myNbCurvPoints;
|
||||
|
||||
// Ng3d = 3 * NbConstr + 2 * myNbTangPoints + 5 * myNbCurvPoints;
|
||||
@@ -2715,13 +2717,13 @@ void AppDef_Variational::AssemblingConstraints(const Handle(FEmTool_Curve)& Curv
|
||||
|
||||
TColStd_Array1OfReal& Intervals = Curve->Knots();
|
||||
|
||||
Standard_Real t, R1, R2;
|
||||
Standard_Real t = NAN, R1 = NAN, R2 = NAN;
|
||||
|
||||
Handle(PLib_Base) myBase = Curve->Base();
|
||||
Handle(PLib_HermitJacobi) myHermitJacobi = Handle(PLib_HermitJacobi)::DownCast (myBase);
|
||||
Standard_Integer Order = myHermitJacobi->NivConstr() + 1;
|
||||
|
||||
Standard_Real UFirst, ULast, coeff, c0, mfact, mfact1;
|
||||
Standard_Real UFirst = NAN, ULast = NAN, coeff = NAN, c0 = NAN, mfact = NAN, mfact1 = NAN;
|
||||
|
||||
A.NullifyConstraint();
|
||||
|
||||
@@ -2960,7 +2962,7 @@ Standard_Boolean AppDef_Variational::InitTthetaF(const Standard_Integer ndimen,
|
||||
gp_Vec T, V;
|
||||
gp_Vec theta1, theta2;
|
||||
gp_Vec F;
|
||||
Standard_Real XX, XY, YY, XZ, YZ, ZZ;
|
||||
Standard_Real XX = NAN, XY = NAN, YY = NAN, XZ = NAN, YZ = NAN, ZZ = NAN;
|
||||
|
||||
if ((typcon == AppParCurves_TangencyPoint)||(typcon == AppParCurves_CurvaturePoint))
|
||||
{
|
||||
|
@@ -254,11 +254,11 @@ private:
|
||||
Standard_Integer myNbPoints;
|
||||
Handle(TColStd_HArray1OfReal) myTabPoints;
|
||||
Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints;
|
||||
Standard_Integer myNbConstraints;
|
||||
Standard_Integer myNbConstraints{};
|
||||
Handle(TColStd_HArray1OfReal) myTabConstraints;
|
||||
Standard_Integer myNbPassPoints;
|
||||
Standard_Integer myNbTangPoints;
|
||||
Standard_Integer myNbCurvPoints;
|
||||
Standard_Integer myNbPassPoints{};
|
||||
Standard_Integer myNbTangPoints{};
|
||||
Standard_Integer myNbCurvPoints{};
|
||||
Handle(TColStd_HArray1OfInteger) myTypConstraints;
|
||||
Handle(TColStd_HArray1OfReal) myTtheta;
|
||||
Handle(TColStd_HArray1OfReal) myTfthet;
|
||||
@@ -270,15 +270,15 @@ private:
|
||||
Standard_Integer myNivCont;
|
||||
Standard_Boolean myWithMinMax;
|
||||
Standard_Boolean myWithCutting;
|
||||
Standard_Real myPercent[3];
|
||||
Standard_Real myCriterium[4];
|
||||
Standard_Real myPercent[3]{};
|
||||
Standard_Real myCriterium[4]{};
|
||||
Handle(AppDef_SmoothCriterion) mySmoothCriterion;
|
||||
Handle(TColStd_HArray1OfReal) myParameters;
|
||||
Handle(TColStd_HArray1OfReal) myKnots;
|
||||
AppParCurves_MultiBSpCurve myMBSpCurve;
|
||||
Standard_Real myMaxError;
|
||||
Standard_Integer myMaxErrorIndex;
|
||||
Standard_Real myAverageError;
|
||||
Standard_Real myMaxError{};
|
||||
Standard_Integer myMaxErrorIndex{};
|
||||
Standard_Real myAverageError{};
|
||||
Standard_Boolean myIsCreated;
|
||||
Standard_Boolean myIsDone;
|
||||
Standard_Boolean myIsOverConstr;
|
||||
|
@@ -16,6 +16,8 @@
|
||||
#define No_Standard_OutOfRange
|
||||
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <AppParCurves.hxx>
|
||||
#include <BSplCLib.hxx>
|
||||
#include <math_Matrix.hxx>
|
||||
@@ -25,8 +27,8 @@ void AppParCurves::BernsteinMatrix(const Standard_Integer NbPoles,
|
||||
const math_Vector& U,
|
||||
math_Matrix& A) {
|
||||
|
||||
Standard_Integer i, j, id;
|
||||
Standard_Real u0, u1, y0, y1, xs;
|
||||
Standard_Integer i = 0, j = 0, id = 0;
|
||||
Standard_Real u0 = NAN, u1 = NAN, y0 = NAN, y1 = NAN, xs = NAN;
|
||||
Standard_Integer first = U.Lower(), last = U.Upper();
|
||||
math_Vector B(1, NbPoles-1);
|
||||
|
||||
@@ -62,8 +64,8 @@ void AppParCurves::Bernstein(const Standard_Integer NbPoles,
|
||||
math_Matrix& A,
|
||||
math_Matrix& DA) {
|
||||
|
||||
Standard_Integer i, j, id, Ndeg = NbPoles-1;
|
||||
Standard_Real u0, u1, y0, y1, xs, bj, bj1;
|
||||
Standard_Integer i = 0, j = 0, id = 0, Ndeg = NbPoles-1;
|
||||
Standard_Real u0 = NAN, u1 = NAN, y0 = NAN, y1 = NAN, xs = NAN, bj = NAN, bj1 = NAN;
|
||||
Standard_Integer first = U.Lower(), last = U.Upper();
|
||||
math_Vector B(1, NbPoles-1);
|
||||
|
||||
@@ -101,9 +103,9 @@ void AppParCurves::Bernstein(const Standard_Integer NbPoles,
|
||||
void AppParCurves::SecondDerivativeBernstein(const Standard_Real U,
|
||||
math_Vector& DDA) {
|
||||
// Standard_Real U1 = 1-U, Y0, Y1, Xs;
|
||||
Standard_Real Y0, Y1, Xs;
|
||||
Standard_Real Y0 = NAN, Y1 = NAN, Xs = NAN;
|
||||
Standard_Integer NbPoles = DDA.Length();
|
||||
Standard_Integer id, j, N4, deg = NbPoles-1;
|
||||
Standard_Integer id = 0, j = 0, N4 = 0, deg = NbPoles-1;
|
||||
N4 = deg*(deg-1);
|
||||
math_Vector B(1, deg-1);
|
||||
B(1) = 1.;
|
||||
@@ -155,13 +157,13 @@ void AppParCurves::SplineFunction(const Standard_Integer nbpoles,
|
||||
math_IntegerVector& index)
|
||||
{
|
||||
// Standard_Real U, NewU, co, diff, t1, t2;
|
||||
Standard_Real U, NewU;
|
||||
Standard_Real U = NAN, NewU = NAN;
|
||||
// gp_Pnt2d Pt, P0;
|
||||
// gp_Vec2d V1;
|
||||
// Standard_Integer i, j, k, iter, in, ik, deg1 = deg+1;
|
||||
Standard_Integer i, j, deg1 = deg+1;
|
||||
Standard_Integer i = 0, j = 0, deg1 = deg+1;
|
||||
// Standard_Integer oldkindex, kindex, theindex, ttindex;
|
||||
Standard_Integer oldkindex, kindex, theindex;
|
||||
Standard_Integer oldkindex = 0, kindex = 0, theindex = 0;
|
||||
math_Vector locpoles(1 , deg1);
|
||||
math_Vector locdpoles(1 , deg1);
|
||||
Standard_Integer firstp = Parameters.Lower(), lastp = Parameters.Upper();
|
||||
@@ -174,8 +176,8 @@ void AppParCurves::SplineFunction(const Standard_Integer nbpoles,
|
||||
|
||||
oldkindex = 1;
|
||||
|
||||
Standard_Integer pp, qq;
|
||||
Standard_Real Saved, Inverse, LocalInverse, locqq, locdqq, val;
|
||||
Standard_Integer pp = 0, qq = 0;
|
||||
Standard_Real Saved = NAN, Inverse = NAN, LocalInverse = NAN, locqq = NAN, locdqq = NAN, val = NAN;
|
||||
|
||||
for (i = firstp; i <= lastp; i++) {
|
||||
U = Parameters(i);
|
||||
|
@@ -25,10 +25,10 @@ AppParCurves_ConstraintCouple::
|
||||
|
||||
AppParCurves_ConstraintCouple::
|
||||
AppParCurves_ConstraintCouple(const Standard_Integer TheIndex,
|
||||
const AppParCurves_Constraint Cons)
|
||||
const AppParCurves_Constraint Cons) : myIndex(TheIndex), myConstraint(Cons)
|
||||
{
|
||||
myIndex = TheIndex;
|
||||
myConstraint = Cons;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@@ -32,7 +32,7 @@
|
||||
static Standard_Integer ComputeDegree(const TColStd_Array1OfInteger& mults,
|
||||
const Standard_Integer nbPoles)
|
||||
{
|
||||
Standard_Integer i, sum = 0;
|
||||
Standard_Integer i = 0, sum = 0;
|
||||
for (i = mults.Lower(); i <= mults.Upper(); i++) {
|
||||
sum += mults(i);
|
||||
}
|
||||
@@ -73,13 +73,13 @@ AppParCurves_MultiBSpCurve::AppParCurves_MultiBSpCurve
|
||||
(const AppParCurves_Array1OfMultiPoint& tabMU,
|
||||
const TColStd_Array1OfReal& Knots,
|
||||
const TColStd_Array1OfInteger& Mults):
|
||||
AppParCurves_MultiCurve(tabMU)
|
||||
AppParCurves_MultiCurve(tabMU), myknots(new TColStd_HArray1OfReal(Knots.Lower(), Knots.Upper())), mymults(new TColStd_HArray1OfInteger(Mults.Lower(), Mults.Upper())), myDegree(ComputeDegree(Mults,NbPoles()))
|
||||
{
|
||||
myknots = new TColStd_HArray1OfReal(Knots.Lower(), Knots.Upper());
|
||||
|
||||
myknots->ChangeArray1() = Knots;
|
||||
mymults = new TColStd_HArray1OfInteger(Mults.Lower(), Mults.Upper());
|
||||
|
||||
mymults->ChangeArray1() = Mults;
|
||||
myDegree = ComputeDegree(Mults,NbPoles());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -92,13 +92,13 @@ AppParCurves_MultiBSpCurve::AppParCurves_MultiBSpCurve
|
||||
(const AppParCurves_MultiCurve& SC,
|
||||
const TColStd_Array1OfReal& Knots,
|
||||
const TColStd_Array1OfInteger& Mults):
|
||||
AppParCurves_MultiCurve(SC)
|
||||
AppParCurves_MultiCurve(SC), myknots(new TColStd_HArray1OfReal(Knots.Lower(), Knots.Upper())), mymults(new TColStd_HArray1OfInteger(Mults.Lower(), Mults.Upper())), myDegree(ComputeDegree(Mults,NbPoles()))
|
||||
{
|
||||
myknots = new TColStd_HArray1OfReal(Knots.Lower(), Knots.Upper());
|
||||
|
||||
myknots->ChangeArray1() = Knots;
|
||||
mymults = new TColStd_HArray1OfInteger(Mults.Lower(), Mults.Upper());
|
||||
|
||||
mymults->ChangeArray1() = Mults;
|
||||
myDegree = ComputeDegree(Mults,NbPoles());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@@ -27,17 +27,17 @@
|
||||
AppParCurves_MultiCurve::AppParCurves_MultiCurve() {}
|
||||
|
||||
|
||||
AppParCurves_MultiCurve::AppParCurves_MultiCurve (const Standard_Integer NbPol)
|
||||
AppParCurves_MultiCurve::AppParCurves_MultiCurve (const Standard_Integer NbPol) : tabPoint(new AppParCurves_HArray1OfMultiPoint(1, NbPol))
|
||||
{
|
||||
tabPoint = new AppParCurves_HArray1OfMultiPoint(1, NbPol);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
AppParCurves_MultiCurve::AppParCurves_MultiCurve (const AppParCurves_Array1OfMultiPoint& tabMU)
|
||||
AppParCurves_MultiCurve::AppParCurves_MultiCurve (const AppParCurves_Array1OfMultiPoint& tabMU) : tabPoint(new AppParCurves_HArray1OfMultiPoint(1, tabMU.Length()))
|
||||
{
|
||||
tabPoint = new AppParCurves_HArray1OfMultiPoint(1, tabMU.Length());
|
||||
Standard_Integer i, Lower = tabMU.Lower();
|
||||
|
||||
Standard_Integer i = 0, Lower = tabMU.Lower();
|
||||
for (i = 1; i <= tabMU.Length(); i++) {
|
||||
tabPoint->SetValue(i, tabMU.Value(Lower+i-1));
|
||||
}
|
||||
|
@@ -32,10 +32,10 @@ AppParCurves_MultiPoint::AppParCurves_MultiPoint()
|
||||
|
||||
|
||||
AppParCurves_MultiPoint::AppParCurves_MultiPoint (const Standard_Integer NbPoles,
|
||||
const Standard_Integer NbPoles2d)
|
||||
const Standard_Integer NbPoles2d) : nbP(NbPoles), nbP2d(NbPoles2d)
|
||||
{
|
||||
nbP = NbPoles;
|
||||
nbP2d = NbPoles2d;
|
||||
|
||||
|
||||
if (nbP != 0) {
|
||||
Handle(TColgp_HArray1OfPnt) tab3d =
|
||||
new TColgp_HArray1OfPnt(1, NbPoles);
|
||||
@@ -50,10 +50,10 @@ AppParCurves_MultiPoint::AppParCurves_MultiPoint (const Standard_Integer NbPoles
|
||||
|
||||
|
||||
|
||||
AppParCurves_MultiPoint::AppParCurves_MultiPoint(const TColgp_Array1OfPnt& tabP)
|
||||
AppParCurves_MultiPoint::AppParCurves_MultiPoint(const TColgp_Array1OfPnt& tabP) : nbP2d(0), nbP(tabP.Length())
|
||||
{
|
||||
nbP2d = 0;
|
||||
nbP = tabP.Length();
|
||||
|
||||
|
||||
Handle(TColgp_HArray1OfPnt) tab3d =
|
||||
new TColgp_HArray1OfPnt(1, nbP);
|
||||
ttabPoint = tab3d;
|
||||
@@ -66,10 +66,10 @@ AppParCurves_MultiPoint::AppParCurves_MultiPoint(const TColgp_Array1OfPnt& tabP)
|
||||
|
||||
|
||||
|
||||
AppParCurves_MultiPoint::AppParCurves_MultiPoint(const TColgp_Array1OfPnt2d& tabP2d)
|
||||
AppParCurves_MultiPoint::AppParCurves_MultiPoint(const TColgp_Array1OfPnt2d& tabP2d) : nbP(0), nbP2d(tabP2d.Length())
|
||||
{
|
||||
nbP = 0;
|
||||
nbP2d = tabP2d.Length();
|
||||
|
||||
|
||||
Handle(TColgp_HArray1OfPnt2d) tab2d =
|
||||
new TColgp_HArray1OfPnt2d(1, nbP2d);
|
||||
ttabPoint2d = tab2d;
|
||||
@@ -82,10 +82,10 @@ AppParCurves_MultiPoint::AppParCurves_MultiPoint(const TColgp_Array1OfPnt2d& tab
|
||||
|
||||
|
||||
AppParCurves_MultiPoint::AppParCurves_MultiPoint(const TColgp_Array1OfPnt& tabP,
|
||||
const TColgp_Array1OfPnt2d& tabP2d)
|
||||
const TColgp_Array1OfPnt2d& tabP2d) : nbP(tabP.Length()), nbP2d(tabP2d.Length())
|
||||
{
|
||||
nbP = tabP.Length();
|
||||
nbP2d = tabP2d.Length();
|
||||
|
||||
|
||||
Handle(TColgp_HArray1OfPnt) t3d =
|
||||
new TColgp_HArray1OfPnt(1, nbP);
|
||||
ttabPoint = t3d;
|
||||
@@ -95,7 +95,7 @@ AppParCurves_MultiPoint::AppParCurves_MultiPoint(const TColgp_Array1OfPnt& tab
|
||||
ttabPoint2d = t2d;
|
||||
|
||||
TColgp_Array1OfPnt& P3d = tabPoint->ChangeArray1();
|
||||
Standard_Integer i, Lower = tabP.Lower();
|
||||
Standard_Integer i = 0, Lower = tabP.Lower();
|
||||
for (i = 1; i <= nbP; i++) {
|
||||
P3d.SetValue(i, tabP.Value(Lower+i-1));
|
||||
}
|
||||
|
@@ -34,16 +34,16 @@ class Approx_Curve2d_Eval : public AdvApprox_EvaluatorFunction
|
||||
Standard_Real First, Standard_Real Last)
|
||||
: fonct(theFunc) { StartEndSav[0] = First; StartEndSav[1] = Last; }
|
||||
|
||||
virtual void Evaluate (Standard_Integer *Dimension,
|
||||
void Evaluate (Standard_Integer *Dimension,
|
||||
Standard_Real StartEnd[2],
|
||||
Standard_Real *Parameter,
|
||||
Standard_Integer *DerivativeRequest,
|
||||
Standard_Real *Result, // [Dimension]
|
||||
Standard_Integer *ErrorCode);
|
||||
Standard_Integer *ErrorCode) override;
|
||||
|
||||
private:
|
||||
Handle(Adaptor2d_Curve2d) fonct;
|
||||
Standard_Real StartEndSav[2];
|
||||
Standard_Real StartEndSav[2]{};
|
||||
};
|
||||
|
||||
void Approx_Curve2d_Eval::Evaluate (Standard_Integer *Dimension,
|
||||
@@ -96,7 +96,7 @@ void Approx_Curve2d_Eval::Evaluate (Standard_Integer *Dimension,
|
||||
}
|
||||
}
|
||||
|
||||
Approx_Curve2d::Approx_Curve2d(const Handle(Adaptor2d_Curve2d)& C2D,const Standard_Real First,const Standard_Real Last,const Standard_Real TolU,const Standard_Real TolV,const GeomAbs_Shape Continuity,const Standard_Integer MaxDegree,const Standard_Integer MaxSegments)
|
||||
Approx_Curve2d::Approx_Curve2d(const Handle(Adaptor2d_Curve2d)& C2D,const Standard_Real First,const Standard_Real Last,const Standard_Real TolU,const Standard_Real TolV,const GeomAbs_Shape Continuity,const Standard_Integer MaxDegree,const Standard_Integer MaxSegments) : myMaxError2dU(0), myMaxError2dV(0)
|
||||
{
|
||||
C2D->Trim(First,Last,Precision::PConfusion());
|
||||
|
||||
@@ -115,8 +115,8 @@ void Approx_Curve2d_Eval::Evaluate (Standard_Integer *Dimension,
|
||||
|
||||
AdvApprox_PrefAndRec CutTool(CutPnts_C2,CutPnts_C3);
|
||||
|
||||
myMaxError2dU = 0;
|
||||
myMaxError2dV = 0;
|
||||
|
||||
|
||||
|
||||
Approx_Curve2d_Eval ev (C2D, First, Last);
|
||||
AdvApprox_ApproxAFunction aApprox (Num1DSS, Num2DSS, Num3DSS,
|
||||
|
@@ -38,16 +38,16 @@ class Approx_Curve3d_Eval : public AdvApprox_EvaluatorFunction
|
||||
Standard_Real First, Standard_Real Last)
|
||||
: fonct(theFunc) { StartEndSav[0] = First; StartEndSav[1] = Last; }
|
||||
|
||||
virtual void Evaluate (Standard_Integer *Dimension,
|
||||
void Evaluate (Standard_Integer *Dimension,
|
||||
Standard_Real StartEnd[2],
|
||||
Standard_Real *Parameter,
|
||||
Standard_Integer *DerivativeRequest,
|
||||
Standard_Real *Result, // [Dimension]
|
||||
Standard_Integer *ErrorCode);
|
||||
Standard_Integer *ErrorCode) override;
|
||||
|
||||
private:
|
||||
Handle(Adaptor3d_Curve) fonct;
|
||||
Standard_Real StartEndSav[2];
|
||||
Standard_Real StartEndSav[2]{};
|
||||
};
|
||||
|
||||
void Approx_Curve3d_Eval::Evaluate (Standard_Integer *Dimension,
|
||||
@@ -105,7 +105,7 @@ Approx_Curve3d::Approx_Curve3d(const Handle(Adaptor3d_Curve)& Curve,
|
||||
const Standard_Real Tol3d,
|
||||
const GeomAbs_Shape Order,
|
||||
const Standard_Integer MaxSegments,
|
||||
const Standard_Integer MaxDegree)
|
||||
const Standard_Integer MaxDegree) : myMaxError(0)
|
||||
{
|
||||
// Initialisation of input parameters of AdvApprox
|
||||
|
||||
@@ -127,7 +127,7 @@ Approx_Curve3d::Approx_Curve3d(const Handle(Adaptor3d_Curve)& Curve,
|
||||
|
||||
AdvApprox_PrefAndRec CutTool(CutPnts_C2,CutPnts_C3);
|
||||
|
||||
myMaxError = 0;
|
||||
|
||||
|
||||
Approx_Curve3d_Eval ev (Curve, First, Last);
|
||||
AdvApprox_ApproxAFunction aApprox (Num1DSS, Num2DSS, Num3DSS,
|
||||
|
@@ -14,6 +14,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <Approx_CurveOnSurface.hxx>
|
||||
|
||||
#include <Adaptor2d_Curve2d.hxx>
|
||||
@@ -55,17 +57,17 @@ class Approx_CurveOnSurface_Eval : public AdvApprox_EvaluatorFunction
|
||||
: fonct(theFunc), fonct2d(theFunc2d)
|
||||
{ StartEndSav[0] = First; StartEndSav[1] = Last; }
|
||||
|
||||
virtual void Evaluate (Standard_Integer *Dimension,
|
||||
void Evaluate (Standard_Integer *Dimension,
|
||||
Standard_Real StartEnd[2],
|
||||
Standard_Real *Parameter,
|
||||
Standard_Integer *DerivativeRequest,
|
||||
Standard_Real *Result, // [Dimension]
|
||||
Standard_Integer *ErrorCode);
|
||||
Standard_Integer *ErrorCode) override;
|
||||
|
||||
private:
|
||||
Handle(Adaptor3d_Curve) fonct;
|
||||
Handle(Adaptor2d_Curve2d) fonct2d;
|
||||
Standard_Real StartEndSav[2];
|
||||
Standard_Real StartEndSav[2]{};
|
||||
};
|
||||
|
||||
void Approx_CurveOnSurface_Eval::Evaluate (Standard_Integer *Dimension,
|
||||
@@ -154,16 +156,16 @@ class Approx_CurveOnSurface_Eval3d : public AdvApprox_EvaluatorFunction
|
||||
Standard_Real First, Standard_Real Last)
|
||||
: fonct(theFunc) { StartEndSav[0] = First; StartEndSav[1] = Last; }
|
||||
|
||||
virtual void Evaluate (Standard_Integer *Dimension,
|
||||
void Evaluate (Standard_Integer *Dimension,
|
||||
Standard_Real StartEnd[2],
|
||||
Standard_Real *Parameter,
|
||||
Standard_Integer *DerivativeRequest,
|
||||
Standard_Real *Result, // [Dimension]
|
||||
Standard_Integer *ErrorCode);
|
||||
Standard_Integer *ErrorCode) override;
|
||||
|
||||
private:
|
||||
Handle(Adaptor3d_Curve) fonct;
|
||||
Standard_Real StartEndSav[2];
|
||||
Standard_Real StartEndSav[2]{};
|
||||
};
|
||||
|
||||
void Approx_CurveOnSurface_Eval3d::Evaluate (Standard_Integer *Dimension,
|
||||
@@ -235,16 +237,16 @@ class Approx_CurveOnSurface_Eval2d : public AdvApprox_EvaluatorFunction
|
||||
Standard_Real First, Standard_Real Last)
|
||||
: fonct2d(theFunc2d) { StartEndSav[0] = First; StartEndSav[1] = Last; }
|
||||
|
||||
virtual void Evaluate (Standard_Integer *Dimension,
|
||||
void Evaluate (Standard_Integer *Dimension,
|
||||
Standard_Real StartEnd[2],
|
||||
Standard_Real *Parameter,
|
||||
Standard_Integer *DerivativeRequest,
|
||||
Standard_Real *Result, // [Dimension]
|
||||
Standard_Integer *ErrorCode);
|
||||
Standard_Integer *ErrorCode) override;
|
||||
|
||||
private:
|
||||
Handle(Adaptor2d_Curve2d) fonct2d;
|
||||
Standard_Real StartEndSav[2];
|
||||
Standard_Real StartEndSav[2]{};
|
||||
};
|
||||
|
||||
void Approx_CurveOnSurface_Eval2d::Evaluate (Standard_Integer *Dimension,
|
||||
@@ -381,8 +383,8 @@ void Approx_CurveOnSurface::Perform(const Standard_Integer theMaxSegments,
|
||||
|
||||
Handle( Adaptor2d_Curve2d ) TrimmedC2D = myC2D->Trim( myFirst, myLast, Precision::PConfusion() );
|
||||
|
||||
Standard_Boolean isU, isForward;
|
||||
Standard_Real aParam;
|
||||
Standard_Boolean isU = 0, isForward = 0;
|
||||
Standard_Real aParam = NAN;
|
||||
if (theOnly3d && isIsoLine(TrimmedC2D, isU, aParam, isForward))
|
||||
{
|
||||
if (buildC3dOnIsoLine(TrimmedC2D, isU, aParam, isForward))
|
||||
@@ -404,7 +406,7 @@ void Approx_CurveOnSurface::Perform(const Standard_Integer theMaxSegments,
|
||||
Approx_CurveOnSurface_Eval3d Eval3dCvOnSurf (HCOnS, myFirst, myLast);
|
||||
Approx_CurveOnSurface_Eval2d Eval2dCvOnSurf ( TrimmedC2D, myFirst, myLast);
|
||||
Approx_CurveOnSurface_Eval EvalCvOnSurf (HCOnS, TrimmedC2D, myFirst, myLast);
|
||||
AdvApprox_EvaluatorFunction* EvalPtr;
|
||||
AdvApprox_EvaluatorFunction* EvalPtr = nullptr;
|
||||
if ( theOnly3d ) EvalPtr = &Eval3dCvOnSurf;
|
||||
else if ( theOnly2d ) EvalPtr = &Eval2dCvOnSurf;
|
||||
else EvalPtr = &EvalCvOnSurf;
|
||||
@@ -414,7 +416,7 @@ void Approx_CurveOnSurface::Perform(const Standard_Integer theMaxSegments,
|
||||
Num1DSS = 2;
|
||||
OneDTol = new TColStd_HArray1OfReal(1,Num1DSS);
|
||||
|
||||
Standard_Real TolU, TolV;
|
||||
Standard_Real TolU = NAN, TolV = NAN;
|
||||
|
||||
TolU = mySurf->UResolution(myTol) / 2.;
|
||||
TolV = mySurf->VResolution(myTol) / 2.;
|
||||
@@ -445,7 +447,7 @@ void Approx_CurveOnSurface::Perform(const Standard_Integer theMaxSegments,
|
||||
ThreeDTol->Init(myTol/2);
|
||||
}
|
||||
|
||||
AdvApprox_Cutting* CutTool;
|
||||
AdvApprox_Cutting* CutTool = nullptr;
|
||||
|
||||
if (aContinuity <= myC2D->Continuity() &&
|
||||
aContinuity <= mySurf->UContinuity() &&
|
||||
@@ -556,7 +558,7 @@ void Approx_CurveOnSurface::Perform(const Standard_Integer theMaxSegments,
|
||||
//function : isIsoLine
|
||||
//purpose :
|
||||
//=============================================================================
|
||||
Standard_Boolean Approx_CurveOnSurface::isIsoLine(const Handle(Adaptor2d_Curve2d) theC2D,
|
||||
Standard_Boolean Approx_CurveOnSurface::isIsoLine(const Handle(Adaptor2d_Curve2d)& theC2D,
|
||||
Standard_Boolean& theIsU,
|
||||
Standard_Real& theParam,
|
||||
Standard_Boolean& theIsForward) const
|
||||
@@ -638,7 +640,7 @@ Standard_Boolean Approx_CurveOnSurface::isIsoLine(const Handle(Adaptor2d_Curve2d
|
||||
//function : buildC3dOnIsoLine
|
||||
//purpose :
|
||||
//=============================================================================
|
||||
Standard_Boolean Approx_CurveOnSurface::buildC3dOnIsoLine(const Handle(Adaptor2d_Curve2d) theC2D,
|
||||
Standard_Boolean Approx_CurveOnSurface::buildC3dOnIsoLine(const Handle(Adaptor2d_Curve2d)& theC2D,
|
||||
const Standard_Boolean theIsU,
|
||||
const Standard_Real theParam,
|
||||
const Standard_Boolean theIsForward)
|
||||
@@ -659,7 +661,7 @@ Standard_Boolean Approx_CurveOnSurface::buildC3dOnIsoLine(const Handle(Adaptor2d
|
||||
gp_Pnt2d aL2d = theC2D->Value(theC2D->LastParameter());
|
||||
|
||||
Standard_Boolean isToTrim = Standard_True;
|
||||
Standard_Real U1, U2, V1, V2;
|
||||
Standard_Real U1 = NAN, U2 = NAN, V1 = NAN, V2 = NAN;
|
||||
aSurf->Bounds(U1, U2, V1, V2);
|
||||
|
||||
if (theIsU)
|
||||
|
@@ -85,7 +85,7 @@ protected:
|
||||
//! @param theParam Line parameter.
|
||||
//! @param theIsForward Flag indicating forward parameterization on a isoline.
|
||||
//! @return Standard_True when 2d curve is a line and Standard_False otherwise.
|
||||
Standard_Boolean isIsoLine(const Handle(Adaptor2d_Curve2d) theC2D,
|
||||
Standard_Boolean isIsoLine(const Handle(Adaptor2d_Curve2d)& theC2D,
|
||||
Standard_Boolean& theIsU,
|
||||
Standard_Real& theParam,
|
||||
Standard_Boolean& theIsForward) const;
|
||||
@@ -97,7 +97,7 @@ protected:
|
||||
//! @param theParam Line parameter.
|
||||
//! @param theIsForward Flag indicating forward parameterization on a isoline.
|
||||
//! @return Standard_True when 3d curve is built and Standard_False otherwise.
|
||||
Standard_Boolean buildC3dOnIsoLine(const Handle(Adaptor2d_Curve2d) theC2D,
|
||||
Standard_Boolean buildC3dOnIsoLine(const Handle(Adaptor2d_Curve2d)& theC2D,
|
||||
const Standard_Boolean theIsU,
|
||||
const Standard_Real theParam,
|
||||
const Standard_Boolean theIsForward);
|
||||
|
@@ -14,6 +14,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <Approx_CurvilinearParameter.hxx>
|
||||
|
||||
#include <Adaptor2d_Curve2d.hxx>
|
||||
@@ -73,16 +75,16 @@ class Approx_CurvilinearParameter_EvalCurv : public AdvApprox_EvaluatorFunction
|
||||
Standard_Real First, Standard_Real Last)
|
||||
: fonct(theFunc) { StartEndSav[0] = First; StartEndSav[1] = Last; }
|
||||
|
||||
virtual void Evaluate (Standard_Integer *Dimension,
|
||||
void Evaluate (Standard_Integer *Dimension,
|
||||
Standard_Real StartEnd[2],
|
||||
Standard_Real *Parameter,
|
||||
Standard_Integer *DerivativeRequest,
|
||||
Standard_Real *Result, // [Dimension]
|
||||
Standard_Integer *ErrorCode);
|
||||
Standard_Integer *ErrorCode) override;
|
||||
|
||||
private:
|
||||
Handle(Approx_CurvlinFunc) fonct;
|
||||
Standard_Real StartEndSav[2];
|
||||
Standard_Real StartEndSav[2]{};
|
||||
};
|
||||
|
||||
void Approx_CurvilinearParameter_EvalCurv::Evaluate (Standard_Integer * Dimension,
|
||||
@@ -95,7 +97,7 @@ void Approx_CurvilinearParameter_EvalCurv::Evaluate (Standard_Integer * Dimensio
|
||||
*ErrorCode = 0;
|
||||
Standard_Real S = *Param;
|
||||
TColStd_Array1OfReal Res(0, 2);
|
||||
Standard_Integer i;
|
||||
Standard_Integer i = 0;
|
||||
|
||||
// Dimension is incorrect
|
||||
if (*Dimension != 3) {
|
||||
@@ -126,7 +128,7 @@ Approx_CurvilinearParameter::Approx_CurvilinearParameter(const Handle(Adaptor3d_
|
||||
const GeomAbs_Shape Order,
|
||||
const Standard_Integer MaxDegree,
|
||||
const Standard_Integer MaxSegments)
|
||||
: myMaxError2d1(0.0),
|
||||
: myCase(1), myMaxError2d1(0.0),
|
||||
myMaxError2d2(0.0)
|
||||
{
|
||||
#ifdef OCCT_DEBUG_CHRONO
|
||||
@@ -134,7 +136,7 @@ Approx_CurvilinearParameter::Approx_CurvilinearParameter(const Handle(Adaptor3d_
|
||||
uparam_count = 0;
|
||||
InitChron(chr_total);
|
||||
#endif
|
||||
myCase = 1;
|
||||
|
||||
// Initialisation of input parameters of AdvApprox
|
||||
|
||||
Standard_Integer Num1DSS=0, Num2DSS=0, Num3DSS=1;
|
||||
@@ -212,16 +214,16 @@ class Approx_CurvilinearParameter_EvalCurvOnSurf : public AdvApprox_EvaluatorFun
|
||||
Standard_Real First, Standard_Real Last)
|
||||
: fonct(theFunc) { StartEndSav[0] = First; StartEndSav[1] = Last; }
|
||||
|
||||
virtual void Evaluate (Standard_Integer *Dimension,
|
||||
void Evaluate (Standard_Integer *Dimension,
|
||||
Standard_Real StartEnd[2],
|
||||
Standard_Real *Parameter,
|
||||
Standard_Integer *DerivativeRequest,
|
||||
Standard_Real *Result, // [Dimension]
|
||||
Standard_Integer *ErrorCode);
|
||||
Standard_Integer *ErrorCode) override;
|
||||
|
||||
private:
|
||||
Handle(Approx_CurvlinFunc) fonct;
|
||||
Standard_Real StartEndSav[2];
|
||||
Standard_Real StartEndSav[2]{};
|
||||
};
|
||||
|
||||
void Approx_CurvilinearParameter_EvalCurvOnSurf::Evaluate (Standard_Integer * Dimension,
|
||||
@@ -234,7 +236,7 @@ void Approx_CurvilinearParameter_EvalCurvOnSurf::Evaluate (Standard_Integer * Di
|
||||
*ErrorCode = 0;
|
||||
Standard_Real S = *Param;
|
||||
TColStd_Array1OfReal Res(0, 4);
|
||||
Standard_Integer i;
|
||||
Standard_Integer i = 0;
|
||||
|
||||
// Dimension is incorrect
|
||||
if (*Dimension != 5) {
|
||||
@@ -265,21 +267,21 @@ Approx_CurvilinearParameter::Approx_CurvilinearParameter(const Handle(Adaptor2d_
|
||||
const Standard_Real Tol,
|
||||
const GeomAbs_Shape Order,
|
||||
const Standard_Integer MaxDegree,
|
||||
const Standard_Integer MaxSegments)
|
||||
const Standard_Integer MaxSegments) : myCase(2)
|
||||
{
|
||||
#ifdef OCCT_DEBUG_CHRONO
|
||||
t_total = t_init = t_approx = t_uparam = 0;
|
||||
uparam_count = 0;
|
||||
InitChron(chr_total);
|
||||
#endif
|
||||
myCase = 2;
|
||||
|
||||
|
||||
// Initialisation of input parameters of AdvApprox
|
||||
|
||||
Standard_Integer Num1DSS=2, Num2DSS=0, Num3DSS=1, i;
|
||||
Standard_Integer Num1DSS=2, Num2DSS=0, Num3DSS=1, i = 0;
|
||||
|
||||
Handle(TColStd_HArray1OfReal) OneDTol = new TColStd_HArray1OfReal(1,Num1DSS);
|
||||
Standard_Real TolV,TolW;
|
||||
Standard_Real TolV = NAN,TolW = NAN;
|
||||
|
||||
ToleranceComputation(C2D,Surf,10,Tol,TolV,TolW);
|
||||
OneDTol->SetValue(1,TolV);
|
||||
@@ -373,16 +375,16 @@ class Approx_CurvilinearParameter_EvalCurvOn2Surf : public AdvApprox_EvaluatorFu
|
||||
Standard_Real First, Standard_Real Last)
|
||||
: fonct(theFunc) { StartEndSav[0] = First; StartEndSav[1] = Last; }
|
||||
|
||||
virtual void Evaluate (Standard_Integer *Dimension,
|
||||
void Evaluate (Standard_Integer *Dimension,
|
||||
Standard_Real StartEnd[2],
|
||||
Standard_Real *Parameter,
|
||||
Standard_Integer *DerivativeRequest,
|
||||
Standard_Real *Result, // [Dimension]
|
||||
Standard_Integer *ErrorCode);
|
||||
Standard_Integer *ErrorCode) override;
|
||||
|
||||
private:
|
||||
Handle(Approx_CurvlinFunc) fonct;
|
||||
Standard_Real StartEndSav[2];
|
||||
Standard_Real StartEndSav[2]{};
|
||||
};
|
||||
|
||||
void Approx_CurvilinearParameter_EvalCurvOn2Surf::Evaluate (Standard_Integer * Dimension,
|
||||
@@ -395,7 +397,7 @@ void Approx_CurvilinearParameter_EvalCurvOn2Surf::Evaluate (Standard_Integer * D
|
||||
*ErrorCode = 0;
|
||||
Standard_Real S = *Param;
|
||||
TColStd_Array1OfReal Res(0, 6);
|
||||
Standard_Integer i;
|
||||
Standard_Integer i = 0;
|
||||
|
||||
// Dimension is incorrect
|
||||
if (*Dimension != 7) {
|
||||
@@ -428,23 +430,23 @@ Approx_CurvilinearParameter::Approx_CurvilinearParameter(const Handle(Adaptor2d_
|
||||
const Standard_Real Tol,
|
||||
const GeomAbs_Shape Order,
|
||||
const Standard_Integer MaxDegree,
|
||||
const Standard_Integer MaxSegments)
|
||||
const Standard_Integer MaxSegments) : myCase(3)
|
||||
{
|
||||
Standard_Integer i;
|
||||
Standard_Integer i = 0;
|
||||
|
||||
#ifdef OCCT_DEBUG_CHRONO
|
||||
t_total = t_init = t_approx = t_uparam = 0;
|
||||
uparam_count = 0;
|
||||
InitChron(chr_total);
|
||||
#endif
|
||||
myCase = 3;
|
||||
|
||||
|
||||
// Initialisation of input parameters of AdvApprox
|
||||
|
||||
Standard_Integer Num1DSS=4, Num2DSS=0, Num3DSS=1;
|
||||
Handle(TColStd_HArray1OfReal) OneDTol = new TColStd_HArray1OfReal(1,Num1DSS);
|
||||
|
||||
Standard_Real TolV,TolW;
|
||||
Standard_Real TolV = NAN,TolW = NAN;
|
||||
ToleranceComputation(C2D1,Surf1,10,Tol,TolV,TolW);
|
||||
OneDTol->SetValue(1,TolV);
|
||||
OneDTol->SetValue(2,TolW);
|
||||
|
@@ -90,7 +90,7 @@ private:
|
||||
Handle(Geom2d_BSplineCurve) myCurve2d1;
|
||||
Standard_Real myMaxError2d1;
|
||||
Handle(Geom2d_BSplineCurve) myCurve2d2;
|
||||
Standard_Real myMaxError2d2;
|
||||
Standard_Real myMaxError2d2{};
|
||||
|
||||
};
|
||||
|
||||
|
@@ -14,6 +14,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <Approx_CurvlinFunc.hxx>
|
||||
|
||||
#include <Adaptor2d_Curve2d.hxx>
|
||||
@@ -43,7 +45,7 @@ Standard_IMPORT void ResultChron( OSD_Chronometer & ch, Standard_Real & time);
|
||||
|
||||
static Standard_Real cubic(const Standard_Real X, const Standard_Real *Xi, const Standard_Real *Yi)
|
||||
{
|
||||
Standard_Real I1, I2, I3, I21, I22, I31, Result;
|
||||
Standard_Real I1 = NAN, I2 = NAN, I3 = NAN, I21 = NAN, I22 = NAN, I31 = NAN, Result = NAN;
|
||||
|
||||
I1 = (Yi[0] - Yi[1])/(Xi[0] - Xi[1]);
|
||||
I2 = (Yi[1] - Yi[2])/(Xi[1] - Xi[2]);
|
||||
@@ -68,7 +70,7 @@ static void findfourpoints(const Standard_Real ,
|
||||
const Standard_Real prevU, Standard_Real *Xi,
|
||||
Standard_Real *Yi)
|
||||
{
|
||||
Standard_Integer i, j;
|
||||
Standard_Integer i = 0, j = 0;
|
||||
Standard_Integer NbInt = Si->Length() - 1;
|
||||
if (NbInt < 3) throw Standard_ConstructionError("Approx_CurvlinFunc::GetUParameter");
|
||||
|
||||
@@ -193,8 +195,8 @@ void Approx_CurvlinFunc::Init()
|
||||
void Approx_CurvlinFunc::Init(Adaptor3d_Curve& C, Handle(TColStd_HArray1OfReal)& Si,
|
||||
Handle(TColStd_HArray1OfReal)& Ui) const
|
||||
{
|
||||
Standard_Real Step, FirstU, LastU;
|
||||
Standard_Integer i, j, k, NbInt, NbIntC3;
|
||||
Standard_Real Step = NAN, FirstU = NAN, LastU = NAN;
|
||||
Standard_Integer i = 0, j = 0, k = 0, NbInt = 0, NbIntC3 = 0;
|
||||
FirstU = C.FirstParameter();
|
||||
LastU = C.LastParameter();
|
||||
|
||||
@@ -260,7 +262,7 @@ Standard_Integer Approx_CurvlinFunc::NbIntervals(const GeomAbs_Shape S) const
|
||||
CurOnSur.Load(mySurf1);
|
||||
return CurOnSur.NbIntervals(S);
|
||||
case 3:
|
||||
Standard_Integer NbInt;
|
||||
Standard_Integer NbInt = 0;
|
||||
CurOnSur.Load(myC2D1);
|
||||
CurOnSur.Load(mySurf1);
|
||||
NbInt = CurOnSur.NbIntervals(S);
|
||||
@@ -284,7 +286,7 @@ Standard_Integer Approx_CurvlinFunc::NbIntervals(const GeomAbs_Shape S) const
|
||||
void Approx_CurvlinFunc::Intervals(TColStd_Array1OfReal& T, const GeomAbs_Shape S) const
|
||||
{
|
||||
Adaptor3d_CurveOnSurface CurOnSur;
|
||||
Standard_Integer i;
|
||||
Standard_Integer i = 0;
|
||||
|
||||
switch(myCase) {
|
||||
case 1:
|
||||
@@ -296,7 +298,7 @@ void Approx_CurvlinFunc::Intervals(TColStd_Array1OfReal& T, const GeomAbs_Shape
|
||||
CurOnSur.Intervals(T, S);
|
||||
break;
|
||||
case 3:
|
||||
Standard_Integer NbInt;
|
||||
Standard_Integer NbInt = 0;
|
||||
CurOnSur.Load(myC2D1);
|
||||
CurOnSur.Load(mySurf1);
|
||||
NbInt = CurOnSur.NbIntervals(S);
|
||||
@@ -324,7 +326,7 @@ void Approx_CurvlinFunc::Trim(const Standard_Real First, const Standard_Real Las
|
||||
if (First < 0 || Last >1) throw Standard_OutOfRange("Approx_CurvlinFunc::Trim");
|
||||
if ((Last - First) < Tol) return;
|
||||
|
||||
Standard_Real FirstU, LastU;
|
||||
Standard_Real FirstU = NAN, LastU = NAN;
|
||||
Adaptor3d_CurveOnSurface CurOnSur;
|
||||
Handle(Adaptor3d_CurveOnSurface) HCurOnSur;
|
||||
|
||||
@@ -373,7 +375,7 @@ void Approx_CurvlinFunc::Trim(const Standard_Real First, const Standard_Real Las
|
||||
void Approx_CurvlinFunc::Length()
|
||||
{
|
||||
Adaptor3d_CurveOnSurface CurOnSur;
|
||||
Standard_Real FirstU, LastU;
|
||||
Standard_Real FirstU = NAN, LastU = NAN;
|
||||
|
||||
switch(myCase){
|
||||
case 1:
|
||||
@@ -408,7 +410,7 @@ void Approx_CurvlinFunc::Length()
|
||||
|
||||
Standard_Real Approx_CurvlinFunc::Length(Adaptor3d_Curve& C, const Standard_Real FirstU, const Standard_Real LastU) const
|
||||
{
|
||||
Standard_Real Length;
|
||||
Standard_Real Length = NAN;
|
||||
|
||||
Length = GCPnts_AbscissaPoint::Length(C, FirstU, LastU, myTolLen);
|
||||
return Length;
|
||||
@@ -422,7 +424,7 @@ Standard_Real Approx_CurvlinFunc::GetLength() const
|
||||
|
||||
Standard_Real Approx_CurvlinFunc::GetSParameter(const Standard_Real U) const
|
||||
{
|
||||
Standard_Real S=0, S1, S2;
|
||||
Standard_Real S=0, S1 = NAN, S2 = NAN;
|
||||
Adaptor3d_CurveOnSurface CurOnSur;
|
||||
|
||||
switch (myCase) {
|
||||
@@ -452,8 +454,8 @@ Standard_Real Approx_CurvlinFunc::GetUParameter(Adaptor3d_Curve& C,
|
||||
const Standard_Real S,
|
||||
const Standard_Integer NumberOfCurve) const
|
||||
{
|
||||
Standard_Real deltaS, base, U, Length;
|
||||
Standard_Integer NbInt, NInterval, i;
|
||||
Standard_Real deltaS = NAN, base = NAN, U = NAN, Length = NAN;
|
||||
Standard_Integer NbInt = 0, NInterval = 0, i = 0;
|
||||
Handle(TColStd_HArray1OfReal) InitUArray, InitSArray;
|
||||
#ifdef OCCT_DEBUG_CHRONO
|
||||
InitChron(chr_uparam);
|
||||
@@ -495,7 +497,7 @@ Standard_Real Approx_CurvlinFunc::GetUParameter(Adaptor3d_Curve& C,
|
||||
deltaS = (S - InitSArray->Value(NInterval))*Length;
|
||||
|
||||
// to find an initial point
|
||||
Standard_Real Xi[4], Yi[4], UGuess;
|
||||
Standard_Real Xi[4], Yi[4], UGuess = NAN;
|
||||
findfourpoints(S, NInterval, InitSArray, InitUArray, myPrevS, myPrevU, Xi, Yi);
|
||||
UGuess = cubic(S , Xi, Yi);
|
||||
|
||||
@@ -515,7 +517,7 @@ Standard_Real Approx_CurvlinFunc::GetUParameter(Adaptor3d_Curve& C,
|
||||
|
||||
Standard_Real Approx_CurvlinFunc::GetSParameter(Adaptor3d_Curve& C, const Standard_Real U, const Standard_Real Len) const
|
||||
{
|
||||
Standard_Real S, Origin;
|
||||
Standard_Real S = NAN, Origin = NAN;
|
||||
|
||||
Origin = C.FirstParameter();
|
||||
S = myFirstS + Length(C, Origin, U)/Len;
|
||||
@@ -528,7 +530,7 @@ Standard_Boolean Approx_CurvlinFunc::EvalCase1(const Standard_Real S, const Stan
|
||||
|
||||
gp_Pnt C;
|
||||
gp_Vec dC_dU, dC_dS, d2C_dU2, d2C_dS2;
|
||||
Standard_Real U, Mag, dU_dS, d2U_dS2;
|
||||
Standard_Real U = NAN, Mag = NAN, dU_dS = NAN, d2U_dS2 = NAN;
|
||||
|
||||
U = GetUParameter (*myC3D, S, 1);
|
||||
|
||||
@@ -575,7 +577,7 @@ Standard_Boolean Approx_CurvlinFunc::EvalCase2(const Standard_Real S, const Stan
|
||||
{
|
||||
if(myCase != 2) throw Standard_ConstructionError("Approx_CurvlinFunc::EvalCase2");
|
||||
|
||||
Standard_Boolean Done;
|
||||
Standard_Boolean Done = 0;
|
||||
|
||||
Done = EvalCurOnSur(S, Order, Result, 1);
|
||||
|
||||
@@ -587,7 +589,7 @@ Standard_Boolean Approx_CurvlinFunc::EvalCase3(const Standard_Real S, const Stan
|
||||
if(myCase != 3) throw Standard_ConstructionError("Approx_CurvlinFunc::EvalCase3");
|
||||
|
||||
TColStd_Array1OfReal tmpRes1(0, 4), tmpRes2(0, 4);
|
||||
Standard_Boolean Done;
|
||||
Standard_Boolean Done = 0;
|
||||
|
||||
Done = EvalCurOnSur(S, Order, tmpRes1, 1);
|
||||
|
||||
@@ -628,7 +630,7 @@ Standard_Boolean Approx_CurvlinFunc::EvalCurOnSur(const Standard_Real S, const S
|
||||
else
|
||||
throw Standard_ConstructionError("Approx_CurvlinFunc::EvalCurOnSur");
|
||||
|
||||
Standard_Real Mag, dU_dS, d2U_dS2, dV_dU, dW_dU, dV_dS, dW_dS, d2V_dS2, d2W_dS2, d2V_dU2, d2W_dU2;
|
||||
Standard_Real Mag = NAN, dU_dS = NAN, d2U_dS2 = NAN, dV_dU = NAN, dW_dU = NAN, dV_dS = NAN, dW_dS = NAN, d2V_dS2 = NAN, d2W_dS2 = NAN, d2V_dU2 = NAN, d2W_dU2 = NAN;
|
||||
gp_Pnt2d C2D;
|
||||
gp_Pnt C;
|
||||
gp_Vec2d dC2D_dU, d2C2D_dU2;
|
||||
|
@@ -115,13 +115,13 @@ private:
|
||||
Standard_Integer myCase;
|
||||
Standard_Real myFirstS;
|
||||
Standard_Real myLastS;
|
||||
Standard_Real myFirstU1;
|
||||
Standard_Real myLastU1;
|
||||
Standard_Real myFirstU2;
|
||||
Standard_Real myLastU2;
|
||||
Standard_Real myLength;
|
||||
Standard_Real myLength1;
|
||||
Standard_Real myLength2;
|
||||
Standard_Real myFirstU1{};
|
||||
Standard_Real myLastU1{};
|
||||
Standard_Real myFirstU2{};
|
||||
Standard_Real myLastU2{};
|
||||
Standard_Real myLength{};
|
||||
Standard_Real myLength1{};
|
||||
Standard_Real myLength2{};
|
||||
Standard_Real myTolLen;
|
||||
Standard_Real myPrevS;
|
||||
Standard_Real myPrevU;
|
||||
|
@@ -52,9 +52,9 @@ static void DEBUG(const AppParCurves_MultiCurve& MC) {
|
||||
|
||||
|
||||
|
||||
Approx_MCurvesToBSpCurve::Approx_MCurvesToBSpCurve()
|
||||
Approx_MCurvesToBSpCurve::Approx_MCurvesToBSpCurve() : myDone(Standard_False)
|
||||
{
|
||||
myDone = Standard_False;
|
||||
|
||||
}
|
||||
|
||||
void Approx_MCurvesToBSpCurve::Reset()
|
||||
@@ -78,7 +78,7 @@ void Approx_MCurvesToBSpCurve::Perform
|
||||
(const AppParCurves_SequenceOfMultiCurve& TheSeq)
|
||||
{
|
||||
|
||||
Standard_Integer i, j, deg=0;
|
||||
Standard_Integer i = 0, j = 0, deg=0;
|
||||
Standard_Integer nbcu = TheSeq.Length();
|
||||
AppParCurves_MultiCurve CU;
|
||||
Standard_Integer nbpolesspl=0, nbknots=0;
|
||||
@@ -167,8 +167,8 @@ void Approx_MCurvesToBSpCurve::Perform
|
||||
}
|
||||
|
||||
Standard_Integer kpol = 1, kpoles3d=1, kpoles2d=1;
|
||||
Standard_Integer mydegre, k;
|
||||
Standard_Integer first, last, Inc, thefirst;
|
||||
Standard_Integer mydegre = 0, k = 0;
|
||||
Standard_Integer first = 0, last = 0, Inc = 0, thefirst = 0;
|
||||
if (nb3d != 0) thefirst = 1;
|
||||
else thefirst = 2;
|
||||
|
||||
|
@@ -14,6 +14,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <Approx_SameParameter.hxx>
|
||||
|
||||
#include <Adaptor2d_Curve2d.hxx>
|
||||
@@ -46,12 +48,12 @@ public:
|
||||
Poles(thePoles),
|
||||
HCurve2d(theHCurve2d) {}
|
||||
|
||||
virtual void Evaluate (Standard_Integer *Dimension,
|
||||
void Evaluate (Standard_Integer *Dimension,
|
||||
Standard_Real StartEnd[2],
|
||||
Standard_Real *Parameter,
|
||||
Standard_Integer *DerivativeRequest,
|
||||
Standard_Real *Result, // [Dimension]
|
||||
Standard_Integer *ErrorCode);
|
||||
Standard_Integer *ErrorCode) override;
|
||||
|
||||
private:
|
||||
const TColStd_Array1OfReal& FlatKnots;
|
||||
@@ -119,7 +121,7 @@ static void ProjectPointOnCurve(const Standard_Real InitValue,
|
||||
|
||||
gp_Pnt a_point;
|
||||
gp_Vec vector, d1, d2;
|
||||
Standard_Real func, func_derivative,
|
||||
Standard_Real func = NAN, func_derivative = NAN,
|
||||
param = InitValue;
|
||||
Status = Standard_False;
|
||||
do
|
||||
@@ -236,7 +238,7 @@ static Standard_Boolean Check(const TColStd_Array1OfReal& FlatKnots,
|
||||
Standard_Real t = unsurnn*i;
|
||||
Standard_Real tc3d = pc3d[0]*(1.0 - t) + pc3d[nbp - 1] * t; // weight function.
|
||||
gp_Pnt Pc3d = c3d->Value(tc3d);
|
||||
Standard_Real tcons;
|
||||
Standard_Real tcons = NAN;
|
||||
BSplCLib::Eval(tc3d, Standard_False, 0, extrap_mode[0],
|
||||
aDegree, FlatKnots, 1, (Standard_Real&)Poles(1), tcons);
|
||||
|
||||
@@ -276,11 +278,11 @@ Approx_SameParameter::Approx_SameParameter(const Handle(Geom_Curve)& C3D,
|
||||
const Standard_Real Tol)
|
||||
: myDeltaMin(Precision::PConfusion()),
|
||||
mySameParameter(Standard_True),
|
||||
myDone(Standard_False)
|
||||
myDone(Standard_False), myHCurve2d(new Geom2dAdaptor_Curve(C2D)), myC3d(new GeomAdaptor_Curve(C3D)), mySurf(new GeomAdaptor_Surface(S))
|
||||
{
|
||||
myHCurve2d = new Geom2dAdaptor_Curve(C2D);
|
||||
myC3d = new GeomAdaptor_Curve(C3D);
|
||||
mySurf = new GeomAdaptor_Surface(S);
|
||||
|
||||
|
||||
|
||||
Build(Tol);
|
||||
}
|
||||
|
||||
@@ -294,11 +296,11 @@ Approx_SameParameter::Approx_SameParameter(const Handle(Adaptor3d_Curve)& C3D,
|
||||
const Standard_Real Tol)
|
||||
: myDeltaMin(Precision::PConfusion()),
|
||||
mySameParameter(Standard_True),
|
||||
myDone(Standard_False)
|
||||
myDone(Standard_False), myHCurve2d(new Geom2dAdaptor_Curve(C2D)), myC3d(C3D), mySurf(S)
|
||||
{
|
||||
myC3d = C3D;
|
||||
mySurf = S;
|
||||
myHCurve2d = new Geom2dAdaptor_Curve(C2D);
|
||||
|
||||
|
||||
|
||||
Build(Tol);
|
||||
}
|
||||
|
||||
@@ -312,11 +314,11 @@ Approx_SameParameter::Approx_SameParameter(const Handle(Adaptor3d_Curve)& C3D,
|
||||
const Standard_Real Tol)
|
||||
: myDeltaMin(Precision::PConfusion()),
|
||||
mySameParameter(Standard_True),
|
||||
myDone(Standard_False)
|
||||
myDone(Standard_False), myHCurve2d(C2D), myC3d(C3D), mySurf(S)
|
||||
{
|
||||
myC3d = C3D;
|
||||
mySurf = S;
|
||||
myHCurve2d = C2D;
|
||||
|
||||
|
||||
|
||||
Build(Tol);
|
||||
}
|
||||
|
||||
@@ -657,7 +659,7 @@ Standard_Boolean Approx_SameParameter::CheckSameParameter(Approx_SameParameter_D
|
||||
Projector.Initialize (*myC3d, theData.myC3dPF, theData.myC3dPL, theData.myTol);
|
||||
|
||||
Standard_Integer count = 1;
|
||||
Standard_Real previousp = theData.myC3dPF, initp=0, curp;
|
||||
Standard_Real previousp = theData.myC3dPF, initp=0, curp = NAN;
|
||||
Standard_Real bornesup = theData.myC3dPL - myDeltaMin;
|
||||
Standard_Boolean isProjOk = Standard_False;
|
||||
for (Standard_Integer ii = 1; ii < theData.myNbPnt; ii++)
|
||||
@@ -813,7 +815,7 @@ Standard_Boolean Approx_SameParameter::Interpolate(const Approx_SameParameter_Da
|
||||
thePoles(ii) = theData.myPC2d[ii - 2];
|
||||
aParameters(ii) = theFlatKnots(ii+2) = theData.myPC3d[ii - 2];
|
||||
}
|
||||
Standard_Integer inversion_problem;
|
||||
Standard_Integer inversion_problem = 0;
|
||||
BSplCLib::Interpolate(3,theFlatKnots,aParameters,ContactOrder,
|
||||
1,thePoles(1),inversion_problem);
|
||||
if(inversion_problem)
|
||||
@@ -842,7 +844,7 @@ Standard_Boolean Approx_SameParameter::IncreaseNbPoles(const TColStd_Array1OfRea
|
||||
const Standard_Integer aDegree = 3;
|
||||
const Standard_Integer DerivativeRequest = 0;
|
||||
Standard_Integer extrap_mode[2] = {aDegree, aDegree};
|
||||
Standard_Real eval_result;
|
||||
Standard_Real eval_result = NAN;
|
||||
Standard_Real *PolesArray = (Standard_Real *) &thePoles(thePoles.Lower());
|
||||
Standard_Integer newcount = 0;
|
||||
for (Standard_Integer ii = 0; ii < theData.myNbPnt; ii++)
|
||||
|
@@ -186,7 +186,7 @@ private:
|
||||
|
||||
Standard_Boolean mySameParameter;
|
||||
Standard_Boolean myDone;
|
||||
Standard_Real myTolReached;
|
||||
Standard_Real myTolReached{};
|
||||
Handle(Geom2d_Curve) myCurve2d;
|
||||
Handle(Adaptor2d_Curve2d) myHCurve2d;
|
||||
Handle(Adaptor3d_Curve) myC3d;
|
||||
|
@@ -15,6 +15,8 @@
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <AdvApprox_ApproxAFunction.hxx>
|
||||
#include <AdvApprox_DichoCutting.hxx>
|
||||
#include <AdvApprox_PrefAndRec.hxx>
|
||||
@@ -37,12 +39,12 @@ class Approx_SweepApproximation_Eval : public AdvApprox_EvaluatorFunction
|
||||
Approx_SweepApproximation_Eval (Approx_SweepApproximation& theTool)
|
||||
: Tool(theTool) {}
|
||||
|
||||
virtual void Evaluate (Standard_Integer *Dimension,
|
||||
void Evaluate (Standard_Integer *Dimension,
|
||||
Standard_Real StartEnd[2],
|
||||
Standard_Real *Parameter,
|
||||
Standard_Integer *DerivativeRequest,
|
||||
Standard_Real *Result, // [Dimension]
|
||||
Standard_Integer *ErrorCode);
|
||||
Standard_Integer *ErrorCode) override;
|
||||
|
||||
private:
|
||||
Approx_SweepApproximation &Tool;
|
||||
@@ -60,14 +62,14 @@ void Approx_SweepApproximation_Eval::Evaluate (Standard_Integer *,/*Dimension*/
|
||||
}
|
||||
|
||||
Approx_SweepApproximation::
|
||||
Approx_SweepApproximation(const Handle(Approx_SweepFunction)& Func)
|
||||
Approx_SweepApproximation(const Handle(Approx_SweepFunction)& Func) : myFunc(Func), myParam(0), myOrder(-1), first(1.e100), last(-1.e100), done(Standard_False)
|
||||
{
|
||||
myFunc = Func;
|
||||
|
||||
// Init of variables of control
|
||||
myParam = 0;
|
||||
myOrder = -1;
|
||||
first = 1.e100; last = -1.e100;
|
||||
done = Standard_False;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void Approx_SweepApproximation::Perform(const Standard_Real First,
|
||||
@@ -80,8 +82,8 @@ void Approx_SweepApproximation::Perform(const Standard_Real First,
|
||||
const Standard_Integer Degmax,
|
||||
const Standard_Integer Segmax)
|
||||
{
|
||||
Standard_Integer NbPolSect, NbKnotSect, ii;
|
||||
Standard_Real Tol, Tol3dMin = Tol3d, The3D2DTol=0 ;
|
||||
Standard_Integer NbPolSect = 0, NbKnotSect = 0, ii = 0;
|
||||
Standard_Real Tol = NAN, Tol3dMin = Tol3d, The3D2DTol=0 ;
|
||||
GeomAbs_Shape continuity = Continuity;
|
||||
|
||||
// (1) Characteristics of a section
|
||||
@@ -107,7 +109,7 @@ void Approx_SweepApproximation::Perform(const Standard_Real First,
|
||||
if (ThreeDTol->Value(ii) < Tol3dMin) Tol3dMin = ThreeDTol->Value(ii);
|
||||
|
||||
if (myFunc->IsRational()) {
|
||||
Standard_Real Size;
|
||||
Standard_Real Size = NAN;
|
||||
Num1DSS = NbPolSect;
|
||||
TColStd_Array1OfReal Wmin(1, Num1DSS);
|
||||
myFunc->GetMinimalWeight(Wmin);
|
||||
@@ -129,7 +131,7 @@ void Approx_SweepApproximation::Perform(const Standard_Real First,
|
||||
else {
|
||||
// for 2d define affinity using resolutions, to
|
||||
// avoid homogenuous tolerance of approximation (u/v and 2d/3d)
|
||||
Standard_Real res, tolu, tolv;
|
||||
Standard_Real res = NAN, tolu = NAN, tolv = NAN;
|
||||
TwoDTol = new (TColStd_HArray1OfReal) (1, Num2DSS);
|
||||
AAffin = new (Approx_HArray1OfGTrsf2d) (1, Num2DSS);
|
||||
The3D2DTol= 0.9*BoundTol; // 10% of security
|
||||
@@ -175,7 +177,7 @@ void Approx_SweepApproximation::Perform(const Standard_Real First,
|
||||
|
||||
// Checks if myFunc->D2 is implemented
|
||||
if (continuity >= GeomAbs_C2) {
|
||||
Standard_Boolean B;
|
||||
Standard_Boolean B = 0;
|
||||
B = myFunc->D2(First, First, Last,
|
||||
myPoles->ChangeArray1(), myDPoles->ChangeArray1(),
|
||||
myD2Poles->ChangeArray1(),
|
||||
@@ -187,7 +189,7 @@ void Approx_SweepApproximation::Perform(const Standard_Real First,
|
||||
}
|
||||
// Checks if myFunc->D1 is implemented
|
||||
if (continuity == GeomAbs_C1) {
|
||||
Standard_Boolean B;
|
||||
Standard_Boolean B = 0;
|
||||
B = myFunc->D1(First, First, Last,
|
||||
myPoles->ChangeArray1(), myDPoles->ChangeArray1(),
|
||||
myPoles2d->ChangeArray1(), myDPoles2d->ChangeArray1(),
|
||||
@@ -267,7 +269,7 @@ Approximation(const Handle(TColStd_HArray1OfReal)& OneDTol,
|
||||
|
||||
if (done) {
|
||||
// --> Fill Champs of the surface ----
|
||||
Standard_Integer ii, jj;
|
||||
Standard_Integer ii = 0, jj = 0;
|
||||
|
||||
vdeg = Approx.Degree();
|
||||
// Unfortunately Adv_Approx stores the transposition of the required
|
||||
@@ -279,7 +281,7 @@ Approximation(const Handle(TColStd_HArray1OfReal)& OneDTol,
|
||||
(1, Num3DSS, 1, Approx.NbPoles());
|
||||
|
||||
if (Num1DSS == Num3DSS) {
|
||||
Standard_Real wpoid;
|
||||
Standard_Real wpoid = NAN;
|
||||
gp_Pnt P;
|
||||
for (ii=1; ii <=Num3DSS; ii++) {
|
||||
for (jj=1; jj <=Approx.NbPoles() ; jj++) {
|
||||
@@ -384,7 +386,7 @@ Standard_Boolean Approx_SweepApproximation::D0(const Standard_Real Param,
|
||||
const Standard_Real Last,
|
||||
Standard_Real& Result)
|
||||
{
|
||||
Standard_Integer index, ii;
|
||||
Standard_Integer index = 0, ii = 0;
|
||||
Standard_Boolean Ok=Standard_True;
|
||||
Standard_Real * LocalResult = &Result;
|
||||
|
||||
@@ -448,7 +450,7 @@ Standard_Boolean Approx_SweepApproximation::D1(const Standard_Real Param,
|
||||
{
|
||||
gp_XY Vcoord;
|
||||
gp_Vec Vaux;
|
||||
Standard_Integer index, ii;
|
||||
Standard_Integer index = 0, ii = 0;
|
||||
Standard_Boolean Ok=Standard_True;
|
||||
Standard_Real * LocalResult = &Result;
|
||||
|
||||
@@ -525,7 +527,7 @@ Standard_Boolean Approx_SweepApproximation::D2(const Standard_Real Param,
|
||||
{
|
||||
gp_XY Vcoord;
|
||||
gp_Vec Vaux;
|
||||
Standard_Integer index, ii;
|
||||
Standard_Integer index = 0, ii = 0;
|
||||
Standard_Boolean Ok=Standard_True;
|
||||
Standard_Real * LocalResult = &Result;
|
||||
|
||||
@@ -642,8 +644,8 @@ Surface(TColgp_Array2OfPnt& TPoles,
|
||||
|
||||
Standard_Real Approx_SweepApproximation::MaxErrorOnSurf() const
|
||||
{
|
||||
Standard_Integer ii;
|
||||
Standard_Real MaxError = 0, err;
|
||||
Standard_Integer ii = 0;
|
||||
Standard_Real MaxError = 0, err = NAN;
|
||||
if (!done) {throw StdFail_NotDone("Approx_SweepApproximation");}
|
||||
|
||||
if (myFunc->IsRational()) {
|
||||
@@ -666,8 +668,8 @@ Standard_Real Approx_SweepApproximation::MaxErrorOnSurf() const
|
||||
|
||||
Standard_Real Approx_SweepApproximation::AverageErrorOnSurf() const
|
||||
{
|
||||
Standard_Integer ii;
|
||||
Standard_Real MoyError = 0, err;
|
||||
Standard_Integer ii = 0;
|
||||
Standard_Real MoyError = 0, err = NAN;
|
||||
if (!done) {throw StdFail_NotDone("Approx_SweepApproximation");}
|
||||
|
||||
if (myFunc->IsRational()) {
|
||||
|
@@ -164,12 +164,12 @@ private:
|
||||
|
||||
Handle(Approx_SweepFunction) myFunc;
|
||||
Standard_Boolean done;
|
||||
Standard_Integer Num1DSS;
|
||||
Standard_Integer Num2DSS;
|
||||
Standard_Integer Num3DSS;
|
||||
Standard_Integer udeg;
|
||||
Standard_Integer vdeg;
|
||||
Standard_Integer deg2d;
|
||||
Standard_Integer Num1DSS{};
|
||||
Standard_Integer Num2DSS{};
|
||||
Standard_Integer Num3DSS{};
|
||||
Standard_Integer udeg{};
|
||||
Standard_Integer vdeg{};
|
||||
Standard_Integer deg2d{};
|
||||
Handle(TColgp_HArray2OfPnt) tabPoles;
|
||||
Handle(TColStd_HArray2OfReal) tabWeights;
|
||||
Handle(TColStd_HArray1OfReal) tabUKnots;
|
||||
|
@@ -11,6 +11,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <ApproxInt_KnotTools.hxx>
|
||||
#include <TColgp_Array1OfPnt2d.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
@@ -45,8 +47,8 @@ static Standard_Real EvalCurv(const Standard_Real dim,
|
||||
// V1^V2 is outer product of two vectors:
|
||||
// P(i,j) = V1(i)*V2(j) - V1(j)*V2(i);
|
||||
Standard_Real mp = 0.;
|
||||
Standard_Integer i, j;
|
||||
Standard_Real p;
|
||||
Standard_Integer i = 0, j = 0;
|
||||
Standard_Real p = NAN;
|
||||
for(i = 1; i < dim; ++i)
|
||||
{
|
||||
for(j = 0; j < i; ++j)
|
||||
@@ -100,7 +102,7 @@ void ApproxInt_KnotTools::BuildCurvature(
|
||||
{
|
||||
// Arrays are allocated for max theDim = 7: 1 3d curve + 2 2d curves.
|
||||
Standard_Real Val[21], Par[3], Res[21];
|
||||
Standard_Integer i, j, m, ic;
|
||||
Standard_Integer i = 0, j = 0, m = 0, ic = 0;
|
||||
Standard_Integer dim = theDim;
|
||||
//
|
||||
theMaxCurv = 0.;
|
||||
@@ -189,7 +191,7 @@ void ApproxInt_KnotTools::ComputeKnotInds(const NCollection_LocalArray<Standard_
|
||||
Standard_Real aMaxCurv = 0.;
|
||||
BuildCurvature(theCoords, theDim, thePars, aCurv, aMaxCurv);
|
||||
//
|
||||
Standard_Integer i, j, dim = theDim;
|
||||
Standard_Integer i = 0, j = 0, dim = theDim;
|
||||
#ifdef APPROXINT_KNOTTOOLS_DEBUG
|
||||
std::cout << "Discrete curvature array is" << std::endl;
|
||||
for(i = aCurv.Lower(); i <= aCurv.Upper(); ++i)
|
||||
@@ -250,7 +252,7 @@ void ApproxInt_KnotTools::ComputeKnotInds(const NCollection_LocalArray<Standard_
|
||||
#endif
|
||||
|
||||
//III: Put knots in monotone intervals of curvature.
|
||||
Standard_Boolean Ok;
|
||||
Standard_Boolean Ok = 0;
|
||||
i = 1;
|
||||
do
|
||||
{
|
||||
@@ -280,7 +282,7 @@ void ApproxInt_KnotTools::ComputeKnotInds(const NCollection_LocalArray<Standard_
|
||||
icm = (anInd - aCurv.Lower()) * theDim;
|
||||
NCollection_LocalArray<Standard_Real> V1(theDim), V2(theDim);
|
||||
Standard_Real mp = 0., m1 = 0., m2 = 0.;
|
||||
Standard_Real p;
|
||||
Standard_Real p = NAN;
|
||||
for(Standard_Integer k = 0; k < theDim; ++k)
|
||||
{
|
||||
V1[k] = theCoords[icm + k] - theCoords[ici + k];
|
||||
@@ -482,7 +484,7 @@ Standard_Boolean ApproxInt_KnotTools::InsKnotBefI(const Standard_Integer theI,
|
||||
}
|
||||
//
|
||||
Standard_Real curv = 0.5*(theCurv(anInd) + theCurv(anInd1));
|
||||
Standard_Integer mid = 0, j, jj;
|
||||
Standard_Integer mid = 0, j = 0, jj = 0;
|
||||
const Standard_Real aLimitCurvatureChange = 3.0;
|
||||
for(j = anInd+1; j < anInd1; ++j)
|
||||
{
|
||||
@@ -532,9 +534,9 @@ Standard_Boolean ApproxInt_KnotTools::InsKnotBefI(const Standard_Integer theI,
|
||||
ici1 = (anInd1 - theCurv.Lower()) * theDim,
|
||||
icm = (mid - theCurv.Lower()) * theDim;
|
||||
NCollection_LocalArray<Standard_Real> V1(theDim), V2(theDim);
|
||||
Standard_Integer i;
|
||||
Standard_Integer i = 0;
|
||||
Standard_Real mp = 0., m1 = 0., m2 = 0.;
|
||||
Standard_Real p;
|
||||
Standard_Real p = NAN;
|
||||
for(i = 0; i < theDim; ++i)
|
||||
{
|
||||
V1[i] = theCoords[icm + i] - theCoords[ici + i];
|
||||
@@ -596,7 +598,7 @@ void ApproxInt_KnotTools::BuildKnots(const TColgp_Array1OfPnt& thePntsXYZ,
|
||||
aDim += 2;
|
||||
|
||||
NCollection_LocalArray<Standard_Real> aCoords(thePars.Length()*aDim);
|
||||
Standard_Integer i, j;
|
||||
Standard_Integer i = 0, j = 0;
|
||||
for(i = thePars.Lower(); i <= thePars.Upper(); ++i)
|
||||
{
|
||||
j = (i - thePars.Lower()) * aDim;
|
||||
@@ -654,7 +656,7 @@ void ApproxInt_KnotTools::BuildKnots(const TColgp_Array1OfPnt& thePntsXYZ,
|
||||
//=======================================================================
|
||||
static Standard_Real MaxParamRatio(const math_Vector& thePars)
|
||||
{
|
||||
Standard_Integer i;
|
||||
Standard_Integer i = 0;
|
||||
Standard_Real aMaxRatio = 0.;
|
||||
//
|
||||
for (i = thePars.Lower() + 1; i < thePars.Upper(); ++i)
|
||||
@@ -694,7 +696,7 @@ Approx_ParametrizationType ApproxInt_KnotTools::DefineParType(
|
||||
TColgp_Array1OfPnt2d aPntU1V1(theFpar, theLpar);
|
||||
TColgp_Array1OfPnt2d aPntU2V2(theFpar, theLpar);
|
||||
|
||||
Standard_Integer i, j;
|
||||
Standard_Integer i = 0, j = 0;
|
||||
|
||||
for (i = theFpar; i <= theLpar; ++i)
|
||||
{
|
||||
|
@@ -40,9 +40,9 @@ Quantity_Color MatraGray (Quantity_NOC_MATRAGRAY);
|
||||
|
||||
}
|
||||
|
||||
Aspect_Background::Aspect_Background (const Quantity_Color& AColor) {
|
||||
Aspect_Background::Aspect_Background (const Quantity_Color& AColor) : MyColor(AColor) {
|
||||
|
||||
MyColor = AColor;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@@ -80,7 +80,7 @@ void Aspect_CircularGrid::Compute(const Standard_Real X,
|
||||
Standard_Real cs=0,sn=0;
|
||||
Standard_Boolean done = Standard_False;
|
||||
Standard_Integer nmax = 2*myDivisionNumber;
|
||||
Standard_Integer nquad,qmax;
|
||||
Standard_Integer nquad = 0,qmax = 0;
|
||||
|
||||
if( ra == 0. ) {
|
||||
nquad = 4; qmax = nmax/nquad;
|
||||
|
@@ -56,9 +56,9 @@ private:
|
||||
|
||||
Standard_Real myRadiusStep;
|
||||
Standard_Integer myDivisionNumber;
|
||||
Standard_Real myAlpha;
|
||||
Standard_Real myA1;
|
||||
Standard_Real myB1;
|
||||
Standard_Real myAlpha{};
|
||||
Standard_Real myA1{};
|
||||
Standard_Real myB1{};
|
||||
|
||||
};
|
||||
|
||||
|
14
src/Aspect/Aspect_DisplayConnection.cxx
Executable file → Normal file
14
src/Aspect/Aspect_DisplayConnection.cxx
Executable file → Normal file
@@ -27,13 +27,13 @@ IMPLEMENT_STANDARD_RTTIEXT(Aspect_DisplayConnection,Standard_Transient)
|
||||
// function : Aspect_DisplayConnection
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
Aspect_DisplayConnection::Aspect_DisplayConnection()
|
||||
Aspect_DisplayConnection::Aspect_DisplayConnection() : myDisplay(NULL), myDefVisualInfo(NULL), myDefFBConfig(NULL), myIsOwnDisplay(false)
|
||||
{
|
||||
#if defined(HAVE_XLIB)
|
||||
myDisplay = NULL;
|
||||
myDefVisualInfo = NULL;
|
||||
myDefFBConfig = NULL;
|
||||
myIsOwnDisplay = false;
|
||||
|
||||
|
||||
|
||||
|
||||
OSD_Environment anEnv ("DISPLAY");
|
||||
myDisplayName = anEnv.Value();
|
||||
Init (NULL);
|
||||
@@ -67,9 +67,9 @@ Aspect_DisplayConnection::Aspect_DisplayConnection (const TCollection_AsciiStrin
|
||||
: myDisplay (NULL),
|
||||
myDefVisualInfo (NULL),
|
||||
myDefFBConfig (NULL),
|
||||
myIsOwnDisplay (false)
|
||||
myDisplayName(theDisplayName), myIsOwnDisplay (false)
|
||||
{
|
||||
myDisplayName = theDisplayName;
|
||||
|
||||
Init (NULL);
|
||||
}
|
||||
|
||||
|
@@ -16,23 +16,23 @@
|
||||
#include <Aspect_GradientBackground.hxx>
|
||||
|
||||
|
||||
Aspect_GradientBackground::Aspect_GradientBackground () {
|
||||
Aspect_GradientBackground::Aspect_GradientBackground () : MyGradientMethod(Aspect_GradientFillMethod_None) {
|
||||
|
||||
Quantity_Color Black (Quantity_NOC_BLACK);
|
||||
|
||||
SetColor( Black );
|
||||
MyColor2 = Black;
|
||||
MyGradientMethod = Aspect_GradientFillMethod_None;
|
||||
|
||||
|
||||
}
|
||||
|
||||
Aspect_GradientBackground::Aspect_GradientBackground( const Quantity_Color& AColor1,
|
||||
const Quantity_Color& AColor2,
|
||||
const Aspect_GradientFillMethod AMethod )
|
||||
const Aspect_GradientFillMethod AMethod ) : MyColor2(AColor2), MyGradientMethod(AMethod)
|
||||
{
|
||||
SetColor( AColor1 );
|
||||
MyColor2 = AColor2;
|
||||
MyGradientMethod = AMethod;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@@ -75,12 +75,12 @@ private:
|
||||
Standard_Real myYStep;
|
||||
Standard_Real myFirstAngle;
|
||||
Standard_Real mySecondAngle;
|
||||
Standard_Real a1;
|
||||
Standard_Real b1;
|
||||
Standard_Real c1;
|
||||
Standard_Real a2;
|
||||
Standard_Real b2;
|
||||
Standard_Real c2;
|
||||
Standard_Real a1{};
|
||||
Standard_Real b1{};
|
||||
Standard_Real c1{};
|
||||
Standard_Real a2{};
|
||||
Standard_Real b2{};
|
||||
Standard_Real c2{};
|
||||
|
||||
};
|
||||
|
||||
|
@@ -170,7 +170,7 @@ protected:
|
||||
Aspect_Background MyBackground;
|
||||
Aspect_GradientBackground MyGradientBackground;
|
||||
Aspect_FillMethod MyBackgroundFillMethod;
|
||||
Standard_Boolean MyIsVirtual;
|
||||
Standard_Boolean MyIsVirtual{};
|
||||
|
||||
};
|
||||
|
||||
|
@@ -260,7 +260,7 @@ protected:
|
||||
|
||||
protected: //! @name 3d mouse input variables
|
||||
|
||||
bool my3dMouseButtonState[32];//!< cached button state
|
||||
bool my3dMouseButtonState[32]{};//!< cached button state
|
||||
NCollection_Vec3<bool> my3dMouseNoRotate; //!< ignore 3d mouse rotation axes
|
||||
NCollection_Vec3<bool> my3dMouseToReverse; //!< reverse 3d mouse rotation axes
|
||||
float my3dMouseAccelTrans; //!< acceleration ratio for translation event
|
||||
|
@@ -12,6 +12,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <BOPAlgo_ArgumentAnalyzer.hxx>
|
||||
#include <BOPAlgo_BuilderFace.hxx>
|
||||
#include <BOPAlgo_CheckerSI.hxx>
|
||||
@@ -345,7 +347,7 @@ void BOPAlgo_ArgumentAnalyzer::TestTypes()
|
||||
void BOPAlgo_ArgumentAnalyzer::TestSelfInterferences(const Message_ProgressRange& theRange)
|
||||
{
|
||||
Message_ProgressScope aPS(theRange, NULL, (!myShape1.IsNull() && !myShape2.IsNull() ? 2 : 1));
|
||||
Standard_Integer ii;
|
||||
Standard_Integer ii = 0;
|
||||
//
|
||||
for(ii = 0; ii < 2; ii++) {
|
||||
const TopoDS_Shape& aS = (ii == 0) ? myShape1 : myShape2;
|
||||
@@ -358,7 +360,7 @@ void BOPAlgo_ArgumentAnalyzer::TestSelfInterferences(const Message_ProgressRange
|
||||
continue;
|
||||
}
|
||||
//
|
||||
Standard_Integer n1, n2;
|
||||
Standard_Integer n1 = 0, n2 = 0;
|
||||
BOPDS_MapIteratorOfMapOfPair aItMPK;
|
||||
TopTools_ListOfShape anArgs;
|
||||
BOPAlgo_CheckerSI aChecker;
|
||||
@@ -812,8 +814,8 @@ void BOPAlgo_ArgumentAnalyzer::TestMergeEdge()
|
||||
// ================================================================================
|
||||
void BOPAlgo_ArgumentAnalyzer::TestContinuity()
|
||||
{
|
||||
Standard_Integer i, j, aNbS;
|
||||
Standard_Real f, l;
|
||||
Standard_Integer i = 0, j = 0, aNbS = 0;
|
||||
Standard_Real f = NAN, l = NAN;
|
||||
TopExp_Explorer aExp;
|
||||
//
|
||||
for (i = 0; i < 2; ++i) {
|
||||
@@ -869,8 +871,8 @@ void BOPAlgo_ArgumentAnalyzer::TestContinuity()
|
||||
// ================================================================================
|
||||
void BOPAlgo_ArgumentAnalyzer::TestCurveOnSurface()
|
||||
{
|
||||
Standard_Integer i;
|
||||
Standard_Real aT, aD, aTolE;
|
||||
Standard_Integer i = 0;
|
||||
Standard_Real aT = NAN, aD = NAN, aTolE = NAN;
|
||||
TopExp_Explorer aExpF, aExpE;
|
||||
//
|
||||
for(i = 0; i < 2; i++) {
|
||||
|
@@ -120,8 +120,8 @@ BOPAlgo_Operation BOPAlgo_BOP::Operation()const
|
||||
//=======================================================================
|
||||
void BOPAlgo_BOP::CheckData()
|
||||
{
|
||||
Standard_Integer i, j, aNbArgs, aNbTools;
|
||||
Standard_Boolean bFuse;
|
||||
Standard_Integer i = 0, j = 0, aNbArgs = 0, aNbTools = 0;
|
||||
Standard_Boolean bFuse = 0;
|
||||
TopTools_ListIteratorOfListOfShape aItLS;
|
||||
//
|
||||
if (!(myOperation==BOPAlgo_COMMON ||
|
||||
@@ -178,7 +178,7 @@ void BOPAlgo_BOP::CheckData()
|
||||
continue;
|
||||
}
|
||||
|
||||
Standard_Integer iDMin, iDMax;
|
||||
Standard_Integer iDMin = 0, iDMax = 0;
|
||||
BOPTools_AlgoTools::Dimensions(aS, iDMin, iDMax);
|
||||
|
||||
if (iDMin < iDimMin[i])
|
||||
@@ -355,7 +355,7 @@ void BOPAlgo_BOP::BuildResult(const TopAbs_ShapeEnum theType)
|
||||
void BOPAlgo_BOP::Perform(const Message_ProgressRange& theRange)
|
||||
{
|
||||
Handle(NCollection_BaseAllocator) aAllocator;
|
||||
BOPAlgo_PaveFiller* pPF;
|
||||
BOPAlgo_PaveFiller* pPF = nullptr;
|
||||
TopTools_ListIteratorOfListOfShape aItLS;
|
||||
//
|
||||
GetReport()->Clear();
|
||||
@@ -585,8 +585,8 @@ void BOPAlgo_BOP::BuildRC(const Message_ProgressRange& theRange)
|
||||
}
|
||||
// B. Common, Cut, Cut21
|
||||
//
|
||||
Standard_Integer i, j, aNb, iDim;
|
||||
Standard_Boolean bCheckEdges, bContains, bCut21, bCommon;
|
||||
Standard_Integer i = 0, j = 0, aNb = 0, iDim = 0;
|
||||
Standard_Boolean bCheckEdges = 0, bContains = 0, bCut21 = 0, bCommon = 0;
|
||||
TopTools_ListIteratorOfListOfShape aItLS;
|
||||
//
|
||||
// prepare the building elements of arguments to get its splits
|
||||
@@ -662,7 +662,7 @@ void BOPAlgo_BOP::BuildRC(const Message_ProgressRange& theRange)
|
||||
//
|
||||
// compare the maps and make the result
|
||||
//
|
||||
Standard_Integer iDimMin, iDimMax;
|
||||
Standard_Integer iDimMin = 0, iDimMax = 0;
|
||||
//
|
||||
iDimMin = Min(myDims[0], myDims[1]);
|
||||
bCommon = (myOperation == BOPAlgo_COMMON);
|
||||
@@ -755,7 +755,7 @@ void BOPAlgo_BOP::BuildRC(const Message_ProgressRange& theRange)
|
||||
return;
|
||||
}
|
||||
// The squats around degenerated edges
|
||||
Standard_Integer nVD;
|
||||
Standard_Integer nVD = 0;
|
||||
TopTools_IndexedMapOfShape aMVC;
|
||||
//
|
||||
// 1. Vertices of aC
|
||||
@@ -841,7 +841,7 @@ void BOPAlgo_BOP::BuildShape(const Message_ProgressRange& theRange)
|
||||
return;
|
||||
}
|
||||
//
|
||||
Standard_Integer i;
|
||||
Standard_Integer i = 0;
|
||||
TopAbs_ShapeEnum aType, aT1, aT2;
|
||||
TopTools_ListOfShape aLSC, aLCB;
|
||||
TopTools_ListIteratorOfListOfShape aItLS, aItLSIm, aItLCB;
|
||||
@@ -1044,7 +1044,7 @@ void BOPAlgo_BOP::BuildSolid(const Message_ProgressRange& theRange)
|
||||
//
|
||||
// Find solids in input arguments sharing faces with other solids
|
||||
TopTools_MapOfShape aMTSols;
|
||||
Standard_Integer i, aNb = aMFS.Extent();
|
||||
Standard_Integer i = 0, aNb = aMFS.Extent();
|
||||
for (i = 1; i < aNb; ++i) {
|
||||
const TopTools_ListOfShape& aLSols = aMFS(i);
|
||||
if (aLSols.Extent() > 1) {
|
||||
@@ -1505,7 +1505,7 @@ void RemoveDuplicates(TopTools_ListOfShape& theContainers,
|
||||
// compare the contents of the containers and find duplicates
|
||||
TopTools_MapOfShape aDuplicates;
|
||||
//
|
||||
Standard_Integer i, j, aNb = aContents.Extent();
|
||||
Standard_Integer i = 0, j = 0, aNb = aContents.Extent();
|
||||
for (i = 1; i <= aNb; ++i) {
|
||||
const TopoDS_Shape& aCi = aContents.FindKey(i);
|
||||
if (aDuplicates.Contains(aCi)) {
|
||||
|
@@ -125,7 +125,7 @@ protected:
|
||||
protected:
|
||||
|
||||
BOPAlgo_Operation myOperation;
|
||||
Standard_Integer myDims[2];
|
||||
Standard_Integer myDims[2]{};
|
||||
TopoDS_Shape myRC;
|
||||
};
|
||||
|
||||
|
@@ -452,7 +452,7 @@ void BOPAlgo_Builder::PerformInternal1(const BOPAlgo_PaveFiller& theFiller, cons
|
||||
//=======================================================================
|
||||
void BOPAlgo_Builder::PostTreat(const Message_ProgressRange& theRange)
|
||||
{
|
||||
Standard_Integer i, aNbS;
|
||||
Standard_Integer i = 0, aNbS = 0;
|
||||
TopAbs_ShapeEnum aType;
|
||||
TopTools_IndexedMapOfShape aMA;
|
||||
if (myPaveFiller->NonDestructive()) {
|
||||
|
@@ -16,6 +16,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <BOPAlgo_BuilderFace.hxx>
|
||||
#include <BOPAlgo_WireEdgeSet.hxx>
|
||||
#include <BOPAlgo_WireSplitter.hxx>
|
||||
@@ -66,9 +68,9 @@ static
|
||||
//=======================================================================
|
||||
BOPAlgo_BuilderFace::BOPAlgo_BuilderFace()
|
||||
:
|
||||
BOPAlgo_BuilderArea()
|
||||
BOPAlgo_BuilderArea(), myOrientation(TopAbs_EXTERNAL)
|
||||
{
|
||||
myOrientation=TopAbs_EXTERNAL;
|
||||
|
||||
}
|
||||
//=======================================================================
|
||||
//function :
|
||||
@@ -77,9 +79,9 @@ BOPAlgo_BuilderFace::BOPAlgo_BuilderFace()
|
||||
BOPAlgo_BuilderFace::BOPAlgo_BuilderFace
|
||||
(const Handle(NCollection_BaseAllocator)& theAllocator)
|
||||
:
|
||||
BOPAlgo_BuilderArea(theAllocator)
|
||||
BOPAlgo_BuilderArea(theAllocator), myOrientation(TopAbs_EXTERNAL)
|
||||
{
|
||||
myOrientation=TopAbs_EXTERNAL;
|
||||
|
||||
}
|
||||
//=======================================================================
|
||||
//function : ~
|
||||
@@ -166,8 +168,8 @@ void BOPAlgo_BuilderFace::Perform(const Message_ProgressRange& theRange)
|
||||
//=======================================================================
|
||||
void BOPAlgo_BuilderFace::PerformShapesToAvoid(const Message_ProgressRange& theRange)
|
||||
{
|
||||
Standard_Boolean bFound;
|
||||
Standard_Integer i, iCnt, aNbV, aNbE;
|
||||
Standard_Boolean bFound = 0;
|
||||
Standard_Integer i = 0, iCnt = 0, aNbV = 0, aNbE = 0;
|
||||
TopTools_IndexedDataMapOfShapeListOfShape aMVE;
|
||||
TopTools_ListIteratorOfListOfShape aIt;
|
||||
//
|
||||
@@ -244,8 +246,8 @@ void BOPAlgo_BuilderFace::PerformShapesToAvoid(const Message_ProgressRange& theR
|
||||
//=======================================================================
|
||||
void BOPAlgo_BuilderFace::PerformLoops(const Message_ProgressRange& theRange)
|
||||
{
|
||||
Standard_Boolean bFlag;
|
||||
Standard_Integer i, aNbEA;
|
||||
Standard_Boolean bFlag = 0;
|
||||
Standard_Integer i = 0, aNbEA = 0;
|
||||
TopTools_ListIteratorOfListOfShape aIt;
|
||||
TopTools_IndexedDataMapOfShapeListOfShape aVEMap;
|
||||
TopTools_MapOfOrientedShape aMAdded;
|
||||
@@ -456,7 +458,7 @@ void BOPAlgo_BuilderFace::PerformAreas(const Message_ProgressRange& theRange)
|
||||
|
||||
// Prepare tree with the boxes of the hole faces
|
||||
BOPTools_Box2dTree aBoxTree;
|
||||
Standard_Integer i, aNbH = aHoleFaces.Extent();
|
||||
Standard_Integer i = 0, aNbH = aHoleFaces.Extent();
|
||||
aBoxTree.SetSize (aNbH);
|
||||
for (i = 1; i <= aNbH; ++i)
|
||||
{
|
||||
@@ -746,7 +748,7 @@ void BOPAlgo_BuilderFace::PerformInternalShapes(const Message_ProgressRange& the
|
||||
void MakeInternalWires(const TopTools_IndexedMapOfShape& theME,
|
||||
TopTools_ListOfShape& theWires)
|
||||
{
|
||||
Standard_Integer i, aNbE;
|
||||
Standard_Integer i = 0, aNbE = 0;
|
||||
TopTools_MapOfShape aAddedMap;
|
||||
TopTools_ListIteratorOfListOfShape aItE;
|
||||
TopTools_IndexedDataMapOfShapeListOfShape aMVE;
|
||||
@@ -828,7 +830,7 @@ Standard_Boolean IsInside(const TopoDS_Shape& theWire,
|
||||
return isInside;
|
||||
|
||||
// Get 2d curve of the edge on the face
|
||||
Standard_Real aT1, aT2;
|
||||
Standard_Real aT1 = NAN, aT2 = NAN;
|
||||
const Handle(Geom2d_Curve)& aC2D = BRep_Tool::CurveOnSurface(aE, aF, aT1, aT2);
|
||||
if (aC2D.IsNull())
|
||||
continue;
|
||||
|
@@ -141,8 +141,8 @@ void BOPAlgo_BuilderSolid::Perform(const Message_ProgressRange& theRange)
|
||||
//=======================================================================
|
||||
void BOPAlgo_BuilderSolid::PerformShapesToAvoid(const Message_ProgressRange& theRange)
|
||||
{
|
||||
Standard_Boolean bFound;
|
||||
Standard_Integer i, iCnt, aNbE, aNbF;
|
||||
Standard_Boolean bFound = 0;
|
||||
Standard_Integer i = 0, iCnt = 0, aNbE = 0, aNbF = 0;
|
||||
TopAbs_Orientation aOrE;
|
||||
TopTools_IndexedDataMapOfShapeListOfShape aMEF;
|
||||
TopTools_ListIteratorOfListOfShape aIt;
|
||||
@@ -226,7 +226,7 @@ void BOPAlgo_BuilderSolid::PerformShapesToAvoid(const Message_ProgressRange& the
|
||||
//=======================================================================
|
||||
void BOPAlgo_BuilderSolid::PerformLoops(const Message_ProgressRange& theRange)
|
||||
{
|
||||
Standard_Integer i, aNbSh;
|
||||
Standard_Integer i = 0, aNbSh = 0;
|
||||
TopTools_ListIteratorOfListOfShape aIt;
|
||||
TopoDS_Iterator aItS;
|
||||
Handle(NCollection_BaseAllocator) aAlr;
|
||||
@@ -446,7 +446,7 @@ void BOPAlgo_BuilderSolid::PerformAreas(const Message_ProgressRange& theRange)
|
||||
|
||||
// Prepare tree with the boxes of the hole shells
|
||||
BOPTools_BoxTree aBBTree;
|
||||
Standard_Integer i, aNbH = aHoleShells.Extent();
|
||||
Standard_Integer i = 0, aNbH = aHoleShells.Extent();
|
||||
aBBTree.SetSize (aNbH);
|
||||
for (i = 1; i <= aNbH; ++i)
|
||||
{
|
||||
@@ -632,7 +632,7 @@ void BOPAlgo_BuilderSolid::PerformInternalShapes(const Message_ProgressRange& th
|
||||
|
||||
// Prepare list of faces to classify
|
||||
TopTools_ListOfShape aLFaces;
|
||||
Standard_Integer i, aNbF = aMFs.Extent();
|
||||
Standard_Integer i = 0, aNbF = aMFs.Extent();
|
||||
for (i = 1; i <= aNbF; ++i)
|
||||
aLFaces.Append(aMFs(i));
|
||||
|
||||
@@ -725,7 +725,7 @@ void BOPAlgo_BuilderSolid::PerformInternalShapes(const Message_ProgressRange& th
|
||||
void MakeInternalShells(const TopTools_IndexedMapOfShape& theMF,
|
||||
TopTools_ListOfShape& theShells)
|
||||
{
|
||||
Standard_Integer i, aNbF;
|
||||
Standard_Integer i = 0, aNbF = 0;
|
||||
BRep_Builder aBB;
|
||||
TopTools_ListIteratorOfListOfShape aItF;
|
||||
TopTools_IndexedDataMapOfShapeListOfShape aMEF;
|
||||
@@ -733,7 +733,7 @@ void MakeInternalShells(const TopTools_IndexedMapOfShape& theMF,
|
||||
//
|
||||
aNbF = theMF.Extent();
|
||||
for (i = 1; i <= aNbF; ++i) {
|
||||
TopoDS_Shape aF = theMF(i);
|
||||
const TopoDS_Shape& aF = theMF(i);
|
||||
TopExp::MapShapesAndAncestors(aF,
|
||||
TopAbs_EDGE, TopAbs_FACE,
|
||||
aMEF);
|
||||
|
@@ -69,7 +69,7 @@ void BOPAlgo_Builder::FillImagesVertices(const Message_ProgressRange& theRange)
|
||||
//=======================================================================
|
||||
void BOPAlgo_Builder::FillImagesEdges(const Message_ProgressRange& theRange)
|
||||
{
|
||||
Standard_Integer i, aNbS = myDS->NbSourceShapes();
|
||||
Standard_Integer i = 0, aNbS = myDS->NbSourceShapes();
|
||||
Message_ProgressScope aPS(theRange, "Filling splits of edges", aNbS);
|
||||
for (i = 0; i < aNbS; ++i, aPS.Next()) {
|
||||
const BOPDS_ShapeInfo& aSI = myDS->ShapeInfo(i);
|
||||
@@ -160,7 +160,7 @@ void BOPAlgo_Builder::BuildResult(const TopAbs_ShapeEnum theType)
|
||||
//=======================================================================
|
||||
void BOPAlgo_Builder::FillImagesContainers(const TopAbs_ShapeEnum theType, const Message_ProgressRange& theRange)
|
||||
{
|
||||
Standard_Integer i, aNbS;
|
||||
Standard_Integer i = 0, aNbS = 0;
|
||||
TopTools_MapOfShape aMFP(100, myAllocator);
|
||||
//
|
||||
aNbS=myDS->NbSourceShapes();
|
||||
@@ -183,7 +183,7 @@ void BOPAlgo_Builder::BuildResult(const TopAbs_ShapeEnum theType)
|
||||
//=======================================================================
|
||||
void BOPAlgo_Builder::FillImagesCompounds(const Message_ProgressRange& theRange)
|
||||
{
|
||||
Standard_Integer i, aNbS;
|
||||
Standard_Integer i = 0, aNbS = 0;
|
||||
TopTools_MapOfShape aMFP(100, myAllocator);
|
||||
//
|
||||
aNbS=myDS->NbSourceShapes();
|
||||
@@ -266,7 +266,7 @@ void BOPAlgo_Builder::BuildResult(const TopAbs_ShapeEnum theType)
|
||||
void BOPAlgo_Builder::FillImagesCompound(const TopoDS_Shape& theS,
|
||||
TopTools_MapOfShape& theMFP)
|
||||
{
|
||||
Standard_Boolean bInterferred;
|
||||
Standard_Boolean bInterferred = 0;
|
||||
TopAbs_Orientation aOrX;
|
||||
TopoDS_Iterator aIt;
|
||||
BRep_Builder aBB;
|
||||
|
@@ -16,6 +16,8 @@
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <BOPAlgo_Builder.hxx>
|
||||
#include <BOPAlgo_Alerts.hxx>
|
||||
#include <BOPAlgo_BuilderFace.hxx>
|
||||
@@ -72,7 +74,7 @@ class BOPAlgo_PairOfShapeBoolean : public BOPAlgo_ParallelAlgo {
|
||||
myFlag(Standard_False) {
|
||||
}
|
||||
//
|
||||
virtual ~BOPAlgo_PairOfShapeBoolean() {
|
||||
~BOPAlgo_PairOfShapeBoolean() override {
|
||||
}
|
||||
//
|
||||
TopoDS_Shape& Shape1() {
|
||||
@@ -95,7 +97,7 @@ class BOPAlgo_PairOfShapeBoolean : public BOPAlgo_ParallelAlgo {
|
||||
return myContext;
|
||||
}
|
||||
//
|
||||
virtual void Perform() {
|
||||
void Perform() override {
|
||||
Message_ProgressScope aPS(myProgressRange, NULL, 1);
|
||||
if (UserBreak(aPS))
|
||||
{
|
||||
@@ -142,7 +144,7 @@ public:
|
||||
|
||||
private:
|
||||
//! Disable the range enabled method
|
||||
virtual void Perform(const Message_ProgressRange& /*theRange*/) {};
|
||||
void Perform(const Message_ProgressRange& /*theRange*/) override {};
|
||||
|
||||
private:
|
||||
Message_ProgressRange myRange;
|
||||
@@ -163,7 +165,7 @@ class BOPAlgo_VFI : public BOPAlgo_ParallelAlgo {
|
||||
myIsInternal(Standard_False) {
|
||||
}
|
||||
//
|
||||
virtual ~BOPAlgo_VFI(){
|
||||
~BOPAlgo_VFI() override{
|
||||
}
|
||||
//
|
||||
void SetVertex(const TopoDS_Vertex& aV) {
|
||||
@@ -194,14 +196,14 @@ class BOPAlgo_VFI : public BOPAlgo_ParallelAlgo {
|
||||
return myContext;
|
||||
}
|
||||
//
|
||||
virtual void Perform() {
|
||||
void Perform() override {
|
||||
Message_ProgressScope aPS(myProgressRange, NULL, 1);
|
||||
if (UserBreak(aPS))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Standard_Real aT1, aT2, dummy;
|
||||
Standard_Real aT1 = NAN, aT2 = NAN, dummy = NAN;
|
||||
//
|
||||
Standard_Integer iFlag =
|
||||
myContext->ComputeVF(myV, myF, aT1, aT2, dummy, myFuzzyValue);
|
||||
@@ -242,8 +244,8 @@ void BOPAlgo_Builder::FillImagesFaces(const Message_ProgressRange& theRange)
|
||||
//=======================================================================
|
||||
void BOPAlgo_Builder::BuildSplitFaces(const Message_ProgressRange& theRange)
|
||||
{
|
||||
Standard_Boolean bHasFaceInfo, bIsClosed, bIsDegenerated, bToReverse;
|
||||
Standard_Integer i, j, k, aNbS, aNbPBIn, aNbPBOn, aNbPBSc, aNbAV, nSp;
|
||||
Standard_Boolean bHasFaceInfo = 0, bIsClosed = 0, bIsDegenerated = 0, bToReverse = 0;
|
||||
Standard_Integer i = 0, j = 0, k = 0, aNbS = 0, aNbPBIn = 0, aNbPBOn = 0, aNbPBSc = 0, aNbAV = 0, nSp = 0;
|
||||
TopoDS_Face aFF, aFSD;
|
||||
TopoDS_Edge aSp, aEE;
|
||||
TopAbs_Orientation anOriF, anOriE;
|
||||
|
@@ -116,7 +116,7 @@ void BOPAlgo_Builder::FillIn3DParts(TopTools_DataMapOfShapeShape& theDraftSolids
|
||||
// Get all faces
|
||||
TopTools_ListOfShape aLFaces(anAlloc);
|
||||
|
||||
Standard_Integer i, aNbS = myDS->NbSourceShapes();
|
||||
Standard_Integer i = 0, aNbS = myDS->NbSourceShapes();
|
||||
for (i = 0; i < aNbS; ++i)
|
||||
{
|
||||
const BOPDS_ShapeInfo& aSI = myDS->ShapeInfo(i);
|
||||
@@ -248,8 +248,8 @@ void BOPAlgo_Builder::BuildDraftSolid(const TopoDS_Shape& theSolid,
|
||||
TopoDS_Shape& theDraftSolid,
|
||||
TopTools_ListOfShape& theLIF)
|
||||
{
|
||||
Standard_Boolean bToReverse;
|
||||
Standard_Integer iFlag;
|
||||
Standard_Boolean bToReverse = 0;
|
||||
Standard_Integer iFlag = 0;
|
||||
TopAbs_Orientation aOrF, aOrSh, aOrSd;
|
||||
TopoDS_Iterator aIt1, aIt2;
|
||||
TopoDS_Shell aShD;
|
||||
@@ -365,7 +365,7 @@ public:
|
||||
|
||||
private:
|
||||
//! Disable the range enabled method
|
||||
virtual void Perform(const Message_ProgressRange&/* theRange*/) {}
|
||||
void Perform(const Message_ProgressRange&/* theRange*/) override {}
|
||||
|
||||
private:
|
||||
TopoDS_Solid mySolid; //!< Solid to split
|
||||
@@ -382,8 +382,8 @@ typedef NCollection_Vector<BOPAlgo_SplitSolid> BOPAlgo_VectorOfBuilderSolid;
|
||||
void BOPAlgo_Builder::BuildSplitSolids(TopTools_DataMapOfShapeShape& theDraftSolids,
|
||||
const Message_ProgressRange& theRange)
|
||||
{
|
||||
Standard_Boolean bFlagSD;
|
||||
Standard_Integer i, aNbS;
|
||||
Standard_Boolean bFlagSD = 0;
|
||||
Standard_Integer i = 0, aNbS = 0;
|
||||
TopExp_Explorer aExp;
|
||||
TopTools_ListIteratorOfListOfShape aIt;
|
||||
//
|
||||
@@ -473,7 +473,7 @@ void BOPAlgo_Builder::BuildSplitSolids(TopTools_DataMapOfShapeShape& theDraftSol
|
||||
aBS.SetRunParallel(myRunParallel);
|
||||
}//for (i=0; i<aNbS; ++i) {
|
||||
//
|
||||
Standard_Integer k, aNbBS;
|
||||
Standard_Integer k = 0, aNbBS = 0;
|
||||
//
|
||||
aNbBS=aVBS.Length();
|
||||
// Set progress range for each task to be run in parallel
|
||||
@@ -569,7 +569,7 @@ void BOPAlgo_Builder::BuildSplitSolids(TopTools_DataMapOfShapeShape& theDraftSol
|
||||
//=======================================================================
|
||||
void BOPAlgo_Builder::FillInternalShapes(const Message_ProgressRange& theRange)
|
||||
{
|
||||
Standard_Integer i, j, aNbS, aNbSI, aNbSx;
|
||||
Standard_Integer i = 0, j = 0, aNbS = 0, aNbSI = 0, aNbSx = 0;
|
||||
TopAbs_ShapeEnum aType;
|
||||
TopAbs_State aState;
|
||||
TopoDS_Iterator aItS;
|
||||
|
@@ -196,7 +196,7 @@ void BOPAlgo_CellsBuilder::IndexParts()
|
||||
// for the multi-dimensional case
|
||||
// add sub-shapes of the splits into the <myIndex> map
|
||||
//
|
||||
Standard_Integer i, aNbS = myIndex.Extent();
|
||||
Standard_Integer i = 0, aNbS = myIndex.Extent();
|
||||
for (i = 1; i <= aNbS; ++i) {
|
||||
const TopoDS_Shape& aSP = myIndex.FindKey(i);
|
||||
const TopTools_ListOfShape& aLSOr = myIndex(i);
|
||||
@@ -780,7 +780,7 @@ Standard_Boolean BOPAlgo_CellsBuilder::RemoveInternals(const TopTools_ListOfShap
|
||||
}
|
||||
//
|
||||
// Unify same domain
|
||||
Standard_Boolean bFaces, bEdges;
|
||||
Standard_Boolean bFaces = 0, bEdges = 0;
|
||||
//
|
||||
bFaces = (aType == TopAbs_FACE);
|
||||
bEdges = (aType == TopAbs_EDGE);
|
||||
@@ -808,7 +808,7 @@ Standard_Boolean BOPAlgo_CellsBuilder::RemoveInternals(const TopTools_ListOfShap
|
||||
//
|
||||
// fill map of modified shapes
|
||||
TopTools_IndexedMapOfShape aMG;
|
||||
Standard_Integer i, aNb;
|
||||
Standard_Integer i = 0, aNb = 0;
|
||||
//
|
||||
TopExp::MapShapes(aShape, TopAbs_VERTEX, aMG);
|
||||
TopExp::MapShapes(aShape, TopAbs_EDGE, aMG);
|
||||
@@ -881,7 +881,7 @@ Standard_Boolean BOPAlgo_CellsBuilder::RemoveInternals(const TopTools_ListOfShap
|
||||
//
|
||||
// to build unified solid, select only faces attached to only one solid
|
||||
TopTools_ListOfShape aLFUnique;
|
||||
Standard_Integer i, aNb = aDMFS.Extent();
|
||||
Standard_Integer i = 0, aNb = aDMFS.Extent();
|
||||
for (i = 1; i <= aNb; ++i) {
|
||||
if (aDMFS(i).Extent() == 1) {
|
||||
aLFUnique.Append(aDMFS.FindKey(i));
|
||||
|
@@ -57,7 +57,7 @@ class BOPAlgo_FaceSelfIntersect :
|
||||
myIF(-1), myTolF(1.e-7) {
|
||||
}
|
||||
//
|
||||
virtual ~BOPAlgo_FaceSelfIntersect() {
|
||||
~BOPAlgo_FaceSelfIntersect() override {
|
||||
}
|
||||
//
|
||||
void SetIndex(const Standard_Integer nF) {
|
||||
@@ -84,7 +84,7 @@ class BOPAlgo_FaceSelfIntersect :
|
||||
return myTolF;
|
||||
}
|
||||
//
|
||||
virtual void Perform() {
|
||||
void Perform() override {
|
||||
Message_ProgressScope aPS(myProgressRange, NULL, 1);
|
||||
if (UserBreak(aPS))
|
||||
{
|
||||
@@ -110,9 +110,9 @@ typedef NCollection_Vector<BOPAlgo_FaceSelfIntersect> BOPAlgo_VectorOfFaceSelfIn
|
||||
//=======================================================================
|
||||
BOPAlgo_CheckerSI::BOPAlgo_CheckerSI()
|
||||
:
|
||||
BOPAlgo_PaveFiller()
|
||||
BOPAlgo_PaveFiller(), myLevelOfCheck(BOPDS_DS::NbInterfTypes()-1)
|
||||
{
|
||||
myLevelOfCheck=BOPDS_DS::NbInterfTypes()-1;
|
||||
|
||||
myNonDestructive=Standard_True;
|
||||
SetAvoidBuildPCurve(Standard_True);
|
||||
}
|
||||
@@ -129,7 +129,7 @@ BOPAlgo_CheckerSI::~BOPAlgo_CheckerSI()
|
||||
//=======================================================================
|
||||
void BOPAlgo_CheckerSI::SetLevelOfCheck(const Standard_Integer theLevel)
|
||||
{
|
||||
Standard_Integer aNbLists;
|
||||
Standard_Integer aNbLists = 0;
|
||||
//
|
||||
aNbLists=BOPDS_DS::NbInterfTypes();
|
||||
if (theLevel >= 0 && theLevel < aNbLists) {
|
||||
@@ -215,7 +215,7 @@ void BOPAlgo_CheckerSI::Perform(const Message_ProgressRange& theRange)
|
||||
//=======================================================================
|
||||
void BOPAlgo_CheckerSI::PostTreat()
|
||||
{
|
||||
Standard_Integer i, aNb, n1, n2;
|
||||
Standard_Integer i = 0, aNb = 0, n1 = 0, n2 = 0;
|
||||
BOPDS_Pair aPK;
|
||||
//
|
||||
BOPDS_MapOfPair& aMPK=
|
||||
@@ -293,8 +293,8 @@ void BOPAlgo_CheckerSI::PostTreat()
|
||||
BOPDS_VectorOfInterfFF& aFFs=myDS->InterfFF();
|
||||
aNb=aFFs.Length();
|
||||
for (i=0; i!=aNb; ++i) {
|
||||
Standard_Boolean bTangentFaces, bFlag;
|
||||
Standard_Integer aNbC, aNbP, j, iFound;
|
||||
Standard_Boolean bTangentFaces = 0, bFlag = 0;
|
||||
Standard_Integer aNbC = 0, aNbP = 0, j = 0, iFound = 0;
|
||||
//
|
||||
const BOPDS_InterfFF& aFF=aFFs(i);
|
||||
aFF.Indices(n1, n2);
|
||||
|
@@ -15,6 +15,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <BOPAlgo_CheckerSI.hxx>
|
||||
|
||||
#include <BOPDS_DS.hxx>
|
||||
@@ -103,7 +105,7 @@ class BOPAlgo_VertexSolid {
|
||||
return;
|
||||
}
|
||||
|
||||
Standard_Real aTol;
|
||||
Standard_Real aTol = NAN;
|
||||
gp_Pnt aPV;
|
||||
//
|
||||
BRepClass3d_SolidClassifier& aSC=myContext->SolidClassifier(myZ);
|
||||
@@ -179,7 +181,7 @@ class BOPAlgo_ShapeSolid {
|
||||
return;
|
||||
}
|
||||
|
||||
Standard_Boolean bHasInterf;
|
||||
Standard_Boolean bHasInterf = 0;
|
||||
//
|
||||
myHasInterf=Standard_False;
|
||||
//
|
||||
@@ -212,17 +214,17 @@ class BOPAlgo_SolidSolid : public BOPAlgo_ShapeSolid {
|
||||
BOPAlgo_ShapeSolid() {
|
||||
};
|
||||
//
|
||||
virtual ~BOPAlgo_SolidSolid(){
|
||||
~BOPAlgo_SolidSolid() override{
|
||||
};
|
||||
//
|
||||
virtual void Perform() {
|
||||
void Perform() override {
|
||||
Message_ProgressScope aPS(myProgressRange, NULL, 1);
|
||||
if (!aPS.More())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Standard_Boolean bFlag;
|
||||
Standard_Boolean bFlag = 0;
|
||||
//
|
||||
bFlag=Standard_False;
|
||||
myHasInterf=Standard_False;
|
||||
@@ -244,7 +246,7 @@ void BOPAlgo_CheckerSI::PerformVZ(const Message_ProgressRange& theRange)
|
||||
{
|
||||
Message_ProgressScope aPSOuter(theRange, NULL, 1);
|
||||
|
||||
Standard_Integer iSize, nV, nZ, k, aNbVVS;
|
||||
Standard_Integer iSize = 0, nV = 0, nZ = 0, k = 0, aNbVVS = 0;
|
||||
TopAbs_State aState;
|
||||
BOPDS_MapOfPair aMPK;
|
||||
//
|
||||
@@ -339,8 +341,8 @@ void BOPAlgo_CheckerSI::PerformZZ(const Message_ProgressRange& theRange)
|
||||
{
|
||||
Message_ProgressScope aPSOuter(theRange, NULL, 1);
|
||||
|
||||
Standard_Boolean bHasInterf;
|
||||
Standard_Integer iSize, nZ1, nZ, k, aNbSolidSolid;
|
||||
Standard_Boolean bHasInterf = 0;
|
||||
Standard_Integer iSize = 0, nZ1 = 0, nZ = 0, k = 0, aNbSolidSolid = 0;
|
||||
//
|
||||
myIterator->Initialize(TopAbs_SOLID, TopAbs_SOLID);
|
||||
iSize=myIterator->ExpectedLength();
|
||||
@@ -398,8 +400,8 @@ void BOPAlgo_CheckerSI::PerformSZ(const TopAbs_ShapeEnum theTS, const Message_Pr
|
||||
{
|
||||
Message_ProgressScope aPSOuter(theRange, NULL, 1);
|
||||
|
||||
Standard_Boolean bHasInterf;
|
||||
Standard_Integer iSize, nS, nZ, k, aNbShapeSolid;
|
||||
Standard_Boolean bHasInterf = 0;
|
||||
Standard_Integer iSize = 0, nS = 0, nZ = 0, k = 0, aNbShapeSolid = 0;
|
||||
//
|
||||
myIterator->Initialize(theTS, TopAbs_SOLID);
|
||||
iSize=myIterator->ExpectedLength();
|
||||
|
@@ -12,6 +12,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <Bnd_Box.hxx>
|
||||
#include <BOPAlgo_BuilderSolid.hxx>
|
||||
#include <BOPAlgo_MakerVolume.hxx>
|
||||
@@ -211,7 +213,7 @@ void BOPAlgo_MakerVolume::fillPISteps(BOPAlgo_PISteps& theSteps) const
|
||||
void BOPAlgo_MakerVolume::CollectFaces()
|
||||
{
|
||||
//
|
||||
Standard_Integer i, aNbShapes;
|
||||
Standard_Integer i = 0, aNbShapes = 0;
|
||||
TopTools_ListIteratorOfListOfShape aIt;
|
||||
TopTools_MapOfShape aMFence;
|
||||
//
|
||||
@@ -249,7 +251,7 @@ void BOPAlgo_MakerVolume::CollectFaces()
|
||||
void BOPAlgo_MakerVolume::MakeBox(TopTools_MapOfShape& theBoxFaces)
|
||||
{
|
||||
//
|
||||
Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax, anExt;
|
||||
Standard_Real aXmin = NAN, aYmin = NAN, aZmin = NAN, aXmax = NAN, aYmax = NAN, aZmax = NAN, anExt = NAN;
|
||||
//
|
||||
anExt = sqrt(myBBox.SquareExtent()) * 0.5;
|
||||
myBBox.Enlarge(anExt);
|
||||
@@ -302,7 +304,7 @@ void BOPAlgo_MakerVolume::RemoveBox(TopTools_ListOfShape& theLSR,
|
||||
//
|
||||
TopTools_ListIteratorOfListOfShape aIt;
|
||||
TopExp_Explorer aExp;
|
||||
Standard_Boolean bFound;
|
||||
Standard_Boolean bFound = 0;
|
||||
//
|
||||
bFound = Standard_False;
|
||||
aIt.Initialize(theLSR);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user