mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0024171: Eliminate CLang compiler warning -Wreorder
Got rid of -Wreorder warning (wrong fields' initialization order); some warnings -Wdangling-else are also fixed
This commit is contained in:
parent
105aae761e
commit
eafb234bf1
src
AIS
Adaptor3d
Aspect
BOPDS
BOPTools
BRepExtrema
BRepFill
BRepMesh
BRepTools
BinTools
BlendFunc
ChFi3d
GeomPlate
Hermit
IGESControl
IGESDefs
IGESToBRep
IntPatch
IntPolyh
IntSurf
MeshVS
NCollection
NIS
OpenGl
ProjLib
QANewBRepNaming
QANewModTopOpe
Resource
STEPControl
SWDRAW
SelectMgr
ShapeAnalysis
ShapeAnalysis_BoxBndTree.hxxShapeAnalysis_CheckSmallFace.cxxShapeAnalysis_TransferParametersProj.cxx
ShapeCustom
ShapeFix
ShapeProcess
ShapeProcessAPI
TNaming
TopClass
TopTrans
V3d
ViewerTest
Voxel
VrmlData
XCAFDoc
XSDRAWSTLVRML
@ -208,12 +208,13 @@ AIS_StatusOfDetection AIS_InteractiveContext::MoveTo(const Standard_Integer XPix
|
||||
if ( selector->More() )
|
||||
{
|
||||
if ( HasOpenedContext() )
|
||||
{
|
||||
if ( !myFilters->IsOk( selector->OnePicked() ) )
|
||||
return AIS_SOD_AllBad;
|
||||
return AIS_SOD_AllBad;
|
||||
else
|
||||
if ( !myLocalContexts( myCurLocalIndex )->Filter()->IsOk( selector->OnePicked() ) )
|
||||
return AIS_SOD_AllBad;
|
||||
|
||||
}
|
||||
|
||||
// Does nothing if previously detected object is equal to the current one
|
||||
if ( selector->OnePicked()->Selectable() == myLastPicked )
|
||||
|
@ -538,7 +538,7 @@ Standard_Boolean AIS_LocalContext::Remove(const Handle(AIS_InteractiveObject)& a
|
||||
const Handle(V3d_Viewer)& aViewer = myCTX->CurrentViewer();
|
||||
for(i = 1; i <= myMapOfOwner.Extent(); i++){
|
||||
const Handle(SelectMgr_EntityOwner)& anOwner = myMapOfOwner(i) ;
|
||||
if(!anOwner.IsNull())
|
||||
if(!anOwner.IsNull()) {
|
||||
if(anOwner->Selectable() != aSelectable)
|
||||
ownersToKeep.Add(anOwner);
|
||||
else
|
||||
@ -549,6 +549,7 @@ Standard_Boolean AIS_LocalContext::Remove(const Handle(AIS_InteractiveObject)& a
|
||||
Unhilight(anOwner, aViewer->ActiveView());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
myMapOfOwner.Clear();
|
||||
myMapOfOwner.Assign(ownersToKeep);
|
||||
|
@ -248,11 +248,12 @@ AIS_SelectStatus AIS_Selection::Select(const Handle(Standard_Transient)& anObjec
|
||||
if ( S->myResultMap.IsBound( anObject ) ){
|
||||
AIS_NListTransient::Iterator aListIter = S->myResultMap.Find( anObject );
|
||||
//skt-----------------------------------------------------------------
|
||||
if( S->myIterator == aListIter )
|
||||
if( S->myIterator.More() )
|
||||
S->myIterator.Next();
|
||||
else
|
||||
S->myIterator = AIS_NListTransient::Iterator();
|
||||
if( S->myIterator == aListIter ) {
|
||||
if( S->myIterator.More() )
|
||||
S->myIterator.Next();
|
||||
else
|
||||
S->myIterator = AIS_NListTransient::Iterator();
|
||||
}
|
||||
//--------------------------------------------------------------------
|
||||
#ifdef BUC60953
|
||||
// In the mode of advanced mesh selection only one owner is created
|
||||
|
@ -55,7 +55,7 @@ static void GetConeApexParam(const gp_Cone& C, Standard_Real& U, Standard_Real&
|
||||
}
|
||||
|
||||
|
||||
Adaptor3d_TopolTool::Adaptor3d_TopolTool () : nbRestr(0),idRestr(0),myNbSamplesU(-1)
|
||||
Adaptor3d_TopolTool::Adaptor3d_TopolTool () : nbRestr(0),myNbSamplesU(-1),idRestr(0)
|
||||
|
||||
{
|
||||
}
|
||||
|
@ -41,13 +41,13 @@ myMax( 1.0 ),
|
||||
myXPos( 0 ),
|
||||
myYPos( 0 ),
|
||||
myWidth( 0.2 ),
|
||||
myHeight( 1 ),
|
||||
myTitle( "" ),
|
||||
myInterval( 10 ),
|
||||
myHeight( 1 ),
|
||||
myFormat( "%.4g" ),
|
||||
myInterval( 10 ),
|
||||
myAtBorder( Standard_True ),
|
||||
myReversed( Standard_False ),
|
||||
myColorType( Aspect_TOCSD_AUTO ),
|
||||
myReversed( Standard_False ),
|
||||
myLabelType( Aspect_TOCSD_AUTO ),
|
||||
myLabelPos( Aspect_TOCSP_RIGHT ),
|
||||
myTitlePos( Aspect_TOCSP_CENTER ),
|
||||
|
@ -82,8 +82,8 @@ BOPDS_DS::BOPDS_DS()
|
||||
myMapShapeIndex(100, myAllocator),
|
||||
myPaveBlocksPool(myAllocator),
|
||||
myFaceInfoPool(myAllocator),
|
||||
myShapesSD(100, myAllocator),
|
||||
myMapPBCB(100, myAllocator),
|
||||
myShapesSD(100, myAllocator),
|
||||
myInterfTB(100, myAllocator),
|
||||
myInterfVV(myAllocator),
|
||||
myInterfVE(myAllocator),
|
||||
@ -108,8 +108,8 @@ BOPDS_DS::BOPDS_DS(const Handle(NCollection_BaseAllocator)& theAllocator)
|
||||
myMapShapeIndex(100, myAllocator),
|
||||
myPaveBlocksPool(myAllocator),
|
||||
myFaceInfoPool(myAllocator),
|
||||
myShapesSD(100, myAllocator),
|
||||
myMapPBCB(100, myAllocator),
|
||||
myShapesSD(100, myAllocator),
|
||||
myInterfTB(100, myAllocator),
|
||||
myInterfVV(myAllocator),
|
||||
myInterfVE(myAllocator),
|
||||
|
@ -75,8 +75,8 @@ class BOPTools_ConnexityBlock {
|
||||
};
|
||||
//
|
||||
protected:
|
||||
Standard_Boolean myRegular;
|
||||
Handle(NCollection_BaseAllocator) myAllocator;
|
||||
Standard_Boolean myRegular;
|
||||
BOPCol_ListOfShape myShapes;
|
||||
BOPCol_ListOfShape myLoops;
|
||||
};
|
||||
|
@ -96,7 +96,7 @@ void BRepExtrema_DistShapeShape::DistanceMapMap(const TopTools_IndexedMapOfShape
|
||||
const TopoDS_Shape &S2 = Map2(j);
|
||||
|
||||
BRepExtrema_DistanceSS dist(S1,S2,box1,box2,myDistRef,myEps);
|
||||
if (dist.IsDone())
|
||||
if (dist.IsDone()) {
|
||||
if(dist.DistValue() < (myDistRef-myEps))
|
||||
{
|
||||
mySolutionsShape1.Clear();
|
||||
@ -116,6 +116,7 @@ void BRepExtrema_DistShapeShape::DistanceMapMap(const TopTools_IndexedMapOfShape
|
||||
if (myDistRef > dist.DistValue())
|
||||
myDistRef=dist.DistValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -210,10 +210,10 @@ static Standard_Boolean IsSameOriented(const TopoDS_Shape& aFace,
|
||||
//=======================================================================
|
||||
BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
|
||||
: mySpine(Spine),
|
||||
myTrihedron(GeomFill_IsCorrectedFrenet),
|
||||
myTransition(BRepFill_Modified),
|
||||
myTrihedron(GeomFill_IsCorrectedFrenet),
|
||||
myForceApproxC1(Standard_False),
|
||||
myStatus(GeomFill_PipeOk)
|
||||
myTransition(BRepFill_Modified),
|
||||
myStatus(GeomFill_PipeOk)
|
||||
{
|
||||
myLocation.Nullify();
|
||||
mySection.Nullify();
|
||||
|
@ -2259,26 +2259,27 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
|
||||
}
|
||||
}
|
||||
|
||||
if (ipath == 1)
|
||||
if (uclose && (isec == NbLaw)) {
|
||||
Vertex(isec+1, 1) = Vertex(1, 1);
|
||||
}
|
||||
else if (Vertex(isec+1, 1).IsNull()) {
|
||||
if (constSection)
|
||||
myLoc->PerformVertex(IPath-1,
|
||||
TopoDS::Vertex(SecVertex(isec+1)),
|
||||
TabErr(isec,1)+VError(isec+1),
|
||||
TopoDS::Vertex(Vertex(isec+1, 1)) );
|
||||
else
|
||||
myLoc->PerformVertex(IPath-1,
|
||||
mySec->Vertex(isec+1,Vi(1)),
|
||||
TabErr(isec,1) +
|
||||
mySec->VertexTol(isec,Vi(1)),
|
||||
TopoDS::Vertex(Vertex(isec+1, 1)) );
|
||||
if (MergeVertex(Vertex(isec,1), Vertex(isec+1,1))) {
|
||||
VEdge(isec, 1) = NullEdge(Vertex(isec, 1));
|
||||
}
|
||||
}
|
||||
if (ipath == 1) {
|
||||
if (uclose && (isec == NbLaw)) {
|
||||
Vertex(isec+1, 1) = Vertex(1, 1);
|
||||
}
|
||||
else if (Vertex(isec+1, 1).IsNull()) {
|
||||
if (constSection)
|
||||
myLoc->PerformVertex(IPath-1,
|
||||
TopoDS::Vertex(SecVertex(isec+1)),
|
||||
TabErr(isec,1)+VError(isec+1),
|
||||
TopoDS::Vertex(Vertex(isec+1, 1)) );
|
||||
else
|
||||
myLoc->PerformVertex(IPath-1,
|
||||
mySec->Vertex(isec+1,Vi(1)),
|
||||
TabErr(isec,1) +
|
||||
mySec->VertexTol(isec,Vi(1)),
|
||||
TopoDS::Vertex(Vertex(isec+1, 1)) );
|
||||
if (MergeVertex(Vertex(isec,1), Vertex(isec+1,1))) {
|
||||
VEdge(isec, 1) = NullEdge(Vertex(isec, 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (uclose && (isec == NbLaw)) {
|
||||
Vertex(isec+1, ipath+1) = Vertex(1, ipath+1);
|
||||
|
@ -77,10 +77,10 @@ public:
|
||||
private:
|
||||
|
||||
Standard_Integer myEdge1;
|
||||
Standard_Boolean myOrientation1;
|
||||
Standard_Integer myEdge2;
|
||||
Standard_Boolean myOrientation2;
|
||||
Standard_Integer myEdge3;
|
||||
Standard_Boolean myOrientation1;
|
||||
Standard_Boolean myOrientation2;
|
||||
Standard_Boolean myOrientation3;
|
||||
BRepMesh_DegreeOfFreedom myMovability;
|
||||
};
|
||||
|
@ -544,19 +544,21 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d
|
||||
v = (Vsup - Vinf)*0.1;
|
||||
if(S->IsUPeriodic()) {
|
||||
Standard_Real uperiod = S->UPeriod();
|
||||
if(uperiod < (Usup+2*u-Uinf))
|
||||
if(uperiod < (Usup+2*u-Uinf)) {
|
||||
if(uperiod <= (Usup-Uinf))
|
||||
u = 0;
|
||||
else
|
||||
u = (uperiod-(Usup-Uinf))*0.5;
|
||||
}
|
||||
}
|
||||
if(S->IsVPeriodic()) {
|
||||
Standard_Real vperiod = S->VPeriod();
|
||||
if(vperiod < (Vsup+2*v-Vinf))
|
||||
if(vperiod < (Vsup+2*v-Vinf)) {
|
||||
if(vperiod <= (Vsup-Vinf))
|
||||
v = 0;
|
||||
else
|
||||
v = (vperiod-(Vsup-Vinf))*0.5;
|
||||
}
|
||||
}
|
||||
GeomAdaptor_Surface GAS(S, Uinf-u,Usup+u,Vinf-v,Vsup+v);
|
||||
Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(GAS);
|
||||
|
@ -75,7 +75,7 @@ static Standard_OStream& operator <<(Standard_OStream& OS, const gp_Pnt P)
|
||||
//=======================================================================
|
||||
|
||||
BinTools_ShapeSet::BinTools_ShapeSet(const Standard_Boolean isWithTriangles)
|
||||
:myWithTriangles(isWithTriangles), myFormatNb(3)
|
||||
:myFormatNb(3), myWithTriangles(isWithTriangles)
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
|
@ -46,7 +46,7 @@ BlendFunc_CSCircular::BlendFunc_CSCircular(const Handle(Adaptor3d_HSurface)& S,
|
||||
const Handle(Adaptor3d_HCurve)& C,
|
||||
const Handle(Adaptor3d_HCurve)& CGuide,
|
||||
const Handle(Law_Function)& L) :
|
||||
surf(S),curv(C),guide(CGuide),istangent(Standard_True),law(L),
|
||||
surf(S),curv(C),guide(CGuide),law(L),istangent(Standard_True),
|
||||
//prmc, dprmc, istangent, ray, choix, normtg,
|
||||
maxang(RealFirst()),minang(RealLast()),mySShape(BlendFunc_Rational)
|
||||
//myTConv
|
||||
|
@ -1778,7 +1778,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
narc1 = Lin->StartPointOnFirst().NbPointOnRst();
|
||||
narc2 = Lin->StartPointOnSecond().NbPointOnRst();
|
||||
// modified by eap Fri Feb 8 11:43:48 2002 ___BEGIN___
|
||||
if(!debarc1)
|
||||
if(!debarc1) {
|
||||
if (narc1 == 0)
|
||||
backwContinueFailed = Lin->StartPointOnFirst().ParameterOnGuide() > Target;
|
||||
else {
|
||||
@ -1799,7 +1799,8 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
// }
|
||||
}
|
||||
}
|
||||
if(!debarc2)
|
||||
}
|
||||
if(!debarc2) {
|
||||
if (narc2 == 0)
|
||||
backwContinueFailed = Lin->StartPointOnSecond().ParameterOnGuide() > Target;
|
||||
else {
|
||||
@ -1820,6 +1821,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
if (backwContinueFailed) {
|
||||
// if we leave backwContinueFailed as is, we will stop in this direction
|
||||
// but we are to continue if there are no more faces on the side with arc
|
||||
@ -1879,7 +1881,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
narc1 = Lin->EndPointOnFirst().NbPointOnRst();
|
||||
narc2 = Lin->EndPointOnSecond().NbPointOnRst();
|
||||
// modified by eap Fri Feb 8 11:44:57 2002 ___BEGIN___
|
||||
if(!finarc1)
|
||||
if(!finarc1) {
|
||||
if (narc1 == 0)
|
||||
forwContinueFailed = Lin->EndPointOnFirst().ParameterOnGuide() < Target;
|
||||
else {
|
||||
@ -1895,7 +1897,8 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
// }
|
||||
}
|
||||
}
|
||||
if(!finarc2)
|
||||
}
|
||||
if(!finarc2) {
|
||||
if (narc2 == 0)
|
||||
forwContinueFailed = Lin->EndPointOnSecond().ParameterOnGuide() < Target;
|
||||
else {
|
||||
@ -1911,6 +1914,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
if (forwContinueFailed) {
|
||||
// if we leave forwContinueFailed as is, we will stop in this direction
|
||||
// but we are to continue if there are no more faces on the side with arc
|
||||
|
@ -2033,107 +2033,126 @@ Discretise(const Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter,
|
||||
if (Affich > 1) {
|
||||
cout << "Courbe : " << i << endl;
|
||||
cout << " NbPnt, NbPtInter, NbPtG1G1 :" << NbPnt_i << ", "
|
||||
<< NbPtInter << ", " << NbPtG1G1 << endl;
|
||||
<< NbPtInter << ", " << NbPtG1G1 << endl;
|
||||
}
|
||||
#endif
|
||||
for (Standard_Integer j=1; j<=NbPnt_i; j++)
|
||||
{ // repartition des points en cosinus selon l'ACR 2d
|
||||
// Afin d'eviter les points d'acumulation dans le 2d
|
||||
//Inter=Uinit+(Uif)*((-cos(M_PI*((j-1)/(NbPnt_i-1)))+1)/2);
|
||||
if (j==NbPnt_i)
|
||||
Inter=Ufinal;//pour parer au bug sur sun
|
||||
else if (ACR) {
|
||||
CurLength = Length2d*(1-Cos((j-1)*M_PI/(NbPnt_i-1)))/2;
|
||||
Inter = acrlaw->Value(CurLength);
|
||||
}
|
||||
else {
|
||||
Inter=Uinit+(Ufinal-Uinit)*((1-Cos((j-1)*M_PI/(NbPnt_i-1)))/2);
|
||||
}
|
||||
myParCont->ChangeValue(i).Append(Inter);// on ajoute le point
|
||||
if (NbPtInter!=0)
|
||||
{ for(Standard_Integer l=1;l<=NbPtInter;l+=2)
|
||||
//on cherche si le point Inter est dans l'intervalle
|
||||
//PntInter[i] PntInter[i+1]
|
||||
//auquelle cas il ne faudrait pas le stocker (pb de doublons)
|
||||
{ if ((Inter>PntInter->Value(i).Value(l))
|
||||
&&(Inter<PntInter->Value(i).Value(l+1)))
|
||||
{ l=NbPtInter+2;
|
||||
// pour sortir de la boucle sans stocker le point
|
||||
}
|
||||
else
|
||||
{ if (l+1>=NbPtInter)
|
||||
// on a parcouru tout le tableau : Le point
|
||||
// n'appartient pas a un interval point commun
|
||||
if (NbPtG1G1!=0)
|
||||
// est qu'il existe un intervalle incompatible
|
||||
for(Standard_Integer k=1;k<=NbPtG1G1;k+=2)
|
||||
{ if ((Inter>PntG1G1->Value(i).Value(k))
|
||||
&&(Inter<PntG1G1->Value(i).Value(k+1)))
|
||||
{ k=NbPtG1G1+2; // pour sortir de la boucle
|
||||
// Ajouter les points de contrainte G0
|
||||
gp_Pnt P3d,PP,Pdif;
|
||||
gp_Pnt2d P2d;
|
||||
|
||||
AC2d.D0(Inter, P2d);
|
||||
LinCont->D0(Inter,P3d);
|
||||
mySurfInit->D0(P2d.Coord(1),P2d.Coord(2),PP);
|
||||
Pdif.SetCoord(-PP.Coord(1)+P3d.Coord(1),
|
||||
-PP.Coord(2)+P3d.Coord(2),
|
||||
-PP.Coord(3)+P3d.Coord(3));
|
||||
Plate_PinpointConstraint PC(P2d.XY(),
|
||||
Pdif.XYZ(),0,0);
|
||||
myPlate.Load(PC);
|
||||
|
||||
}
|
||||
else // le point n'appartient pas a un interval G1
|
||||
{ if (k+1>=NbPtG1G1)
|
||||
{ myPlateCont->ChangeValue(i).Append(Inter);
|
||||
// on ajoute le point
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{ myPlateCont->ChangeValue(i).Append(Inter);
|
||||
// on ajoute le point
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{ if (NbPtG1G1!=0) // est qu'il existe un intervalle incompatible
|
||||
for(Standard_Integer k=1;k<=NbPtG1G1;k+=2)
|
||||
{ if ((Inter>PntG1G1->Value(i).Value(k))
|
||||
&&(Inter<PntG1G1->Value(i).Value(k+1)))
|
||||
{ k=NbPtG1G1+2; // pour sortir de la boucle
|
||||
// Ajouter les points de contrainte G0
|
||||
gp_Pnt P3d,PP,Pdif;
|
||||
gp_Pnt2d P2d;
|
||||
|
||||
AC2d.D0(Inter, P2d);
|
||||
LinCont->D0(Inter,P3d);
|
||||
mySurfInit->D0(P2d.Coord(1),P2d.Coord(2),PP);
|
||||
Pdif.SetCoord(-PP.Coord(1)+P3d.Coord(1),
|
||||
-PP.Coord(2)+P3d.Coord(2),
|
||||
-PP.Coord(3)+P3d.Coord(3));
|
||||
Plate_PinpointConstraint PC(P2d.XY(),Pdif.XYZ(),0,0);
|
||||
myPlate.Load(PC);
|
||||
|
||||
}
|
||||
else // le point n'appartient pas a un intervalle G1
|
||||
{ if (k+1>=NbPtG1G1)
|
||||
{ myPlateCont->ChangeValue(i).Append(Inter);
|
||||
// on ajoute le point
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{ if ( ( (!mySurfInitIsGive)
|
||||
&&(Geom2dAdaptor_Curve(LinCont->Curve2dOnSurf()).GetType()!=GeomAbs_Circle))
|
||||
|| ( (j>1) &&(j<NbPnt_i))) //on enleve les extremites
|
||||
myPlateCont->ChangeValue(i).Append(Inter);// on ajoute le point
|
||||
}
|
||||
}
|
||||
{
|
||||
// repartition des points en cosinus selon l'ACR 2d
|
||||
// Afin d'eviter les points d'acumulation dans le 2d
|
||||
//Inter=Uinit+(Uif)*((-cos(M_PI*((j-1)/(NbPnt_i-1)))+1)/2);
|
||||
if (j==NbPnt_i)
|
||||
Inter=Ufinal;//pour parer au bug sur sun
|
||||
else if (ACR) {
|
||||
CurLength = Length2d*(1-Cos((j-1)*M_PI/(NbPnt_i-1)))/2;
|
||||
Inter = acrlaw->Value(CurLength);
|
||||
}
|
||||
else {
|
||||
Inter=Uinit+(Ufinal-Uinit)*((1-Cos((j-1)*M_PI/(NbPnt_i-1)))/2);
|
||||
}
|
||||
myParCont->ChangeValue(i).Append(Inter);// on ajoute le point
|
||||
if (NbPtInter!=0)
|
||||
{
|
||||
for(Standard_Integer l=1;l<=NbPtInter;l+=2)
|
||||
{
|
||||
//on cherche si le point Inter est dans l'intervalle
|
||||
//PntInter[i] PntInter[i+1]
|
||||
//auquelle cas il ne faudrait pas le stocker (pb de doublons)
|
||||
if ((Inter>PntInter->Value(i).Value(l))
|
||||
&&(Inter<PntInter->Value(i).Value(l+1)))
|
||||
{
|
||||
l=NbPtInter+2;
|
||||
// pour sortir de la boucle sans stocker le point
|
||||
}
|
||||
else
|
||||
{
|
||||
if (l+1>=NbPtInter) {
|
||||
// on a parcouru tout le tableau : Le point
|
||||
// n'appartient pas a un interval point commun
|
||||
if (NbPtG1G1!=0)
|
||||
{
|
||||
// est qu'il existe un intervalle incompatible
|
||||
for(Standard_Integer k=1;k<=NbPtG1G1;k+=2)
|
||||
{
|
||||
if ((Inter>PntG1G1->Value(i).Value(k))
|
||||
&&(Inter<PntG1G1->Value(i).Value(k+1)))
|
||||
{
|
||||
k=NbPtG1G1+2; // pour sortir de la boucle
|
||||
// Ajouter les points de contrainte G0
|
||||
gp_Pnt P3d,PP,Pdif;
|
||||
gp_Pnt2d P2d;
|
||||
|
||||
AC2d.D0(Inter, P2d);
|
||||
LinCont->D0(Inter,P3d);
|
||||
mySurfInit->D0(P2d.Coord(1),P2d.Coord(2),PP);
|
||||
Pdif.SetCoord(-PP.Coord(1)+P3d.Coord(1),
|
||||
-PP.Coord(2)+P3d.Coord(2),
|
||||
-PP.Coord(3)+P3d.Coord(3));
|
||||
Plate_PinpointConstraint PC(P2d.XY(),Pdif.XYZ(),0,0);
|
||||
myPlate.Load(PC);
|
||||
}
|
||||
else // le point n'appartient pas a un interval G1
|
||||
{
|
||||
if (k+1>=NbPtG1G1)
|
||||
{
|
||||
myPlateCont->ChangeValue(i).Append(Inter);
|
||||
// on ajoute le point
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
myPlateCont->ChangeValue(i).Append(Inter);
|
||||
// on ajoute le point
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (NbPtG1G1!=0) // est qu'il existe un intervalle incompatible
|
||||
{
|
||||
for(Standard_Integer k=1;k<=NbPtG1G1;k+=2)
|
||||
{
|
||||
if ((Inter>PntG1G1->Value(i).Value(k))
|
||||
&&(Inter<PntG1G1->Value(i).Value(k+1)))
|
||||
{
|
||||
k=NbPtG1G1+2; // pour sortir de la boucle
|
||||
// Ajouter les points de contrainte G0
|
||||
gp_Pnt P3d,PP,Pdif;
|
||||
gp_Pnt2d P2d;
|
||||
|
||||
AC2d.D0(Inter, P2d);
|
||||
LinCont->D0(Inter,P3d);
|
||||
mySurfInit->D0(P2d.Coord(1),P2d.Coord(2),PP);
|
||||
Pdif.SetCoord(-PP.Coord(1)+P3d.Coord(1),
|
||||
-PP.Coord(2)+P3d.Coord(2),
|
||||
-PP.Coord(3)+P3d.Coord(3));
|
||||
Plate_PinpointConstraint PC(P2d.XY(),Pdif.XYZ(),0,0);
|
||||
myPlate.Load(PC);
|
||||
|
||||
}
|
||||
else // le point n'appartient pas a un intervalle G1
|
||||
{
|
||||
if (k+1>=NbPtG1G1)
|
||||
{
|
||||
myPlateCont->ChangeValue(i).Append(Inter);
|
||||
// on ajoute le point
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( ( (!mySurfInitIsGive)
|
||||
&&(Geom2dAdaptor_Curve(LinCont->Curve2dOnSurf()).GetType()!=GeomAbs_Circle))
|
||||
|| ( (j>1) &&(j<NbPnt_i))) //on enleve les extremites
|
||||
myPlateCont->ChangeValue(i).Append(Inter);// on ajoute le point
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------
|
||||
|
@ -235,62 +235,77 @@ static void PolyTest(const TColStd_Array1OfReal& Herm,
|
||||
Standard_Real Polemax=Polesinit(max).Y();
|
||||
if (((Polemax)>=((1/TolPoles)*Polemin))||((Polemin==0.0)&&(Polemax>=(1/TolPoles)))){
|
||||
if (Polesinit(0).Y()>=(1/TolPoles)*Polesinit(3).Y()||Polesinit(0).Y()<=TolPoles*Polesinit(3).Y())
|
||||
Standard_DimensionError::Raise("Hermit Impossible Tolerance");
|
||||
Standard_DimensionError::Raise("Hermit Impossible Tolerance");
|
||||
if ((max==0)||(max==3))
|
||||
for (i=0;i<=3;i++)
|
||||
Polesinit(i).SetCoord(0.0,(Polesinit(i).Y()-TolPoles*Polemax));
|
||||
if ((max==1)||(max==2))
|
||||
if ((min==0)||(min==3))
|
||||
for (i=0;i<=3;i++)
|
||||
Polesinit(i).SetCoord(0.0,(Polesinit(i).Y()-(1/TolPoles)*Polemin));
|
||||
else{
|
||||
if ((TolPoles*Polemax<Polesinit(0).Y())&&(TolPoles*Polemax<Polesinit(3).Y())){
|
||||
for (i=0;i<=3;i++)
|
||||
Polesinit(i).SetCoord(0.0,(Polesinit(i).Y()-TolPoles*Polemax));
|
||||
mark=1;
|
||||
}
|
||||
if ((1/TolPoles*Polemin>Polesinit(0).Y())&&(1/TolPoles*Polemin>Polesinit(3).Y())&&(mark==0)){
|
||||
for (i=0;i<=3;i++)
|
||||
Polesinit(i).SetCoord(0.0,(Polesinit(i).Y()-1/TolPoles*Polemin));
|
||||
mark=1;
|
||||
}
|
||||
if (mark==0){
|
||||
Standard_Real Pole0,Pole3;
|
||||
Pole0=Polesinit(0).Y();
|
||||
Pole3=Polesinit(3).Y();
|
||||
if (Pole0<3){
|
||||
a=Log10(Pole3/Pole0);
|
||||
if (boucle==2)
|
||||
for (i=0;i<=3;i++)
|
||||
Polesinit(i).SetCoord(0.0, Polesinit(i).Y()-(Pole3*(Pow(10.0,(-0.5*Log10(TolPoles)-a/2.0)))));
|
||||
if (boucle==1){
|
||||
for (i=0;i<=3;i++)
|
||||
Polesinit(i).SetCoord(0.0, Polesinit(i).Y()-(Pole0*(Pow(10.0,(a/2.0+0.5*Log10(TolPoles))))));
|
||||
dercas=1;
|
||||
}
|
||||
}
|
||||
if (Pole0>Pole3){
|
||||
a=Log10(Pole0/Pole3);
|
||||
if (boucle==2)
|
||||
for (i=0;i<=3;i++)
|
||||
Polesinit(i).SetCoord(0.0, Polesinit(i).Y()-(Pole0*(Pow(10.0,(-0.5*Log10(TolPoles)-a/2.0)))));
|
||||
if (boucle==1){
|
||||
for (i=0;i<=3;i++)
|
||||
Polesinit(i).SetCoord(0.0, Polesinit(i).Y()-(Pole3*(Pow(10.0,(a/2.0+0.5*Log10(TolPoles))))));
|
||||
dercas=1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
for (i=0;i<=3;i++)
|
||||
Polesinit(i).SetCoord(0.0,(Polesinit(i).Y()-TolPoles*Polemax));
|
||||
}
|
||||
else if ((max==1)||(max==2)) {
|
||||
if ((min==0)||(min==3))
|
||||
{
|
||||
for (i=0;i<=3;i++)
|
||||
Polesinit(i).SetCoord(0.0,(Polesinit(i).Y()-(1/TolPoles)*Polemin));
|
||||
}
|
||||
else{
|
||||
if ((TolPoles*Polemax<Polesinit(0).Y())&&(TolPoles*Polemax<Polesinit(3).Y())){
|
||||
for (i=0;i<=3;i++)
|
||||
Polesinit(i).SetCoord(0.0,(Polesinit(i).Y()-TolPoles*Polemax));
|
||||
mark=1;
|
||||
}
|
||||
if ((1/TolPoles*Polemin>Polesinit(0).Y())&&(1/TolPoles*Polemin>Polesinit(3).Y())&&(mark==0)){
|
||||
for (i=0;i<=3;i++)
|
||||
Polesinit(i).SetCoord(0.0,(Polesinit(i).Y()-1/TolPoles*Polemin));
|
||||
mark=1;
|
||||
}
|
||||
if (mark==0){
|
||||
Standard_Real Pole0,Pole3;
|
||||
Pole0=Polesinit(0).Y();
|
||||
Pole3=Polesinit(3).Y();
|
||||
if (Pole0<3){
|
||||
a=Log10(Pole3/Pole0);
|
||||
if (boucle==2)
|
||||
{
|
||||
for (i=0;i<=3;i++)
|
||||
Polesinit(i).SetCoord(0.0, Polesinit(i).Y()-(Pole3*(Pow(10.0,(-0.5*Log10(TolPoles)-a/2.0)))));
|
||||
}
|
||||
if (boucle==1)
|
||||
{
|
||||
for (i=0;i<=3;i++)
|
||||
Polesinit(i).SetCoord(0.0, Polesinit(i).Y()-(Pole0*(Pow(10.0,(a/2.0+0.5*Log10(TolPoles))))));
|
||||
dercas=1;
|
||||
}
|
||||
}
|
||||
if (Pole0>Pole3)
|
||||
{
|
||||
a=Log10(Pole0/Pole3);
|
||||
if (boucle==2)
|
||||
{
|
||||
for (i=0;i<=3;i++)
|
||||
Polesinit(i).SetCoord(0.0, Polesinit(i).Y()-(Pole0*(Pow(10.0,(-0.5*Log10(TolPoles)-a/2.0)))));
|
||||
}
|
||||
if (boucle==1)
|
||||
{
|
||||
for (i=0;i<=3;i++)
|
||||
Polesinit(i).SetCoord(0.0, Polesinit(i).Y()-(Pole3*(Pow(10.0,(a/2.0+0.5*Log10(TolPoles))))));
|
||||
dercas=1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} //end of the loop
|
||||
} // end of the loop
|
||||
|
||||
if (!SignDenom(Polesinit)) //invertion of the polynome sign
|
||||
if (!SignDenom(Polesinit)) //invertion of the polynome sign
|
||||
{
|
||||
for (index=0;index<=3;index++)
|
||||
Polesinit(index).SetCoord(0.0,-Polesinit(index).Y());
|
||||
}
|
||||
|
||||
//loop of positivity
|
||||
if ((Polesinit(1).Y()<0.0)&&(Polesinit(2).Y()>=0.0)){
|
||||
// loop of positivity
|
||||
if ((Polesinit(1).Y()<0.0)&&(Polesinit(2).Y()>=0.0))
|
||||
{
|
||||
Us1=Polesinit(0).Y()/(Polesinit(0).Y()-Polesinit(1).Y());
|
||||
if (boucle==2)
|
||||
Us1=Us1*knots(2);
|
||||
@ -304,7 +319,8 @@ static void PolyTest(const TColStd_Array1OfReal& Herm,
|
||||
U4=knots(I1);
|
||||
}
|
||||
|
||||
if ((Polesinit(1).Y()>=0.0)&&(Polesinit(2).Y()<0.0)){
|
||||
if ((Polesinit(1).Y()>=0.0)&&(Polesinit(2).Y()<0.0))
|
||||
{
|
||||
Us2=Polesinit(2).Y()/(Polesinit(2).Y()-Polesinit(3).Y());
|
||||
if (boucle==2)
|
||||
Us2=knots(knots.Length()-1)+Us2*(1-knots(knots.Length()-1));
|
||||
@ -397,6 +413,7 @@ static void PolyTest(const TColStd_Array1OfReal& Herm,
|
||||
}
|
||||
|
||||
if (I1==I2) //definition and filling of the
|
||||
{
|
||||
if((I3==I4)||(I3==0)){ //array of knots
|
||||
Knots=new TColStd_HArray1OfReal(1,BS->NbKnots());
|
||||
for (i=1;i<=BS->NbKnots();i++)
|
||||
@ -408,7 +425,9 @@ static void PolyTest(const TColStd_Array1OfReal& Herm,
|
||||
Knots->SetValue(i,BS->Knot(i));
|
||||
Knots->SetValue(BS->NbKnots()+1,Uy);
|
||||
}
|
||||
else{
|
||||
}
|
||||
else
|
||||
{
|
||||
if((I3==I4)||(I3==0)){
|
||||
Knots=new TColStd_HArray1OfReal(1,BS->NbKnots()+1);
|
||||
for (i=1;i<=BS->NbKnots();i++)
|
||||
@ -433,69 +452,93 @@ static void PolyTest(const TColStd_Array1OfReal& Herm,
|
||||
Polesinit(2).SetCoord(0.0,Herm(3)-Herm(2)/3.0);
|
||||
Polesinit(3).SetCoord(0.0,Herm(3));
|
||||
|
||||
//loop to check the tolerances on poles
|
||||
if (TolPoles!=0.0){
|
||||
// loop to check the tolerances on poles
|
||||
if (TolPoles!=0.0)
|
||||
{
|
||||
Polemax(Polesinit,min,max);
|
||||
Standard_Real Polemin=Polesinit(min).Y();
|
||||
Standard_Real Polemax=Polesinit(max).Y();
|
||||
if (((Polemax)>=((1/TolPoles)*Polemin))||((Polemin==0.0)&&(Polemax>=(1/TolPoles)))){
|
||||
if (((Polemax)>=((1/TolPoles)*Polemin))||((Polemin==0.0)&&(Polemax>=(1/TolPoles))))
|
||||
{
|
||||
if (Polesinit(0).Y()>=(1/TolPoles)*Polesinit(3).Y()||Polesinit(0).Y()<=TolPoles*Polesinit(3).Y())
|
||||
Standard_DimensionError::Raise("Hermit Impossible Tolerance");
|
||||
Standard_DimensionError::Raise("Hermit Impossible Tolerance");
|
||||
if ((max==0)||(max==3))
|
||||
for (i=0;i<=3;i++)
|
||||
Polesinit(i).SetCoord(0.0,(Polesinit(i).Y()-TolPoles*Polemax));
|
||||
if ((max==1)||(max==2))
|
||||
if ((min==0)||(min==3))
|
||||
for (i=0;i<=3;i++)
|
||||
Polesinit(i).SetCoord(0.0,(Polesinit(i).Y()-(1/TolPoles)*Polemin));
|
||||
else{
|
||||
if ((TolPoles*Polemax<Polesinit(0).Y())&&(TolPoles*Polemax<Polesinit(3).Y())){
|
||||
for (i=0;i<=3;i++)
|
||||
Polesinit(i).SetCoord(0.0,(Polesinit(i).Y()-TolPoles*Polemax));
|
||||
mark=1;
|
||||
}
|
||||
if ((1/TolPoles*Polemin>Polesinit(0).Y())&&(1/TolPoles*Polemin>Polesinit(3).Y())&&(mark==0)){
|
||||
for (i=0;i<=3;i++)
|
||||
Polesinit(i).SetCoord(0.0,(Polesinit(i).Y()-1/TolPoles*Polemin));
|
||||
mark=1;
|
||||
}
|
||||
if (mark==0){
|
||||
Standard_Real Pole0,Pole3;
|
||||
Pole0=Polesinit(0).Y();
|
||||
Pole3=Polesinit(3).Y();
|
||||
if (Pole0<3){
|
||||
a=Log10(Pole3/Pole0);
|
||||
if (boucle==2)
|
||||
for (i=0;i<=3;i++)
|
||||
Polesinit(i).SetCoord(0.0, Polesinit(i).Y()-(Pole3*(Pow(10.0,(-0.5*Log10(TolPoles)-a/2.0)))));
|
||||
if (boucle==1){
|
||||
for (i=0;i<=3;i++)
|
||||
Polesinit(i).SetCoord(0.0, Polesinit(i).Y()-(Pole0*(Pow(10.0,(a/2.0+0.5*Log10(TolPoles))))));
|
||||
dercas=1;
|
||||
}
|
||||
}
|
||||
if (Pole0>Pole3){
|
||||
a=Log10(Pole0/Pole3);
|
||||
if (boucle==2)
|
||||
for (i=0;i<=3;i++)
|
||||
Polesinit(i).SetCoord(0.0, Polesinit(i).Y()-(Pole0*(Pow(10.0,(-0.5*Log10(TolPoles)-a/2.0)))));
|
||||
if (boucle==1){
|
||||
for (i=0;i<=3;i++)
|
||||
Polesinit(i).SetCoord(0.0, Polesinit(i).Y()-(Pole3*(Pow(10.0,(a/2.0+0.5*Log10(TolPoles))))));
|
||||
dercas=1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} //end of the loop
|
||||
{
|
||||
for (i=0;i<=3;i++)
|
||||
Polesinit(i).SetCoord(0.0,(Polesinit(i).Y()-TolPoles*Polemax));
|
||||
}
|
||||
else if ((max==1)||(max==2))
|
||||
{
|
||||
if ((min==0)||(min==3))
|
||||
{
|
||||
for (i=0;i<=3;i++)
|
||||
Polesinit(i).SetCoord(0.0,(Polesinit(i).Y()-(1/TolPoles)*Polemin));
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((TolPoles*Polemax<Polesinit(0).Y())&&(TolPoles*Polemax<Polesinit(3).Y()))
|
||||
{
|
||||
for (i=0;i<=3;i++)
|
||||
Polesinit(i).SetCoord(0.0,(Polesinit(i).Y()-TolPoles*Polemax));
|
||||
mark=1;
|
||||
}
|
||||
|
||||
if (!SignDenom(Polesinit)) //invertion of the polynome sign
|
||||
if ((1/TolPoles*Polemin>Polesinit(0).Y())&&(1/TolPoles*Polemin>Polesinit(3).Y())&&(mark==0))
|
||||
{
|
||||
for (i=0;i<=3;i++)
|
||||
Polesinit(i).SetCoord(0.0,(Polesinit(i).Y()-1/TolPoles*Polemin));
|
||||
mark=1;
|
||||
}
|
||||
if (mark==0)
|
||||
{
|
||||
Standard_Real Pole0,Pole3;
|
||||
Pole0=Polesinit(0).Y();
|
||||
Pole3=Polesinit(3).Y();
|
||||
if (Pole0<3)
|
||||
{
|
||||
a=Log10(Pole3/Pole0);
|
||||
if (boucle==2)
|
||||
{
|
||||
for (i=0;i<=3;i++)
|
||||
Polesinit(i).SetCoord(0.0, Polesinit(i).Y()-(Pole3*(Pow(10.0,(-0.5*Log10(TolPoles)-a/2.0)))));
|
||||
}
|
||||
if (boucle==1)
|
||||
{
|
||||
for (i=0;i<=3;i++)
|
||||
Polesinit(i).SetCoord(0.0, Polesinit(i).Y()-(Pole0*(Pow(10.0,(a/2.0+0.5*Log10(TolPoles))))));
|
||||
dercas=1;
|
||||
}
|
||||
}
|
||||
if (Pole0>Pole3)
|
||||
{
|
||||
a=Log10(Pole0/Pole3);
|
||||
if (boucle==2)
|
||||
{
|
||||
for (i=0;i<=3;i++)
|
||||
Polesinit(i).SetCoord(0.0, Polesinit(i).Y()-(Pole0*(Pow(10.0,(-0.5*Log10(TolPoles)-a/2.0)))));
|
||||
}
|
||||
else if (boucle==1)
|
||||
{
|
||||
for (i=0;i<=3;i++)
|
||||
Polesinit(i).SetCoord(0.0, Polesinit(i).Y()-(Pole3*(Pow(10.0,(a/2.0+0.5*Log10(TolPoles))))));
|
||||
dercas=1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} // end of the loop
|
||||
|
||||
if (!SignDenom(Polesinit)) // invertion of the polynome sign
|
||||
{
|
||||
for (index=0;index<=3;index++)
|
||||
Polesinit(index).SetCoord(0.0,-Polesinit(index).Y());
|
||||
}
|
||||
|
||||
//boucle de positivite
|
||||
if ((Polesinit(1).Y()<0.0)&&(Polesinit(2).Y()>=0.0)){
|
||||
// boucle de positivite
|
||||
if ((Polesinit(1).Y()<0.0)&&(Polesinit(2).Y()>=0.0))
|
||||
{
|
||||
Us1=Polesinit(0).Y()/(Polesinit(0).Y()-Polesinit(1).Y());
|
||||
if (boucle==2)
|
||||
Us1=Us1*knots(2);
|
||||
@ -509,7 +552,8 @@ static void PolyTest(const TColStd_Array1OfReal& Herm,
|
||||
U4=knots(I1);
|
||||
}
|
||||
|
||||
if ((Polesinit(1).Y()>=0.0)&&(Polesinit(2).Y()<0.0)){
|
||||
if ((Polesinit(1).Y()>=0.0)&&(Polesinit(2).Y()<0.0))
|
||||
{
|
||||
Us2=Polesinit(2).Y()/(Polesinit(2).Y()-Polesinit(3).Y());
|
||||
if (boucle==2)
|
||||
Us2=knots(knots.Length()-1)+Us2*(1-knots(knots.Length()-1));
|
||||
|
@ -204,14 +204,14 @@ static Standard_Boolean Connect (const Handle(ShapeAnalysis_Wire)& theSAW,
|
||||
else if (( surfcurv == -3 && len3d > 0) || len2d == 0)
|
||||
GTranslate2d = Standard_False;
|
||||
|
||||
if (GTranslate3d && GTranslate2d)
|
||||
if (GTranslate3d && GTranslate2d) {
|
||||
//Setting preference in the case of inconsitency between 3D and 2D
|
||||
if (surfcurv == 2) Preferred3d = Standard_False;
|
||||
else if (surfcurv == 3) Preferred2d = Standard_False;
|
||||
else if (myfilepreference == 2) Preferred3d = Standard_False;
|
||||
else if (myfilepreference == 3) Preferred2d = Standard_False;
|
||||
else Preferred3d = Standard_False;
|
||||
|
||||
}
|
||||
if (GTranslate3d && GTranslate2d && len3d != len2d) {
|
||||
GTranslate3d = Preferred3d;
|
||||
GTranslate2d = Preferred2d;
|
||||
|
@ -281,10 +281,11 @@ void IGESDefs_ToolAttributeTable::OwnCheck
|
||||
(const Handle(IGESDefs_AttributeTable)& ent,
|
||||
const Interface_ShareTool& , Handle(Interface_Check)& ach) const
|
||||
{
|
||||
if (ent->Definition().IsNull())
|
||||
if (ent->Definition().IsNull()) {
|
||||
if (ent->HasStructure()) ach->AddFail
|
||||
("Structure in Directory Entry is not an Attribute Definition Table");
|
||||
else ach->AddFail("No Attribute Definition defined");
|
||||
}
|
||||
if (ent->FormNumber() == 0 && ent->NbRows() != 1)
|
||||
ach->AddFail("Form 0 with several Rows");
|
||||
if (ent->NbAttributes() != ent->Definition()->NbAttributes())
|
||||
|
@ -168,12 +168,12 @@ IGESToBRep_IGESBoundary::IGESToBRep_IGESBoundary(const IGESToBRep_CurveAndSurfac
|
||||
else if (len2d == 0)
|
||||
GTranslate2d = Standard_False;
|
||||
|
||||
if (GTranslate3d && GTranslate2d)
|
||||
if (GTranslate3d && GTranslate2d) {
|
||||
//Setting preference in the case of inconsitency between 3D and 2D
|
||||
if (myfilepreference == 2) Preferred3d = Standard_False;
|
||||
else if (myfilepreference == 3) Preferred2d = Standard_False;
|
||||
else Preferred3d = Standard_False;
|
||||
|
||||
}
|
||||
if (GTranslate3d && GTranslate2d && len3d != len2d) {
|
||||
GTranslate3d = Preferred3d;
|
||||
GTranslate2d = Preferred2d;
|
||||
|
@ -807,16 +807,16 @@ void IntPatch_RstInt::PutVertexOnLine (Handle(IntPatch_Line)& L,
|
||||
}
|
||||
|
||||
if (!duplicate) {
|
||||
Standard_Integer ParamApproxOnLine = Standard_Integer(W1[ip])+1;
|
||||
|
||||
arc->D1(paramarc,p2d,d2d);
|
||||
U1 = p2d.X(); V1 = p2d.Y();
|
||||
if (typL == IntPatch_Walking && SurfaceIsPeriodic)
|
||||
if (OnFirst)
|
||||
Recadre(TypeS1,TypeS2,wlin,ParamApproxOnLine,U1,V1,U2,V2);
|
||||
else
|
||||
Recadre(TypeS1,TypeS2,wlin,ParamApproxOnLine,U2,V2,U1,V1);
|
||||
Standard_Integer ParamApproxOnLine = Standard_Integer(W1[ip])+1;
|
||||
|
||||
arc->D1(paramarc,p2d,d2d);
|
||||
U1 = p2d.X(); V1 = p2d.Y();
|
||||
if (typL == IntPatch_Walking && SurfaceIsPeriodic) {
|
||||
if (OnFirst)
|
||||
Recadre(TypeS1,TypeS2,wlin,ParamApproxOnLine,U1,V1,U2,V2);
|
||||
else
|
||||
Recadre(TypeS1,TypeS2,wlin,ParamApproxOnLine,U2,V2,U1,V1);
|
||||
}
|
||||
locpt.Append(ptsommet);
|
||||
locpt2.Append(gp_Pnt2d(U2,V2));
|
||||
|
||||
|
@ -2936,16 +2936,17 @@ Standard_Integer IntPolyh_MaillageAffinage::TriangleEdgeContact2
|
||||
else SP1.SetEdge1(-1);
|
||||
}
|
||||
else {
|
||||
PI=PE1+Edge*lambda;
|
||||
if(TriSurfID==1)
|
||||
if(Tri2.GetEdgeOrientation(EdgeIndex)>0)
|
||||
SP1.SetLambda2(lambda);
|
||||
else SP1.SetLambda2(1.0-lambda);
|
||||
if(TriSurfID==2)
|
||||
if(Tri1.GetEdgeOrientation(EdgeIndex)>0)
|
||||
SP1.SetLambda1(lambda);
|
||||
else SP1.SetLambda1(1.0-lambda);
|
||||
|
||||
PI=PE1+Edge*lambda;
|
||||
if(TriSurfID==1) {
|
||||
if(Tri2.GetEdgeOrientation(EdgeIndex)>0)
|
||||
SP1.SetLambda2(lambda);
|
||||
else SP1.SetLambda2(1.0-lambda);
|
||||
}
|
||||
if(TriSurfID==2) {
|
||||
if(Tri1.GetEdgeOrientation(EdgeIndex)>0)
|
||||
SP1.SetLambda1(lambda);
|
||||
else SP1.SetLambda1(1.0-lambda);
|
||||
}
|
||||
}
|
||||
|
||||
Standard_Real Cote23X=Cote23.X();
|
||||
|
@ -186,11 +186,11 @@ fields
|
||||
|
||||
ax3 : Ax3 from gp;
|
||||
lin : Lin from gp;
|
||||
typ : SurfaceType from GeomAbs;
|
||||
prm1 : Real from Standard;
|
||||
prm2 : Real from Standard;
|
||||
prm3 : Real from Standard;
|
||||
prm4 : Real from Standard;
|
||||
ax3direc : Boolean from Standard;
|
||||
typ : SurfaceType from GeomAbs;
|
||||
|
||||
end Quadric;
|
||||
|
@ -319,7 +319,7 @@ void MeshVS_Mesh::ComputeSelection ( const Handle(SelectMgr_Selection)& theSelec
|
||||
TColStd_MapIteratorOfPackedMapOfInteger anIterN( anAllNodesMap );
|
||||
|
||||
for( ; anIterN.More(); anIterN.Next() )
|
||||
if( myDataSource->GetGeom( anIterN.Key(), Standard_False, aCoords, NbNodes, aType ) )
|
||||
if( myDataSource->GetGeom( anIterN.Key(), Standard_False, aCoords, NbNodes, aType ) ) {
|
||||
if( first )
|
||||
{
|
||||
for( Standard_Integer i=1; i<=3; i++ )
|
||||
@ -334,6 +334,7 @@ void MeshVS_Mesh::ComputeSelection ( const Handle(SelectMgr_Selection)& theSelec
|
||||
if( aCoords( i )>max[i-1] )
|
||||
max[i-1] = aCoords( i );
|
||||
}
|
||||
}
|
||||
Bnd_Box box;
|
||||
box.Add( gp_Pnt( min[0], min[1], min[2] ) );
|
||||
box.Add( gp_Pnt( max[0], max[1], max[2] ) );
|
||||
|
@ -854,7 +854,7 @@ void MeshVS_MeshPrsBuilder::HowManyPrimitives (const Handle(MeshVS_HArray1OfSequ
|
||||
Standard_Integer& Vertices,
|
||||
Standard_Integer& Bounds)
|
||||
{
|
||||
if( !Topo.IsNull() )
|
||||
if( !Topo.IsNull() ) {
|
||||
if( AsPolygons || IsSelect )
|
||||
{
|
||||
Standard_Integer B = Topo->Upper()-Topo->Lower()+1;
|
||||
@ -874,6 +874,7 @@ void MeshVS_MeshPrsBuilder::HowManyPrimitives (const Handle(MeshVS_HArray1OfSequ
|
||||
Bounds += E;
|
||||
Vertices += 2*E;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//================================================================
|
||||
|
@ -209,7 +209,7 @@ void NCollection_BaseSequence::PInsertAfter (const Standard_Integer theIndex,
|
||||
{
|
||||
if (theIndex < 0 || theIndex > mySize)
|
||||
Standard_OutOfRange::Raise();
|
||||
if (Other.mySize != 0)
|
||||
if (Other.mySize != 0) {
|
||||
if (theIndex == 0)
|
||||
PPrepend (Other);
|
||||
else {
|
||||
@ -226,6 +226,7 @@ void NCollection_BaseSequence::PInsertAfter (const Standard_Integer theIndex,
|
||||
myCurrentIndex += Other.mySize;
|
||||
Other.Nullify();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@ -47,7 +47,7 @@ const Handle_NIS_Drawer& NIS_InteractiveObject::SetDrawer
|
||||
const Standard_Boolean setUpdated)
|
||||
{
|
||||
NIS_InteractiveContext * aCtx = theDrawer->GetContext();
|
||||
if (myDrawer.IsNull() == Standard_False)
|
||||
if (myDrawer.IsNull() == Standard_False) {
|
||||
if (aCtx == 0L)
|
||||
{
|
||||
aCtx = myDrawer->GetContext();
|
||||
@ -59,6 +59,7 @@ const Handle_NIS_Drawer& NIS_InteractiveObject::SetDrawer
|
||||
(myDrawer->GetContext() != 0L && aCtx != myDrawer->GetContext(),
|
||||
"NIS_InteractiveObject::SetDrawer: different drawer context");
|
||||
}
|
||||
}
|
||||
|
||||
Standard_NullValue_Raise_if
|
||||
(aCtx == 0L, "NIS_InteractiveObject::SetDrawer: NULL drawer context");
|
||||
|
@ -93,8 +93,8 @@ OpenGl_Context::OpenGl_Context (const Handle(OpenGl_Caps)& theCaps)
|
||||
myReleaseQueue (new OpenGl_ResourcesQueue()),
|
||||
myGlLibHandle (NULL),
|
||||
myGlCore20 (NULL),
|
||||
myMaxTexDim (1024),
|
||||
myAnisoMax (1),
|
||||
myMaxTexDim (1024),
|
||||
myGlVerMajor (0),
|
||||
myGlVerMinor (0),
|
||||
myIsFeedback (Standard_False),
|
||||
|
@ -30,8 +30,8 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_PrinterContext, Standard_Transient)
|
||||
OpenGl_PrinterContext::OpenGl_PrinterContext()
|
||||
: myProjTransform (0, 3, 0, 3),
|
||||
myLayerViewportX (0),
|
||||
myLayerViewportY (0),
|
||||
myScaleX (1.0f),
|
||||
myLayerViewportY (0),
|
||||
myScaleY (1.0f)
|
||||
{
|
||||
// identity projection matrix
|
||||
|
@ -101,8 +101,8 @@ OpenGl_View::OpenGl_View (const CALL_DEF_VIEWCONTEXT &AContext)
|
||||
myIntShadingMethod(TEL_SM_GOURAUD),
|
||||
myAntiAliasing(Standard_False),
|
||||
myTransPers(&myDefaultTransPers),
|
||||
myIsTransPers(Standard_False),
|
||||
myTrihedron(NULL),
|
||||
myIsTransPers(Standard_False),
|
||||
myGraduatedTrihedron(NULL)
|
||||
{
|
||||
// Initialize matrices
|
||||
|
@ -199,34 +199,38 @@ static gp_Pnt2d Function_Value(const Standard_Real U,
|
||||
if(Surf->IsVPeriodic() || Surf->IsVClosed()) {
|
||||
vperiod = Surf->LastVParameter() - Surf->FirstVParameter();
|
||||
}
|
||||
if(U0 < Uinf)
|
||||
if(U0 < Uinf) {
|
||||
if(!uperiod)
|
||||
U0 = Uinf;
|
||||
else {
|
||||
decalU = int((Uinf - U0)/uperiod)+1;
|
||||
U0 += decalU*uperiod;
|
||||
}
|
||||
if(U0 > Usup)
|
||||
}
|
||||
if(U0 > Usup) {
|
||||
if(!uperiod)
|
||||
U0 = Usup;
|
||||
else {
|
||||
decalU = -(int((U0 - Usup)/uperiod)+1);
|
||||
U0 += decalU*uperiod;
|
||||
}
|
||||
if(V0 < Vinf)
|
||||
}
|
||||
if(V0 < Vinf) {
|
||||
if(!vperiod)
|
||||
V0 = Vinf;
|
||||
else {
|
||||
decalV = int((Vinf - V0)/vperiod)+1;
|
||||
V0 += decalV*vperiod;
|
||||
}
|
||||
if(V0 > Vsup)
|
||||
}
|
||||
if(V0 > Vsup) {
|
||||
if(!vperiod)
|
||||
V0 = Vsup;
|
||||
else {
|
||||
decalV = -int((V0 - Vsup)/vperiod)-1;
|
||||
V0 += decalV*vperiod;
|
||||
}
|
||||
}
|
||||
|
||||
// The surface around U0 is reduced
|
||||
Standard_Real uLittle = (Usup - Uinf)/10, vLittle = (Vsup - Vinf)/10;
|
||||
@ -759,44 +763,46 @@ Handle(Adaptor2d_HCurve2d)
|
||||
case GeomAbs_Cylinder:
|
||||
{
|
||||
// Standard_Real Sloc, Tloc;
|
||||
Standard_Real Sloc;
|
||||
Standard_Integer usens = 0;
|
||||
gp_Cylinder Cylinder = Surf->Cylinder();
|
||||
ElSLib::Parameters( Cylinder, Pts(1), S, T);
|
||||
Pts2d(1).SetCoord(S,T);
|
||||
for ( i = 2 ; i <= NbOfPnts ; i++) {
|
||||
Sloc = S;
|
||||
ElSLib::Parameters( Cylinder, Pts(i), S, T);
|
||||
if(Abs(Sloc - S) > M_PI)
|
||||
if(Sloc > S)
|
||||
usens++;
|
||||
else
|
||||
usens--;
|
||||
Pts2d(i).SetCoord(S+usens*2*M_PI,T);
|
||||
}
|
||||
myProjIsDone = Standard_True;
|
||||
break;
|
||||
Standard_Real Sloc;
|
||||
Standard_Integer usens = 0;
|
||||
gp_Cylinder Cylinder = Surf->Cylinder();
|
||||
ElSLib::Parameters( Cylinder, Pts(1), S, T);
|
||||
Pts2d(1).SetCoord(S,T);
|
||||
for ( i = 2 ; i <= NbOfPnts ; i++) {
|
||||
Sloc = S;
|
||||
ElSLib::Parameters( Cylinder, Pts(i), S, T);
|
||||
if(Abs(Sloc - S) > M_PI) {
|
||||
if(Sloc > S)
|
||||
usens++;
|
||||
else
|
||||
usens--;
|
||||
}
|
||||
Pts2d(i).SetCoord(S+usens*2*M_PI,T);
|
||||
}
|
||||
myProjIsDone = Standard_True;
|
||||
break;
|
||||
}
|
||||
case GeomAbs_Cone:
|
||||
{
|
||||
// Standard_Real Sloc, Tloc;
|
||||
Standard_Real Sloc;
|
||||
Standard_Integer usens = 0;
|
||||
gp_Cone Cone = Surf->Cone();
|
||||
ElSLib::Parameters( Cone, Pts(1), S, T);
|
||||
Pts2d(1).SetCoord(S,T);
|
||||
for ( i = 2 ; i <= NbOfPnts ; i++) {
|
||||
Sloc = S;
|
||||
ElSLib::Parameters( Cone, Pts(i), S, T);
|
||||
if(Abs(Sloc - S) > M_PI)
|
||||
if(Sloc > S)
|
||||
usens++;
|
||||
else
|
||||
usens--;
|
||||
Pts2d(i).SetCoord(S+usens*2*M_PI,T);
|
||||
}
|
||||
myProjIsDone = Standard_True;
|
||||
break;
|
||||
Standard_Real Sloc;
|
||||
Standard_Integer usens = 0;
|
||||
gp_Cone Cone = Surf->Cone();
|
||||
ElSLib::Parameters( Cone, Pts(1), S, T);
|
||||
Pts2d(1).SetCoord(S,T);
|
||||
for ( i = 2 ; i <= NbOfPnts ; i++) {
|
||||
Sloc = S;
|
||||
ElSLib::Parameters( Cone, Pts(i), S, T);
|
||||
if(Abs(Sloc - S) > M_PI) {
|
||||
if(Sloc > S)
|
||||
usens++;
|
||||
else
|
||||
usens--;
|
||||
}
|
||||
Pts2d(i).SetCoord(S+usens*2*M_PI,T);
|
||||
}
|
||||
myProjIsDone = Standard_True;
|
||||
break;
|
||||
}
|
||||
case GeomAbs_Sphere:
|
||||
{
|
||||
@ -809,11 +815,12 @@ Handle(Adaptor2d_HCurve2d)
|
||||
for ( i = 2 ; i <= NbOfPnts ; i++) {
|
||||
Sloc = S;Tloc = T;
|
||||
ElSLib::Parameters( Sphere, Pts(i), S, T);
|
||||
if(1.6*M_PI < Abs(Sloc - S))
|
||||
if(1.6*M_PI < Abs(Sloc - S)) {
|
||||
if(Sloc > S)
|
||||
usens += 2;
|
||||
else
|
||||
usens -= 2;
|
||||
}
|
||||
if(1.6*M_PI > Abs(Sloc - S) && Abs(Sloc - S) > 0.4*M_PI) {
|
||||
vparit = !vparit;
|
||||
if(Sloc > S)
|
||||
@ -846,16 +853,18 @@ Handle(Adaptor2d_HCurve2d)
|
||||
for ( i = 2 ; i <= NbOfPnts ; i++) {
|
||||
Sloc = S; Tloc = T;
|
||||
ElSLib::Parameters( Torus, Pts(i), S, T);
|
||||
if(Abs(Sloc - S) > M_PI)
|
||||
if(Abs(Sloc - S) > M_PI) {
|
||||
if(Sloc > S)
|
||||
usens++;
|
||||
else
|
||||
usens--;
|
||||
if(Abs(Tloc - T) > M_PI)
|
||||
}
|
||||
if(Abs(Tloc - T) > M_PI) {
|
||||
if(Tloc > T)
|
||||
vsens++;
|
||||
else
|
||||
vsens--;
|
||||
}
|
||||
Pts2d(i).SetCoord(S+usens*2*M_PI,T+vsens*2*M_PI);
|
||||
}
|
||||
myProjIsDone = Standard_True;
|
||||
@ -1159,7 +1168,7 @@ Handle(Adaptor2d_HCurve2d)
|
||||
if (Dist2Min < DistTol3d * DistTol3d) {
|
||||
//if (Dist2Min < Tol3d * Tol3d) {
|
||||
(ext.Point(GoodValue)).Parameter(u,v);
|
||||
if(uperiod)
|
||||
if(uperiod) {
|
||||
if((U0 - u) > (2*uperiod/3)) {
|
||||
usens++;
|
||||
}
|
||||
@ -1167,7 +1176,8 @@ Handle(Adaptor2d_HCurve2d)
|
||||
if((u - U0) > (2*uperiod/3)) {
|
||||
usens--;
|
||||
}
|
||||
if(vperiod)
|
||||
}
|
||||
if(vperiod) {
|
||||
if((V0 - v) > (vperiod/2)) {
|
||||
vsens++;
|
||||
}
|
||||
@ -1175,6 +1185,7 @@ Handle(Adaptor2d_HCurve2d)
|
||||
if((v - V0) > (vperiod/2)) {
|
||||
vsens--;
|
||||
}
|
||||
}
|
||||
U0 = u; V0 = v;
|
||||
U1 = U0 + usens*uperiod;
|
||||
V1 = V0 + vsens*vperiod;
|
||||
|
@ -309,33 +309,33 @@ void QANewBRepNaming_Gluing::RecomputeUnique(QANewModTopOpe_Glue& theMkGluing) {
|
||||
if (aNext == 0) anEdgesIterator.Initialize(theMkGluing.Generated(aFullEdge));
|
||||
else anEdgesIterator.Initialize(theMkGluing.Modified(aFullEdge));
|
||||
for (;anEdgesIterator.More();anEdgesIterator.Next())
|
||||
if (anEdgesIterator.Value().ShapeType() == TopAbs_EDGE) {
|
||||
TopoDS_Edge aDivEdge = TopoDS::Edge(anEdgesIterator.Value());
|
||||
if (!TopExp::FirstVertex(aDivEdge).IsNull()) { // divided edge must have at least one vertex
|
||||
if (TopExp::FirstVertex(aFullEdge).IsNull()) AddToTheUnique(aDivEdge,aFullEdge);
|
||||
else if (!TopExp::LastVertex(aDivEdge).IsNull())//if full edge have at least one vertex, subedges must have two
|
||||
if (TopExp::LastVertex(aFullEdge).IsNull()) {
|
||||
if (BRep_Tool::Pnt(TopExp::FirstVertex(aFullEdge)).
|
||||
IsEqual(BRep_Tool::Pnt(TopExp::FirstVertex(aDivEdge)),Precision::Confusion()))
|
||||
AddToTheUnique(aDivEdge,aFullEdge);
|
||||
else if (BRep_Tool::Pnt(TopExp::FirstVertex(aFullEdge)).
|
||||
IsEqual(BRep_Tool::Pnt(TopExp::LastVertex(aDivEdge)),Precision::Confusion()))
|
||||
AddToTheUnique(aDivEdge,aFullEdge);
|
||||
} else {
|
||||
Standard_Integer aCounter = 0;
|
||||
if (BRep_Tool::Pnt(TopExp::FirstVertex(aFullEdge)).
|
||||
IsEqual(BRep_Tool::Pnt(TopExp::FirstVertex(aDivEdge)),Precision::Confusion()) ||
|
||||
BRep_Tool::Pnt(TopExp::FirstVertex(aFullEdge)).
|
||||
IsEqual(BRep_Tool::Pnt(TopExp::LastVertex(aDivEdge)),Precision::Confusion())) aCounter++;
|
||||
if (BRep_Tool::Pnt(TopExp::LastVertex(aFullEdge)).
|
||||
IsEqual(BRep_Tool::Pnt(TopExp::FirstVertex(aDivEdge)),Precision::Confusion()) ||
|
||||
BRep_Tool::Pnt(TopExp::LastVertex(aFullEdge)).
|
||||
IsEqual(BRep_Tool::Pnt(TopExp::LastVertex(aDivEdge)),Precision::Confusion())) aCounter++;
|
||||
if (aCounter!=2) AddToTheUnique(aDivEdge,aFullEdge);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (anEdgesIterator.Value().ShapeType() == TopAbs_EDGE) {
|
||||
TopoDS_Edge aDivEdge = TopoDS::Edge(anEdgesIterator.Value());
|
||||
if (!TopExp::FirstVertex(aDivEdge).IsNull()) { // divided edge must have at least one vertex
|
||||
if (TopExp::FirstVertex(aFullEdge).IsNull()) AddToTheUnique(aDivEdge,aFullEdge);
|
||||
else if (!TopExp::LastVertex(aDivEdge).IsNull()) {//if full edge have at least one vertex, subedges must have two
|
||||
if (TopExp::LastVertex(aFullEdge).IsNull()) {
|
||||
if (BRep_Tool::Pnt(TopExp::FirstVertex(aFullEdge)).
|
||||
IsEqual(BRep_Tool::Pnt(TopExp::FirstVertex(aDivEdge)),Precision::Confusion()))
|
||||
AddToTheUnique(aDivEdge,aFullEdge);
|
||||
else if (BRep_Tool::Pnt(TopExp::FirstVertex(aFullEdge)).
|
||||
IsEqual(BRep_Tool::Pnt(TopExp::LastVertex(aDivEdge)),Precision::Confusion()))
|
||||
AddToTheUnique(aDivEdge,aFullEdge);
|
||||
} else {
|
||||
Standard_Integer aCounter = 0;
|
||||
if (BRep_Tool::Pnt(TopExp::FirstVertex(aFullEdge)).
|
||||
IsEqual(BRep_Tool::Pnt(TopExp::FirstVertex(aDivEdge)),Precision::Confusion()) ||
|
||||
BRep_Tool::Pnt(TopExp::FirstVertex(aFullEdge)).
|
||||
IsEqual(BRep_Tool::Pnt(TopExp::LastVertex(aDivEdge)),Precision::Confusion())) aCounter++;
|
||||
if (BRep_Tool::Pnt(TopExp::LastVertex(aFullEdge)).
|
||||
IsEqual(BRep_Tool::Pnt(TopExp::FirstVertex(aDivEdge)),Precision::Confusion()) ||
|
||||
BRep_Tool::Pnt(TopExp::LastVertex(aFullEdge)).
|
||||
IsEqual(BRep_Tool::Pnt(TopExp::LastVertex(aDivEdge)),Precision::Confusion())) aCounter++;
|
||||
if (aCounter!=2) AddToTheUnique(aDivEdge,aFullEdge);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
aNext = 2;
|
||||
|
@ -98,8 +98,8 @@ QANewModTopOpe_Glue::QANewModTopOpe_Glue(const TopoDS_Shape& theS1,
|
||||
const Standard_Boolean theAllowCutting,
|
||||
const Standard_Boolean thePerformNow)
|
||||
: BRepAlgoAPI_BooleanOperation (theS1,theS2, BOPAlgo_FUSE),
|
||||
myAllowCutting (theAllowCutting),
|
||||
myCompleted (Standard_False)
|
||||
myCompleted (Standard_False),
|
||||
myAllowCutting (theAllowCutting)
|
||||
{
|
||||
NotDone();
|
||||
myGenerated.Clear();
|
||||
|
@ -57,8 +57,8 @@ QANewModTopOpe_Limitation::QANewModTopOpe_Limitation(const TopoDS_Shape& theObje
|
||||
myObjectToCut(theObjectToCut),
|
||||
myFwdIsDone(Standard_False),
|
||||
myRevIsDone(Standard_False),
|
||||
myMode(theMode),
|
||||
myCut(NULL),
|
||||
myMode(theMode),
|
||||
myCommon(NULL)
|
||||
{
|
||||
|
||||
|
@ -222,9 +222,10 @@ static Standard_Integer GetLine(OSD_File& aFile,TCollection_AsciiString& aLine)
|
||||
do {
|
||||
aFile.ReadLine(Buffer,BufSize,Len);
|
||||
aLine += Buffer;
|
||||
if (aFile.IsAtEnd())
|
||||
if (aFile.IsAtEnd()) {
|
||||
if (!aLine.Length()) return 0;
|
||||
else aLine += "\n";
|
||||
}
|
||||
} while (aLine.Value(aLine.Length()) != '\n');
|
||||
|
||||
return 1;
|
||||
|
@ -1339,12 +1339,13 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferCompound (const Handle(T
|
||||
while ( !bnd.IsNull() ) {
|
||||
Handle(Transfer_SimpleBinderOfTransient) bx =
|
||||
Handle(Transfer_SimpleBinderOfTransient)::DownCast(bnd);
|
||||
if ( !bx.IsNull() )
|
||||
if ( !bx.IsNull() ) {
|
||||
// Single SDR is created for a non-manifold group (ssv: 12.11.2010)
|
||||
if (!isManifold && i > 1)
|
||||
break;
|
||||
else
|
||||
binder->AddResult( TransientResult( bx->Result() ) );
|
||||
}
|
||||
bnd = bnd->NextResult();
|
||||
}
|
||||
}
|
||||
|
@ -264,10 +264,11 @@ static Standard_Integer stwire (Draw_Interpretor& di, Standard_Integer argc, con
|
||||
if (BRep_Tool::Degenerated(E)) di<<" DGNR";
|
||||
if (sbwd->IsSeam(i)) di<<" SEAM_WIRE";
|
||||
if (Shape.ShapeType() == TopAbs_FACE &&
|
||||
sae.IsSeam(E,TopoDS::Face(Shape))) di<<" SEAM_FACE";
|
||||
if (Shape.ShapeType() == TopAbs_FACE )
|
||||
if (sae.HasPCurve(E,TopoDS::Face(Shape))) di<<" PCU";
|
||||
else di<<" NO_PCU";
|
||||
sae.IsSeam(E,TopoDS::Face(Shape))) di<<" SEAM_FACE";
|
||||
if (Shape.ShapeType() == TopAbs_FACE ) {
|
||||
if (sae.HasPCurve(E,TopoDS::Face(Shape))) di<<" PCU";
|
||||
else di<<" NO_PCU";
|
||||
}
|
||||
if (sae.HasCurve3d(E)) di<<" C3D";
|
||||
else di<<" NO_C3D";
|
||||
if (sae.IsClosed3d(E)) di<<" CLOSED";
|
||||
|
@ -1150,21 +1150,25 @@ static Standard_Integer splitface
|
||||
Standard_Real Umin, Umax, Vmin, Vmax;
|
||||
S->Bounds ( Umin, Umax, Vmin, Vmax );
|
||||
if ( Uf < Umin && ! S->IsUPeriodic() ) Uf = Umin;
|
||||
else if ( Uf > Umin )
|
||||
else if ( Uf > Umin ) {
|
||||
if ( Precision::IsInfinite(Umin) ) Uf -= 100;
|
||||
else Uf = Umin;
|
||||
}
|
||||
if ( Vf < Vmin && ! S->IsVPeriodic() ) Vf = Vmin;
|
||||
else if ( Vf > Vmin )
|
||||
else if ( Vf > Vmin ) {
|
||||
if ( Precision::IsInfinite(Vmin) ) Vf -= 100;
|
||||
else Vf = Vmin;
|
||||
}
|
||||
if ( Ul > Umax && ! S->IsUPeriodic() ) Ul = Umax;
|
||||
else if ( Ul < Umax )
|
||||
else if ( Ul < Umax ) {
|
||||
if ( Precision::IsInfinite(Umax) ) Ul += 100;
|
||||
else Ul = Umax;
|
||||
}
|
||||
if ( Vl > Vmax && ! S->IsVPeriodic() ) Vl = Vmax;
|
||||
else if ( Vl < Vmax )
|
||||
else if ( Vl < Vmax ) {
|
||||
if ( Precision::IsInfinite(Vmax) ) Vl += 100;
|
||||
else Vl = Vmax;
|
||||
}
|
||||
|
||||
TColStd_SequenceOfReal uval;
|
||||
TColStd_SequenceOfReal vval;
|
||||
|
@ -87,11 +87,12 @@ void SelectMgr_EntityOwner::HilightWithColor(const Handle(PrsMgr_PresentationMan
|
||||
const Quantity_NameOfColor aColor,
|
||||
const Standard_Integer aMode)
|
||||
{
|
||||
if( HasSelectable() )
|
||||
if( HasSelectable() ) {
|
||||
if( IsAutoHilight() )
|
||||
PM->Color(mySelectable,aColor,aMode);
|
||||
else
|
||||
mySelectable->HilightOwnerWithColor( PM, aColor, this );
|
||||
}
|
||||
}
|
||||
|
||||
void SelectMgr_EntityOwner::Unhilight(const Handle(PrsMgr_PresentationManager)& PM,
|
||||
|
@ -182,7 +182,7 @@ void SelectMgr_SelectableObject::ResetLocation()
|
||||
for(Sel->Init();Sel->More();Sel->Next()){
|
||||
SE = *((Handle(Select3D_SensitiveEntity)*) &(Sel->Sensitive()));
|
||||
if(!SE.IsNull()){
|
||||
if(SE->HasLocation())
|
||||
if(SE->HasLocation()) {
|
||||
if( SE->Location()==myLocation){
|
||||
SE->ResetLocation();
|
||||
const Handle(SelectBasics_EntityOwner)& EO = SE->OwnerId();
|
||||
@ -192,7 +192,7 @@ void SelectMgr_SelectableObject::ResetLocation()
|
||||
SE->SetLocation(iniloc*myLocation.Inverted());
|
||||
const Handle(SelectBasics_EntityOwner)& EO = SE->OwnerId();
|
||||
(*((Handle(SelectMgr_EntityOwner)*)&EO))->SetLocation(SE->Location());}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Sel->UpdateStatus(SelectMgr_TOU_None);
|
||||
|
@ -100,7 +100,6 @@ class ShapeAnalysis_BoxBndTreeSelector
|
||||
Bnd_Box myLBox;
|
||||
Handle (TopTools_HArray1OfShape) mySeq;
|
||||
Standard_Boolean myShared;
|
||||
Standard_Integer myStatus;
|
||||
Standard_Integer myNb;
|
||||
TopoDS_Vertex myFVertex;
|
||||
TopoDS_Vertex myLVertex;
|
||||
@ -110,6 +109,8 @@ class ShapeAnalysis_BoxBndTreeSelector
|
||||
Standard_Real myTol;
|
||||
Standard_Real myMin3d;
|
||||
TColStd_Array1OfInteger myArrIndices;
|
||||
Standard_Integer myStatus;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -374,12 +374,13 @@ static Standard_Boolean MinMaxSmall
|
||||
else return Standard_False;
|
||||
}
|
||||
// Now, check these two edge to define a strip !
|
||||
if (!E1.IsNull()&&!E2.IsNull())
|
||||
if (!E1.IsNull()&&!E2.IsNull()) {
|
||||
if(!CheckStripEdges (E1,E2,tol,dmax)) return Standard_False;
|
||||
else {
|
||||
myStatusStrip = ShapeExtend::EncodeStatus (ShapeExtend_DONE3);
|
||||
return Standard_True ;
|
||||
}
|
||||
else {
|
||||
myStatusStrip = ShapeExtend::EncodeStatus (ShapeExtend_DONE3);
|
||||
return Standard_True ;
|
||||
}
|
||||
}
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
|
@ -147,12 +147,13 @@ Handle(TColStd_HSequenceOfReal) ShapeAnalysis_TransferParametersProj::Perform
|
||||
}
|
||||
|
||||
//pdn correcting on periodic
|
||||
if(myCurve->IsClosed())
|
||||
if(myCurve->IsClosed()) {
|
||||
for(j = len; j >=1; j--)
|
||||
if(resKnots->Value(j) < maxPar)
|
||||
resKnots->SetValue(j,(To2d ? myAC3d.LastParameter() : myCurve->LastParameter())-(len-j)*preci);
|
||||
resKnots->SetValue(j,(To2d ? myAC3d.LastParameter() : myCurve->LastParameter())-(len-j)*preci);
|
||||
else
|
||||
break;
|
||||
break;
|
||||
}
|
||||
//pdn correction on range
|
||||
for ( j=1; j <= len; j++ ) {
|
||||
if ( resKnots->Value (j) < first ) resKnots->SetValue ( j, first );
|
||||
|
@ -60,7 +60,7 @@ Standard_Boolean ShapeCustom_ConvertToBSpline::IsToConvert(const Handle(Geom_Sur
|
||||
Handle(Geom_RectangularTrimmedSurface)::DownCast ( S );
|
||||
SS = RTS->BasisSurface();
|
||||
}
|
||||
if(SS->IsKind(STANDARD_TYPE(Geom_OffsetSurface)))
|
||||
if(SS->IsKind(STANDARD_TYPE(Geom_OffsetSurface))) {
|
||||
if(myOffsetMode)
|
||||
return Standard_True;
|
||||
else {
|
||||
@ -69,6 +69,7 @@ Standard_Boolean ShapeCustom_ConvertToBSpline::IsToConvert(const Handle(Geom_Sur
|
||||
Handle(Geom_Surface) tmp;
|
||||
return IsToConvert(basis,tmp);
|
||||
}
|
||||
}
|
||||
if ( SS->IsKind(STANDARD_TYPE(Geom_SurfaceOfLinearExtrusion)) )
|
||||
return myExtrMode;
|
||||
if ( SS->IsKind(STANDARD_TYPE(Geom_SurfaceOfRevolution)) )
|
||||
|
@ -666,9 +666,10 @@ Standard_Integer ShapeFix_ComposeShell::ComputeCode (const Handle(ShapeExtend_Wi
|
||||
}
|
||||
}
|
||||
if ( j < np ) { i = 0; break; } // not tangency
|
||||
if ( i == endInd )
|
||||
if ( i == endInd ) {
|
||||
if ( special <=0 ) break;
|
||||
else special = -1;
|
||||
}
|
||||
}
|
||||
if ( myClosedMode ) {
|
||||
if ( code != IOR_UNDEF && ! begin ) {
|
||||
|
@ -1399,16 +1399,18 @@ Standard_Boolean ShapeFix_Face::FixMissingSeam()
|
||||
if ( ::Precision::IsInfinite ( SUF ) || ::Precision::IsInfinite ( SUL ) ) {
|
||||
if ( ::Precision::IsInfinite ( SUF ) ) SUF = fU1;
|
||||
if ( ::Precision::IsInfinite ( SUL ) ) SUL = fU2;
|
||||
if(Abs(SUL-SUF) < ::Precision::PConfusion())
|
||||
if(Abs(SUL-SUF) < ::Precision::PConfusion()) {
|
||||
if ( ::Precision::IsInfinite ( SUF ) ) SUF-=1000.;
|
||||
else SUL+=1000.;
|
||||
}
|
||||
}
|
||||
if ( ::Precision::IsInfinite ( SVF ) || ::Precision::IsInfinite ( SVL ) ) {
|
||||
if ( ::Precision::IsInfinite ( SVF ) ) SVF = fV1;
|
||||
if ( ::Precision::IsInfinite ( SVL ) ) SVL = fV2;
|
||||
if(Abs(SVL-SVF) < ::Precision::PConfusion())
|
||||
if(Abs(SVL-SVF) < ::Precision::PConfusion()) {
|
||||
if ( ::Precision::IsInfinite ( SVF ) ) SVF-=1000.;
|
||||
else SVL+=1000.;
|
||||
}
|
||||
}
|
||||
|
||||
URange = Abs ( SUL - SUF );
|
||||
@ -1629,9 +1631,10 @@ Standard_Boolean ShapeFix_Face::FixMissingSeam()
|
||||
vf = pos1.Y();
|
||||
}
|
||||
}
|
||||
if ( skipU && skipV )
|
||||
if ( skipU && skipV ) {
|
||||
if ( i1 <= nb1 ) continue;
|
||||
else break;
|
||||
}
|
||||
// or yet better - if it is end of some edges on both wires
|
||||
for ( Standard_Integer i2 = 1; i1 <= nb1 && i2 <= nb2; i2++ ) {
|
||||
TopoDS_Edge edge2 = wd2->Edge ( i2 );
|
||||
|
@ -1302,9 +1302,10 @@ Standard_Boolean ShapeFix_Wire::FixShifted()
|
||||
SVMid = 0.5*(SVF+SVL);
|
||||
if (uclosed) URange = Abs ( SUL - SUF );
|
||||
else URange = RealLast();
|
||||
if (!IsVCrvClosed)
|
||||
if (!IsVCrvClosed) {
|
||||
if (vclosed) VRange = Abs ( SVL - SVF );
|
||||
else VRange = RealLast();
|
||||
}
|
||||
Standard_Real UTol = 0.2 * URange, VTol = 0.2 * VRange;
|
||||
|
||||
Handle(ShapeExtend_WireData) sbwdOring = WireData();
|
||||
|
@ -414,9 +414,11 @@ void ShapeProcess_ShapeContext::PrintStatistics () const
|
||||
if (valueshape.IsNull()) SN++;
|
||||
else SS++;
|
||||
else if (keyshape.ShapeType() == TopAbs_FACE)
|
||||
{
|
||||
if (valueshape.IsNull()) FN++;
|
||||
else if (valueshape.ShapeType() == TopAbs_SHELL) FS++;
|
||||
else FF++;
|
||||
}
|
||||
}
|
||||
|
||||
// mapping
|
||||
|
@ -110,13 +110,15 @@ void ShapeProcessAPI_ApplySequence::PrintPreparationResult () const
|
||||
Standard_Integer SS = 0, SN = 0, FF = 0, FS = 0, FN = 0;
|
||||
for (TopTools_DataMapIteratorOfDataMapOfShapeShape It (myContext->Map()); It.More(); It.Next()) {
|
||||
TopoDS_Shape keyshape = It.Key(), valueshape = It.Value();
|
||||
if (keyshape.ShapeType() == TopAbs_SHELL)
|
||||
if (keyshape.ShapeType() == TopAbs_SHELL) {
|
||||
if (valueshape.IsNull()) SN++;
|
||||
else SS++;
|
||||
else if (keyshape.ShapeType() == TopAbs_FACE)
|
||||
}
|
||||
else if (keyshape.ShapeType() == TopAbs_FACE) {
|
||||
if (valueshape.IsNull()) FN++;
|
||||
else if (valueshape.ShapeType() == TopAbs_SHELL) FS++;
|
||||
else FF++;
|
||||
}
|
||||
}
|
||||
|
||||
Handle(Message_Messenger) aMessenger = myContext->Messenger();
|
||||
|
@ -1017,16 +1017,18 @@ static void SelectSameShape (TNaming_Node*& myNode,
|
||||
else Valid = pdn->IsValidInTrans(Trans);
|
||||
|
||||
if (Valid)
|
||||
{
|
||||
if (Old) {
|
||||
if( pdn->myOld == RS && pdn->myNew != 0L && pdn->myNew != RS) {
|
||||
break;
|
||||
}
|
||||
if( pdn->myOld == RS && pdn->myNew != 0L && pdn->myNew != RS) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if( pdn->myNew == RS && pdn->myOld != 0L && pdn->myOld != RS) {
|
||||
break;
|
||||
}
|
||||
if( pdn->myNew == RS && pdn->myOld != 0L && pdn->myOld != RS) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
pdn = pdn->NextSameShape(RS);
|
||||
}
|
||||
myNode = pdn;
|
||||
|
@ -37,9 +37,8 @@
|
||||
TopClass_Classifier2d::TopClass_Classifier2d() :
|
||||
myIsSet(Standard_False),
|
||||
myFirstCompare(Standard_True),
|
||||
myIsHeadOrEnd(Standard_False), // skv OCC12627
|
||||
myState(TopAbs_UNKNOWN) // skv OCC12627
|
||||
|
||||
myState(TopAbs_UNKNOWN), // skv OCC12627
|
||||
myIsHeadOrEnd(Standard_False) // skv OCC12627
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -451,9 +451,10 @@ TopAbs_State TopTrans_SurfaceTransition::StateBefore() const
|
||||
// we take the state before of after orientations
|
||||
before = ::FUN_getstate(myAng,myOri,AFTER,BEFORE);
|
||||
// eap Mar 25 2002
|
||||
if (myTouchFlag)
|
||||
if (myTouchFlag) {
|
||||
if (before == TopAbs_OUT) before = TopAbs_IN;
|
||||
else if (before == TopAbs_IN) before = TopAbs_OUT;
|
||||
}
|
||||
}
|
||||
return before;
|
||||
}
|
||||
@ -467,9 +468,10 @@ TopAbs_State TopTrans_SurfaceTransition::StateAfter() const
|
||||
// looking back in before for defined states
|
||||
after = ::FUN_getstate(myAng,myOri,BEFORE,AFTER);
|
||||
// eap Mar 25 2002
|
||||
if (myTouchFlag)
|
||||
if (myTouchFlag) {
|
||||
if (after == TopAbs_OUT) after = TopAbs_IN;
|
||||
else if (after == TopAbs_IN) after = TopAbs_OUT;
|
||||
}
|
||||
}
|
||||
return after;
|
||||
}
|
||||
|
@ -1642,6 +1642,8 @@ fields
|
||||
--MyColorScale : ColorScale from V3d;
|
||||
MyLayerMgr : LayerMgr from V3d;
|
||||
|
||||
MyProjModel : TypeOfProjectionModel from V3d is protected;
|
||||
|
||||
-- the transformation between XoY and the grid plane
|
||||
MyTrsf : Array2OfReal from TColStd;
|
||||
|
||||
@ -1649,10 +1651,8 @@ fields
|
||||
MyGridEchoStructure : Structure from Graphic3d;
|
||||
MyGridEchoGroup : Group from Graphic3d;
|
||||
|
||||
MyProjModel : TypeOfProjectionModel from V3d is protected;
|
||||
|
||||
MyTransparencyFlag : Boolean from Standard;
|
||||
myImmediateUpdate: Boolean from Standard is protected;
|
||||
MyTransparencyFlag : Boolean from Standard;
|
||||
myImmediateUpdate: Boolean from Standard is protected;
|
||||
friends
|
||||
|
||||
SetViewOn from class Viewer from V3d ( me : mutable ),
|
||||
|
@ -439,13 +439,14 @@ Handle(AIS_Shape) GetAISShapeFromName(const char* name)
|
||||
const Handle(AIS_InteractiveObject) IO =
|
||||
Handle(AIS_InteractiveObject)::DownCast(GetMapOfAIS().Find2(name));
|
||||
if (!IO.IsNull()) {
|
||||
if(IO->Type()==AIS_KOI_Shape)
|
||||
if(IO->Type()==AIS_KOI_Shape) {
|
||||
if(IO->Signature()==0){
|
||||
retsh = *((Handle(AIS_Shape)*)&IO);
|
||||
}
|
||||
else
|
||||
cout << "an Object which is not an AIS_Shape "
|
||||
"already has this name!!!"<<endl;
|
||||
}
|
||||
}
|
||||
return retsh;
|
||||
}
|
||||
@ -1009,12 +1010,12 @@ static int VSubInt(Draw_Interpretor& di, Standard_Integer argc, const char** arg
|
||||
TCollection_AsciiString name = argv[2];
|
||||
if(GetMapOfAIS().IsBound2(name)){
|
||||
IO = Handle(AIS_InteractiveObject)::DownCast(GetMapOfAIS().Find2(name));
|
||||
if (!IO.IsNull())
|
||||
if (!IO.IsNull()) {
|
||||
if(On==1)
|
||||
Ctx->SubIntensityOn(IO);
|
||||
else
|
||||
Ctx->SubIntensityOff(IO);
|
||||
|
||||
}
|
||||
}
|
||||
else return 1;
|
||||
}
|
||||
@ -1121,11 +1122,12 @@ static int VColor2 (Draw_Interpretor& di, Standard_Integer argc, const char** ar
|
||||
while ( it.More() ) {
|
||||
const Handle(AIS_InteractiveObject) ashape =
|
||||
Handle(AIS_InteractiveObject)::DownCast(it.Key1());
|
||||
if (!ashape.IsNull())
|
||||
if (!ashape.IsNull()) {
|
||||
if(HaveToSet)
|
||||
TheAISContext()->SetColor(ashape,ViewerTest::GetColorFromName(argv[1]),Standard_False);
|
||||
else
|
||||
TheAISContext()->UnsetColor(ashape,Standard_False);
|
||||
}
|
||||
it.Next();
|
||||
}
|
||||
TheAISContext()->UpdateCurrentViewer();
|
||||
@ -1218,11 +1220,12 @@ static int VTransparency (Draw_Interpretor& di, Standard_Integer argc,
|
||||
while ( it.More() ) {
|
||||
Handle(AIS_InteractiveObject) ashape =
|
||||
Handle(AIS_InteractiveObject)::DownCast(it.Key1());
|
||||
if (!ashape.IsNull())
|
||||
if (!ashape.IsNull()) {
|
||||
if(HaveToSet)
|
||||
TheAISContext()->SetTransparency(ashape,Draw::Atof(argv[1]),Standard_False);
|
||||
else
|
||||
TheAISContext()->UnsetTransparency(ashape,Standard_False);
|
||||
}
|
||||
it.Next();
|
||||
}
|
||||
TheAISContext()->UpdateCurrentViewer();
|
||||
@ -1274,11 +1277,12 @@ static int VMaterial (Draw_Interpretor& di, Standard_Integer argc, const char**
|
||||
if ( ThereIsName && IsBound ) {
|
||||
Handle(AIS_InteractiveObject) ashape =
|
||||
Handle(AIS_InteractiveObject)::DownCast (GetMapOfAIS().Find2(name));
|
||||
if (!ashape.IsNull())
|
||||
if (!ashape.IsNull()) {
|
||||
if (HaveToSet)
|
||||
TheAISContext()->SetMaterial(ashape,GetMaterialFromName(argv[2]));
|
||||
else
|
||||
TheAISContext()->UnsetMaterial(ashape);
|
||||
}
|
||||
}
|
||||
//=======================================================================
|
||||
// Il n'y a pas de nom de shape
|
||||
@ -1308,11 +1312,12 @@ static int VMaterial (Draw_Interpretor& di, Standard_Integer argc, const char**
|
||||
while ( it.More() ) {
|
||||
Handle(AIS_InteractiveObject) ashape =
|
||||
Handle(AIS_InteractiveObject)::DownCast (it.Key1());
|
||||
if (!ashape.IsNull())
|
||||
if (!ashape.IsNull()) {
|
||||
if (HaveToSet)
|
||||
TheAISContext()->SetMaterial(ashape,GetMaterialFromName(argv[1]),Standard_False);
|
||||
else
|
||||
TheAISContext()->UnsetMaterial(ashape,Standard_False);
|
||||
}
|
||||
it.Next();
|
||||
}
|
||||
TheAISContext()->UpdateCurrentViewer();
|
||||
@ -1399,15 +1404,16 @@ static int VWidth (Draw_Interpretor& di, Standard_Integer argc, const char** arg
|
||||
else if (!ThereIsCurrent && !ThereIsArgument){
|
||||
ViewerTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName
|
||||
it(GetMapOfAIS());
|
||||
while ( it.More() ) {
|
||||
Handle(AIS_InteractiveObject) ashape =
|
||||
Handle(AIS_InteractiveObject)::DownCast (it.Key1());
|
||||
if (!ashape.IsNull())
|
||||
if (HaveToSet)
|
||||
TheAISContext()->SetWidth(ashape,Draw::Atof(argv[1]),Standard_False);
|
||||
else
|
||||
TheAISContext()->UnsetWidth(ashape,Standard_False);
|
||||
it.Next();
|
||||
while ( it.More() ) {
|
||||
Handle(AIS_InteractiveObject) ashape =
|
||||
Handle(AIS_InteractiveObject)::DownCast (it.Key1());
|
||||
if (!ashape.IsNull()) {
|
||||
if (HaveToSet)
|
||||
TheAISContext()->SetWidth(ashape,Draw::Atof(argv[1]),Standard_False);
|
||||
else
|
||||
TheAISContext()->UnsetWidth(ashape,Standard_False);
|
||||
}
|
||||
it.Next();
|
||||
}
|
||||
TheAISContext()->UpdateCurrentViewer();
|
||||
}
|
||||
|
@ -32,8 +32,8 @@
|
||||
ViewerTest_EventManager::ViewerTest_EventManager
|
||||
(const Handle(V3d_View)& aView,
|
||||
const Handle(AIS_InteractiveContext)& Ctx)
|
||||
: myView (aView),
|
||||
myCtx (Ctx),
|
||||
: myCtx (Ctx),
|
||||
myView (aView),
|
||||
myX (-1),
|
||||
myY (-1)
|
||||
{}
|
||||
|
@ -3319,14 +3319,13 @@ private:
|
||||
|
||||
Standard_Real myX1;
|
||||
Standard_Real myY1;
|
||||
Standard_Real myHeight;
|
||||
TCollection_AsciiString myText;
|
||||
TCollection_AsciiString myFontName;
|
||||
Standard_Real myHeight;
|
||||
Handle(Visual3d_Layer) myLayer;
|
||||
Quantity_Color myColor;
|
||||
Quantity_Color mySubtitleColor;
|
||||
Aspect_TypeOfDisplayText myType;
|
||||
Handle(Visual3d_Layer) myLayer;
|
||||
|
||||
TCollection_AsciiString myFontName;
|
||||
};
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE(V3d_TextItem, Visual3d_LayerItem)
|
||||
@ -3391,10 +3390,10 @@ public:
|
||||
private:
|
||||
|
||||
Standard_Real myX1, myY1, myX2, myY2;
|
||||
V3d_LayerMgrPointer myLayerMgr;
|
||||
Aspect_TypeOfLine myType;
|
||||
Standard_Real myWidth;
|
||||
Standard_Real myTransparency;
|
||||
Aspect_TypeOfLine myType;
|
||||
V3d_LayerMgrPointer myLayerMgr;
|
||||
};
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE(V3d_LineItem, Visual3d_LayerItem)
|
||||
|
@ -51,7 +51,7 @@ Voxel_FastConverter::Voxel_FastConverter(const TopoDS_Shape& shape,
|
||||
:myShape(shape),myVoxels(&voxels),
|
||||
myDeflection(deflection),
|
||||
myNbX(nbx),myNbY(nby),myNbZ(nbz),
|
||||
myNbThreads(nbthreads),myIsBool(2),
|
||||
myIsBool(2),myNbThreads(nbthreads),
|
||||
myNbTriangles(0),
|
||||
myUseExistingTriangulation(useExistingTriangulation)
|
||||
{
|
||||
@ -69,7 +69,7 @@ Voxel_FastConverter::Voxel_FastConverter(const TopoDS_Shape& shape,
|
||||
:myShape(shape),myVoxels(&voxels),
|
||||
myDeflection(deflection),
|
||||
myNbX(nbx),myNbY(nby),myNbZ(nbz),
|
||||
myNbThreads(nbthreads),myIsBool(1),
|
||||
myIsBool(1),myNbThreads(nbthreads),
|
||||
myNbTriangles(0),
|
||||
myUseExistingTriangulation(useExistingTriangulation)
|
||||
{
|
||||
@ -87,7 +87,7 @@ Voxel_FastConverter::Voxel_FastConverter(const TopoDS_Shape& shape,
|
||||
:myShape(shape),myVoxels(&voxels),
|
||||
myDeflection(deflection),
|
||||
myNbX(nbx),myNbY(nby),myNbZ(nbz),
|
||||
myNbThreads(nbthreads),myIsBool(0),
|
||||
myIsBool(0),myNbThreads(nbthreads),
|
||||
myNbTriangles(0),
|
||||
myUseExistingTriangulation(useExistingTriangulation)
|
||||
{
|
||||
|
@ -563,7 +563,7 @@ VrmlData_ErrorStatus VrmlData_TextureCoordinate::Read
|
||||
// Match the name with the current word in the stream
|
||||
if (VRMLDATA_LCOMPARE (theBuffer.LinePtr, "point"))
|
||||
// Read the body of the data node (comma-separated list of duplets)
|
||||
if (OK(aStatus, VrmlData_Scene::ReadLine(theBuffer)))
|
||||
if (OK(aStatus, VrmlData_Scene::ReadLine(theBuffer))) {
|
||||
if (theBuffer.LinePtr[0] != '[') // opening bracket
|
||||
aStatus = VrmlData_VrmlFormatError;
|
||||
else {
|
||||
@ -591,6 +591,7 @@ VrmlData_ErrorStatus VrmlData_TextureCoordinate::Read
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (OK(aStatus) && OK(aStatus, readBrace (theBuffer))) {
|
||||
myLength = vecValues.Length();
|
||||
if (myLength > 0) {
|
||||
@ -652,7 +653,7 @@ VrmlData_ErrorStatus VrmlData_ArrayVec3d::ReadArray
|
||||
theBuffer.LinePtr++;
|
||||
}
|
||||
// Read the body of the data node (list of triplets)
|
||||
if (OK(aStatus) && OK(aStatus, VrmlData_Scene::ReadLine(theBuffer)))
|
||||
if (OK(aStatus) && OK(aStatus, VrmlData_Scene::ReadLine(theBuffer))) {
|
||||
if (theBuffer.LinePtr[0] != '[') // opening bracket
|
||||
aStatus = VrmlData_VrmlFormatError;
|
||||
else {
|
||||
@ -679,6 +680,7 @@ VrmlData_ErrorStatus VrmlData_ArrayVec3d::ReadArray
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (OK(aStatus) && OK(aStatus, readBrace (theBuffer))) {
|
||||
myLength = vecValues.Length();
|
||||
if (myLength > 0) {
|
||||
|
@ -66,11 +66,12 @@ VrmlData_ErrorStatus VrmlData_Faceted::readData (VrmlData_InBuffer& theBuffer)
|
||||
} else if (VRMLDATA_LCOMPARE (theBuffer.LinePtr, "creaseAngle")) {
|
||||
Standard_Real anAngle;
|
||||
if (OK(aStatus, Scene().ReadReal (theBuffer, anAngle,
|
||||
Standard_False, Standard_False)))
|
||||
Standard_False, Standard_False))) {
|
||||
if (anAngle < -Precision::Confusion()*0.001)
|
||||
aStatus = VrmlData_IrrelevantNumber;
|
||||
else
|
||||
myCreaseAngle = anAngle;
|
||||
}
|
||||
}
|
||||
return aStatus;
|
||||
}
|
||||
|
@ -181,11 +181,12 @@ VrmlData_ErrorStatus VrmlData_Node::WriteClosing () const
|
||||
VrmlData_ErrorStatus VrmlData_Node::readBrace (VrmlData_InBuffer& theBuffer)
|
||||
{
|
||||
VrmlData_ErrorStatus aStatus;
|
||||
if (OK(aStatus, VrmlData_Scene::ReadLine(theBuffer)))
|
||||
if (OK(aStatus, VrmlData_Scene::ReadLine(theBuffer))) {
|
||||
if (theBuffer.LinePtr[0] == '}')
|
||||
theBuffer.LinePtr++;
|
||||
else
|
||||
aStatus = VrmlData_VrmlFormatError;
|
||||
}
|
||||
return aStatus;
|
||||
}
|
||||
|
||||
|
@ -208,13 +208,17 @@ VrmlData_ErrorStatus VrmlData_Scene::readLine (VrmlData_InBuffer& theBuffer)
|
||||
theBuffer.Input.getline (theBuffer.Line, sizeof(theBuffer.Line));
|
||||
theBuffer.LineCount++;
|
||||
const int stat = theBuffer.Input.rdstate();
|
||||
if (stat & ios::badbit)
|
||||
if (stat & ios::badbit) {
|
||||
aStatus = VrmlData_UnrecoverableError;
|
||||
else if (stat & ios::failbit)
|
||||
if (stat & ios::eofbit)
|
||||
}
|
||||
else if (stat & ios::failbit) {
|
||||
if (stat & ios::eofbit) {
|
||||
aStatus = VrmlData_EndOfFile;
|
||||
else
|
||||
}
|
||||
else {
|
||||
aStatus = VrmlData_GeneralError;
|
||||
}
|
||||
}
|
||||
theBuffer.LinePtr = &theBuffer.Line[0];
|
||||
theBuffer.IsProcessed = Standard_False;
|
||||
}
|
||||
@ -449,7 +453,7 @@ VrmlData_ErrorStatus VrmlData_Scene::createNode
|
||||
TCollection_AsciiString aName;
|
||||
|
||||
// Read the DEF token to assign the node name
|
||||
if (VrmlData_Node::OK(aStatus, ReadLine(theBuffer)))
|
||||
if (VrmlData_Node::OK(aStatus, ReadLine(theBuffer))) {
|
||||
if (VRMLDATA_LCOMPARE(theBuffer.LinePtr, "DEF")) {
|
||||
if (VrmlData_Node::OK(aStatus, ReadWord (theBuffer, aName)))
|
||||
aStatus = ReadLine(theBuffer);
|
||||
@ -457,6 +461,7 @@ VrmlData_ErrorStatus VrmlData_Scene::createNode
|
||||
theNode.Nullify();
|
||||
return aStatus;
|
||||
}
|
||||
}
|
||||
|
||||
const char * strName = aName.ToCString();
|
||||
if (aStatus == VrmlData_StatusOK) {
|
||||
@ -517,7 +522,7 @@ VrmlData_ErrorStatus VrmlData_Scene::createNode
|
||||
aStatus = ReadWord (theBuffer, aTitle);
|
||||
if (isProto) {
|
||||
aStatus = ReadLine(theBuffer);
|
||||
if (aStatus == VrmlData_StatusOK)
|
||||
if (aStatus == VrmlData_StatusOK) {
|
||||
if (theBuffer.LinePtr[0] != '[')
|
||||
aStatus = VrmlData_VrmlFormatError;
|
||||
else {
|
||||
@ -541,6 +546,7 @@ VrmlData_ErrorStatus VrmlData_Scene::createNode
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (aStatus == VrmlData_StatusOK)
|
||||
aNode = new VrmlData_UnknownNode(* this,
|
||||
@ -556,13 +562,15 @@ VrmlData_ErrorStatus VrmlData_Scene::createNode
|
||||
if (aNode->IsKind(theType) == Standard_False)
|
||||
aStatus = VrmlData_VrmlFormatError;
|
||||
}
|
||||
if (aStatus == VrmlData_StatusOK)
|
||||
if (aStatus == VrmlData_StatusOK) {
|
||||
if (theBuffer.LinePtr[0] == '{') {
|
||||
theBuffer.LinePtr++;
|
||||
theNode = aNode;
|
||||
myAllNodes.Append(aNode);
|
||||
} else
|
||||
} else {
|
||||
aStatus = VrmlData_VrmlFormatError;
|
||||
}
|
||||
}
|
||||
return aStatus;
|
||||
}
|
||||
|
||||
@ -718,13 +726,16 @@ VrmlData_ErrorStatus VrmlData_Scene::ReadXYZ
|
||||
theBuffer.LinePtr = endptr;
|
||||
}
|
||||
}
|
||||
if (aStatus == VrmlData_StatusOK)
|
||||
if (isScale)
|
||||
if (aStatus == VrmlData_StatusOK) {
|
||||
if (isScale) {
|
||||
theXYZ.SetCoord (aVal[0] * myLinearScale,
|
||||
aVal[1] * myLinearScale,
|
||||
aVal[2] * myLinearScale);
|
||||
else
|
||||
}
|
||||
else {
|
||||
theXYZ.SetCoord (aVal[0], aVal[1], aVal[2]);
|
||||
}
|
||||
}
|
||||
return aStatus;
|
||||
}
|
||||
|
||||
@ -757,11 +768,12 @@ VrmlData_ErrorStatus VrmlData_Scene::ReadXY
|
||||
theBuffer.LinePtr = endptr;
|
||||
}
|
||||
}
|
||||
if (aStatus == VrmlData_StatusOK)
|
||||
if (aStatus == VrmlData_StatusOK) {
|
||||
if (isScale)
|
||||
theXY.SetCoord (aVal[0] * myLinearScale, aVal[1] * myLinearScale);
|
||||
else
|
||||
theXY.SetCoord (aVal[0], aVal[1]);
|
||||
}
|
||||
return aStatus;
|
||||
}
|
||||
|
||||
@ -778,7 +790,7 @@ VrmlData_ErrorStatus VrmlData_Scene::ReadArrIndex
|
||||
{
|
||||
VrmlData_ErrorStatus aStatus;
|
||||
theNBlocks = 0;
|
||||
if (VrmlData_Node::OK(aStatus, ReadLine(theBuffer)))
|
||||
if (VrmlData_Node::OK(aStatus, ReadLine(theBuffer))) {
|
||||
if (theBuffer.LinePtr[0] != '[') // opening bracket
|
||||
aStatus = VrmlData_VrmlFormatError;
|
||||
else {
|
||||
@ -845,6 +857,7 @@ VrmlData_ErrorStatus VrmlData_Scene::ReadArrIndex
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return aStatus;
|
||||
}
|
||||
|
||||
@ -915,7 +928,7 @@ VrmlData_ErrorStatus VrmlData_Scene::WriteXYZ
|
||||
const char * thePostfix) const
|
||||
{
|
||||
char buf[240];
|
||||
if (IsDummyWrite() == Standard_False)
|
||||
if (IsDummyWrite() == Standard_False) {
|
||||
if (isApplyScale && myLinearScale > Precision::Confusion())
|
||||
Sprintf (buf, "%.12g %.12g %.12g%s", theXYZ.X() / myLinearScale,
|
||||
theXYZ.Y() / myLinearScale, theXYZ.Z() / myLinearScale,
|
||||
@ -923,6 +936,7 @@ VrmlData_ErrorStatus VrmlData_Scene::WriteXYZ
|
||||
else
|
||||
Sprintf (buf, "%.12g %.12g %.12g%s", theXYZ.X(), theXYZ.Y(), theXYZ.Z(),
|
||||
thePostfix ? thePostfix : "");
|
||||
}
|
||||
return WriteLine (buf);
|
||||
}
|
||||
|
||||
|
@ -461,14 +461,16 @@ Standard_Boolean XCAFDoc_ColorTool::SetInstanceColor (const TopoDS_Shape& theSha
|
||||
return Standard_False;
|
||||
Handle(XCAFDoc_GraphNode) aSHUO;
|
||||
// set the SHUO structure for this component if it is not exist
|
||||
if ( !ShapeTool()->FindSHUO( aLabels, aSHUO ) )
|
||||
if ( !ShapeTool()->FindSHUO( aLabels, aSHUO ) ) {
|
||||
if (aLabels.Length() == 1) {
|
||||
// set color directly for component as NAUO
|
||||
SetColor(aLabels.Value(1), color, type);
|
||||
return Standard_True;
|
||||
}
|
||||
else if ( !IsCreateSHUO || !ShapeTool()->SetSHUO( aLabels, aSHUO ) )
|
||||
else if ( !IsCreateSHUO || !ShapeTool()->SetSHUO( aLabels, aSHUO ) ) {
|
||||
return Standard_False;
|
||||
}
|
||||
}
|
||||
TDF_Label aSHUOLabel = aSHUO->Label();
|
||||
SetColor( aSHUOLabel, color, type );
|
||||
return Standard_True;
|
||||
|
@ -614,10 +614,16 @@ static Standard_Integer hidesel
|
||||
Handle( MeshVS_MeshEntityOwner ) anOwner =
|
||||
Handle( MeshVS_MeshEntityOwner )::DownCast( aContext->SelectedOwner() );
|
||||
if( !anOwner.IsNull() )
|
||||
{
|
||||
if( anOwner->Type()==MeshVS_ET_Node )
|
||||
{
|
||||
aHiddenNodes->ChangeMap().Add( anOwner->ID() );
|
||||
}
|
||||
else
|
||||
{
|
||||
aHiddenElements->ChangeMap().Add( anOwner->ID() );
|
||||
}
|
||||
}
|
||||
}
|
||||
aContext->ClearSelected();
|
||||
aMesh->SetHiddenNodes( aHiddenNodes );
|
||||
@ -659,10 +665,16 @@ static Standard_Integer showonly
|
||||
Handle( MeshVS_MeshEntityOwner ) anOwner =
|
||||
Handle( MeshVS_MeshEntityOwner )::DownCast( aContext->SelectedOwner() );
|
||||
if( !anOwner.IsNull() )
|
||||
{
|
||||
if( anOwner->Type()==MeshVS_ET_Node )
|
||||
{
|
||||
aHiddenNodes->ChangeMap().Remove( anOwner->ID() );
|
||||
}
|
||||
else
|
||||
{
|
||||
aHiddenElements->ChangeMap().Remove( anOwner->ID() );
|
||||
}
|
||||
}
|
||||
}
|
||||
aMesh->SetHiddenNodes( aHiddenNodes );
|
||||
aMesh->SetHiddenElems( aHiddenElements );
|
||||
|
Loading…
x
Reference in New Issue
Block a user