mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-19 10:00:33 +05:00
untabify
This commit is contained in:
parent
fd8ea78dc3
commit
046d929fa1
@ -5226,37 +5226,37 @@ SMESH_MeshEditor::ExtrusionAlongTrack (TIDSortedElemSet & theElements,
|
|||||||
SMESH_subMesh* locTrack = *itLSM;
|
SMESH_subMesh* locTrack = *itLSM;
|
||||||
SMESHDS_SubMesh* locMeshDS = locTrack->GetSubMeshDS();
|
SMESHDS_SubMesh* locMeshDS = locTrack->GetSubMeshDS();
|
||||||
TopExp::Vertices( aTrackEdge, aV1, aV2 );
|
TopExp::Vertices( aTrackEdge, aV1, aV2 );
|
||||||
bool aN1isOK = false, aN2isOK = false;
|
bool aN1isOK = false, aN2isOK = false;
|
||||||
if ( aVprev.IsNull() ) {
|
if ( aVprev.IsNull() ) {
|
||||||
// if previous vertex is not yet defined, it means that we in the beginning of wire
|
// if previous vertex is not yet defined, it means that we in the beginning of wire
|
||||||
// and we have to find initial vertex corresponding to starting node theN1
|
// and we have to find initial vertex corresponding to starting node theN1
|
||||||
const SMDS_MeshNode* aN1 = 0;
|
const SMDS_MeshNode* aN1 = 0;
|
||||||
const SMDS_MeshNode* aN2 = 0;
|
const SMDS_MeshNode* aN2 = 0;
|
||||||
|
|
||||||
if ( locTrack->GetFather()->GetSubMesh(aV1) && locTrack->GetFather()->GetSubMesh(aV1)->GetSubMeshDS() ) {
|
if ( locTrack->GetFather()->GetSubMesh(aV1) && locTrack->GetFather()->GetSubMesh(aV1)->GetSubMeshDS() ) {
|
||||||
aItN = locTrack->GetFather()->GetSubMesh(aV1)->GetSubMeshDS()->GetNodes();
|
aItN = locTrack->GetFather()->GetSubMesh(aV1)->GetSubMeshDS()->GetNodes();
|
||||||
aN1 = aItN->next();
|
aN1 = aItN->next();
|
||||||
}
|
}
|
||||||
if ( locTrack->GetFather()->GetSubMesh(aV2) && locTrack->GetFather()->GetSubMesh(aV2)->GetSubMeshDS() ) {
|
if ( locTrack->GetFather()->GetSubMesh(aV2) && locTrack->GetFather()->GetSubMesh(aV2)->GetSubMeshDS() ) {
|
||||||
aItN = locTrack->GetFather()->GetSubMesh(aV2)->GetSubMeshDS()->GetNodes();
|
aItN = locTrack->GetFather()->GetSubMesh(aV2)->GetSubMeshDS()->GetNodes();
|
||||||
aN2 = aItN->next();
|
aN2 = aItN->next();
|
||||||
}
|
}
|
||||||
// starting node must be aN1 or aN2
|
// starting node must be aN1 or aN2
|
||||||
aN1isOK = aN1 && aN1->GetID() == theN1->GetID();
|
aN1isOK = ( aN1 && aN1 == theN1 );
|
||||||
aN2isOK = aN2 && aN2->GetID() == theN1->GetID();
|
aN2isOK = ( aN2 && aN2 == theN1 );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// we have specified ending vertex of the previous edge on the previous iteration
|
// we have specified ending vertex of the previous edge on the previous iteration
|
||||||
// and we have just to check that it corresponds to any vertex in current segment
|
// and we have just to check that it corresponds to any vertex in current segment
|
||||||
aN1isOK = aVprev.IsSame( aV1 );
|
aN1isOK = aVprev.IsSame( aV1 );
|
||||||
aN2isOK = aVprev.IsSame( aV2 );
|
aN2isOK = aVprev.IsSame( aV2 );
|
||||||
}
|
}
|
||||||
if ( !aN1isOK && !aN2isOK ) continue;
|
if ( !aN1isOK && !aN2isOK ) continue;
|
||||||
// 2. Collect parameters on the track edge
|
// 2. Collect parameters on the track edge
|
||||||
aPrms.clear();
|
aPrms.clear();
|
||||||
aItN = locMeshDS->GetNodes();
|
aItN = locMeshDS->GetNodes();
|
||||||
while ( aItN->more() ) {
|
while ( aItN->more() ) {
|
||||||
const SMDS_MeshNode* pNode = aItN->next();
|
const SMDS_MeshNode* pNode = aItN->next();
|
||||||
const SMDS_EdgePosition* pEPos =
|
const SMDS_EdgePosition* pEPos =
|
||||||
static_cast<const SMDS_EdgePosition*>( pNode->GetPosition() );
|
static_cast<const SMDS_EdgePosition*>( pNode->GetPosition() );
|
||||||
double aT = pEPos->GetUParameter();
|
double aT = pEPos->GetUParameter();
|
||||||
@ -5269,7 +5269,7 @@ SMESH_MeshEditor::ExtrusionAlongTrack (TIDSortedElemSet & theElements,
|
|||||||
UsedNums.Add(k);
|
UsedNums.Add(k);
|
||||||
// update startN for search following egde
|
// update startN for search following egde
|
||||||
if ( aN1isOK ) aVprev = aV2;
|
if ( aN1isOK ) aVprev = aV2;
|
||||||
else aVprev = aV1;
|
else aVprev = aV1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5288,8 +5288,7 @@ SMESH_MeshEditor::ExtrusionAlongTrack (TIDSortedElemSet & theElements,
|
|||||||
SMESH_MeshEditor_PathPoint PP2 = currList.front();
|
SMESH_MeshEditor_PathPoint PP2 = currList.front();
|
||||||
gp_Dir D1 = PP1.Tangent();
|
gp_Dir D1 = PP1.Tangent();
|
||||||
gp_Dir D2 = PP2.Tangent();
|
gp_Dir D2 = PP2.Tangent();
|
||||||
gp_Dir Dnew( gp_Vec( (D1.X()+D2.X())/2, (D1.Y()+D2.Y())/2,
|
gp_Dir Dnew( ( D1.XYZ() + D2.XYZ() ) / 2 );
|
||||||
(D1.Z()+D2.Z())/2 ) );
|
|
||||||
PP1.SetTangent(Dnew);
|
PP1.SetTangent(Dnew);
|
||||||
fullList.push_back(PP1);
|
fullList.push_back(PP1);
|
||||||
itPP++;
|
itPP++;
|
||||||
|
Loading…
Reference in New Issue
Block a user