mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-14 09:38:34 +05:00
Merge tag 'V8_3_0a2' into ngr/python3_dev
Version 8.3.0 alpha 2
This commit is contained in:
commit
eb0de82cc1
@ -25,6 +25,7 @@ INCLUDE(UseQtExt)
|
|||||||
INCLUDE_DIRECTORIES(
|
INCLUDE_DIRECTORIES(
|
||||||
${PTHREAD_INCLUDE_DIR}
|
${PTHREAD_INCLUDE_DIR}
|
||||||
${VTK_INCLUDE_DIRS}
|
${VTK_INCLUDE_DIRS}
|
||||||
|
${OPENCV_INCLUDE_DIR}
|
||||||
${OMNIORB_INCLUDE_DIR}
|
${OMNIORB_INCLUDE_DIR}
|
||||||
${CAS_INCLUDE_DIRS}
|
${CAS_INCLUDE_DIRS}
|
||||||
${KERNEL_INCLUDE_DIRS}
|
${KERNEL_INCLUDE_DIRS}
|
||||||
|
@ -319,7 +319,7 @@ void GEOMGUI_TextTreeWdg::updateAnnotationBranch( const QString& theEntry )
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void GEOMGUI_TextTreeWdg::updateObjectName( const QString& theEntry )
|
void GEOMGUI_TextTreeWdg::updateObjectName( const QString& theEntry )
|
||||||
{
|
{
|
||||||
QTreeWidgetItem* anObjectItem;
|
QTreeWidgetItem* anObjectItem = 0;
|
||||||
|
|
||||||
QHash<QString, QTreeWidgetItem*> anObjects = getObjects( DimensionShape );
|
QHash<QString, QTreeWidgetItem*> anObjects = getObjects( DimensionShape );
|
||||||
if ( anObjects.contains( theEntry ) )
|
if ( anObjects.contains( theEntry ) )
|
||||||
|
@ -342,16 +342,30 @@ TopoDS_Shape GEOMImpl_BooleanDriver::makeCompoundShellFromFaces
|
|||||||
if (theShape.ShapeType() != TopAbs_COMPOUND)
|
if (theShape.ShapeType() != TopAbs_COMPOUND)
|
||||||
return theShape;
|
return theShape;
|
||||||
|
|
||||||
|
BRep_Builder B;
|
||||||
|
TopoDS_Compound aFaces;
|
||||||
|
B.MakeCompound(aFaces);
|
||||||
|
|
||||||
|
// simplify compound structure for
|
||||||
|
// Mantis issue 0023419 (note 0021712)
|
||||||
|
TopExp_Explorer aExp;
|
||||||
|
TopTools_MapOfShape aMapFaces;
|
||||||
|
aExp.Init(theShape, TopAbs_FACE);
|
||||||
|
for (; aExp.More(); aExp.Next()) {
|
||||||
|
const TopoDS_Shape& aFace = aExp.Current();
|
||||||
|
if (aMapFaces.Add(aFace)) {
|
||||||
|
B.Add(aFaces, aFace);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
BOPCol_ListOfShape aListShapes;
|
BOPCol_ListOfShape aListShapes;
|
||||||
BOPTools_AlgoTools::MakeConnexityBlocks(theShape, TopAbs_EDGE, TopAbs_FACE, aListShapes);
|
BOPTools_AlgoTools::MakeConnexityBlocks(aFaces, TopAbs_EDGE, TopAbs_FACE, aListShapes);
|
||||||
|
|
||||||
if (aListShapes.IsEmpty())
|
if (aListShapes.IsEmpty())
|
||||||
return theShape;
|
return theShape;
|
||||||
|
|
||||||
TopoDS_Compound aResult;
|
TopoDS_Compound aResult;
|
||||||
BRep_Builder B;
|
|
||||||
B.MakeCompound(aResult);
|
B.MakeCompound(aResult);
|
||||||
TopExp_Explorer aExp;
|
|
||||||
BOPCol_ListIteratorOfListOfShape anIter(aListShapes);
|
BOPCol_ListIteratorOfListOfShape anIter(aListShapes);
|
||||||
|
|
||||||
for (; anIter.More(); anIter.Next()) {
|
for (; anIter.More(); anIter.Next()) {
|
||||||
@ -373,6 +387,7 @@ TopoDS_Shape GEOMImpl_BooleanDriver::makeCompoundShellFromFaces
|
|||||||
|
|
||||||
return aResult;
|
return aResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : performOperation
|
//function : performOperation
|
||||||
//purpose :
|
//purpose :
|
||||||
@ -415,11 +430,12 @@ TopoDS_Shape GEOMImpl_BooleanDriver::performOperation
|
|||||||
// This allows to avoid adding empty compounds,
|
// This allows to avoid adding empty compounds,
|
||||||
// resulting from COMMON on two non-intersecting shapes.
|
// resulting from COMMON on two non-intersecting shapes.
|
||||||
if (aStepResult.ShapeType() == TopAbs_COMPOUND) {
|
if (aStepResult.ShapeType() == TopAbs_COMPOUND) {
|
||||||
#if OCC_VERSION_MAJOR >= 7
|
#if OCC_VERSION_MAJOR >= 7
|
||||||
if (aValue1.ShapeType() == TopAbs_FACE && aValue2.ShapeType() == TopAbs_FACE) {
|
if ((aValue1.ShapeType() == TopAbs_FACE || aValue1.ShapeType() == TopAbs_SHELL) &&
|
||||||
|
(aValue2.ShapeType() == TopAbs_FACE || aValue2.ShapeType() == TopAbs_SHELL)) {
|
||||||
aStepResult = makeCompoundShellFromFaces(aStepResult);
|
aStepResult = makeCompoundShellFromFaces(aStepResult);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
TopoDS_Iterator aCompIter (aStepResult);
|
TopoDS_Iterator aCompIter (aStepResult);
|
||||||
for (; aCompIter.More(); aCompIter.Next()) {
|
for (; aCompIter.More(); aCompIter.Next()) {
|
||||||
// add shape in a result
|
// add shape in a result
|
||||||
@ -477,11 +493,12 @@ TopoDS_Shape GEOMImpl_BooleanDriver::performOperation
|
|||||||
// This allows to avoid adding empty compounds,
|
// This allows to avoid adding empty compounds,
|
||||||
// resulting from CUT of parts
|
// resulting from CUT of parts
|
||||||
if (aCut.ShapeType() == TopAbs_COMPOUND) {
|
if (aCut.ShapeType() == TopAbs_COMPOUND) {
|
||||||
#if OCC_VERSION_MAJOR >= 7
|
#if OCC_VERSION_MAJOR >= 7
|
||||||
if (itSub1.Value().ShapeType() == TopAbs_FACE) {
|
if (itSub1.Value().ShapeType() == TopAbs_FACE ||
|
||||||
|
itSub1.Value().ShapeType() == TopAbs_SHELL) {
|
||||||
aCut = makeCompoundShellFromFaces(aCut);
|
aCut = makeCompoundShellFromFaces(aCut);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
TopoDS_Iterator aCompIter (aCut);
|
TopoDS_Iterator aCompIter (aCut);
|
||||||
for (; aCompIter.More(); aCompIter.Next()) {
|
for (; aCompIter.More(); aCompIter.Next()) {
|
||||||
// add shape in a result
|
// add shape in a result
|
||||||
@ -509,7 +526,7 @@ TopoDS_Shape GEOMImpl_BooleanDriver::performOperation
|
|||||||
|
|
||||||
// perform FUSE operation
|
// perform FUSE operation
|
||||||
else if (theType == BOOLEAN_FUSE) {
|
else if (theType == BOOLEAN_FUSE) {
|
||||||
#if OCC_VERSION_MAJOR >= 7
|
#if OCC_VERSION_MAJOR >= 7
|
||||||
Standard_Boolean isFaces = Standard_False;
|
Standard_Boolean isFaces = Standard_False;
|
||||||
TopTools_ListOfShape listShape1, listShape2;
|
TopTools_ListOfShape listShape1, listShape2;
|
||||||
GEOMUtils::AddSimpleShapes(theShape1, listShape1);
|
GEOMUtils::AddSimpleShapes(theShape1, listShape1);
|
||||||
@ -521,7 +538,8 @@ TopoDS_Shape GEOMImpl_BooleanDriver::performOperation
|
|||||||
TopTools_ListIteratorOfListOfShape itSub2 (listShape2);
|
TopTools_ListIteratorOfListOfShape itSub2 (listShape2);
|
||||||
for (; itSub2.More(); itSub2.Next()) {
|
for (; itSub2.More(); itSub2.Next()) {
|
||||||
TopoDS_Shape aValue2 = itSub2.Value();
|
TopoDS_Shape aValue2 = itSub2.Value();
|
||||||
if (aValue1.ShapeType() == TopAbs_FACE && aValue2.ShapeType() == TopAbs_FACE) {
|
if ((aValue1.ShapeType() == TopAbs_FACE || aValue1.ShapeType() == TopAbs_SHELL) &&
|
||||||
|
(aValue2.ShapeType() == TopAbs_FACE || aValue2.ShapeType() == TopAbs_SHELL)) {
|
||||||
isFaces = Standard_True;
|
isFaces = Standard_True;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -534,10 +552,10 @@ TopoDS_Shape GEOMImpl_BooleanDriver::performOperation
|
|||||||
StdFail_NotDone::Raise("Fuse operation can not be performed on the given shapes");
|
StdFail_NotDone::Raise("Fuse operation can not be performed on the given shapes");
|
||||||
}
|
}
|
||||||
aShape = BO.Shape();
|
aShape = BO.Shape();
|
||||||
#if OCC_VERSION_MAJOR >= 7
|
#if OCC_VERSION_MAJOR >= 7
|
||||||
if (isFaces)
|
if (isFaces)
|
||||||
aShape = makeCompoundShellFromFaces(aShape);
|
aShape = makeCompoundShellFromFaces(aShape);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// perform SECTION operation
|
// perform SECTION operation
|
||||||
|
@ -66,7 +66,7 @@ GEOM_Annotation::GEOM_Annotation() : AIS_InteractiveObject()
|
|||||||
SetDisplayMode( 0 );
|
SetDisplayMode( 0 );
|
||||||
SetZLayer( Graphic3d_ZLayerId_Default );
|
SetZLayer( Graphic3d_ZLayerId_Default );
|
||||||
SetAutoHide( Standard_True );
|
SetAutoHide( Standard_True );
|
||||||
#if OCC_VERSION_LARGE <= 0x07010000
|
#if OCC_VERSION_LARGE <= 0x07010001
|
||||||
SetHilightMode( HighlightAll );
|
SetHilightMode( HighlightAll );
|
||||||
#endif
|
#endif
|
||||||
SetMutable( Standard_True );
|
SetMutable( Standard_True );
|
||||||
@ -749,7 +749,7 @@ void GEOM_Annotation::OpenGl_Annotation::Render( const Handle(OpenGl_Workspace)&
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if OCC_VERSION_LARGE > 0x07010000
|
#if OCC_VERSION_LARGE > 0x07010001
|
||||||
const Handle(Graphic3d_PresentationAttributes) aHighlightStyle = theWorkspace->HighlightStyle();
|
const Handle(Graphic3d_PresentationAttributes) aHighlightStyle = theWorkspace->HighlightStyle();
|
||||||
if (!aHighlightStyle.IsNull() && myAISObject->myHilightMode == HighlightLabel)
|
if (!aHighlightStyle.IsNull() && myAISObject->myHilightMode == HighlightLabel)
|
||||||
{
|
{
|
||||||
@ -879,7 +879,7 @@ void GEOM_Annotation::OpenGl_Annotation::Render( const Handle(OpenGl_Workspace)&
|
|||||||
|
|
||||||
aContext->ApplyModelViewMatrix();
|
aContext->ApplyModelViewMatrix();
|
||||||
|
|
||||||
#if OCC_VERSION_LARGE > 0x07010000
|
#if OCC_VERSION_LARGE > 0x07010001
|
||||||
theWorkspace->SetHighlightStyle(aHighlightStyle);
|
theWorkspace->SetHighlightStyle(aHighlightStyle);
|
||||||
#else
|
#else
|
||||||
if ( toHighlight != theWorkspace->ToHighlight() )
|
if ( toHighlight != theWorkspace->ToHighlight() )
|
||||||
@ -895,7 +895,7 @@ void GEOM_Annotation::OpenGl_Annotation::Render( const Handle(OpenGl_Workspace)&
|
|||||||
// purpose : Perform highlighting of the presentation.
|
// purpose : Perform highlighting of the presentation.
|
||||||
// =======================================================================
|
// =======================================================================
|
||||||
void GEOM_Annotation::GEOM_AnnotationOwner::HilightWithColor( const Handle(PrsMgr_PresentationManager3d)& thePM,
|
void GEOM_Annotation::GEOM_AnnotationOwner::HilightWithColor( const Handle(PrsMgr_PresentationManager3d)& thePM,
|
||||||
#if OCC_VERSION_LARGE > 0x07010000
|
#if OCC_VERSION_LARGE > 0x07010001
|
||||||
const Handle(Prs3d_Drawer)& theStyle,
|
const Handle(Prs3d_Drawer)& theStyle,
|
||||||
#else
|
#else
|
||||||
const Handle(Graphic3d_HighlightStyle)& theStyle,
|
const Handle(Graphic3d_HighlightStyle)& theStyle,
|
||||||
@ -905,7 +905,7 @@ void GEOM_Annotation::GEOM_AnnotationOwner::HilightWithColor( const Handle(PrsMg
|
|||||||
if ( myPrsSh.IsNull() )
|
if ( myPrsSh.IsNull() )
|
||||||
{
|
{
|
||||||
Handle(Prs3d_Drawer) aDrawer = new Prs3d_Drawer;
|
Handle(Prs3d_Drawer) aDrawer = new Prs3d_Drawer;
|
||||||
#if OCC_VERSION_LARGE > 0x07010000
|
#if OCC_VERSION_LARGE > 0x07010001
|
||||||
aDrawer->Link( theStyle );
|
aDrawer->Link( theStyle );
|
||||||
#else
|
#else
|
||||||
aDrawer->Link( Selectable()->HilightAttributes() );
|
aDrawer->Link( Selectable()->HilightAttributes() );
|
||||||
@ -943,7 +943,7 @@ void GEOM_Annotation::GEOM_AnnotationOwner::Unhilight ( const Handle(PrsMgr_Pres
|
|||||||
{
|
{
|
||||||
SelectMgr_EntityOwner::Unhilight( thePM, theMode );
|
SelectMgr_EntityOwner::Unhilight( thePM, theMode );
|
||||||
|
|
||||||
#if OCC_VERSION_LARGE > 0x07010000
|
#if OCC_VERSION_LARGE > 0x07010001
|
||||||
thePM->Unhighlight( myPrsSh );
|
thePM->Unhighlight( myPrsSh );
|
||||||
#else
|
#else
|
||||||
thePM->Unhighlight( myPrsSh, theMode );
|
thePM->Unhighlight( myPrsSh, theMode );
|
||||||
|
@ -363,7 +363,7 @@ public:
|
|||||||
//! \param theMode [in] the display mode.
|
//! \param theMode [in] the display mode.
|
||||||
virtual void
|
virtual void
|
||||||
HilightWithColor( const Handle(PrsMgr_PresentationManager3d)& thePM,
|
HilightWithColor( const Handle(PrsMgr_PresentationManager3d)& thePM,
|
||||||
#if OCC_VERSION_LARGE > 0x07010000
|
#if OCC_VERSION_LARGE > 0x07010001
|
||||||
const Handle(Prs3d_Drawer)& theStyle,
|
const Handle(Prs3d_Drawer)& theStyle,
|
||||||
#else
|
#else
|
||||||
const Handle(Graphic3d_HighlightStyle)& theStyle,
|
const Handle(Graphic3d_HighlightStyle)& theStyle,
|
||||||
|
Loading…
Reference in New Issue
Block a user