mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-18 10:10:35 +05:00
Porting to OCCT development version: Standard_PI -> M_PI
This commit is contained in:
parent
ee7c5d0f83
commit
5acab3d327
@ -18,7 +18,6 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
|
|
||||||
#include "SMESH_ControlsDef.hxx"
|
#include "SMESH_ControlsDef.hxx"
|
||||||
|
|
||||||
@ -693,7 +692,7 @@ double MinimumAngle::GetValue( const TSequenceOfXYZ& P )
|
|||||||
aMin = Min(aMin,A0);
|
aMin = Min(aMin,A0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return aMin * 180.0 / PI;
|
return aMin * 180.0 / M_PI;
|
||||||
}
|
}
|
||||||
|
|
||||||
double MinimumAngle::GetBadRate( double Value, int nbNodes ) const
|
double MinimumAngle::GetBadRate( double Value, int nbNodes ) const
|
||||||
@ -1278,12 +1277,12 @@ double Warping::ComputeA( const gp_XYZ& thePnt1,
|
|||||||
gp_XYZ N = GI.Crossed( GJ );
|
gp_XYZ N = GI.Crossed( GJ );
|
||||||
|
|
||||||
if ( N.Modulus() < gp::Resolution() )
|
if ( N.Modulus() < gp::Resolution() )
|
||||||
return PI / 2;
|
return M_PI / 2;
|
||||||
|
|
||||||
N.Normalize();
|
N.Normalize();
|
||||||
|
|
||||||
double H = ( thePnt2 - theG ).Dot( N );
|
double H = ( thePnt2 - theG ).Dot( N );
|
||||||
return asin( fabs( H / L ) ) * 180. / PI;
|
return asin( fabs( H / L ) ) * 180. / M_PI;
|
||||||
}
|
}
|
||||||
|
|
||||||
double Warping::GetBadRate( double Value, int /*nbNodes*/ ) const
|
double Warping::GetBadRate( double Value, int /*nbNodes*/ ) const
|
||||||
@ -1362,14 +1361,14 @@ double Skew::GetValue( const TSequenceOfXYZ& P )
|
|||||||
return 0.;
|
return 0.;
|
||||||
|
|
||||||
// Compute skew
|
// Compute skew
|
||||||
static double PI2 = PI / 2.;
|
static double PI2 = M_PI / 2.;
|
||||||
if ( P.size() == 3 )
|
if ( P.size() == 3 )
|
||||||
{
|
{
|
||||||
double A0 = fabs( PI2 - skewAngle( P( 3 ), P( 1 ), P( 2 ) ) );
|
double A0 = fabs( PI2 - skewAngle( P( 3 ), P( 1 ), P( 2 ) ) );
|
||||||
double A1 = fabs( PI2 - skewAngle( P( 1 ), P( 2 ), P( 3 ) ) );
|
double A1 = fabs( PI2 - skewAngle( P( 1 ), P( 2 ), P( 3 ) ) );
|
||||||
double A2 = fabs( PI2 - skewAngle( P( 2 ), P( 3 ), P( 1 ) ) );
|
double A2 = fabs( PI2 - skewAngle( P( 2 ), P( 3 ), P( 1 ) ) );
|
||||||
|
|
||||||
return Max( A0, Max( A1, A2 ) ) * 180. / PI;
|
return Max( A0, Max( A1, A2 ) ) * 180. / M_PI;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1386,7 +1385,7 @@ double Skew::GetValue( const TSequenceOfXYZ& P )
|
|||||||
if ( A < Precision::Angular() )
|
if ( A < Precision::Angular() )
|
||||||
return 0.;
|
return 0.;
|
||||||
|
|
||||||
return A * 180. / PI;
|
return A * 180. / M_PI;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2586,7 +2585,7 @@ bool CoplanarFaces::IsSatisfy( long theElementId )
|
|||||||
if (!normOK)
|
if (!normOK)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
const double radianTol = myToler * PI180;
|
const double radianTol = myToler * M_PI / 180.;
|
||||||
typedef SMDS_StdIterator< const SMDS_MeshElement*, SMDS_ElemIteratorPtr > TFaceIt;
|
typedef SMDS_StdIterator< const SMDS_MeshElement*, SMDS_ElemIteratorPtr > TFaceIt;
|
||||||
std::set<const SMDS_MeshElement*> checkedFaces, checkedNodes;
|
std::set<const SMDS_MeshElement*> checkedFaces, checkedNodes;
|
||||||
std::list<const SMDS_MeshElement*> faceQueue( 1, face );
|
std::list<const SMDS_MeshElement*> faceQueue( 1, face );
|
||||||
|
@ -2071,7 +2071,7 @@ double getAngle(const SMDS_MeshElement * tr1,
|
|||||||
const SMDS_MeshNode * n1,
|
const SMDS_MeshNode * n1,
|
||||||
const SMDS_MeshNode * n2)
|
const SMDS_MeshNode * n2)
|
||||||
{
|
{
|
||||||
double angle = 2*PI; // bad angle
|
double angle = 2. * M_PI; // bad angle
|
||||||
|
|
||||||
// get normals
|
// get normals
|
||||||
SMESH::Controls::TSequenceOfXYZ P1, P2;
|
SMESH::Controls::TSequenceOfXYZ P1, P2;
|
||||||
@ -6459,7 +6459,7 @@ void SMESH_ElementSearcherImpl::findOuterBoundary(const SMDS_MeshElement* outerF
|
|||||||
continue;
|
continue;
|
||||||
gp_Vec dirInF = gp_Vec( fNorm ) ^ n1n2;
|
gp_Vec dirInF = gp_Vec( fNorm ) ^ n1n2;
|
||||||
double angle = dirInOF.AngleWithRef( dirInF, n1n2 );
|
double angle = dirInOF.AngleWithRef( dirInF, n1n2 );
|
||||||
if ( angle < 0 ) angle += 2*PI;
|
if ( angle < 0 ) angle += 2. * M_PI;
|
||||||
angle2Face.insert( make_pair( angle, *face ));
|
angle2Face.insert( make_pair( angle, *face ));
|
||||||
}
|
}
|
||||||
if ( !angle2Face.empty() )
|
if ( !angle2Face.empty() )
|
||||||
|
@ -1260,7 +1260,7 @@ static bool checkQuads (const TIsoNode* node,
|
|||||||
maxLen2 = Max( maxLen2, ( n[1]->myUV - n[2]->myUV ).SquareModulus() );
|
maxLen2 = Max( maxLen2, ( n[1]->myUV - n[2]->myUV ).SquareModulus() );
|
||||||
}
|
}
|
||||||
maxLen2 = Max( maxLen2, ( n[2]->myUV - node->myUV ).SquareModulus() );
|
maxLen2 = Max( maxLen2, ( n[2]->myUV - node->myUV ).SquareModulus() );
|
||||||
minDiag = sqrt( maxLen2 ) * PI / 60.; // ~ maxLen * Sin( 3 deg )
|
minDiag = sqrt( maxLen2 ) * M_PI / 60.; // ~ maxLen * Sin( 3 deg )
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if newUV is behind 3 dirs: n[0]-n[1], n[1]-n[2] and n[0]-n[2]
|
// check if newUV is behind 3 dirs: n[0]-n[1], n[1]-n[2] and n[0]-n[2]
|
||||||
@ -1811,7 +1811,7 @@ bool SMESH_Pattern::
|
|||||||
double initAngle = initTgt1.Angle( initTgt2 );
|
double initAngle = initTgt1.Angle( initTgt2 );
|
||||||
double angle = node->myDir[0].Angle( node->myDir[1] );
|
double angle = node->myDir[0].Angle( node->myDir[1] );
|
||||||
if ( reversed ) angle = -angle;
|
if ( reversed ) angle = -angle;
|
||||||
if ( initAngle > angle && initAngle - angle > PI / 2.1 ) {
|
if ( initAngle > angle && initAngle - angle > M_PI / 2.1 ) {
|
||||||
// find a close internal node
|
// find a close internal node
|
||||||
TIsoNode* nClose = 0;
|
TIsoNode* nClose = 0;
|
||||||
list< TIsoNode* > testNodes;
|
list< TIsoNode* > testNodes;
|
||||||
|
@ -18,13 +18,12 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
|
|
||||||
// SMESH SMESHGUI : GUI for SMESH component
|
// SMESH SMESHGUI : GUI for SMESH component
|
||||||
// File : SMESHGUI_ExtrusionAlongPathDlg.cxx
|
// File : SMESHGUI_ExtrusionAlongPathDlg.cxx
|
||||||
// Author : Vadim SANDLER, Open CASCADE S.A.S.
|
// Author : Vadim SANDLER, Open CASCADE S.A.S.
|
||||||
// SMESH includes
|
// SMESH includes
|
||||||
//
|
|
||||||
#include "SMESHGUI_ExtrusionAlongPathDlg.h"
|
#include "SMESHGUI_ExtrusionAlongPathDlg.h"
|
||||||
|
|
||||||
#include "SMESHGUI.h"
|
#include "SMESHGUI.h"
|
||||||
@ -1412,7 +1411,7 @@ SMESH::double_array_var SMESHGUI_ExtrusionAlongPathDlg::getAngles() {
|
|||||||
int j = 0;
|
int j = 0;
|
||||||
for (int i = 0; i < myAnglesList.count(); i++) {
|
for (int i = 0; i < myAnglesList.count(); i++) {
|
||||||
double angle = myAnglesList[i];
|
double angle = myAnglesList[i];
|
||||||
anAngles[ j++ ] = angle*PI/180;
|
anAngles[ j++ ] = angle*M_PI/180.;
|
||||||
}
|
}
|
||||||
anAngles->length(j);
|
anAngles->length(j);
|
||||||
}
|
}
|
||||||
|
@ -18,12 +18,11 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
|
|
||||||
// File : SMESHGUI_MultiEditDlg.cxx
|
// File : SMESHGUI_MultiEditDlg.cxx
|
||||||
// Author : Sergey LITONIN, Open CASCADE S.A.S.
|
// Author : Sergey LITONIN, Open CASCADE S.A.S.
|
||||||
// SMESH includes
|
// SMESH includes
|
||||||
//
|
|
||||||
#include "SMESHGUI_MultiEditDlg.h"
|
#include "SMESHGUI_MultiEditDlg.h"
|
||||||
|
|
||||||
#include "SMESHGUI.h"
|
#include "SMESHGUI.h"
|
||||||
@ -1207,7 +1206,7 @@ bool SMESHGUI_UnionOfTrianglesDlg::process (SMESH::SMESH_MeshEditor_ptr theEdito
|
|||||||
SMESH::SMESH_IDSource_ptr obj)
|
SMESH::SMESH_IDSource_ptr obj)
|
||||||
{
|
{
|
||||||
SMESH::NumericalFunctor_var aCriterion = getNumericalFunctor();
|
SMESH::NumericalFunctor_var aCriterion = getNumericalFunctor();
|
||||||
double aMaxAngle = myMaxAngleSpin->GetValue() * PI / 180.0;
|
double aMaxAngle = myMaxAngleSpin->GetValue() * M_PI / 180.0;
|
||||||
bool ok;
|
bool ok;
|
||||||
if ( CORBA::is_nil( obj ))
|
if ( CORBA::is_nil( obj ))
|
||||||
ok = theEditor->TriToQuad(theIds, aCriterion, aMaxAngle);
|
ok = theEditor->TriToQuad(theIds, aCriterion, aMaxAngle);
|
||||||
|
@ -18,13 +18,12 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
|
|
||||||
// SMESH SMESHGUI : GUI for SMESH component
|
// SMESH SMESHGUI : GUI for SMESH component
|
||||||
// File : SMESHGUI_RevolutionDlg.cxx
|
// File : SMESHGUI_RevolutionDlg.cxx
|
||||||
// Author : Michael ZORIN, Open CASCADE S.A.S.
|
// Author : Michael ZORIN, Open CASCADE S.A.S.
|
||||||
// SMESH includes
|
// SMESH includes
|
||||||
//
|
|
||||||
#include "SMESHGUI_RevolutionDlg.h"
|
#include "SMESHGUI_RevolutionDlg.h"
|
||||||
|
|
||||||
#include "SMESHGUI.h"
|
#include "SMESHGUI.h"
|
||||||
@ -498,7 +497,7 @@ bool SMESHGUI_RevolutionDlg::ClickOnApply()
|
|||||||
anAxis.vy = SpinBox_DY->GetValue();
|
anAxis.vy = SpinBox_DY->GetValue();
|
||||||
anAxis.vz = SpinBox_DZ->GetValue();
|
anAxis.vz = SpinBox_DZ->GetValue();
|
||||||
|
|
||||||
double anAngle = (SpinBox_Angle->GetValue())*PI/180;
|
double anAngle = (SpinBox_Angle->GetValue())*M_PI/180.;
|
||||||
long aNbSteps = (long)SpinBox_NbSteps->value();
|
long aNbSteps = (long)SpinBox_NbSteps->value();
|
||||||
double aTolerance = SpinBox_Tolerance->GetValue();
|
double aTolerance = SpinBox_Tolerance->GetValue();
|
||||||
|
|
||||||
@ -1061,8 +1060,8 @@ void SMESHGUI_RevolutionDlg::onDisplaySimulation(bool toDisplayPreview)
|
|||||||
anAxis.vx = SpinBox_DX->GetValue();
|
anAxis.vx = SpinBox_DX->GetValue();
|
||||||
anAxis.vy = SpinBox_DY->GetValue();
|
anAxis.vy = SpinBox_DY->GetValue();
|
||||||
anAxis.vz = SpinBox_DZ->GetValue();
|
anAxis.vz = SpinBox_DZ->GetValue();
|
||||||
|
|
||||||
double anAngle = (SpinBox_Angle->GetValue())*PI/180;
|
double anAngle = (SpinBox_Angle->GetValue())*M_PI/180.;
|
||||||
long aNbSteps = (long)SpinBox_NbSteps->value();
|
long aNbSteps = (long)SpinBox_NbSteps->value();
|
||||||
double aTolerance = SpinBox_Tolerance->GetValue();
|
double aTolerance = SpinBox_Tolerance->GetValue();
|
||||||
|
|
||||||
|
@ -416,7 +416,7 @@ bool SMESHGUI_RotationDlg::ClickOnApply()
|
|||||||
anAxis.vy = SpinBox_DY->GetValue();
|
anAxis.vy = SpinBox_DY->GetValue();
|
||||||
anAxis.vz = SpinBox_DZ->GetValue();
|
anAxis.vz = SpinBox_DZ->GetValue();
|
||||||
|
|
||||||
double anAngle = (SpinBox_Angle->GetValue())*PI/180;
|
double anAngle = (SpinBox_Angle->GetValue())*M_PI/180.;
|
||||||
|
|
||||||
QStringList aParameters;
|
QStringList aParameters;
|
||||||
aParameters << SpinBox_X->text();
|
aParameters << SpinBox_X->text();
|
||||||
@ -1087,7 +1087,7 @@ void SMESHGUI_RotationDlg::onDisplaySimulation( bool toDisplayPreview ) {
|
|||||||
anAxis.vx = SpinBox_DX->GetValue();
|
anAxis.vx = SpinBox_DX->GetValue();
|
||||||
anAxis.vy = SpinBox_DY->GetValue();
|
anAxis.vy = SpinBox_DY->GetValue();
|
||||||
anAxis.vz = SpinBox_DZ->GetValue();
|
anAxis.vz = SpinBox_DZ->GetValue();
|
||||||
double anAngle = (SpinBox_Angle->GetValue())*PI/180;
|
double anAngle = (SpinBox_Angle->GetValue())*M_PI/180.;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
SUIT_OverrideCursor aWaitCursor;
|
SUIT_OverrideCursor aWaitCursor;
|
||||||
|
@ -18,13 +18,12 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
|
|
||||||
// SMESH SMESH : implementaion of SMESH idl descriptions
|
// SMESH SMESH : implementaion of SMESH idl descriptions
|
||||||
// File : StdMeshers_AutomaticLength.cxx
|
// File : StdMeshers_AutomaticLength.cxx
|
||||||
// Author : Edward AGAPOV, OCC
|
// Author : Edward AGAPOV, OCC
|
||||||
// Module : SMESH
|
// Module : SMESH
|
||||||
//
|
|
||||||
#include "StdMeshers_AutomaticLength.hxx"
|
#include "StdMeshers_AutomaticLength.hxx"
|
||||||
|
|
||||||
#include "SMESH_Mesh.hxx"
|
#include "SMESH_Mesh.hxx"
|
||||||
@ -117,7 +116,7 @@ namespace {
|
|||||||
*/
|
*/
|
||||||
//================================================================================
|
//================================================================================
|
||||||
|
|
||||||
const double a14divPI = 14. / PI;
|
const double a14divPI = 14. / M_PI;
|
||||||
|
|
||||||
inline double segLength(double S0, double edgeLen, double minLen )
|
inline double segLength(double S0, double edgeLen, double minLen )
|
||||||
{
|
{
|
||||||
@ -399,5 +398,3 @@ bool StdMeshers_AutomaticLength::SetParametersByDefaults(const TDefaults& /*the
|
|||||||
|
|
||||||
// return true;
|
// return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,14 +15,13 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
|
|
||||||
// SMESH SMESH : implementaion of SMESH idl descriptions
|
// SMESH SMESH : implementaion of SMESH idl descriptions
|
||||||
// File : StdMeshers_CompositeHexa_3D.cxx
|
// File : StdMeshers_CompositeHexa_3D.cxx
|
||||||
// Module : SMESH
|
// Module : SMESH
|
||||||
// Created : Tue Nov 25 11:04:59 2008
|
// Created : Tue Nov 25 11:04:59 2008
|
||||||
// Author : Edward AGAPOV (eap)
|
// Author : Edward AGAPOV (eap)
|
||||||
//
|
|
||||||
#include "StdMeshers_CompositeHexa_3D.hxx"
|
#include "StdMeshers_CompositeHexa_3D.hxx"
|
||||||
|
|
||||||
#include "SMDS_Mesh.hxx"
|
#include "SMDS_Mesh.hxx"
|
||||||
@ -800,7 +799,7 @@ bool _QuadFaceGrid::AddContinuousFace( const _QuadFaceGrid& other )
|
|||||||
int iMyCommon;
|
int iMyCommon;
|
||||||
if ( mySides.Contain( otherSide, &iMyCommon ) ) {
|
if ( mySides.Contain( otherSide, &iMyCommon ) ) {
|
||||||
// check if normals of two faces are collinear at all vertices of a otherSide
|
// check if normals of two faces are collinear at all vertices of a otherSide
|
||||||
const double angleTol = PI / 180 / 2;
|
const double angleTol = M_PI / 180. / 2.;
|
||||||
int iV, nbV = otherSide.NbVertices(), nbCollinear = 0;
|
int iV, nbV = otherSide.NbVertices(), nbCollinear = 0;
|
||||||
for ( iV = 0; iV < nbV; ++iV )
|
for ( iV = 0; iV < nbV; ++iV )
|
||||||
{
|
{
|
||||||
|
@ -15,12 +15,11 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
|
|
||||||
// File : StdMeshers_HexaFromSkin_3D.cxx
|
// File : StdMeshers_HexaFromSkin_3D.cxx
|
||||||
// Created : Wed Jan 27 12:28:07 2010
|
// Created : Wed Jan 27 12:28:07 2010
|
||||||
// Author : Edward AGAPOV (eap)
|
// Author : Edward AGAPOV (eap)
|
||||||
//
|
|
||||||
#include "StdMeshers_HexaFromSkin_3D.hxx"
|
#include "StdMeshers_HexaFromSkin_3D.hxx"
|
||||||
|
|
||||||
#include "SMDS_VolumeOfNodes.hxx"
|
#include "SMDS_VolumeOfNodes.hxx"
|
||||||
@ -749,7 +748,7 @@ namespace
|
|||||||
// compute angle of (sideIDir projection to pln) and (X dir of pln)
|
// compute angle of (sideIDir projection to pln) and (X dir of pln)
|
||||||
gp_Vec2d sideIDirProj( sideIDir * pln.XDirection(), sideIDir * pln.YDirection());
|
gp_Vec2d sideIDirProj( sideIDir * pln.XDirection(), sideIDir * pln.YDirection());
|
||||||
double angle = sideIDirProj.Angle( gp::DX2d() );
|
double angle = sideIDirProj.Angle( gp::DX2d() );
|
||||||
if ( angle < 0 ) angle += 2 * PI; // angle [0-2*PI]
|
if ( angle < 0 ) angle += 2. * M_PI; // angle [0-2*PI]
|
||||||
angleOfSide.insert( make_pair( angle, sideI ));
|
angleOfSide.insert( make_pair( angle, sideI ));
|
||||||
_DUMP_(" "<< sideI << " - side dir ("
|
_DUMP_(" "<< sideI << " - side dir ("
|
||||||
<< sideIDir.X() << ", " << sideIDir.Y() << ", " << sideIDir.Z() << ")"
|
<< sideIDir.X() << ", " << sideIDir.Y() << ", " << sideIDir.Z() << ")"
|
||||||
@ -758,8 +757,8 @@ namespace
|
|||||||
if ( nbLoadedSides == 1 )
|
if ( nbLoadedSides == 1 )
|
||||||
{
|
{
|
||||||
double angF = angleOfSide.begin()->first, angL = angleOfSide.rbegin()->first;
|
double angF = angleOfSide.begin()->first, angL = angleOfSide.rbegin()->first;
|
||||||
if ( angF > PI ) angF = 2*PI - angF;
|
if ( angF > M_PI ) angF = 2.*M_PI - angF;
|
||||||
if ( angL > PI ) angL = 2*PI - angL;
|
if ( angL > M_PI ) angL = 2.*M_PI - angL;
|
||||||
foundSide = angF < angL ? angleOfSide.begin()->second : angleOfSide.rbegin()->second;
|
foundSide = angF < angL ? angleOfSide.begin()->second : angleOfSide.rbegin()->second;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1204,4 +1203,3 @@ bool StdMeshers_HexaFromSkin_3D::Compute(SMESH_Mesh&, const TopoDS_Shape&)
|
|||||||
{
|
{
|
||||||
return error("Algorithm can't work with geometrical shapes");
|
return error("Algorithm can't work with geometrical shapes");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,13 +15,12 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
|
|
||||||
// File : StdMeshers_QuadToTriaAdaptor.cxx
|
// File : StdMeshers_QuadToTriaAdaptor.cxx
|
||||||
// Module : SMESH
|
// Module : SMESH
|
||||||
// Created : Wen May 07 16:37:07 2008
|
// Created : Wen May 07 16:37:07 2008
|
||||||
// Author : Sergey KUUL (skl)
|
// Author : Sergey KUUL (skl)
|
||||||
//
|
|
||||||
#include "StdMeshers_QuadToTriaAdaptor.hxx"
|
#include "StdMeshers_QuadToTriaAdaptor.hxx"
|
||||||
|
|
||||||
#include "SMDS_SetIterator.hxx"
|
#include "SMDS_SetIterator.hxx"
|
||||||
@ -110,7 +109,7 @@ namespace
|
|||||||
|
|
||||||
// Check angle between normals
|
// Check angle between normals
|
||||||
double angle = nI.Angle( nJ );
|
double angle = nI.Angle( nJ );
|
||||||
bool tooClose = ( angle < 15 * PI180 );
|
bool tooClose = ( angle < 15. * M_PI / 180. );
|
||||||
|
|
||||||
// Check if pyramids collide
|
// Check if pyramids collide
|
||||||
if ( !tooClose && baI * baJ > 0 )
|
if ( !tooClose && baI * baJ > 0 )
|
||||||
@ -1214,8 +1213,8 @@ bool StdMeshers_QuadToTriaAdaptor::Compute2ndPart(SMESH_Mesh&
|
|||||||
gp_Vec VI2(PCj,Pint);
|
gp_Vec VI2(PCj,Pint);
|
||||||
double ang1 = fabs(VN1.Angle(VI1));
|
double ang1 = fabs(VN1.Angle(VI1));
|
||||||
double ang2 = fabs(VN2.Angle(VI2));
|
double ang2 = fabs(VN2.Angle(VI2));
|
||||||
double coef1 = 0.5 - (( ang1<PI/3 ) ? cos(ang1)*0.25 : 0 );
|
double coef1 = 0.5 - (( ang1 < M_PI/3. ) ? cos(ang1)*0.25 : 0 );
|
||||||
double coef2 = 0.5 - (( ang2<PI/3 ) ? cos(ang2)*0.25 : 0 ); // cos(ang2) ?
|
double coef2 = 0.5 - (( ang2 < M_PI/3. ) ? cos(ang2)*0.25 : 0 ); // cos(ang2) ?
|
||||||
// double coef2 = 0.5;
|
// double coef2 = 0.5;
|
||||||
// if(ang2<PI/3)
|
// if(ang2<PI/3)
|
||||||
// coef2 -= cos(ang1)*0.25;
|
// coef2 -= cos(ang1)*0.25;
|
||||||
@ -1279,4 +1278,3 @@ bool StdMeshers_QuadToTriaAdaptor::Compute2ndPart(SMESH_Mesh&
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,14 +15,13 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
|
|
||||||
// SMESH SMESH : implementaion of SMESH idl descriptions
|
// SMESH SMESH : implementaion of SMESH idl descriptions
|
||||||
// File : StdMeshers_RadialQuadrangle_1D2D.cxx
|
// File : StdMeshers_RadialQuadrangle_1D2D.cxx
|
||||||
// Module : SMESH
|
// Module : SMESH
|
||||||
// Created : Fri Oct 20 11:37:07 2006
|
// Created : Fri Oct 20 11:37:07 2006
|
||||||
// Author : Edward AGAPOV (eap)
|
// Author : Edward AGAPOV (eap)
|
||||||
//
|
|
||||||
#include "StdMeshers_RadialQuadrangle_1D2D.hxx"
|
#include "StdMeshers_RadialQuadrangle_1D2D.hxx"
|
||||||
|
|
||||||
#include "StdMeshers_NumberOfLayers.hxx"
|
#include "StdMeshers_NumberOfLayers.hxx"
|
||||||
@ -479,8 +478,8 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh& aMesh,
|
|||||||
for(; itn != theNodes.end(); itn++ ) {
|
for(; itn != theNodes.end(); itn++ ) {
|
||||||
CNodes.push_back( (*itn).second );
|
CNodes.push_back( (*itn).second );
|
||||||
double ang = (*itn).first - fang;
|
double ang = (*itn).first - fang;
|
||||||
if( ang>PI ) ang = ang - 2*PI;
|
if( ang>M_PI ) ang = ang - 2.*M_PI;
|
||||||
if( ang<-PI ) ang = ang + 2*PI;
|
if( ang<-M_PI ) ang = ang + 2.*M_PI;
|
||||||
Angles.Append( ang );
|
Angles.Append( ang );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -528,7 +527,7 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh& aMesh,
|
|||||||
// a segment of line
|
// a segment of line
|
||||||
double fp, lp;
|
double fp, lp;
|
||||||
Handle(Geom_Circle) aCirc = Handle(Geom_Circle)::DownCast( getCurve( CircEdge, &fp, &lp ));
|
Handle(Geom_Circle) aCirc = Handle(Geom_Circle)::DownCast( getCurve( CircEdge, &fp, &lp ));
|
||||||
if( fabs(fabs(lp-fp)-PI) > Precision::Confusion() ) {
|
if( fabs(fabs(lp-fp)-M_PI) > Precision::Confusion() ) {
|
||||||
// not half of circle
|
// not half of circle
|
||||||
return error(COMPERR_BAD_SHAPE);
|
return error(COMPERR_BAD_SHAPE);
|
||||||
}
|
}
|
||||||
@ -552,8 +551,8 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh& aMesh,
|
|||||||
for(; itn != theNodes.end(); itn++ ) {
|
for(; itn != theNodes.end(); itn++ ) {
|
||||||
CNodes.push_back( (*itn).second );
|
CNodes.push_back( (*itn).second );
|
||||||
double ang = (*itn).first - fang;
|
double ang = (*itn).first - fang;
|
||||||
if( ang>PI ) ang = ang - 2*PI;
|
if( ang>M_PI ) ang = ang - 2.*M_PI;
|
||||||
if( ang<-PI ) ang = ang + 2*PI;
|
if( ang<-M_PI ) ang = ang + 2.*M_PI;
|
||||||
Angles.Append( ang );
|
Angles.Append( ang );
|
||||||
}
|
}
|
||||||
const SMDS_MeshNode* NF = theNodes.begin()->second;
|
const SMDS_MeshNode* NF = theNodes.begin()->second;
|
||||||
@ -690,8 +689,8 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh& aMesh,
|
|||||||
for(; itn != theNodes.end(); itn++ ) {
|
for(; itn != theNodes.end(); itn++ ) {
|
||||||
CNodes.push_back( (*itn).second );
|
CNodes.push_back( (*itn).second );
|
||||||
double ang = (*itn).first - fang;
|
double ang = (*itn).first - fang;
|
||||||
if( ang>PI ) ang = ang - 2*PI;
|
if( ang>M_PI ) ang = ang - 2.*M_PI;
|
||||||
if( ang<-PI ) ang = ang + 2*PI;
|
if( ang<-M_PI ) ang = ang + 2.*M_PI;
|
||||||
Angles.Append( ang );
|
Angles.Append( ang );
|
||||||
}
|
}
|
||||||
P1 = gp_Pnt( NF->X(), NF->Y(), NF->Z() );
|
P1 = gp_Pnt( NF->X(), NF->Y(), NF->Z() );
|
||||||
@ -1148,7 +1147,7 @@ bool StdMeshers_RadialQuadrangle_1D2D::Evaluate(SMESH_Mesh& aMesh,
|
|||||||
// a segment of line
|
// a segment of line
|
||||||
double fp, lp;
|
double fp, lp;
|
||||||
Handle(Geom_Circle) aCirc = Handle(Geom_Circle)::DownCast( getCurve( CircEdge, &fp, &lp ));
|
Handle(Geom_Circle) aCirc = Handle(Geom_Circle)::DownCast( getCurve( CircEdge, &fp, &lp ));
|
||||||
if( fabs(fabs(lp-fp)-PI) > Precision::Confusion() ) {
|
if( fabs(fabs(lp-fp)-M_PI) > Precision::Confusion() ) {
|
||||||
// not half of circle
|
// not half of circle
|
||||||
return error(COMPERR_BAD_SHAPE);
|
return error(COMPERR_BAD_SHAPE);
|
||||||
}
|
}
|
||||||
@ -1286,4 +1285,3 @@ bool StdMeshers_RadialQuadrangle_1D2D::Evaluate(SMESH_Mesh& aMesh,
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
|
|
||||||
// File : StdMeshers_ViscousLayers.cxx
|
// File : StdMeshers_ViscousLayers.cxx
|
||||||
// Created : Wed Dec 1 15:15:34 2010
|
// Created : Wed Dec 1 15:15:34 2010
|
||||||
@ -2508,8 +2507,8 @@ bool _ViscousBuilder::smoothAnalyticEdge( _SolidData& data,
|
|||||||
gp_Vec2d vec1( center, uv1 );
|
gp_Vec2d vec1( center, uv1 );
|
||||||
double uLast = vec0.Angle( vec1 ); // -PI - +PI
|
double uLast = vec0.Angle( vec1 ); // -PI - +PI
|
||||||
double uMidl = vec0.Angle( vecM );
|
double uMidl = vec0.Angle( vecM );
|
||||||
if ( uLast < 0 ) uLast += 2*PI; // 0.0 - 2*PI
|
if ( uLast < 0 ) uLast += 2.*M_PI; // 0.0 - 2*PI
|
||||||
if ( uMidl < 0 ) uMidl += 2*PI;
|
if ( uMidl < 0 ) uMidl += 2.*M_PI;
|
||||||
const bool sense = ( uMidl < uLast );
|
const bool sense = ( uMidl < uLast );
|
||||||
const double radius = 0.5 * ( vec0.Magnitude() + vec1.Magnitude() );
|
const double radius = 0.5 * ( vec0.Magnitude() + vec1.Magnitude() );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user