mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-03-15 23:41:27 +05:00
Merge branch 'V8_2_BR' into pre/V8_2_BR
This commit is contained in:
commit
7ea81bbe6e
@ -299,7 +299,7 @@ Driver_Mesh::Status DriverGMF_Read::Perform()
|
|||||||
for ( int i = 1; i <= nbPyr; ++i )
|
for ( int i = 1; i <= nbPyr; ++i )
|
||||||
{
|
{
|
||||||
GmfGetLin(meshID, GmfPyramids, &iN[0], &iN[1], &iN[2], &iN[3], &iN[4], &ref);
|
GmfGetLin(meshID, GmfPyramids, &iN[0], &iN[1], &iN[2], &iN[3], &iN[4], &ref);
|
||||||
if ( !myMesh->AddVolumeWithID( iN[0], iN[2], iN[1], iN[3], iN[4], pyrIDShift + i ))
|
if ( !myMesh->AddVolumeWithID( iN[3], iN[2], iN[1], iN[0], iN[4], pyrIDShift + i ))
|
||||||
status = storeBadNodeIds( "GmfPyramids",i, 5, iN[0], iN[1],iN[2], iN[3], iN[4] );
|
status = storeBadNodeIds( "GmfPyramids",i, 5, iN[0], iN[1],iN[2], iN[3], iN[4] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -204,10 +204,10 @@ Driver_Mesh::Status DriverGMF_Write::Perform()
|
|||||||
|
|
||||||
// pyramids
|
// pyramids
|
||||||
BEGIN_ELEM_WRITE( SMDSEntity_Pyramid, GmfPyramids, pyra )
|
BEGIN_ELEM_WRITE( SMDSEntity_Pyramid, GmfPyramids, pyra )
|
||||||
node2IdMap[ pyra->GetNode( 0 )],
|
node2IdMap[ pyra->GetNode( 3 )],
|
||||||
node2IdMap[ pyra->GetNode( 2 )],
|
node2IdMap[ pyra->GetNode( 2 )],
|
||||||
node2IdMap[ pyra->GetNode( 1 )],
|
node2IdMap[ pyra->GetNode( 1 )],
|
||||||
node2IdMap[ pyra->GetNode( 3 )],
|
node2IdMap[ pyra->GetNode( 0 )],
|
||||||
node2IdMap[ pyra->GetNode( 4 )],
|
node2IdMap[ pyra->GetNode( 4 )],
|
||||||
END_ELEM_WRITE( pyra );
|
END_ELEM_WRITE( pyra );
|
||||||
|
|
||||||
|
@ -1530,9 +1530,9 @@ void SMESH_ActorDef::SetVisibility(int theMode, bool theIsUpdateRepersentation)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(myNodeActor->GetPointsLabeled()) {
|
if(myNodeActor->GetPointsLabeled()) {
|
||||||
|
myNodeActor->UpdateLabels();
|
||||||
myNodeActor->VisibilityOn();
|
myNodeActor->VisibilityOn();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(my0DActor)
|
if(my0DActor)
|
||||||
my0DActor->UpdateLabels();
|
my0DActor->UpdateLabels();
|
||||||
|
|
||||||
@ -1940,9 +1940,9 @@ int SMESH_ActorDef::RenderTranslucentGeometry(vtkViewport *vp)
|
|||||||
|
|
||||||
void SMESH_ActorDef::Render(vtkRenderer *ren)
|
void SMESH_ActorDef::Render(vtkRenderer *ren)
|
||||||
{
|
{
|
||||||
unsigned long aTime = myTimeStamp->GetMTime();
|
vtkMTimeType aTime = myTimeStamp->GetMTime();
|
||||||
unsigned long anObjTime = myVisualObj->GetUnstructuredGrid()->GetMTime();
|
vtkMTimeType anObjTime = myVisualObj->GetUnstructuredGrid()->GetMTime();
|
||||||
unsigned long aClippingTime = myImplicitBoolean->GetMTime();
|
vtkMTimeType aClippingTime = myImplicitBoolean->GetMTime();
|
||||||
if(anObjTime > aTime || aClippingTime > aTime)
|
if(anObjTime > aTime || aClippingTime > aTime)
|
||||||
Update();
|
Update();
|
||||||
}
|
}
|
||||||
|
@ -145,13 +145,14 @@ void SMESH_CellLabelActor::SetFontProperties( SMESH::LabelFont family, int size,
|
|||||||
|
|
||||||
void SMESH_CellLabelActor::SetCellsLabeled(bool theIsCellsLabeled)
|
void SMESH_CellLabelActor::SetCellsLabeled(bool theIsCellsLabeled)
|
||||||
{
|
{
|
||||||
|
myIsCellsLabeled = theIsCellsLabeled;
|
||||||
|
|
||||||
|
myCellsLabels->SetVisibility(false);
|
||||||
|
|
||||||
myTransformFilter->Update();
|
myTransformFilter->Update();
|
||||||
vtkUnstructuredGrid* aGrid = vtkUnstructuredGrid::SafeDownCast(myTransformFilter->GetOutput());
|
vtkUnstructuredGrid* aGrid = vtkUnstructuredGrid::SafeDownCast(myTransformFilter->GetOutput());
|
||||||
if ( !aGrid )
|
|
||||||
return;
|
|
||||||
|
|
||||||
myIsCellsLabeled = theIsCellsLabeled && aGrid->GetNumberOfPoints();
|
if ( myIsCellsLabeled && aGrid )
|
||||||
if ( myIsCellsLabeled )
|
|
||||||
{
|
{
|
||||||
myCellsNumDataSet->ShallowCopy(aGrid);
|
myCellsNumDataSet->ShallowCopy(aGrid);
|
||||||
vtkUnstructuredGrid *aDataSet = myCellsNumDataSet;
|
vtkUnstructuredGrid *aDataSet = myCellsNumDataSet;
|
||||||
@ -172,8 +173,6 @@ void SMESH_CellLabelActor::SetCellsLabeled(bool theIsCellsLabeled)
|
|||||||
aDataSet->GetCellData()->SetScalars(anArray);
|
aDataSet->GetCellData()->SetScalars(anArray);
|
||||||
myCellCenters->SetInputData(aDataSet);
|
myCellCenters->SetInputData(aDataSet);
|
||||||
myCellsLabels->SetVisibility(GetVisibility());
|
myCellsLabels->SetVisibility(GetVisibility());
|
||||||
}else{
|
|
||||||
myCellsLabels->SetVisibility(false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -615,7 +615,7 @@ SMESH_DeviceActor
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
unsigned long int
|
vtkMTimeType
|
||||||
SMESH_DeviceActor
|
SMESH_DeviceActor
|
||||||
::GetMTime()
|
::GetMTime()
|
||||||
{
|
{
|
||||||
@ -640,7 +640,7 @@ SMESH_DeviceActor
|
|||||||
// << " " << myTransformFilter->GetMTime()
|
// << " " << myTransformFilter->GetMTime()
|
||||||
// << " " << myFaceOrientationFilter->GetMTime() << endl;
|
// << " " << myFaceOrientationFilter->GetMTime() << endl;
|
||||||
|
|
||||||
unsigned long mTime = this->Superclass::GetMTime();
|
vtkMTimeType mTime = this->Superclass::GetMTime();
|
||||||
mTime = max(mTime,myExtractGeometry->GetMTime());
|
mTime = max(mTime,myExtractGeometry->GetMTime());
|
||||||
mTime = max(mTime,myExtractUnstructuredGrid->GetMTime());
|
mTime = max(mTime,myExtractUnstructuredGrid->GetMTime());
|
||||||
mTime = max(mTime,myMergeFilter->GetMTime());
|
mTime = max(mTime,myMergeFilter->GetMTime());
|
||||||
|
@ -75,7 +75,7 @@ class SMESHOBJECT_EXPORT SMESH_DeviceActor: public vtkLODActor{
|
|||||||
virtual vtkCell* GetElemCell(int theObjID);
|
virtual vtkCell* GetElemCell(int theObjID);
|
||||||
|
|
||||||
virtual void SetTransform(VTKViewer_Transform* theTransform);
|
virtual void SetTransform(VTKViewer_Transform* theTransform);
|
||||||
virtual unsigned long int GetMTime();
|
virtual vtkMTimeType GetMTime();
|
||||||
|
|
||||||
virtual void SetFacesOriented(bool theIsFacesOriented);
|
virtual void SetFacesOriented(bool theIsFacesOriented);
|
||||||
virtual bool GetFacesOriented() { return myIsFacesOriented; }
|
virtual bool GetFacesOriented() { return myIsFacesOriented; }
|
||||||
|
@ -44,7 +44,8 @@ vtkStandardNewMacro(SMESH_NodeLabelActor);
|
|||||||
/*!
|
/*!
|
||||||
Constructor.
|
Constructor.
|
||||||
*/
|
*/
|
||||||
SMESH_NodeLabelActor::SMESH_NodeLabelActor() {
|
SMESH_NodeLabelActor::SMESH_NodeLabelActor()
|
||||||
|
{
|
||||||
//Definition of points numbering pipeline
|
//Definition of points numbering pipeline
|
||||||
//---------------------------------------
|
//---------------------------------------
|
||||||
myPointsNumDataSet = vtkUnstructuredGrid::New();
|
myPointsNumDataSet = vtkUnstructuredGrid::New();
|
||||||
@ -90,7 +91,8 @@ SMESH_NodeLabelActor::SMESH_NodeLabelActor() {
|
|||||||
/*!
|
/*!
|
||||||
Destructor
|
Destructor
|
||||||
*/
|
*/
|
||||||
SMESH_NodeLabelActor::~SMESH_NodeLabelActor() {
|
SMESH_NodeLabelActor::~SMESH_NodeLabelActor()
|
||||||
|
{
|
||||||
//Deleting of points numbering pipeline
|
//Deleting of points numbering pipeline
|
||||||
//---------------------------------------
|
//---------------------------------------
|
||||||
myPointsNumDataSet->Delete();
|
myPointsNumDataSet->Delete();
|
||||||
@ -130,16 +132,16 @@ void SMESH_NodeLabelActor::SetFontProperties( SMESH::LabelFont family, int size,
|
|||||||
myPtsTextProp->SetColor( r, g, b );
|
myPtsTextProp->SetColor( r, g, b );
|
||||||
}
|
}
|
||||||
|
|
||||||
void SMESH_NodeLabelActor::SetPointsLabeled(bool theIsPointsLabeled) {
|
void SMESH_NodeLabelActor::SetPointsLabeled(bool theIsPointsLabeled)
|
||||||
|
{
|
||||||
|
myIsPointsLabeled = theIsPointsLabeled;
|
||||||
|
|
||||||
|
myPointLabels->SetVisibility( false );
|
||||||
|
|
||||||
myTransformFilter->Update();
|
myTransformFilter->Update();
|
||||||
vtkDataSet* aGrid = vtkUnstructuredGrid::SafeDownCast(myTransformFilter->GetOutput());
|
vtkDataSet* aGrid = vtkUnstructuredGrid::SafeDownCast(myTransformFilter->GetOutput());
|
||||||
|
|
||||||
if(!aGrid)
|
if ( myIsPointsLabeled && aGrid )
|
||||||
return;
|
|
||||||
|
|
||||||
myIsPointsLabeled = theIsPointsLabeled && aGrid->GetNumberOfPoints();
|
|
||||||
|
|
||||||
if ( myIsPointsLabeled )
|
|
||||||
{
|
{
|
||||||
myPointsNumDataSet->ShallowCopy(aGrid);
|
myPointsNumDataSet->ShallowCopy(aGrid);
|
||||||
vtkUnstructuredGrid *aDataSet = myPointsNumDataSet;
|
vtkUnstructuredGrid *aDataSet = myPointsNumDataSet;
|
||||||
@ -160,10 +162,6 @@ void SMESH_NodeLabelActor::SetPointsLabeled(bool theIsPointsLabeled) {
|
|||||||
myPointLabels->SetVisibility( GetVisibility() );
|
myPointLabels->SetVisibility( GetVisibility() );
|
||||||
anArray->Delete();
|
anArray->Delete();
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
myPointLabels->SetVisibility( false );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -189,7 +187,8 @@ void SMESH_NodeLabelActor::RemoveFromRender(vtkRenderer* theRenderer)
|
|||||||
SMESH_DeviceActor::RemoveFromRender(theRenderer);
|
SMESH_DeviceActor::RemoveFromRender(theRenderer);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SMESH_NodeLabelActor::UpdateLabels() {
|
void SMESH_NodeLabelActor::UpdateLabels()
|
||||||
|
{
|
||||||
if(myIsPointsLabeled)
|
if(myIsPointsLabeled)
|
||||||
SetPointsLabeled(myIsPointsLabeled);
|
SetPointsLabeled(myIsPointsLabeled);
|
||||||
}
|
}
|
||||||
@ -198,7 +197,8 @@ void SMESH_NodeLabelActor::UpdateLabels() {
|
|||||||
void SMESH_NodeLabelActor::ProcessEvents(vtkObject* vtkNotUsed(theObject),
|
void SMESH_NodeLabelActor::ProcessEvents(vtkObject* vtkNotUsed(theObject),
|
||||||
unsigned long theEvent,
|
unsigned long theEvent,
|
||||||
void* theClientData,
|
void* theClientData,
|
||||||
void* vtkNotUsed(theCallData)) {
|
void* vtkNotUsed(theCallData))
|
||||||
|
{
|
||||||
SMESH_NodeLabelActor* self = reinterpret_cast<SMESH_NodeLabelActor*>(theClientData);
|
SMESH_NodeLabelActor* self = reinterpret_cast<SMESH_NodeLabelActor*>(theClientData);
|
||||||
if(self)
|
if(self)
|
||||||
self->UpdateLabels();
|
self->UpdateLabels();
|
||||||
|
@ -4708,7 +4708,7 @@ void SMDS_Mesh::Modified()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//! get last modification timeStamp
|
//! get last modification timeStamp
|
||||||
unsigned long SMDS_Mesh::GetMTime() const
|
vtkMTimeType SMDS_Mesh::GetMTime() const
|
||||||
{
|
{
|
||||||
return this->myModifTime;
|
return this->myModifTime;
|
||||||
}
|
}
|
||||||
|
@ -750,7 +750,7 @@ public:
|
|||||||
inline void setMyModified() { this->myModified = true; }
|
inline void setMyModified() { this->myModified = true; }
|
||||||
|
|
||||||
void Modified();
|
void Modified();
|
||||||
unsigned long GetMTime() const;
|
vtkMTimeType GetMTime() const;
|
||||||
bool isCompacted();
|
bool isCompacted();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -125,9 +125,9 @@ SMDS_UnstructuredGrid::~SMDS_UnstructuredGrid()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long SMDS_UnstructuredGrid::GetMTime()
|
vtkMTimeType SMDS_UnstructuredGrid::GetMTime()
|
||||||
{
|
{
|
||||||
unsigned long mtime = vtkUnstructuredGrid::GetMTime();
|
vtkMTimeType mtime = vtkUnstructuredGrid::GetMTime();
|
||||||
return mtime;
|
return mtime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ public:
|
|||||||
int newNodeSize,
|
int newNodeSize,
|
||||||
std::vector<int>& idCellsOldToNew,
|
std::vector<int>& idCellsOldToNew,
|
||||||
int newCellSize);
|
int newCellSize);
|
||||||
virtual unsigned long GetMTime();
|
virtual vtkMTimeType GetMTime();
|
||||||
virtual vtkPoints *GetPoints();
|
virtual vtkPoints *GetPoints();
|
||||||
|
|
||||||
int InsertNextLinkedCell(int type, int npts, vtkIdType *pts);
|
int InsertNextLinkedCell(int type, int npts, vtkIdType *pts);
|
||||||
|
@ -2368,7 +2368,7 @@ bool SMESH_Mesh::SortByMeshOrder(std::vector<SMESH_subMesh*>& theListToSort) con
|
|||||||
vector<SMESH_subMesh*>::iterator onlyBIt = onlyOrderedList.begin();
|
vector<SMESH_subMesh*>::iterator onlyBIt = onlyOrderedList.begin();
|
||||||
vector<SMESH_subMesh*>::iterator onlyEIt = onlyOrderedList.end();
|
vector<SMESH_subMesh*>::iterator onlyEIt = onlyOrderedList.end();
|
||||||
|
|
||||||
// iterate on ordered submeshes and insert them in detected positions
|
// iterate on ordered sub-meshes and insert them in detected positions
|
||||||
map< int, TPosInList >::iterator i_pos = sortedPos.begin();
|
map< int, TPosInList >::iterator i_pos = sortedPos.begin();
|
||||||
for ( ; onlyBIt != onlyEIt; ++onlyBIt, ++i_pos )
|
for ( ; onlyBIt != onlyEIt; ++onlyBIt, ++i_pos )
|
||||||
*(i_pos->second) = *onlyBIt;
|
*(i_pos->second) = *onlyBIt;
|
||||||
@ -2386,18 +2386,27 @@ bool SMESH_Mesh::IsOrderOK( const SMESH_subMesh* smBefore,
|
|||||||
const SMESH_subMesh* smAfter ) const
|
const SMESH_subMesh* smAfter ) const
|
||||||
{
|
{
|
||||||
TListOfListOfInt::const_iterator listIdsIt = _mySubMeshOrder.begin();
|
TListOfListOfInt::const_iterator listIdsIt = _mySubMeshOrder.begin();
|
||||||
TListOfInt::const_iterator idBef, idAft;
|
|
||||||
for( ; listIdsIt != _mySubMeshOrder.end(); listIdsIt++)
|
for( ; listIdsIt != _mySubMeshOrder.end(); listIdsIt++)
|
||||||
{
|
{
|
||||||
const TListOfInt& listOfId = *listIdsIt;
|
const TListOfInt& listOfId = *listIdsIt;
|
||||||
idBef = std::find( listOfId.begin(), listOfId.end(), smBefore->GetId() );
|
int iB = -1, iA = -1, i = 0;
|
||||||
if ( idBef != listOfId.end() )
|
for ( TListOfInt::const_iterator id = listOfId.begin(); id != listOfId.end(); ++id, ++i )
|
||||||
idAft = std::find( listOfId.begin(), listOfId.end(), smAfter->GetId() );
|
{
|
||||||
if ( idAft != listOfId.end () )
|
if ( *id == smBefore->GetId() )
|
||||||
return ( std::distance( listOfId.begin(), idBef ) <
|
{
|
||||||
std::distance( listOfId.begin(), idAft ) );
|
iB = i;
|
||||||
|
if ( iA > -1 )
|
||||||
|
return iB < iA;
|
||||||
}
|
}
|
||||||
return true; // no order imposed to given submeshes
|
else if ( *id == smAfter->GetId() )
|
||||||
|
{
|
||||||
|
iA = i;
|
||||||
|
if ( iB > -1 )
|
||||||
|
return iB < iA;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true; // no order imposed to given sub-meshes
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
@ -2930,7 +2930,7 @@ bool SMESH_MesherHelper::IsReversedSubMesh (const TopoDS_Face& theFace)
|
|||||||
TopoDS_Shape s0 = GetSubShapeByNode( nn[0], GetMeshDS() );
|
TopoDS_Shape s0 = GetSubShapeByNode( nn[0], GetMeshDS() );
|
||||||
TopoDS_Shape s1 = GetSubShapeByNode( nn[1], GetMeshDS() );
|
TopoDS_Shape s1 = GetSubShapeByNode( nn[1], GetMeshDS() );
|
||||||
TopoDS_Shape E = GetCommonAncestor( s0, s1, *myMesh, TopAbs_EDGE );
|
TopoDS_Shape E = GetCommonAncestor( s0, s1, *myMesh, TopAbs_EDGE );
|
||||||
if ( !E.IsNull() && !s0.IsSame( s1 ))
|
if ( !E.IsNull() && !s0.IsSame( s1 ) && E.Orientation() != TopAbs_INTERNAL )
|
||||||
{
|
{
|
||||||
// is E seam edge?
|
// is E seam edge?
|
||||||
int nb = 0;
|
int nb = 0;
|
||||||
|
@ -69,7 +69,7 @@
|
|||||||
#define UnLoadLib( handle ) FreeLibrary( handle );
|
#define UnLoadLib( handle ) FreeLibrary( handle );
|
||||||
#else
|
#else
|
||||||
#define LibHandle void*
|
#define LibHandle void*
|
||||||
#define LoadLib( name ) dlopen( name, RTLD_LAZY )
|
#define LoadLib( name ) dlopen( name, RTLD_LAZY | RTLD_GLOBAL )
|
||||||
#define GetProc dlsym
|
#define GetProc dlsym
|
||||||
#define UnLoadLib( handle ) dlclose( handle );
|
#define UnLoadLib( handle ) dlclose( handle );
|
||||||
#endif
|
#endif
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
#define UnLoadLib( handle ) FreeLibrary( handle );
|
#define UnLoadLib( handle ) FreeLibrary( handle );
|
||||||
#else
|
#else
|
||||||
#define LibHandle void*
|
#define LibHandle void*
|
||||||
#define LoadLib( name ) dlopen( name, RTLD_LAZY )
|
#define LoadLib( name ) dlopen( name, RTLD_LAZY | RTLD_GLOBAL )
|
||||||
#define GetProc dlsym
|
#define GetProc dlsym
|
||||||
#define UnLoadLib( handle ) dlclose( handle );
|
#define UnLoadLib( handle ) dlclose( handle );
|
||||||
#endif
|
#endif
|
||||||
|
@ -448,8 +448,11 @@ const std::vector<UVPtStruct>& StdMeshers_FaceSide::GetUVPtStruct(bool isXCons
|
|||||||
if ((int) u2node.size() + nbProxyNodes != myNbPonits &&
|
if ((int) u2node.size() + nbProxyNodes != myNbPonits &&
|
||||||
(int) u2node.size() + nbProxyNodes != NbPoints( /*update=*/true ))
|
(int) u2node.size() + nbProxyNodes != NbPoints( /*update=*/true ))
|
||||||
{
|
{
|
||||||
MESSAGE("Wrong node parameters on edges, u2node.size():"
|
return myPoints;
|
||||||
<<u2node.size()<<" != myNbPonits:"<<myNbPonits);
|
}
|
||||||
|
if (( myNbPonits > 0 ) &&
|
||||||
|
( u2node.begin()->first < 0 || u2node.rbegin()->first > 1 ))
|
||||||
|
{
|
||||||
return myPoints;
|
return myPoints;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2544,8 +2544,8 @@ namespace // utils used by StdMeshers_Prism_3D::IsApplicable()
|
|||||||
bool _isBase; /* is used in a base FACE */
|
bool _isBase; /* is used in a base FACE */
|
||||||
EdgeWithNeighbors(const TopoDS_Edge& E, int iE, int nbE, int shift, bool isBase ):
|
EdgeWithNeighbors(const TopoDS_Edge& E, int iE, int nbE, int shift, bool isBase ):
|
||||||
_edge( E ), _iBase( iE + shift ),
|
_edge( E ), _iBase( iE + shift ),
|
||||||
_iL( SMESH_MesherHelper::WrapIndex( iE-1, nbE ) + shift ),
|
_iL( SMESH_MesherHelper::WrapIndex( iE-1, Max( 1, nbE )) + shift ),
|
||||||
_iR( SMESH_MesherHelper::WrapIndex( iE+1, nbE ) + shift ),
|
_iR( SMESH_MesherHelper::WrapIndex( iE+1, Max( 1, nbE )) + shift ),
|
||||||
_isBase( isBase )
|
_isBase( isBase )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -2674,9 +2674,9 @@ namespace // utils used by StdMeshers_Prism_3D::IsApplicable()
|
|||||||
edges[ iFirst ]._iL = edges[ iFirst ]._iBase; // connect to self
|
edges[ iFirst ]._iL = edges[ iFirst ]._iBase; // connect to self
|
||||||
edges[ iLast ]._iR = edges[ iLast ]._iBase;
|
edges[ iLast ]._iR = edges[ iLast ]._iBase;
|
||||||
|
|
||||||
// look for an EDGE of the outer WIRE connected to vv
|
// look for an EDGE of the outer WIREs connected to vv
|
||||||
TopoDS_Vertex v0, v1;
|
TopoDS_Vertex v0, v1;
|
||||||
for ( iE = 0; iE < nbEdgesInWires.front(); ++iE )
|
for ( iE = 0; iE < iFirst; ++iE )
|
||||||
{
|
{
|
||||||
v0 = SMESH_MesherHelper::IthVertex( 0, edges[ iE ]._edge );
|
v0 = SMESH_MesherHelper::IthVertex( 0, edges[ iE ]._edge );
|
||||||
v1 = SMESH_MesherHelper::IthVertex( 1, edges[ iE ]._edge );
|
v1 = SMESH_MesherHelper::IthVertex( 1, edges[ iE ]._edge );
|
||||||
|
@ -49,12 +49,14 @@
|
|||||||
|
|
||||||
#include <utilities.h>
|
#include <utilities.h>
|
||||||
|
|
||||||
|
#include <BRepAdaptor_Curve.hxx>
|
||||||
#include <BRepAdaptor_Surface.hxx>
|
#include <BRepAdaptor_Surface.hxx>
|
||||||
#include <BRepMesh_Delaun.hxx>
|
#include <BRepMesh_Delaun.hxx>
|
||||||
#include <BRep_Tool.hxx>
|
#include <BRep_Tool.hxx>
|
||||||
#include <Bnd_B2d.hxx>
|
#include <Bnd_B2d.hxx>
|
||||||
#include <GeomAPI_ProjectPointOnSurf.hxx>
|
#include <GeomAPI_ProjectPointOnSurf.hxx>
|
||||||
#include <GeomLib_IsPlanarSurface.hxx>
|
#include <GeomLib_IsPlanarSurface.hxx>
|
||||||
|
#include <Precision.hxx>
|
||||||
#include <TopExp.hxx>
|
#include <TopExp.hxx>
|
||||||
#include <TopExp_Explorer.hxx>
|
#include <TopExp_Explorer.hxx>
|
||||||
#include <TopTools_DataMapIteratorOfDataMapOfShapeShape.hxx>
|
#include <TopTools_DataMapIteratorOfDataMapOfShapeShape.hxx>
|
||||||
@ -656,6 +658,8 @@ namespace {
|
|||||||
|
|
||||||
SMESH_MesherHelper srcHelper( *srcMesh );
|
SMESH_MesherHelper srcHelper( *srcMesh );
|
||||||
srcHelper.SetSubShape( srcFace );
|
srcHelper.SetSubShape( srcFace );
|
||||||
|
SMESH_MesherHelper edgeHelper( *tgtMesh );
|
||||||
|
edgeHelper.ToFixNodeParameters( true );
|
||||||
|
|
||||||
const SMDS_MeshNode* nullNode = 0;
|
const SMDS_MeshNode* nullNode = 0;
|
||||||
TAssocTool::TNodeNodeMap::iterator srcN_tgtN;
|
TAssocTool::TNodeNodeMap::iterator srcN_tgtN;
|
||||||
@ -694,10 +698,30 @@ namespace {
|
|||||||
}
|
}
|
||||||
case SMDS_TOP_EDGE:
|
case SMDS_TOP_EDGE:
|
||||||
{
|
{
|
||||||
const TopoDS_Shape & srcE = srcMeshDS->IndexToShape( srcNode->getshapeId() );
|
const TopoDS_Edge& srcE = TopoDS::Edge( srcMeshDS->IndexToShape( srcNode->getshapeId()));
|
||||||
const TopoDS_Shape & tgtE = shape2ShapeMap( srcE, /*isSrc=*/true );
|
const TopoDS_Edge& tgtE = TopoDS::Edge( shape2ShapeMap( srcE, /*isSrc=*/true ));
|
||||||
double srcU = srcHelper.GetNodeU( TopoDS::Edge( srcE ), srcNode );
|
double srcU = srcHelper.GetNodeU( srcE, srcNode );
|
||||||
tgtMeshDS->SetNodeOnEdge( n, TopoDS::Edge( tgtE ), srcU );
|
tgtMeshDS->SetNodeOnEdge( n, tgtE, srcU );
|
||||||
|
if ( !tgtFace.IsPartner( srcFace ))
|
||||||
|
{
|
||||||
|
bool isOk = true;
|
||||||
|
edgeHelper.SetSubShape( tgtE );
|
||||||
|
edgeHelper.GetNodeU( tgtE, n, 0, &isOk );
|
||||||
|
if ( !isOk ) // projection of n to tgtE failed (23395)
|
||||||
|
{
|
||||||
|
double sF, sL, tF, tL;
|
||||||
|
BRep_Tool::Range( srcE, sF, sL );
|
||||||
|
BRep_Tool::Range( tgtE, tF, tL );
|
||||||
|
double srcR = ( srcU - sF ) / ( sL - sF );
|
||||||
|
double tgtU = tF + srcR * ( tL - tF );
|
||||||
|
tgtMeshDS->SetNodeOnEdge( n, tgtE, tgtU );
|
||||||
|
gp_Pnt newP = BRepAdaptor_Curve( tgtE ).Value( tgtU );
|
||||||
|
double dist = newP.Distance( tgtP );
|
||||||
|
double tol = BRep_Tool::Tolerance( tgtE );
|
||||||
|
if ( tol < dist && dist < 1000*tol )
|
||||||
|
tgtMeshDS->MoveNode( n, newP.X(), newP.Y(), newP.Z() );
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SMDS_TOP_VERTEX:
|
case SMDS_TOP_VERTEX:
|
||||||
@ -728,12 +752,9 @@ namespace {
|
|||||||
|
|
||||||
if ( !tgtFace.IsPartner( srcFace ) )
|
if ( !tgtFace.IsPartner( srcFace ) )
|
||||||
{
|
{
|
||||||
SMESH_MesherHelper edgeHelper( *tgtMesh );
|
|
||||||
edgeHelper.ToFixNodeParameters( true );
|
|
||||||
helper.ToFixNodeParameters( true );
|
helper.ToFixNodeParameters( true );
|
||||||
|
|
||||||
int nbOkPos = 0;
|
int nbOkPos = 0;
|
||||||
bool toCheck = true;
|
|
||||||
const double tol2d = 1e-12;
|
const double tol2d = 1e-12;
|
||||||
srcN_tgtN = src2tgtNodes.begin();
|
srcN_tgtN = src2tgtNodes.begin();
|
||||||
for ( ; srcN_tgtN != src2tgtNodes.end(); ++srcN_tgtN )
|
for ( ; srcN_tgtN != src2tgtNodes.end(); ++srcN_tgtN )
|
||||||
@ -754,9 +775,9 @@ namespace {
|
|||||||
}
|
}
|
||||||
case SMDS_TOP_EDGE:
|
case SMDS_TOP_EDGE:
|
||||||
{
|
{
|
||||||
const TopoDS_Edge & tgtE = TopoDS::Edge( tgtMeshDS->IndexToShape( n->getshapeId() ));
|
// const TopoDS_Edge & tgtE = TopoDS::Edge( tgtMeshDS->IndexToShape( n->getshapeId() ));
|
||||||
edgeHelper.SetSubShape( tgtE );
|
// edgeHelper.SetSubShape( tgtE );
|
||||||
edgeHelper.GetNodeU( tgtE, n, 0, &toCheck );
|
// edgeHelper.GetNodeU( tgtE, n, 0, &toCheck );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:;
|
default:;
|
||||||
|
@ -287,11 +287,14 @@ void StdMeshers_ProjectionSource1D_i::LoadFrom( const char* theStream )
|
|||||||
}
|
}
|
||||||
|
|
||||||
myCorbaMesh = SMESH::SMESH_Mesh::_duplicate( mesh );
|
myCorbaMesh = SMESH::SMESH_Mesh::_duplicate( mesh );
|
||||||
|
try {
|
||||||
GetImpl()->SetSourceMesh ( meshImpl );
|
GetImpl()->SetSourceMesh ( meshImpl );
|
||||||
GetImpl()->SetSourceEdge ( shapes[ SRC_EDGE ] );
|
GetImpl()->SetSourceEdge ( shapes[ SRC_EDGE ] );
|
||||||
GetImpl()->SetVertexAssociation( shapes[ SRC_VERTEX ],
|
GetImpl()->SetVertexAssociation( shapes[ SRC_VERTEX ],
|
||||||
shapes[ TGT_VERTEX ]);
|
shapes[ TGT_VERTEX ]);
|
||||||
|
}
|
||||||
|
catch (...) {
|
||||||
|
}
|
||||||
myBaseImpl->LoadFrom( is );
|
myBaseImpl->LoadFrom( is );
|
||||||
|
|
||||||
std::istringstream str( theStream );
|
std::istringstream str( theStream );
|
||||||
|
@ -298,12 +298,16 @@ void StdMeshers_ProjectionSource2D_i::LoadFrom( const char* theStream )
|
|||||||
|
|
||||||
myCorbaMesh = SMESH::SMESH_Mesh::_duplicate( mesh );
|
myCorbaMesh = SMESH::SMESH_Mesh::_duplicate( mesh );
|
||||||
|
|
||||||
|
try {
|
||||||
GetImpl()->SetSourceMesh ( meshImpl );
|
GetImpl()->SetSourceMesh ( meshImpl );
|
||||||
GetImpl()->SetSourceFace ( shapes[ SRC_FACE ] );
|
GetImpl()->SetSourceFace ( shapes[ SRC_FACE ] );
|
||||||
GetImpl()->SetVertexAssociation( shapes[ SRC_VERTEX1 ],
|
GetImpl()->SetVertexAssociation( shapes[ SRC_VERTEX1 ],
|
||||||
shapes[ SRC_VERTEX2 ],
|
shapes[ SRC_VERTEX2 ],
|
||||||
shapes[ TGT_VERTEX1 ],
|
shapes[ TGT_VERTEX1 ],
|
||||||
shapes[ TGT_VERTEX2 ]);
|
shapes[ TGT_VERTEX2 ]);
|
||||||
|
}
|
||||||
|
catch( ... ) {
|
||||||
|
}
|
||||||
myBaseImpl->LoadFrom( is );
|
myBaseImpl->LoadFrom( is );
|
||||||
|
|
||||||
std::istringstream str( theStream );
|
std::istringstream str( theStream );
|
||||||
|
@ -299,13 +299,16 @@ void StdMeshers_ProjectionSource3D_i::LoadFrom( const char* theStream )
|
|||||||
|
|
||||||
myCorbaMesh = SMESH::SMESH_Mesh::_duplicate( mesh );
|
myCorbaMesh = SMESH::SMESH_Mesh::_duplicate( mesh );
|
||||||
|
|
||||||
|
try {
|
||||||
GetImpl()->SetSourceMesh ( meshImpl );
|
GetImpl()->SetSourceMesh ( meshImpl );
|
||||||
GetImpl()->SetSource3DShape ( shapes[ SRC_SHAPE3D ] );
|
GetImpl()->SetSource3DShape ( shapes[ SRC_SHAPE3D ] );
|
||||||
GetImpl()->SetVertexAssociation( shapes[ SRC_VERTEX1 ],
|
GetImpl()->SetVertexAssociation( shapes[ SRC_VERTEX1 ],
|
||||||
shapes[ SRC_VERTEX2 ],
|
shapes[ SRC_VERTEX2 ],
|
||||||
shapes[ TGT_VERTEX1 ],
|
shapes[ TGT_VERTEX1 ],
|
||||||
shapes[ TGT_VERTEX2 ]);
|
shapes[ TGT_VERTEX2 ]);
|
||||||
|
}
|
||||||
|
catch (...) {
|
||||||
|
}
|
||||||
myBaseImpl->LoadFrom( is );
|
myBaseImpl->LoadFrom( is );
|
||||||
|
|
||||||
std::istringstream str( theStream );
|
std::istringstream str( theStream );
|
||||||
|
@ -379,8 +379,12 @@ void StdMeshers_QuadrangleParams_i::LoadFrom( const char* theStream )
|
|||||||
for ( int i = 0; i < nb; ++i )
|
for ( int i = 0; i < nb; ++i )
|
||||||
shapes.push_back( StdMeshers_ObjRefUlils::LoadFromStream( is, & myShapeEntries[i] ));
|
shapes.push_back( StdMeshers_ObjRefUlils::LoadFromStream( is, & myShapeEntries[i] ));
|
||||||
|
|
||||||
|
try {
|
||||||
GetImpl()->SetEnforcedNodes( shapes, points );
|
GetImpl()->SetEnforcedNodes( shapes, points );
|
||||||
}
|
}
|
||||||
|
catch (...) {
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
myBaseImpl->LoadFrom( is );
|
myBaseImpl->LoadFrom( is );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user