mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-30 22:20:34 +05:00
PAL13903 (SMESH Extrusion along a path , linear variation of the angles)
add LinearAnglesVariation()
This commit is contained in:
parent
280355825e
commit
84d928da09
@ -1298,17 +1298,23 @@ SMESH::SMESH_MeshEditor::Extrusion_Error
|
|||||||
gp_Pnt refPnt( theRefPoint.x, theRefPoint.y, theRefPoint.z );
|
gp_Pnt refPnt( theRefPoint.x, theRefPoint.y, theRefPoint.z );
|
||||||
|
|
||||||
// Update Python script
|
// Update Python script
|
||||||
|
TPythonDump() << "rotAngles = " << theAngles;
|
||||||
|
|
||||||
|
if ( theHasRefPoint )
|
||||||
TPythonDump() << "refPoint = SMESH.PointStruct( "
|
TPythonDump() << "refPoint = SMESH.PointStruct( "
|
||||||
<< refPnt.X() << ", "
|
<< refPnt.X() << ", "
|
||||||
<< refPnt.Y() << ", "
|
<< refPnt.Y() << ", "
|
||||||
<< refPnt.Z() << " )";
|
<< refPnt.Z() << " )";
|
||||||
|
else
|
||||||
|
TPythonDump() << "refPoint = SMESH.PointStruct( 0,0,0 )";
|
||||||
|
|
||||||
TPythonDump() << "error = " << this << ".ExtrusionAlongPath( "
|
TPythonDump() << "error = " << this << ".ExtrusionAlongPath( "
|
||||||
<< theIDsOfElements << ", "
|
<< theIDsOfElements << ", "
|
||||||
<< thePathMesh << ", "
|
<< thePathMesh << ", "
|
||||||
<< thePathShape << ", "
|
<< thePathShape << ", "
|
||||||
<< theNodeStart << ", "
|
<< theNodeStart << ", "
|
||||||
<< theHasAngles << ", "
|
<< theHasAngles << ", "
|
||||||
<< theAngles << ", "
|
<< "rotAngles" << ", "
|
||||||
<< theHasRefPoint << ", refPoint )";
|
<< theHasRefPoint << ", refPoint )";
|
||||||
|
|
||||||
::SMESH_MeshEditor anEditor( _myMesh );
|
::SMESH_MeshEditor anEditor( _myMesh );
|
||||||
@ -1350,18 +1356,40 @@ SMESH_MeshEditor_i::ExtrusionAlongPathObject(SMESH::SMESH_IDSource_ptr theObje
|
|||||||
aSMESHGen->RemoveLastFromPythonScript(aSMESHGen->GetCurrentStudyID());
|
aSMESHGen->RemoveLastFromPythonScript(aSMESHGen->GetCurrentStudyID());
|
||||||
|
|
||||||
// Update Python script
|
// Update Python script
|
||||||
|
TPythonDump() << "rotAngles = " << theAngles;
|
||||||
TPythonDump() << "error = " << this << ".ExtrusionAlongPathObject( "
|
TPythonDump() << "error = " << this << ".ExtrusionAlongPathObject( "
|
||||||
<< theObject << ", "
|
<< theObject << ", "
|
||||||
<< thePathMesh << ", "
|
<< thePathMesh << ", "
|
||||||
<< thePathShape << ", "
|
<< thePathShape << ", "
|
||||||
<< theNodeStart << ", "
|
<< theNodeStart << ", "
|
||||||
<< theHasAngles << ", "
|
<< theHasAngles << ", "
|
||||||
<< theAngles << ", "
|
<< "rotAngles" << ", "
|
||||||
<< theHasRefPoint<<", refPoint )";
|
<< theHasRefPoint<<", refPoint )";
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//================================================================================
|
||||||
|
/*!
|
||||||
|
* \brief Compute rotation angles for ExtrusionAlongPath as linear variation
|
||||||
|
* of given angles along path steps
|
||||||
|
* \param PathMesh mesh containing a 1D sub-mesh on the edge, along
|
||||||
|
* which proceeds the extrusion
|
||||||
|
* \param PathShape is shape(edge); as the mesh can be complex, the edge
|
||||||
|
* is used to define the sub-mesh for the path
|
||||||
|
*/
|
||||||
|
//================================================================================
|
||||||
|
|
||||||
|
SMESH::double_array*
|
||||||
|
SMESH_MeshEditor_i::LinearAnglesVariation(SMESH::SMESH_Mesh_ptr thePathMesh,
|
||||||
|
GEOM::GEOM_Object_ptr thePathShape,
|
||||||
|
const SMESH::double_array & theAngles)
|
||||||
|
{
|
||||||
|
SMESH::double_array_var aResult = new SMESH::double_array();
|
||||||
|
// TO BE IMPLEMENTED
|
||||||
|
return aResult._retn();
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Mirror
|
//function : Mirror
|
||||||
//purpose :
|
//purpose :
|
||||||
@ -2015,7 +2043,7 @@ void SMESH_MeshEditor_i::UpdateLastResult(::SMESH_MeshEditor& anEditor)
|
|||||||
|
|
||||||
SMESH::long_array* SMESH_MeshEditor_i::GetLastCreatedNodes()
|
SMESH::long_array* SMESH_MeshEditor_i::GetLastCreatedNodes()
|
||||||
{
|
{
|
||||||
return myLastCreatedNodes;
|
return myLastCreatedNodes.out();
|
||||||
}
|
}
|
||||||
|
|
||||||
//================================================================================
|
//================================================================================
|
||||||
@ -2027,7 +2055,7 @@ SMESH::long_array* SMESH_MeshEditor_i::GetLastCreatedNodes()
|
|||||||
|
|
||||||
SMESH::long_array* SMESH_MeshEditor_i::GetLastCreatedElems()
|
SMESH::long_array* SMESH_MeshEditor_i::GetLastCreatedElems()
|
||||||
{
|
{
|
||||||
return myLastCreatedElems;
|
return myLastCreatedElems.out();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -177,6 +177,10 @@ class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
|
|||||||
CORBA::Boolean HasRefPoint,
|
CORBA::Boolean HasRefPoint,
|
||||||
const SMESH::PointStruct & RefPoint);
|
const SMESH::PointStruct & RefPoint);
|
||||||
|
|
||||||
|
SMESH::double_array* LinearAnglesVariation(SMESH::SMESH_Mesh_ptr PathMesh,
|
||||||
|
GEOM::GEOM_Object_ptr PathShape,
|
||||||
|
const SMESH::double_array & Angles);
|
||||||
|
|
||||||
void Mirror(const SMESH::long_array & IDsOfElements,
|
void Mirror(const SMESH::long_array & IDsOfElements,
|
||||||
const SMESH::AxisStruct & Axis,
|
const SMESH::AxisStruct & Axis,
|
||||||
SMESH::SMESH_MeshEditor::MirrorType MirrorType,
|
SMESH::SMESH_MeshEditor::MirrorType MirrorType,
|
||||||
@ -277,8 +281,8 @@ class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
|
|||||||
private:
|
private:
|
||||||
SMESHDS_Mesh * GetMeshDS() { return _myMesh->GetMeshDS(); }
|
SMESHDS_Mesh * GetMeshDS() { return _myMesh->GetMeshDS(); }
|
||||||
SMESH_Mesh *_myMesh;
|
SMESH_Mesh *_myMesh;
|
||||||
SMESH::long_array* myLastCreatedElems;
|
SMESH::long_array_var myLastCreatedElems;
|
||||||
SMESH::long_array* myLastCreatedNodes;
|
SMESH::long_array_var myLastCreatedNodes;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user