#include "OCCViewer_ViewManager.h"
#include "SOCC_ViewModel.h"
-#include "VTKViewer_ViewWindow.h"
-#include "VTKViewer_ViewModel.h"
-#include "VTKViewer_RenderWindowInteractor.h"
+#include "SVTK_ViewModel.h"
#include "SVTK_ViewWindow.h"
#include "SVTK_View.h"
inline SVTK_ViewWindow* GetSVTKViewWindow(SUIT_Application* theApp){
SUIT_ViewWindow* window = theApp->desktop()->activeWindow();
- if(window && window->getViewManager()->getType() == VTKViewer_Viewer::Type())
+ if(window && window->getViewManager()->getType() == SVTK_Viewer::Type())
return dynamic_cast<SVTK_ViewWindow*>( window );
return 0;
_PTR(StudyBuilder) aStudyBuilder = aStudy->NewBuilder();
GEOM::GEOM_Gen_var Geom = GeometryGUI::GetGeomGen();
+ if (CORBA::is_nil(Geom)) {
+ GeometryGUI::InitGeomGen();
+ Geom = GeometryGUI::GetGeomGen();
+ }
if (CORBA::is_nil(Geom))
return;
string aFatherIOR;
_PTR(SComponent) father = aStudy->FindComponent("GEOM");
- aStudyBuilder->DefineComponentInstance
- (father, SalomeApp_Application::orb()->object_to_string(Geom));
- father->ComponentIOR(aFatherIOR);
+ if (!father)
+ return;
+ if (!father->ComponentIOR(aFatherIOR)) {
+ aStudyBuilder->LoadWith(father, SalomeApp_Application::orb()->object_to_string(Geom));
+ father->ComponentIOR(aFatherIOR);
+ }
_PTR(SObject) obj = aStudy->FindObjectID(myEntry);
- _PTR(GenericAttribute) anAttr;
+ if (!obj)
+ return;
// Create new actor
+ _PTR(GenericAttribute) anAttr;
if (!obj->FindAttribute(anAttr, "AttributeIOR"))
return;
_PTR(AttributeIOR) anIOR(anAttr);
GEOM::GEOM_Object_var aShape = Geom->GetIORFromString(anIORValue.c_str());
TopoDS_Shape Shape = ShapeReader.GetShape(Geom,aShape);
- if (obj) {
+ if (!Shape.IsNull()) {
if (obj->FindAttribute(anAttr, "AttributeName")) {
_PTR(AttributeName) aName (anAttr);
string aNameValue = aName->Value();
{
public:
TEventUpdateBrowser() {}
- virtual void Execute() {
+ virtual void Execute() {
SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>(SUIT_Session::session()->activeApplication());
if (app) {
CAM_Module* module = app->module("Geometry");
SalomeApp_Module* appMod = dynamic_cast<SalomeApp_Module*>(module);
if (appMod) appMod->updateObjBrowser(true);
- }
+ }
}
};
-
- ProcessVoidEvent(new TEventUpdateBrowser ());
+
+ ProcessVoidEvent(new TEventUpdateBrowser ());
}
void RefineSolids(const TopoDS_Shape& ,
TopTools_ListOfShape&);
-//modified by NIZNHY-PKV Fri Feb 25 17:19:39 2005f XX
static
void GetPlanes (const TopoDS_Edge& anEx,
const TopTools_IndexedDataMapOfShapeListOfShape& anEFMapx,
const TopoDS_Face& aF1,
TopAbs_State& aStPF1);
-//modified by NIZNHY-PKV Fri Feb 25 17:19:44 2005t XX
//=======================================================================
//function : ShellsAndSolids
myAddedFacesMap.Clear();
bMakeSolids=(myLimit==TopAbs_SHAPE || myLimit<TopAbs_SHELL);
//
- //modified by NIZNHY-PKV Thu Feb 24 17:22:32 2005 f XX
myInternalFaces.Clear(); // remove it after all modifs
- //modified by NIZNHY-PKV Thu Feb 24 17:22:56 2005 t XX
+ //
aItS.Initialize(myListShapes);
for ( ;aItS.More(); aItS.Next()) {
const TopoDS_Shape& aS=aItS.Value();
aShellMaker.AddConstFaces(aFC);
//
// add split faces inside aS
+ TopoDS_Shape aIFC;
if (myClosedShapes.Contains(aS)) {
//
// internal faces compound
- TopoDS_Shape aIFC=FindFacesInside(aS, Standard_True);
+ aIFC=FindFacesInside(aS, Standard_True);
aShellMaker.AddSectionFaces(aIFC);
}
//
//
// Add faces added to new shell to myAddedFacesMap:
// avoid rebuilding twice common part of 2 solids.
-
TopTools_ListIteratorOfListOfShape itS(aLNS);
TopExp_Explorer expF;
for (; itS.More(); itS.Next()) {
const TopoDS_Shape& aSh=itS.Value();
expF.Init (aSh, TopAbs_FACE);
for (; expF.More(); expF.Next()){
- myAddedFacesMap.Add (expF.Current());
+ const TopoDS_Shape& aFx=expF.Current();
+ myAddedFacesMap.Add (aFx);
}
}
-
}
//=======================================================================
//function : MakeSolids
const TopoDS_Shape& CSF = myImageShape.Image(theShape).First();
//
TopTools_MapOfShape MSE, MFP;
+ //xf
+ TopTools_IndexedMapOfShape aMFCSF;
+ //xt
TopTools_DataMapOfShapeListOfShape DMSEFP;
TopTools_MapIteratorOfMapOfShape itm;
TopTools_ListOfShape EmptyL;
TopTools_ListIteratorOfListOfShape itl;
-
+ TopTools_IndexedDataMapOfShapeListOfShape DMEF;
+ //
// MSE filling: map of new section edges of CSF
expl.Init(CSF, TopAbs_EDGE);
for (; expl.More(); expl.Next()) {
}
//
// DMEF: map edge of CSF - faces of CSF
- TopTools_IndexedDataMapOfShapeListOfShape DMEF;
TopExp::MapShapesAndAncestors(CSF, TopAbs_EDGE, TopAbs_FACE, DMEF);
+ //xf
+ TopExp::MapShapes(CSF, TopAbs_FACE, aMFCSF);
+ //xt
//
// Fill
// 1. MFP - a map of faces to process: map of resulting faces except
TopoDS_Face aFace1 = TopoDS::Face(itl.Value());
// remove aFace1 form DMSEFP and MFP
LSF.Remove( itl ); // == itl.Next();
- if (!MFP.Remove(aFace1))
+ if (!MFP.Remove(aFace1)) {
continue; // was not is MFP (i.e already checked)
+ }
//
// check if aFace1 was already added to 2 shells
if (!All &&
skipAlreadyAdded = Standard_True;
}
//
+ //xf
+ if (aMFCSF.Contains(aFace1)) {
+ // the face aFace1 can not be inside CSF
+ // if CSF contains the aFace1
+ continue;
+ }
+ //xt
+ //
TopoDS_Shape anOrigFace = aFace1;
if (myImagesFaces.IsImage(aFace1)){
anOrigFace = myImagesFaces.Root(aFace1);
aLNS.Clear();
aLNS.Append(aSolidOr);
}
-//modified by NIZNHY-PKV Fri Feb 25 16:59:57 2005f XX
//=======================================================================
//function : GetPlanes
//purpose :
}
}
}
+
//modified by NIZNHY-PKV Fri Feb 25 17:00:03 2005t XX
/*
A