mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-29 04:20:32 +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,18 +1298,24 @@ SMESH::SMESH_MeshEditor::Extrusion_Error
|
||||
gp_Pnt refPnt( theRefPoint.x, theRefPoint.y, theRefPoint.z );
|
||||
|
||||
// Update Python script
|
||||
TPythonDump() << "refPoint = SMESH.PointStruct( "
|
||||
<< refPnt.X() << ", "
|
||||
<< refPnt.Y() << ", "
|
||||
<< refPnt.Z() << " )";
|
||||
TPythonDump() << "rotAngles = " << theAngles;
|
||||
|
||||
if ( theHasRefPoint )
|
||||
TPythonDump() << "refPoint = SMESH.PointStruct( "
|
||||
<< refPnt.X() << ", "
|
||||
<< refPnt.Y() << ", "
|
||||
<< refPnt.Z() << " )";
|
||||
else
|
||||
TPythonDump() << "refPoint = SMESH.PointStruct( 0,0,0 )";
|
||||
|
||||
TPythonDump() << "error = " << this << ".ExtrusionAlongPath( "
|
||||
<< theIDsOfElements << ", "
|
||||
<< thePathMesh << ", "
|
||||
<< thePathShape << ", "
|
||||
<< theNodeStart << ", "
|
||||
<< theHasAngles << ", "
|
||||
<< theAngles << ", "
|
||||
<< theHasRefPoint << ", refPoint )";
|
||||
<< thePathMesh << ", "
|
||||
<< thePathShape << ", "
|
||||
<< theNodeStart << ", "
|
||||
<< theHasAngles << ", "
|
||||
<< "rotAngles" << ", "
|
||||
<< theHasRefPoint << ", refPoint )";
|
||||
|
||||
::SMESH_MeshEditor anEditor( _myMesh );
|
||||
SMESH::SMESH_MeshEditor::Extrusion_Error error =
|
||||
@ -1350,18 +1356,40 @@ SMESH_MeshEditor_i::ExtrusionAlongPathObject(SMESH::SMESH_IDSource_ptr theObje
|
||||
aSMESHGen->RemoveLastFromPythonScript(aSMESHGen->GetCurrentStudyID());
|
||||
|
||||
// Update Python script
|
||||
TPythonDump() << "rotAngles = " << theAngles;
|
||||
TPythonDump() << "error = " << this << ".ExtrusionAlongPathObject( "
|
||||
<< theObject << ", "
|
||||
<< thePathMesh << ", "
|
||||
<< thePathShape << ", "
|
||||
<< theNodeStart << ", "
|
||||
<< theHasAngles << ", "
|
||||
<< theAngles << ", "
|
||||
<< theHasRefPoint << ", refPoint )";
|
||||
<< "rotAngles" << ", "
|
||||
<< theHasRefPoint<<", refPoint )";
|
||||
|
||||
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
|
||||
//purpose :
|
||||
@ -2015,7 +2043,7 @@ void SMESH_MeshEditor_i::UpdateLastResult(::SMESH_MeshEditor& anEditor)
|
||||
|
||||
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()
|
||||
{
|
||||
return myLastCreatedElems;
|
||||
return myLastCreatedElems.out();
|
||||
}
|
||||
|
||||
|
||||
|
@ -177,6 +177,10 @@ class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
|
||||
CORBA::Boolean HasRefPoint,
|
||||
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,
|
||||
const SMESH::AxisStruct & Axis,
|
||||
SMESH::SMESH_MeshEditor::MirrorType MirrorType,
|
||||
@ -277,8 +281,8 @@ class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
|
||||
private:
|
||||
SMESHDS_Mesh * GetMeshDS() { return _myMesh->GetMeshDS(); }
|
||||
SMESH_Mesh *_myMesh;
|
||||
SMESH::long_array* myLastCreatedElems;
|
||||
SMESH::long_array* myLastCreatedNodes;
|
||||
SMESH::long_array_var myLastCreatedElems;
|
||||
SMESH::long_array_var myLastCreatedNodes;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user