Merge branch 'V8_0_0_BR'

This commit is contained in:
vsr 2016-03-09 17:28:19 +03:00
commit aa14383e45
23 changed files with 302 additions and 118 deletions

View File

@ -29,8 +29,8 @@ CMAKE_POLICY(SET CMP0003 NEW)
# Project name, upper case
STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
SET(${PROJECT_NAME_UC}_MAJOR_VERSION 7)
SET(${PROJECT_NAME_UC}_MINOR_VERSION 7)
SET(${PROJECT_NAME_UC}_MAJOR_VERSION 8)
SET(${PROJECT_NAME_UC}_MINOR_VERSION 0)
SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
SET(${PROJECT_NAME_UC}_VERSION
${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})

View File

@ -299,7 +299,9 @@ module GEOM
long GetStudyID();
/*!
* \brief Get internal type of the object (POINT, BOX, CYLINDER, EXTRUSION...).
* \brief Get internal type of operation created this object (POINT, BOX, CYLINDER, EXTRUSION...).
* \note To get topological information on the object, use \ref GEOM_IMeasureOperations::WhatIs() "WhatIs()"
* or \ref GEOM_IMeasureOperations::KindOfShape() "KindOfShape()" operation.
*/
long GetType();
@ -2654,7 +2656,8 @@ module GEOM
* coincident with \a theShapeWhat or could be a part of it.
* \param theShapeWhere Shape to find sub-shapes of.
* \param theShapeWhat Shape, specifying what to find.
* \return Group of all found sub-shapes or a single found sub-shape.
* \return Compound which includes all found sub-shapes if they have different types;
* or group of all found shapes of the equal type; or a single found sub-shape.
*/
GEOM_Object GetInPlace (in GEOM_Object theShapeWhere,
in GEOM_Object theShapeWhat);
@ -2677,7 +2680,8 @@ module GEOM
*
* \param theShapeWhere Shape to find sub-shapes of.
* \param theShapeWhat Shape, specifying what to find.
* \return Group of all found sub-shapes or a single found sub-shape.
* \return Compound which includes all found sub-shapes if they have different types;
* or group of all found shapes of the equal type; or a single found sub-shape.
*/
GEOM_Object GetInPlaceByHistory (in GEOM_Object theShapeWhere,
in GEOM_Object theShapeWhat);

View File

@ -1278,7 +1278,10 @@ void FillMapOfRef(const Handle(GEOM_Function) &theFunction,
const int aRefTag = GetTag(anObjEntry);
theRefMap[anObjTag].push_back(aRefTag);
if (anObjTag != aRefTag) {
// Avoid making references for operations without copy.
theRefMap[anObjTag].push_back(aRefTag);
}
}
}
}

View File

@ -17,6 +17,8 @@
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
INCLUDE(UseQtExt)
# --- options ---
# additional include directories

View File

@ -68,7 +68,7 @@ bool GEOMGUI::OnGUIEvent( int /*theCommandID*/, SUIT_Desktop* /*parent*/ )
//=================================================================================
// class : GEOMGUI::OnMousePress
// purpose : Mouse press event processing. Should return FALSE to let the event
// purpose : Mouse press event processing. Should return false to let the event
// be processed further.
//=================================================================================
bool GEOMGUI::OnMousePress( QMouseEvent* /*pe*/, SUIT_Desktop* /*parent*/, SUIT_ViewWindow* /*studyFrame*/ )

View File

@ -4960,10 +4960,18 @@ Please, select face, shell or solid and try again</translation>
<source>MEN_POP_SHOW_DEPENDENCY_TREE</source>
<translation>Show dependency tree</translation>
</message>
<message>
<source>STB_POP_SHOW_DEPENDENCY_TREE</source>
<translation>Show dependency tree</translation>
</message>
<message>
<source>MEN_POP_REDUCE_STUDY</source>
<translation>Reduce study</translation>
</message>
<message>
<source>STB_POP_REDUCE_STUDY</source>
<translation>Reduce study</translation>
</message>
<message>
<source>MEN_POP_SHOW_ALL_DIMENSIONS</source>
<translation>Show all dimensions</translation>

View File

@ -4952,10 +4952,18 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
<source>MEN_POP_SHOW_DEPENDENCY_TREE</source>
<translation>Montrer l&apos;arbre des dépendances</translation>
</message>
<message>
<source>STB_POP_SHOW_DEPENDENCY_TREE</source>
<translation>Montrer l&apos;arbre des dépendances</translation>
</message>
<message>
<source>MEN_POP_REDUCE_STUDY</source>
<translation>Etude réduite</translation>
</message>
<message>
<source>STB_POP_REDUCE_STUDY</source>
<translation>Etude réduite</translation>
</message>
<message>
<source>MEN_POP_SHOW_ALL_DIMENSIONS</source>
<translation>Afficher les cotations </translation>

View File

@ -4955,10 +4955,18 @@
<source>MEN_POP_SHOW_DEPENDENCY_TREE</source>
<translation></translation>
</message>
<message>
<source>STB_POP_SHOW_DEPENDENCY_TREE</source>
<translation></translation>
</message>
<message>
<source>MEN_POP_REDUCE_STUDY</source>
<translation></translation>
</message>
<message>
<source>STB_POP_REDUCE_STUDY</source>
<translation></translation>
</message>
<message>
<source>MEN_POP_SHOW_ALL_DIMENSIONS</source>
<translation></translation>

View File

@ -180,6 +180,8 @@ static GeomFill_Trihedron EvaluateBestSweepMode(const TopoDS_Shape& Spine)
//=======================================================================
static Standard_Boolean BuildPipeShell(BRepOffsetAPI_MakePipeShell &theBuilder)
{
theBuilder.SetForceApproxC1(Standard_True);
theBuilder.Build();
Standard_Boolean isDone = theBuilder.IsDone();
@ -3125,7 +3127,8 @@ Standard_Integer GEOMImpl_PipeDriver::Execute (TFunction_Logbook& log) const
else
{
GeomFill_Trihedron theBestMode = EvaluateBestSweepMode(aWirePath);
BRepOffsetAPI_MakePipe aMkPipe(aWirePath, aShapeBase, theBestMode);
BRepOffsetAPI_MakePipe aMkPipe
(aWirePath, aShapeBase, theBestMode, Standard_True);
if (aMkPipe.IsDone() && aMkPipe.ErrorOnSurface() <= TolPipeSurf) {
aShape = aMkPipe.Shape();
@ -3137,7 +3140,7 @@ Standard_Integer GEOMImpl_PipeDriver::Execute (TFunction_Logbook& log) const
} else if (theBestMode != GeomFill_IsDiscreteTrihedron) {
// Try to use Descrete Trihedron mode.
BRepOffsetAPI_MakePipe aMkPipeDescrete
(aWirePath, aShapeBase, GeomFill_IsDiscreteTrihedron);
(aWirePath, aShapeBase, GeomFill_IsDiscreteTrihedron, Standard_True);
if (aMkPipeDescrete.IsDone()) {
aShape = aMkPipeDescrete.Shape();

View File

@ -73,6 +73,8 @@
#include <TopoDS_Compound.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_HSequenceOfShape.hxx>
@ -161,6 +163,185 @@ namespace
return result;
}
/**
* This function adds faces from the input shape into the list of faces. If
* the input shape is a face, it is added itself. If it is a shell, its
* sub-shapes (faces) are added. If it is a compound, its sub-shapes
* (faces or shells) are added in the list. For null shapes and for other
* types of shapes an exception is thrown.
*
* @param theShape the shape to be added. Either face or shell or a compound
* of faces and/or shells.
* @param theListFaces the list of faces that is modified on output.
* @param theMapFence the map that protects from adding the same faces in
* the list.
*/
void addFaces(const TopoDS_Shape &theShape,
TopTools_ListOfShape &theListFaces,
TopTools_MapOfShape &theMapFence)
{
if (theShape.IsNull()) {
Standard_NullObject::Raise("Face for shell construction is null");
}
// Append the shape is the mapFence
if (theMapFence.Add(theShape)) {
// Shape type
const TopAbs_ShapeEnum aType = theShape.ShapeType();
if (aType == TopAbs_FACE) {
theListFaces.Append(theShape);
} else if (aType == TopAbs_SHELL || aType == TopAbs_COMPOUND) {
TopoDS_Iterator anIter(theShape);
for (; anIter.More(); anIter.Next()) {
// Add sub-shapes: faces for shell or faces/shells for compound.
const TopoDS_Shape &aSubShape = anIter.Value();
addFaces(aSubShape, theListFaces, theMapFence);
}
} else {
Standard_TypeMismatch::Raise
("Shape for shell construction is neither a shell nor a face");
}
}
}
/**
* This function constructs a shell or a compound of shells
* from a set of faces and/or shells.
*
* @param theShapes is a set of faces, shells and/or
* compounds of faces/shells.
* @return a shell or a compound of shells.
*/
TopoDS_Shape makeShellFromFaces
(const Handle(TColStd_HSequenceOfTransient) &theShapes)
{
const Standard_Integer aNbShapes = theShapes->Length();
Standard_Integer i;
TopTools_ListOfShape aListFaces;
TopTools_MapOfShape aMapFence;
BRep_Builder aBuilder;
// Fill the list of unique faces
for (i = 1; i <= aNbShapes; ++i) {
// Function
const Handle(GEOM_Function) aRefShape =
Handle(GEOM_Function)::DownCast(theShapes->Value(i));
if (aRefShape.IsNull()) {
Standard_NullObject::Raise("Face for shell construction is null");
}
// Shape
const TopoDS_Shape aShape = aRefShape->GetValue();
addFaces(aShape, aListFaces, aMapFence);
}
// Perform computation of shells.
TopTools_ListOfShape aListShells;
TopTools_ListIteratorOfListOfShape anIter;
while (!aListFaces.IsEmpty()) {
// Perform sewing
BRepBuilderAPI_Sewing aSewing(Precision::Confusion()*10.0);
for (anIter.Initialize(aListFaces); anIter.More(); anIter.Next()) {
aSewing.Add(anIter.Value());
}
aSewing.Perform();
// Fill list of shells.
const TopoDS_Shape &aSewed = aSewing.SewedShape();
TopExp_Explorer anExp(aSewed, TopAbs_SHELL);
Standard_Boolean isNewShells = Standard_False;
// Append shells
for (; anExp.More(); anExp.Next()) {
aListShells.Append(anExp.Current());
isNewShells = Standard_True;
}
// Append single faces.
anExp.Init(aSewed, TopAbs_FACE, TopAbs_SHELL);
for (; anExp.More(); anExp.Next()) {
TopoDS_Shell aShell;
aBuilder.MakeShell(aShell);
aBuilder.Add(aShell, anExp.Current());
aListShells.Append(aShell);
isNewShells = Standard_True;
}
if (!isNewShells) {
// There are no more shell can be obtained. Break the loop.
break;
}
// Remove faces that are in the result from the list.
TopTools_IndexedMapOfShape aMapFaces;
TopExp::MapShapes(aSewed, TopAbs_FACE, aMapFaces);
// Add deleted faces to the map
const Standard_Integer aNbDelFaces = aSewing.NbDeletedFaces();
for (i = 1; i <= aNbDelFaces; ++i) {
aMapFaces.Add(aSewing.DeletedFace(i));
}
for (anIter.Initialize(aListFaces); anIter.More();) {
const TopoDS_Shape &aFace = anIter.Value();
Standard_Boolean isFaceUsed = Standard_False;
if (aMapFaces.Contains(aFace) || aSewing.IsModified(aFace)) {
// Remove face from the list.
aListFaces.Remove(anIter);
} else {
// Go to the next face.
anIter.Next();
}
}
}
// If there are faces not used in shells create a shell for each face.
for (anIter.Initialize(aListFaces); anIter.More(); anIter.Next()) {
TopoDS_Shell aShell;
aBuilder.MakeShell(aShell);
aBuilder.Add(aShell, anIter.Value());
aListShells.Append(aShell);
}
// Construct the result that can be either a shell or a compound of shells
TopoDS_Shape aResult;
if (!aListShells.IsEmpty()) {
if (aListShells.Extent() == 1) {
aResult = aListShells.First();
} else {
// There are more then one shell.
TopoDS_Compound aCompound;
aBuilder.MakeCompound(aCompound);
for (anIter.Initialize(aListShells); anIter.More(); anIter.Next()) {
aBuilder.Add(aCompound, anIter.Value());
}
aResult = aCompound;
}
}
return aResult;
}
// End of namespace
}
//modified by NIZNHY-PKV Wed Dec 28 13:48:20 2011f
@ -432,60 +613,13 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const
allowCompound = true;
Handle(TColStd_HSequenceOfTransient) aShapes = aCI.GetShapes();
unsigned int ind, nbshapes = aShapes->Length();
// add faces
BRepBuilderAPI_Sewing aSewing (Precision::Confusion()*10.0);
for (ind = 1; ind <= nbshapes; ind++) {
Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast(aShapes->Value(ind));
TopoDS_Shape aShape_i = aRefShape->GetValue();
if (aShape_i.IsNull()) {
Standard_NullObject::Raise("Face for shell construction is null");
}
aSewing.Add(aShape_i);
}
aSewing.Perform();
TopoDS_Shape sh = aSewing.SewedShape();
if (sh.ShapeType()==TopAbs_FACE && nbshapes==1) {
// case for creation of shell from one face - PAL12722 (skl 26.06.2006)
TopoDS_Shell ss;
B.MakeShell(ss);
B.Add(ss,sh);
aShape = ss;
}
else {
//TopExp_Explorer exp (aSewing.SewedShape(), TopAbs_SHELL);
TopExp_Explorer exp (sh, TopAbs_SHELL);
Standard_Integer ish = 0;
for (; exp.More(); exp.Next()) {
aShape = exp.Current();
ish++;
}
if (ish != 1) {
// try the case of one face (Mantis issue 0021809)
TopExp_Explorer expF (sh, TopAbs_FACE);
Standard_Integer ifa = 0;
for (; expF.More(); expF.Next()) {
aShape = expF.Current();
ifa++;
}
if (ifa == 1) {
TopoDS_Shell ss;
B.MakeShell(ss);
B.Add(ss,aShape);
aShape = ss;
}
else {
aShape = aSewing.SewedShape();
}
}
if (aShapes.IsNull()) {
Standard_NullObject::Raise("Argument Shapes is null");
}
// Compute a shell or a compound of shells.
aShape = makeShellFromFaces(aShapes);
}
else if (aType == SOLID_SHELLS) {
// result may be only a solid or a compound of solids

View File

@ -17,6 +17,8 @@
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
INCLUDE(UseQtExt)
# --- options ---
# additional include directories

View File

@ -43,7 +43,7 @@
// purpose : Constructs a GEOMToolsGUI_DeflectionDlg which is a child of 'parent', with the
// name 'name' and widget flags set to 'f'.
// The dialog will by default be modeless, unless you set 'modal' to
// TRUE to construct a modal dialog.
// true to construct a modal dialog.
//=================================================================================
GEOMToolsGUI_DeflectionDlg::GEOMToolsGUI_DeflectionDlg (QWidget* parent)
: QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint)

View File

@ -44,7 +44,7 @@
// purpose : Constructs a GEOMToolsGUI_LineWidthDlg which is a child of 'parent', with the
// name 'name' and widget flags set to 'f'.
// The dialog will by default be modeless, unless you set 'modal' to
// TRUE to construct a modal dialog.
// true to construct a modal dialog.
//=================================================================================
GEOMToolsGUI_LineWidthDlg::GEOMToolsGUI_LineWidthDlg (QWidget* parent, const QString& title)

View File

@ -44,7 +44,7 @@
// purpose : Constructs a GEOMToolsGUI_NbIsosDlg which is a child of 'parent', with the
// name 'name' and widget flags set to 'f'.
// The dialog will by default be modeless, unless you set 'modal' to
// TRUE to construct a modal dialog.
// true to construct a modal dialog.
//=================================================================================
GEOMToolsGUI_NbIsosDlg::GEOMToolsGUI_NbIsosDlg(QWidget* parent )
:QDialog( parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint )

View File

@ -4834,8 +4834,8 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
self._autoPublish(anObj, theName, "face")
return anObj
## Create a shell from the set of faces and shells.
# @param theFacesAndShells List of faces and/or shells.
## Create a shell from the set of faces, shells and/or compounds of faces.
# @param theFacesAndShells List of faces, shells and/or compounds of faces.
# @param theName Object name; when specified, this parameter is used
# for result publication in the study. Otherwise, if automatic
# publication is switched on, default value is used for result name.
@ -5866,7 +5866,8 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
# for result publication in the study. Otherwise, if automatic
# publication is switched on, default value is used for result name.
#
# @return Group of all found sub-shapes or a single found sub-shape.
# @return Compound which includes all found sub-shapes if they have different types;
# or group of all found shapes of the equal type; or a single found sub-shape.
#
# @note This function has a restriction on argument shapes.
# If \a theShapeWhere has curved parts with significantly
@ -5891,7 +5892,8 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
publication is switched on, default value is used for result name.
Returns:
Group of all found sub-shapes or a single found sub-shape.
Compound which includes all found sub-shapes if they have different types;
or group of all found shapes of the equal type; or a single found sub-shape.
Note:
@ -5927,7 +5929,8 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
# for result publication in the study. Otherwise, if automatic
# publication is switched on, default value is used for result name.
#
# @return Group of all found sub-shapes or a single found sub-shape.
# @return Compound which includes all found sub-shapes if they have different types;
# or group of all found shapes of the equal type; or a single found sub-shape.
#
# @ref swig_GetInPlace "Example"
@ManageTransactions("ShapesOp")
@ -5948,7 +5951,8 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
publication is switched on, default value is used for result name.
Returns:
Group of all found sub-shapes or a single found sub-shape.
Compound which includes all found sub-shapes if they have different types;
or group of all found shapes of the equal type; or a single found sub-shape.
"""
# Example: see GEOM_TestOthers.py
anObj = self.ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)

View File

@ -18,12 +18,12 @@
#
INCLUDE(${SWIG_USE_FILE})
INCLUDE(UseQtExt)
# --- options ---
# additional include directories
INCLUDE_DIRECTORIES(
${QT_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}

View File

@ -17,10 +17,13 @@
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
INCLUDE(UseQtExt)
# --- options ---
# additional include directories
INCLUDE_DIRECTORIES(
${QT_INCLUDE_DIRS}
${VTK_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR}
${CAS_INCLUDE_DIRS}

View File

@ -17,6 +17,8 @@
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
INCLUDE(UseQtExt)
# --- options ---
# additional include directories

View File

@ -26,7 +26,7 @@ def t_shape_fluid(context):
from salome.geom.t_shape import t_shape_dialog
from salome.geom.t_shape import t_shape_progress
import xalome
from PyQt4.QtGui import QMessageBox
from qtsalome import QMessageBox
activeStudy = context.study
dialog = t_shape_dialog.TShapeDialog()

View File

@ -20,15 +20,14 @@
# Author : Renaud Nédélec (OpenCascade S.A.S)
import sys
from PyQt4 import QtGui
from PyQt4 import QtCore
from qtsalome import *
from t_shape_dialog_ui import Ui_Dialog
class TShapeDialog(QtGui.QDialog):
class TShapeDialog(QDialog):
def __init__(self):
QtGui.QDialog.__init__(self, None, QtCore.Qt.Tool)
QDialog.__init__(self, None, Qt.Tool)
# Set up the user interface from Designer.
self.ui = Ui_Dialog()
self.ui.setupUi(self)
@ -43,7 +42,7 @@ class TShapeDialog(QtGui.QDialog):
def accept(self):
self._wasOk = True
QtGui.QDialog.accept(self)
QDialog.accept(self)
def getData(self):
r1 = self.ui.dsb_bigRadius.value()
@ -58,7 +57,7 @@ class TShapeDialog(QtGui.QDialog):
def reject(self):
self._wasOk = False
QtGui.QDialog.reject(self)
QDialog.reject(self)
def wasOk(self):
return self._wasOk
@ -70,7 +69,7 @@ class TShapeDialog(QtGui.QDialog):
def main( args ):
import sys
app = QtGui.QApplication(sys.argv)
app = QApplication(sys.argv)
Dialog = TShapeDialog()
ui = Ui_Dialog()
ui.setupUi(Dialog)

View File

@ -20,15 +20,14 @@
# Author : Renaud Nédélec (OpenCascade S.A.S)
from salome.geom.t_shape import t_shape_builder
from PyQt4.QtGui import QProgressDialog
from PyQt4 import QtCore
from qtsalome import *
class t_shape_progress(QProgressDialog):
_totSteps = 0
_nmaxSteps = 27
def __init__(self, parent=None):
QProgressDialog.__init__(self, "t_shape fluid build", "stop", 0, self._nmaxSteps, parent, QtCore.Qt.Tool)
QProgressDialog.__init__(self, "t_shape fluid build", "stop", 0, self._nmaxSteps, parent, Qt.Tool)
self.show()
def run(self, activeStudy, r1, r2, h1, h2, thickness):

View File

@ -113,15 +113,19 @@ XAOPlugin_IOperations::~XAOPlugin_IOperations()
MESSAGE( "XAOPlugin_IOperations::~XAOPlugin_IOperations" );
}
void XAOPlugin_IOperations::exportGroups( std::list<Handle(GEOM_Object)> groupList,
XAO::Xao* xaoObject,
XAO::BrepGeometry* geometry )
bool XAOPlugin_IOperations::exportGroups( std::list<Handle(GEOM_Object)> groupList,
XAO::Xao* xaoObject,
XAO::BrepGeometry* geometry )
{
// add the groups
std::list<Handle(GEOM_Object)>::iterator groupIterator = groupList.begin();
while (groupIterator != groupList.end())
{
Handle(GEOM_Object) currGroup = (*groupIterator++);
if (currGroup->GetType() != GEOM_GROUP) {
SetErrorCode("Error when export groups: you could perform this operation only with group.");
return false;
}
Handle(TColStd_HArray1OfInteger) groupIds = myGroupOperations->GetObjects(currGroup);
TopAbs_ShapeEnum shapeGroup = myGroupOperations->GetType(currGroup);
@ -164,11 +168,12 @@ void XAOPlugin_IOperations::exportGroups( std::list<Handle(GEOM_Object)> groupLi
break;
}
}
return true;
}
void XAOPlugin_IOperations::exportFields( std::list<Handle(GEOM_Field)> fieldList,
XAO::Xao* xaoObject,
XAO::BrepGeometry* geometry )
XAO::Xao* xaoObject,
XAO::BrepGeometry* geometry )
{
std::list<Handle(GEOM_Field)>::iterator fieldIterator = fieldList.begin();
while (fieldIterator != fieldList.end())
@ -301,10 +306,10 @@ void XAOPlugin_IOperations::exportSubshapes( const Handle(GEOM_Object)& shape, X
*/
//=============================================================================
bool XAOPlugin_IOperations::ExportXAO( Handle(GEOM_Object) shape,
std::list<Handle(GEOM_Object)> groupList,
std::list<Handle(GEOM_Field)> fieldList,
const char* author,
const char* fileName )
std::list<Handle(GEOM_Object)> groupList,
std::list<Handle(GEOM_Field)> fieldList,
const char* author,
const char* fileName )
{
SetErrorCode(KO);
@ -337,7 +342,7 @@ bool XAOPlugin_IOperations::ExportXAO( Handle(GEOM_Object) shape,
exportSubshapes(shape, geometry);
xaoObject->setGeometry(geometry);
exportGroups(groupList, xaoObject, geometry);
if (!exportGroups(groupList, xaoObject, geometry)) return false;
exportFields(fieldList, xaoObject, geometry);
// export the XAO to the file
@ -380,8 +385,8 @@ bool XAOPlugin_IOperations::ExportXAO( Handle(GEOM_Object) shape,
}
void XAOPlugin_IOperations::importSubShapes( XAO::Geometry* xaoGeometry,
Handle(GEOM_Function) function, int shapeType, int dim,
Handle(TColStd_HSequenceOfTransient)& subShapeList )
Handle(GEOM_Function) function, int shapeType, int dim,
Handle(TColStd_HSequenceOfTransient)& subShapeList )
{
Handle(GEOM_Object) subShape;
Handle(GEOM_Function) aFunction;
@ -433,10 +438,10 @@ void XAOPlugin_IOperations::importSubShapes( XAO::Geometry* xaoGeometry,
*/
//=============================================================================
bool XAOPlugin_IOperations::ImportXAO( const char* fileName,
Handle(GEOM_Object)& shape,
Handle(TColStd_HSequenceOfTransient)& subShapes,
Handle(TColStd_HSequenceOfTransient)& groups,
Handle(TColStd_HSequenceOfTransient)& fields )
Handle(GEOM_Object)& shape,
Handle(TColStd_HSequenceOfTransient)& subShapes,
Handle(TColStd_HSequenceOfTransient)& groups,
Handle(TColStd_HSequenceOfTransient)& fields )
{
SetErrorCode(KO);

View File

@ -44,31 +44,31 @@ public:
~XAOPlugin_IOperations();
bool ExportXAO( Handle(GEOM_Object) shape,
std::list<Handle(GEOM_Object)> groupList,
std::list<Handle(GEOM_Field)> fieldList,
const char* author,
const char* fileName );
std::list<Handle(GEOM_Object)> groupList,
std::list<Handle(GEOM_Field)> fieldList,
const char* author,
const char* fileName );
bool ImportXAO( const char* fileName,
Handle(GEOM_Object)& shape,
Handle(TColStd_HSequenceOfTransient)& subShapes,
Handle(TColStd_HSequenceOfTransient)& groups,
Handle(TColStd_HSequenceOfTransient)& fields );
Handle(GEOM_Object)& shape,
Handle(TColStd_HSequenceOfTransient)& subShapes,
Handle(TColStd_HSequenceOfTransient)& groups,
Handle(TColStd_HSequenceOfTransient)& fields );
private:
void importSubShapes( XAO::Geometry* xaoGeometry,
Handle(GEOM_Function) function,
int shapeType,
int dim,
Handle(TColStd_HSequenceOfTransient)& subshapeList );
void exportSubshapes( const Handle(GEOM_Object)& shape,
XAO::BrepGeometry* geometry );
void exportFields( std::list<Handle(GEOM_Field)> fieldList,
XAO::Xao* xaoObject,
XAO::BrepGeometry* geometry );
void exportGroups( std::list<Handle(GEOM_Object)> groupList,
XAO::Xao* xaoObject,
XAO::BrepGeometry* geometry );
void importSubShapes( XAO::Geometry* xaoGeometry,
Handle(GEOM_Function) function,
int shapeType,
int dim,
Handle(TColStd_HSequenceOfTransient)& subshapeList );
void exportSubshapes( const Handle(GEOM_Object)& shape,
XAO::BrepGeometry* geometry );
void exportFields( std::list<Handle(GEOM_Field)> fieldList,
XAO::Xao* xaoObject,
XAO::BrepGeometry* geometry );
bool exportGroups( std::list<Handle(GEOM_Object)> groupList,
XAO::Xao* xaoObject,
XAO::BrepGeometry* geometry );
};
#endif