Merge from BR_Dev_For_4_0 branch (from mergeto_BR_QT4_Dev_07Jul08 tag)

This commit is contained in:
vsr 2008-07-14 05:11:31 +00:00
parent d6b1a6e8a4
commit 3df284e94a
11 changed files with 96 additions and 47 deletions

View File

@ -107,19 +107,26 @@ GENERATE_RTF = NO
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Configuration options related to the dot tool # Configuration options related to the dot tool
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES #CLASS_DIAGRAMS = YES
CLASS_DIAGRAMS = NO
HIDE_UNDOC_RELATIONS = NO HIDE_UNDOC_RELATIONS = NO
HAVE_DOT = YES #HAVE_DOT = YES
CLASS_GRAPH = YES HAVE_DOT = NO
#CLASS_GRAPH = YES
CLASS_GRAPH = NO
COLLABORATION_GRAPH = NO COLLABORATION_GRAPH = NO
GROUP_GRAPHS = NO GROUP_GRAPHS = NO
UML_LOOK = NO UML_LOOK = NO
TEMPLATE_RELATIONS = YES #TEMPLATE_RELATIONS = YES
INCLUDE_GRAPH = YES #INCLUDE_GRAPH = YES
TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = NO
INCLUDED_BY_GRAPH = NO INCLUDED_BY_GRAPH = NO
CALL_GRAPH = NO CALL_GRAPH = NO
GRAPHICAL_HIERARCHY = YES #GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES #DIRECTORY_GRAPH = YES
GRAPHICAL_HIERARCHY = NO
DIRECTORY_GRAPH = NO
DOT_IMAGE_FORMAT = jpg DOT_IMAGE_FORMAT = jpg
DOT_PATH = DOT_PATH =
DOTFILE_DIRS = DOTFILE_DIRS =

View File

@ -12,9 +12,7 @@ and <b>Approximation</b>.
\n <b>TUI Command:</b> <em>geompy.MakeFilling(Edges, MinDegree, \n <b>TUI Command:</b> <em>geompy.MakeFilling(Edges, MinDegree,
MaxDegree, Tol2D, Tol3D, NbIter, isApprox)</em> MaxDegree, Tol2D, Tol3D, NbIter, isApprox)</em>
\n <b>Arguments:</b> Name + 1 List of edges + 6 Parameters \n <b>Arguments:</b> Name + 1 Compound of edges + 2 Values (min. and max degree of result BSpline surface) + 2 Values (2D and 3D precision to reach) + 1 Value (number of iterations of approximaion algorithm) + 1 Flag (to select one of algorithms).
(Min. degree, Max. degree, Number of iterations, 2D tolerance, 3D
tolerance, Number of iterations, Approximation).
\image html filling.png \image html filling.png

View File

@ -27,10 +27,25 @@ EXTRA_DIST+=GEOM
doxygen=@DOXYGEN@ doxygen=@DOXYGEN@
# Below command replaces "geompyDC" by "geompy" except cases
# "sgeompyDC", "1geompyDC" and "egeompyDC" (these sequences
# can be found in file names and must not be replaces):
#
# sed 's/\([^s1e]\)geompyDC\|^geompyDC/\1geompy/g' $${filen} > ./tmp;
#
usr_docs: usr_docs:
cd ./GEOM; \ cd ./GEOM; \
echo "Processing geompyDC.py file: "; \ echo "Processing geompyDC.py file: "; \
$(doxygen) ./doxyfile_py; \ $(doxygen) ./doxyfile_py; \
cd ./geompy_doc; \
filesl=`find .`; \
for filen in $${filesl}; do \
sed 's/\([^s1e]\)geompyDC\|^geompyDC/\1geompy/g' $${filen} > ./tmp1; \
sed 's/geompy\.geompy/geompy/g' ./tmp1 > ./tmp; \
rm -f tmp1; \
mv -f tmp $${filen}; \
done; \
cd ..; \
echo "Running doxygen in directory: "`pwd`; \ echo "Running doxygen in directory: "`pwd`; \
$(doxygen) ./doxyfile; $(doxygen) ./doxyfile;
@ -53,4 +68,4 @@ docguidir=$(docdir)/gui/GEOM
nodist_docgui_DATA= GEOM/doxyfile nodist_docgui_DATA= GEOM/doxyfile
nodist_docgui_DATA+= GEOM/doxyfile_py nodist_docgui_DATA+= GEOM/doxyfile_py
EXTRA_DIST+= GEOM/doxyfile.in EXTRA_DIST+= GEOM/doxyfile.in
EXTRA_DIST+= GEOM/doxyfile_py.in EXTRA_DIST+= GEOM/doxyfile_py.in

View File

@ -892,11 +892,11 @@ module GEOM
/*! /*!
* Create a filling from the given compound of contours. * Create a filling from the given compound of contours.
* \param theMinDeg a minimal degree * \param theMinDeg a minimal degree of BSpline surface to create
* \param theMaxDeg a maximal degree * \param theMaxDeg a maximal degree of BSpline surface to create
* \param theTol2D a 2d tolerance * \param theTol2D a 2d tolerance to be reached
* \param theTol3D a 3d tolerance * \param theTol3D a 3d tolerance to be reached
* \param theNbIter a number of iteration * \param theNbIter a number of iteration of approximation algorithm
* \return New GEOM_Object, containing the created filling surface. * \return New GEOM_Object, containing the created filling surface.
*/ */
GEOM_Object MakeFilling (in GEOM_Object theShape, GEOM_Object MakeFilling (in GEOM_Object theShape,

View File

@ -275,6 +275,12 @@ GEOM::GEOM_IOperations_ptr BooleanGUI_Dialog::createOperation()
//================================================================================= //=================================================================================
bool BooleanGUI_Dialog::isValid( QString& msg ) bool BooleanGUI_Dialog::isValid( QString& msg )
{ {
Handle(SALOME_InteractiveObject) IO = firstIObject();
Standard_Boolean testResult;
GEOM::GEOM_Object_var anObject = GEOMBase::ConvertIOinGEOMObject( IO, testResult );
if ( !testResult || anObject->_is_nil() )
return false;
return !CORBA::is_nil( myObject1 ) && !CORBA::is_nil( myObject2 ); return !CORBA::is_nil( myObject1 ) && !CORBA::is_nil( myObject2 );
} }

View File

@ -545,7 +545,7 @@ void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Face& aF,
aTRF=BRep_Tool::Triangulation(aF, aLoc); aTRF=BRep_Tool::Triangulation(aF, aLoc);
if (aTRF.IsNull()) { if (aTRF.IsNull()) {
if (!GEOMAlgo_FinderShapeOn::BuildTriangulation(aF)) { if (!GEOMAlgo_FinderShapeOn::BuildTriangulation(aF)) {
myErrorStatus=20; // no triangulation found myWarningStatus=20; // no triangulation found
return; return;
} }
aTRF=BRep_Tool::Triangulation(aF, aLoc); aTRF=BRep_Tool::Triangulation(aF, aLoc);

View File

@ -605,7 +605,7 @@
aTRF=BRep_Tool::Triangulation(aF, aLoc); aTRF=BRep_Tool::Triangulation(aF, aLoc);
if (aTRF.IsNull()) { if (aTRF.IsNull()) {
if (!GEOMAlgo_FinderShapeOn::BuildTriangulation(aF)) { if (!GEOMAlgo_FinderShapeOn::BuildTriangulation(aF)) {
myErrorStatus=20; // no triangulation found myWarningStatus=20; // no triangulation found
return; return;
} }
aTRF=BRep_Tool::Triangulation(aF, aLoc); aTRF=BRep_Tool::Triangulation(aF, aLoc);

View File

@ -135,7 +135,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletAll
*/ */
//============================================================================= //=============================================================================
Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletEdges Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletEdges
(Handle(GEOM_Object) theShape, double theR, list<int> theEdges) (Handle(GEOM_Object) theShape, double theR, std::list<int> theEdges)
{ {
SetErrorCode(KO); SetErrorCode(KO);
@ -161,7 +161,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletEdges
aCI.SetLength(aLen); aCI.SetLength(aLen);
int ind = 1; int ind = 1;
list<int>::iterator it = theEdges.begin(); std::list<int>::iterator it = theEdges.begin();
for (; it != theEdges.end(); it++, ind++) { for (; it != theEdges.end(); it++, ind++) {
aCI.SetEdge(ind, (*it)); aCI.SetEdge(ind, (*it));
} }
@ -204,7 +204,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletEdges
*/ */
//============================================================================= //=============================================================================
Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletEdgesR1R2 Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletEdgesR1R2
(Handle(GEOM_Object) theShape, double theR1, double theR2, list<int> theEdges) (Handle(GEOM_Object) theShape, double theR1, double theR2, std::list<int> theEdges)
{ {
SetErrorCode(KO); SetErrorCode(KO);
@ -231,7 +231,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletEdgesR1R2
aCI.SetLength(aLen); aCI.SetLength(aLen);
int ind = 1; int ind = 1;
list<int>::iterator it = theEdges.begin(); std::list<int>::iterator it = theEdges.begin();
for (; it != theEdges.end(); it++, ind++) { for (; it != theEdges.end(); it++, ind++) {
aCI.SetEdge(ind, (*it)); aCI.SetEdge(ind, (*it));
} }
@ -275,7 +275,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletEdgesR1R2
*/ */
//============================================================================= //=============================================================================
Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletFaces Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletFaces
(Handle(GEOM_Object) theShape, double theR, list<int> theFaces) (Handle(GEOM_Object) theShape, double theR, std::list<int> theFaces)
{ {
SetErrorCode(KO); SetErrorCode(KO);
@ -301,7 +301,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletFaces
aCI.SetLength(aLen); aCI.SetLength(aLen);
int ind = 1; int ind = 1;
list<int>::iterator it = theFaces.begin(); std::list<int>::iterator it = theFaces.begin();
for (; it != theFaces.end(); it++, ind++) { for (; it != theFaces.end(); it++, ind++) {
aCI.SetFace(ind, (*it)); aCI.SetFace(ind, (*it));
} }
@ -344,7 +344,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletFaces
*/ */
//============================================================================= //=============================================================================
Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletFacesR1R2 Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletFacesR1R2
(Handle(GEOM_Object) theShape, double theR1, double theR2, list<int> theFaces) (Handle(GEOM_Object) theShape, double theR1, double theR2, std::list<int> theFaces)
{ {
SetErrorCode(KO); SetErrorCode(KO);
@ -371,7 +371,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletFacesR1R2
aCI.SetLength(aLen); aCI.SetLength(aLen);
int ind = 1; int ind = 1;
list<int>::iterator it = theFaces.begin(); std::list<int>::iterator it = theFaces.begin();
for (; it != theFaces.end(); it++, ind++) { for (; it != theFaces.end(); it++, ind++) {
aCI.SetFace(ind, (*it)); aCI.SetFace(ind, (*it));
} }
@ -582,7 +582,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdgeAD
//============================================================================= //=============================================================================
Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferFaces Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferFaces
(Handle(GEOM_Object) theShape, double theD1, double theD2, (Handle(GEOM_Object) theShape, double theD1, double theD2,
list<int> theFaces) std::list<int> theFaces)
{ {
SetErrorCode(KO); SetErrorCode(KO);
@ -609,7 +609,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferFaces
aCI.SetLength(aLen); aCI.SetLength(aLen);
int ind = 1; int ind = 1;
list<int>::iterator it = theFaces.begin(); std::list<int>::iterator it = theFaces.begin();
for (; it != theFaces.end(); it++, ind++) { for (; it != theFaces.end(); it++, ind++) {
aCI.SetFace(ind, (*it)); aCI.SetFace(ind, (*it));
} }
@ -653,7 +653,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferFaces
//============================================================================= //=============================================================================
Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferFacesAD Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferFacesAD
(Handle(GEOM_Object) theShape, double theD, double theAngle, (Handle(GEOM_Object) theShape, double theD, double theAngle,
list<int> theFaces) std::list<int> theFaces)
{ {
SetErrorCode(KO); SetErrorCode(KO);
@ -680,7 +680,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferFacesAD
aCI.SetLength(aLen); aCI.SetLength(aLen);
int ind = 1; int ind = 1;
list<int>::iterator it = theFaces.begin(); std::list<int>::iterator it = theFaces.begin();
for (; it != theFaces.end(); it++, ind++) { for (; it != theFaces.end(); it++, ind++) {
aCI.SetFace(ind, (*it)); aCI.SetFace(ind, (*it));
} }
@ -724,7 +724,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferFacesAD
//============================================================================= //=============================================================================
Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdges Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdges
(Handle(GEOM_Object) theShape, double theD1, double theD2, (Handle(GEOM_Object) theShape, double theD1, double theD2,
list<int> theEdges) std::list<int> theEdges)
{ {
SetErrorCode(KO); SetErrorCode(KO);
@ -752,7 +752,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdges
aCI.SetLength(aLen); aCI.SetLength(aLen);
int ind = 1; int ind = 1;
list<int>::iterator it = theEdges.begin(); std::list<int>::iterator it = theEdges.begin();
for (; it != theEdges.end(); it++, ind++) { for (; it != theEdges.end(); it++, ind++) {
aCI.SetEdge(ind, (*it)); aCI.SetEdge(ind, (*it));
} }
@ -796,7 +796,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdges
//============================================================================= //=============================================================================
Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdgesAD Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdgesAD
(Handle(GEOM_Object) theShape, double theD, double theAngle, (Handle(GEOM_Object) theShape, double theD, double theAngle,
list<int> theEdges) std::list<int> theEdges)
{ {
SetErrorCode(KO); SetErrorCode(KO);
@ -824,7 +824,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdgesAD
aCI.SetLength(aLen); aCI.SetLength(aLen);
int ind = 1; int ind = 1;
list<int>::iterator it = theEdges.begin(); std::list<int>::iterator it = theEdges.begin();
for (; it != theEdges.end(); it++, ind++) { for (; it != theEdges.end(); it++, ind++) {
aCI.SetEdge(ind, (*it)); aCI.SetEdge(ind, (*it));
} }

View File

@ -96,15 +96,15 @@ void GEOM_Superv_i::setGeomEngine()
{ {
if ( !CORBA::is_nil(myGeomEngine) ) if ( !CORBA::is_nil(myGeomEngine) )
return; return;
// get GEOM_Gen engine
/*
SALOME_LifeCycleCORBA* lcc = new SALOME_LifeCycleCORBA( name_service );
Engines::Component_var comp = lcc->FindOrLoad_Component( "FactoryServer", "GEOM" );
*/
// get GEOM_Gen engine
Engines::Container_var cont=GetContainerRef(); Engines::Container_var cont=GetContainerRef();
cont->load_component_Library("GEOM"); CORBA::String_var container_name=cont->name();
Engines::Component_var comp=cont->create_component_instance("GEOM",0); std::string shortName=container_name.in();
shortName=shortName.substr(12); // substract "/Containers/"
SALOME_LifeCycleCORBA* lcc = new SALOME_LifeCycleCORBA( name_service );
Engines::Component_var comp = lcc->FindOrLoad_Component( shortName.c_str(), "GEOM" );
delete lcc;
myGeomEngine = GEOM::GEOM_Gen::_narrow(comp); myGeomEngine = GEOM::GEOM_Gen::_narrow(comp);
} }

View File

@ -160,7 +160,9 @@ def TestAll (geompy, math):
#Create advanced objects #Create advanced objects
Copy = geompy.MakeCopy(Box) #(GEOM_Object_ptr)->GEOM_Object_ptr Copy = geompy.MakeCopy(Box) #(GEOM_Object_ptr)->GEOM_Object_ptr
Prism = geompy.MakePrismVecH(Face, vz, 100.0) #(2 GEOM_Object_ptr, Double)->GEOM_Object_ptr Prism = geompy.MakePrismVecH(Face, vz, 100.0) #(2 GEOM_Object_ptr, Double)->GEOM_Object_ptr
Prism2Ways = geompy.MakePrismVecH2Ways(Face, vz, 10.0) #(2 GEOM_Object_ptr, Double)->GEOM_Object_ptr
Revolution = geompy.MakeRevolution(Face, vz, angle2) # Revolution = geompy.MakeRevolution(Face, vz, angle2) #
Revolution2Ways = geompy.MakeRevolution(Face, vz, angle1) #
Filling = geompy.MakeFilling(Compound, mindeg, maxdeg, Filling = geompy.MakeFilling(Compound, mindeg, maxdeg,
tol2d, tol3d, nbiter) #(GEOM_Object_ptr, 4 Doubles, Short)->GEOM_Object_ptr tol2d, tol3d, nbiter) #(GEOM_Object_ptr, 4 Doubles, Short)->GEOM_Object_ptr
Pipe = geompy.MakePipe(Wire, Edge) #(2 GEOM_Object_ptr)->GEOM_Object_ptr Pipe = geompy.MakePipe(Wire, Edge) #(2 GEOM_Object_ptr)->GEOM_Object_ptr
@ -304,7 +306,9 @@ def TestAll (geompy, math):
id_Copy = geompy.addToStudy(Copy, "Copy") id_Copy = geompy.addToStudy(Copy, "Copy")
id_Prism = geompy.addToStudy(Prism, "Prism") id_Prism = geompy.addToStudy(Prism, "Prism")
id_Prism2Ways = geompy.addToStudy(Prism2Ways, "Prism2Ways")
id_Revolution = geompy.addToStudy(Revolution, "Revolution") id_Revolution = geompy.addToStudy(Revolution, "Revolution")
id_Revolution2Ways = geompy.addToStudy(Revolution2Ways, "Revolution2Ways")
id_Filling = geompy.addToStudy(Filling, "Filling") id_Filling = geompy.addToStudy(Filling, "Filling")
id_Pipe = geompy.addToStudy(Pipe, "Pipe") id_Pipe = geompy.addToStudy(Pipe, "Pipe")
id_Sewing = geompy.addToStudy(Sewing, "Sewing") id_Sewing = geompy.addToStudy(Sewing, "Sewing")

View File

@ -666,6 +666,20 @@ class geompyDC(GEOM._objref_GEOM_Gen):
anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH) anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
RaiseIfFailed("MakePrismVecH", self.PrimOp) RaiseIfFailed("MakePrismVecH", self.PrimOp)
return anObj return anObj
## Create a shape by extrusion of the base shape along the vector,
# i.e. all the space, transfixed by the base shape during its translation
# along the vector on the given distance in 2 Ways (forward/backward) .
# @param theBase Base shape to be extruded.
# @param theVec Direction of extrusion.
# @param theH Prism dimension along theVec in forward direction.
# @return New GEOM_Object, containing the created prism.
#
# Example: see GEOM_TestAll.py
def MakePrismVecH2Ways(self, theBase, theVec, theH):
anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
return anObj
## Create a shape by extrusion of the base shape along ## Create a shape by extrusion of the base shape along
# the path shape. The path shape can be a wire or an edge. # the path shape. The path shape can be a wire or an edge.
@ -692,6 +706,11 @@ class geompyDC(GEOM._objref_GEOM_Gen):
anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle) anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp) RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
return anObj return anObj
## The Same Revolution but in both ways forward&backward.
def MakeRevolution2Ways(self, theBase, theAxis, theAngle):
anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
return anObj
## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices. ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
# @param theSeqSections - set of specified sections. # @param theSeqSections - set of specified sections.
@ -1371,11 +1390,11 @@ class geompyDC(GEOM._objref_GEOM_Gen):
## Create a filling from the given compound of contours. ## Create a filling from the given compound of contours.
# @param theShape the compound of contours # @param theShape the compound of contours
# @param theMinDeg a minimal degree # @param theMinDeg a minimal degree of BSpline surface to create
# @param theMaxDeg a maximal degree # @param theMaxDeg a maximal degree of BSpline surface to create
# @param theTol2D a 2d tolerance # @param theTol2D a 2d tolerance to be reached
# @param theTol3D a 3d tolerance # @param theTol3D a 3d tolerance to be reached
# @param theNbIter a number of iteration # @param theNbIter a number of iteration of approximation algorithm
# @return New GEOM_Object, containing the created filling surface. # @return New GEOM_Object, containing the created filling surface.
# #
# Example: see GEOM_TestAll.py # Example: see GEOM_TestAll.py
@ -1595,7 +1614,7 @@ class geompyDC(GEOM._objref_GEOM_Gen):
anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector) anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
RaiseIfFailed("TranslateVectorCopy", self.TrsfOp) RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
return anObj return anObj
## Rotate the given object around the given axis ## Rotate the given object around the given axis
# on the given angle, creating its copy before the rotatation. # on the given angle, creating its copy before the rotatation.
# @param theObject The object to be rotated. # @param theObject The object to be rotated.