mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-03-16 01:41:27 +05:00
Modifications for conformity with test base and non regressional tests.
This commit is contained in:
parent
89f68b9edc
commit
641ff4e312
@ -3279,6 +3279,16 @@ double SMESH_MesherHelper::getFaceMaxTol( const TopoDS_Shape& face ) const
|
|||||||
return tol;
|
return tol;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CheckAlmostZero(gp_Vec & vec1,gp_Vec & vec2, gp_Vec & vecref)
|
||||||
|
{
|
||||||
|
auto v1 = gp_Dir(vec1);
|
||||||
|
auto v2 = gp_Dir(vec2);
|
||||||
|
auto vref = gp_Dir(vecref);
|
||||||
|
auto XYZ = v1.Crossed (v2);
|
||||||
|
double cond = XYZ.X()*vref.X()+XYZ.Y()*vref.Y()+XYZ.Z()*vref.Z();
|
||||||
|
return (Abs(cond) <= 1e-12);
|
||||||
|
}
|
||||||
|
|
||||||
//================================================================================
|
//================================================================================
|
||||||
/*!
|
/*!
|
||||||
* \brief Return an angle between two EDGEs sharing a common VERTEX with reference
|
* \brief Return an angle between two EDGEs sharing a common VERTEX with reference
|
||||||
@ -3341,6 +3351,8 @@ double SMESH_MesherHelper::GetAngle( const TopoDS_Edge & theE1,
|
|||||||
if ( theE2.Orientation() /*GetSubShapeOri( F, theE2 )*/ == TopAbs_REVERSED )
|
if ( theE2.Orientation() /*GetSubShapeOri( F, theE2 )*/ == TopAbs_REVERSED )
|
||||||
vec2.Reverse();
|
vec2.Reverse();
|
||||||
angle = vec1.AngleWithRef( vec2, vecRef );
|
angle = vec1.AngleWithRef( vec2, vecRef );
|
||||||
|
if ( angle < 0. && CheckAlmostZero(vec1,vec2,vecRef))
|
||||||
|
angle*=-1;
|
||||||
|
|
||||||
if ( Abs ( angle ) >= 0.99 * M_PI )
|
if ( Abs ( angle ) >= 0.99 * M_PI )
|
||||||
{
|
{
|
||||||
|
@ -106,7 +106,10 @@ class fissureCoude(fissureGenerique):
|
|||||||
|
|
||||||
# --- tube coude sain
|
# --- tube coude sain
|
||||||
|
|
||||||
geometrieSaine = geompy.MakePartition([tube_1, coude, tube_2, P1, P2], [plan_y], [], [], geompy.ShapeType["SOLID"], 0, [], 1)
|
#Refactor to perform the partition in two steps to avoid break from occt (reported bug#)
|
||||||
|
#geometrieSaine = geompy.MakePartition([tube_1, coude, tube_2, P1, P2], [plan_y], [], [], geompy.ShapeType["SOLID"], 0, [], 1)
|
||||||
|
geometrieSaine0 = geompy.MakePartition([tube_1, coude], [plan_y], [], [], geompy.ShapeType["SOLID"], 0, [], 1)
|
||||||
|
geometrieSaine = geompy.MakePartition([geometrieSaine0, tube_2, P1, P2], [plan_y], [], [], geompy.ShapeType["SOLID"], 0, [], 1)
|
||||||
geomPublish(initLog.debug, geometrieSaine, self.nomCas, self.numeroCas )
|
geomPublish(initLog.debug, geometrieSaine, self.nomCas, self.numeroCas )
|
||||||
[P1, P2] = geompy.RestoreGivenSubShapes(geometrieSaine, [P1, P2], GEOM.FSM_GetInPlaceByHistory, False, True)
|
[P1, P2] = geompy.RestoreGivenSubShapes(geometrieSaine, [P1, P2], GEOM.FSM_GetInPlaceByHistory, False, True)
|
||||||
|
|
||||||
|
@ -169,8 +169,8 @@ def test_netgen2dLenghtFromEdge():
|
|||||||
print("Nb Segments:", nb_segments)
|
print("Nb Segments:", nb_segments)
|
||||||
print("Nb Points:", nb_points)
|
print("Nb Points:", nb_points)
|
||||||
|
|
||||||
assert nb_triangles == 12
|
assert nb_triangles == 12*2
|
||||||
assert nb_points == 8
|
assert nb_points == 14
|
||||||
assert nb_segments == 12
|
assert nb_segments == 12
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user