Compare commits
2 Commits
master
...
asozinov/3
Author | SHA1 | Date | |
---|---|---|---|
|
d4dddd0b59 | ||
|
ebdce1c3f5 |
@ -31,6 +31,7 @@
|
|||||||
#include "NETGENPlugin_Hypothesis_2D.hxx"
|
#include "NETGENPlugin_Hypothesis_2D.hxx"
|
||||||
#include "NETGENPlugin_SimpleHypothesis_3D.hxx"
|
#include "NETGENPlugin_SimpleHypothesis_3D.hxx"
|
||||||
|
|
||||||
|
#include <BRepBndLib.hxx>
|
||||||
#include <SMDS_FaceOfNodes.hxx>
|
#include <SMDS_FaceOfNodes.hxx>
|
||||||
#include <SMDS_LinearEdge.hxx>
|
#include <SMDS_LinearEdge.hxx>
|
||||||
#include <SMDS_MeshElement.hxx>
|
#include <SMDS_MeshElement.hxx>
|
||||||
@ -52,6 +53,7 @@
|
|||||||
|
|
||||||
#include <utilities.h>
|
#include <utilities.h>
|
||||||
|
|
||||||
|
#include <Standard_Version.hxx>
|
||||||
#include <BRepAdaptor_Surface.hxx>
|
#include <BRepAdaptor_Surface.hxx>
|
||||||
#include <BRepBuilderAPI_Copy.hxx>
|
#include <BRepBuilderAPI_Copy.hxx>
|
||||||
#include <BRepLProp_SLProps.hxx>
|
#include <BRepLProp_SLProps.hxx>
|
||||||
@ -873,12 +875,12 @@ void NETGENPlugin_Mesher::SetLocalSizeForChordalError( netgen::OCCGeometry& occg
|
|||||||
{
|
{
|
||||||
Standard_Integer n1,n2,n3;
|
Standard_Integer n1,n2,n3;
|
||||||
triangulation->Triangles()(i).Get( n1,n2,n3 );
|
triangulation->Triangles()(i).Get( n1,n2,n3 );
|
||||||
p [0] = triangulation->Nodes()(n1).Transformed(loc).XYZ();
|
p [0] = triangulation->Node(n1).Transformed(loc).XYZ();
|
||||||
p [1] = triangulation->Nodes()(n2).Transformed(loc).XYZ();
|
p [1] = triangulation->Node(n2).Transformed(loc).XYZ();
|
||||||
p [2] = triangulation->Nodes()(n3).Transformed(loc).XYZ();
|
p [2] = triangulation->Node(n3).Transformed(loc).XYZ();
|
||||||
uv[0] = triangulation->UVNodes()(n1).XY();
|
uv[0] = triangulation->UVNode(n1).XY();
|
||||||
uv[1] = triangulation->UVNodes()(n2).XY();
|
uv[1] = triangulation->UVNode(n2).XY();
|
||||||
uv[2] = triangulation->UVNodes()(n3).XY();
|
uv[2] = triangulation->UVNode(n3).XY();
|
||||||
surfProp.SetParameters( uv[0].X(), uv[0].Y() );
|
surfProp.SetParameters( uv[0].X(), uv[0].Y() );
|
||||||
if ( !surfProp.IsCurvatureDefined() )
|
if ( !surfProp.IsCurvatureDefined() )
|
||||||
break;
|
break;
|
||||||
@ -1036,7 +1038,14 @@ double NETGENPlugin_Mesher::GetDefaultMinSize(const TopoDS_Shape& geom,
|
|||||||
BRep_Tool::Triangulation ( TopoDS::Face( fExp.Current() ), loc);
|
BRep_Tool::Triangulation ( TopoDS::Face( fExp.Current() ), loc);
|
||||||
if ( triangulation.IsNull() ) continue;
|
if ( triangulation.IsNull() ) continue;
|
||||||
const double fTol = BRep_Tool::Tolerance( TopoDS::Face( fExp.Current() ));
|
const double fTol = BRep_Tool::Tolerance( TopoDS::Face( fExp.Current() ));
|
||||||
|
#if OCC_VERSION_HEX < 0x070600
|
||||||
const TColgp_Array1OfPnt& points = triangulation->Nodes();
|
const TColgp_Array1OfPnt& points = triangulation->Nodes();
|
||||||
|
#else
|
||||||
|
auto points = [&triangulation](Standard_Integer index) {
|
||||||
|
return triangulation->Node(index);
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
const Poly_Array1OfTriangle& trias = triangulation->Triangles();
|
const Poly_Array1OfTriangle& trias = triangulation->Triangles();
|
||||||
for ( int iT = trias.Lower(); iT <= trias.Upper(); ++iT )
|
for ( int iT = trias.Lower(); iT <= trias.Upper(); ++iT )
|
||||||
{
|
{
|
||||||
@ -4511,6 +4520,7 @@ int NETGENPlugin_NetgenLibWrapper::GenerateMesh( netgen::OCCGeometry& occgeo,
|
|||||||
|
|
||||||
ngMesh->SetGeometry( shared_ptr<netgen::NetgenGeometry>( &occgeo, &NOOP_Deleter ));
|
ngMesh->SetGeometry( shared_ptr<netgen::NetgenGeometry>( &occgeo, &NOOP_Deleter ));
|
||||||
|
|
||||||
|
occgeo.BuildFMap();
|
||||||
netgen::mparam.perfstepsstart = startWith;
|
netgen::mparam.perfstepsstart = startWith;
|
||||||
netgen::mparam.perfstepsend = endWith;
|
netgen::mparam.perfstepsend = endWith;
|
||||||
std::shared_ptr<netgen::Mesh> meshPtr( ngMesh, &NOOP_Deleter );
|
std::shared_ptr<netgen::Mesh> meshPtr( ngMesh, &NOOP_Deleter );
|
||||||
|
@ -26,6 +26,8 @@
|
|||||||
#include "NETGENPlugin_Mesher.hxx"
|
#include "NETGENPlugin_Mesher.hxx"
|
||||||
#include "NETGENPlugin_Hypothesis_2D.hxx"
|
#include "NETGENPlugin_Hypothesis_2D.hxx"
|
||||||
|
|
||||||
|
#include <BRepBndLib.hxx>
|
||||||
|
#include <TopExp.hxx>
|
||||||
#include <SMDS_MeshElement.hxx>
|
#include <SMDS_MeshElement.hxx>
|
||||||
#include <SMDS_MeshNode.hxx>
|
#include <SMDS_MeshNode.hxx>
|
||||||
#include <SMESHDS_Mesh.hxx>
|
#include <SMESHDS_Mesh.hxx>
|
||||||
@ -290,6 +292,8 @@ bool NETGENPlugin_NETGEN_2D_ONLY::Compute(SMESH_Mesh& aMesh,
|
|||||||
#endif
|
#endif
|
||||||
occgeoComm.face_maxh = netgen::mparam.maxh;
|
occgeoComm.face_maxh = netgen::mparam.maxh;
|
||||||
#ifdef NETGEN_V6
|
#ifdef NETGEN_V6
|
||||||
|
occgeoComm.BuildFMap();
|
||||||
|
|
||||||
netgen::OCCParameters occparam;
|
netgen::OCCParameters occparam;
|
||||||
netgen::OCCSetLocalMeshSize( occgeoComm, *ngMeshes[0], netgen::mparam, occparam );
|
netgen::OCCSetLocalMeshSize( occgeoComm, *ngMeshes[0], netgen::mparam, occparam );
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user