-// Copyright (C) 2007-2015 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2016 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#include <fenv.h>
#endif
+using namespace std;
+
/* ==================================
* =========== PYTHON ==============
* ==================================*/
double a, b; // Attractor parameter
double d = 0.;
bool createNode=false; // To create a node on attractor projection
- int pos1, pos2;
+ size_t pos1, pos2;
const char *sep = ";";
// atIt->second has the following pattern:
// ATTRACTOR(xa;ya;za;a;b;True|False;d)
MESSAGE("Geomtype is " << GeomType);
int key = -1;
// Group Management
- if (GeomType == TopAbs_COMPOUND){
+ if (GeomType == TopAbs_COMPOUND) {
for (TopoDS_Iterator it (GeomShape); it.More(); it.Next()){
// Group of faces
if (it.Value().ShapeType() == TopAbs_FACE){
BRepBuilderAPI_MakePolygon wire;
const size_t i0 = tmpVertex.size();
- for ( size_t iN = 1; iN < wirePoints.size(); ++iN )
+ for ( size_t iN = 0; iN < wirePoints.size(); ++iN )
{
wire.Add( SMESH_TNodeXYZ( wirePoints[ iN ].node ));
origNodes.push_back( wirePoints[ iN ].node );
for ( ; nIt->more(); ++nbN )
{
const SMDS_MeshNode* n = static_cast<const SMDS_MeshNode*>( nIt->next() );
- TN2NMap::iterator n2nIt =
+ TN2NMap::iterator n2nIt =
_tmp2origNN.insert( _tmp2origNN.end(), make_pair( n, nullNode ));
if ( !n2nIt->second ) {
n->GetXYZ( xyz );
}
switch( nbN ) {
case 3: helper.AddFace( nodes[0], nodes[1], nodes[2] ); break;
- // case 6: helper.AddFace( nodes[0], nodes[1], nodes[2],
- // nodes[3], nodes[4], nodes[5]); break;
+ // case 6: helper.AddFace( nodes[0], nodes[1], nodes[2],
+ // nodes[3], nodes[4], nodes[5]); break;
case 4: helper.AddFace( nodes[0], nodes[1], nodes[2], nodes[3] ); break;
// case 9: helper.AddFace( nodes[0], nodes[1], nodes[2], nodes[3],
// nodes[4], nodes[5], nodes[6], nodes[7], nodes[8]); break;
double * _progress;
};
-
} // namespace
status_t curv_fun(real t, real *uv, real *dt, real *dtt, void *user_data);
this->SMESH_Algo::_progress = 1e-3; // prevent progress advancment while computing attractors
- if ( !compute( aMesh, aShape, /*allowSubMeshClearing=*/true ))
- return false;
+ bool viscousLayersMade =
+ ( aShape.ShapeType() == TopAbs_FACE &&
+ StdMeshers_ViscousLayers2D::HasProxyMesh( TopoDS::Face( aShape ), aMesh ));
- if ( _haveViscousLayers )
+ if ( !viscousLayersMade )
+ if ( !compute( aMesh, aShape, /*allowSubMeshClearing=*/true ))
+ return false;
+
+ if ( _haveViscousLayers || viscousLayersMade )
{
// Compute viscous layers
* (For this face, it will be called by cadsurf with your_face_object_ptr
* as last parameter.
*/
+#if OCC_VERSION_MAJOR < 7
cad_face_t *fce = cad_face_new(c, iface, surf_fun, surfaces.back());
+#else
+ cad_face_t *fce = cad_face_new(c, iface, surf_fun, surfaces.back().get());
+#endif
/* by default a face has no tag (color).
The following call sets it to the same value as the Geom module ID : */
}
/* attach the edge to the current cadsurf face */
+#if OCC_VERSION_MAJOR < 7
cad_edge_t *edg = cad_edge_new(fce, ic, tmin, tmax, curv_fun, curves.back());
+#else
+ cad_edge_t *edg = cad_edge_new(fce, ic, tmin, tmax, curv_fun, curves.back().get());
+#endif
/* by default an edge has no tag (color).
The following call sets it to the same value as the edge_id : */
}
// SetIsAlwaysComputed( true ) to sub-meshes of EDGEs w/o mesh
- TopLoc_Location loc; double f,l;
for (int i = 1; i <= emap.Extent(); i++)
if ( SMESH_subMesh* sm = aMesh.GetSubMeshContaining( emap( i )))
sm->SetIsAlwaysComputed( true );