mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-26 01:10:35 +05:00
Porting on Mandriva 64
This commit is contained in:
parent
d922b42d34
commit
3d9cb959df
@ -244,17 +244,31 @@ $(top_srcdir)/configure.in: $(top_srcdir)/configure.in.base
|
||||
|
||||
|
||||
ACLOCAL_SRC = \
|
||||
ac_cxx_bool.m4 check_corba.m4 \
|
||||
ac_cxx_depend_flag.m4 check_hdf5.m4 enable_pthreads.m4 \
|
||||
ac_cxx_mutable.m4 check_mico.m4 libtool.m4 \
|
||||
ac_cxx_namespaces.m4 check_omniorb.m4 pyembed.m4 \
|
||||
ac_cxx_partial_specialization.m4 python.m4 \
|
||||
ac_cxx_typename.m4 check_pthreads.m4 check_cas.m4 \
|
||||
ac_cc_warnings.m4 check_boost.m4 check_swig.m4
|
||||
ac_cxx_bool.m4 \
|
||||
check_corba.m4 \
|
||||
ac_cxx_depend_flag.m4 \
|
||||
check_hdf5.m4 \
|
||||
enable_pthreads.m4 \
|
||||
ac_cxx_mutable.m4 \
|
||||
check_mico.m4 \
|
||||
ac_cxx_namespaces.m4 \
|
||||
check_omniorb.m4 \
|
||||
pyembed.m4 \
|
||||
ac_cxx_partial_specialization.m4 \
|
||||
python.m4 \
|
||||
ac_cxx_typename.m4 \
|
||||
check_pthreads.m4 \
|
||||
check_cas.m4 \
|
||||
ac_cc_warnings.m4 \
|
||||
check_boost.m4 \
|
||||
check_swig.m4
|
||||
|
||||
ACLOCAL_GUI = \
|
||||
check_vtk.m4 check_opengl.m4 check_qt.m4 \
|
||||
check_GUI.m4 check_corba_in_GUI.m4
|
||||
check_vtk.m4 \
|
||||
check_opengl.m4 \
|
||||
check_qt.m4 \
|
||||
check_GUI.m4 \
|
||||
check_corba_in_GUI.m4
|
||||
|
||||
ACLOCAL_MED = check_Med.m4
|
||||
ACLOCAL_GEOM = check_GEOM.m4
|
||||
|
@ -35,39 +35,21 @@ LIB_OBJ_F = $(patsubst %.f, %.lo, $(filter %.f, $(LIB_SRC)))
|
||||
# all libtool obj file in library
|
||||
LIB_OBJ = $(LIB_OBJ_CXX) $(LIB_OBJ_CC) $(LIB_OBJ_C) $(LIB_CLIENT_OBJ:%.o=%.lo) $(LIB_SERVER_OBJ:%.o=%.lo) $(LIB_SWIG_OBJ) $(LIB_OBJ_F)
|
||||
|
||||
# LIB_BUILD = $(LIB:%.la=$(top_builddir)/lib/salome/%.la)
|
||||
LIB_BUILD = $(patsubst %.la, $(top_builddir)/lib/salome/%.la, $(filter %.la, $(LIB)))
|
||||
LIB_BUILD_A = $(patsubst %.a, $(top_builddir)/lib/salome/%.a, $(filter %.a, $(LIB)))
|
||||
|
||||
ifneq ($(findstring cmodule.la,$(filter %.la, $(LIB))),)
|
||||
LIB_SWIG = $(patsubst %cmodule.la,%.so, $(filter %.la, $(LIB)))
|
||||
else
|
||||
LIB_SWIG =
|
||||
endif
|
||||
|
||||
lib: $(LIB_BUILD) $(LIB_CLIENT_PY)
|
||||
lib: $(LIB) $(LIB_CLIENT_PY)
|
||||
# we don't build static library !
|
||||
|
||||
$(LIB_BUILD): $(top_builddir)/lib/salome/%.la: %.la
|
||||
-$(RM) $@
|
||||
-$(RM) $(patsubst %.la, %.so, $@)
|
||||
-$(RM) $(patsubst %.la, %.a, $@)
|
||||
ln -sf $(CURDIR)/$< $@ || true
|
||||
ln -sf $(patsubst %.la, %.so, $(CURDIR)/.libs/$<) \
|
||||
$(patsubst %.la, %.so, $@) || true
|
||||
ln -sf $(patsubst %.la, %.so, $(CURDIR)/.libs/$<).0 \
|
||||
$(patsubst %.la, %.so, $@).0 || true
|
||||
|
||||
if ! test -z $(LIB_SWIG) ; then \
|
||||
ln -sf $(patsubst %.la,%.so, $(CURDIR)/.libs/$<) $(top_builddir)/lib/salome/_$(LIB_SWIG) || true;\
|
||||
fi;
|
||||
|
||||
$(LIB_BUILD_A): $(top_builddir)/lib/salome/%.a: %.a
|
||||
-$(RM) $@
|
||||
ln -sf $(CURDIR)/$< $@ || true
|
||||
LIB_BUILDDIR=$(shell cd $(CURDIR)/$(top_builddir); pwd)/lib/salome
|
||||
|
||||
$(LIB): $(LIB_OBJ)
|
||||
@$(LT) --mode=link $(CXX) -rpath $(libdir) -o $@ $(CXXFLAGS) $(LIB_OBJ) $(LDFLAGS) $(LIBS)
|
||||
$(LT) --mode=uninstall $(RM) $(LIB_BUILDDIR)/$@
|
||||
$(LT) --mode=link $(CXX) -shared -rpath $(LIB_BUILDDIR) -o $@ $(CXXFLAGS) $(LIB_OBJ) $(LDFLAGS) $(LIBS)
|
||||
$(LT_INSTALL_LIB) $@ $(LIB_BUILDDIR)/$@
|
||||
|
||||
# transform idl reference in appropriate obj file
|
||||
BIN_CLIENT_SRC = $(BIN_CLIENT_IDL:%.idl=%$(IDL_CLN_CXX))
|
||||
@ -79,23 +61,23 @@ BIN_DEP=$(BIN:%=%.cxx) $(BIN_SRC) $(BIN_CLIENT_SRC) $(BIN_SERVER_SRC)
|
||||
BIN_CLIENT_OBJ = $(BIN_CLIENT_IDL:%.idl=%$(IDL_CLN_OBJ))
|
||||
BIN_SERVER_OBJ = $(BIN_SERVER_IDL:%.idl=%$(IDL_SRV_OBJ))
|
||||
# transform c file in appropriate libtool obj file (.c)
|
||||
BIN_OBJ_C = $(patsubst %.c, %.o, $(filter %.c, $(BIN_SRC)))
|
||||
BIN_OBJ_C = $(patsubst %.c, %.lo, $(filter %.c, $(BIN_SRC)))
|
||||
# transform c++ file in appropriate libtool obj file (.cc and .cxx)
|
||||
BIN_OBJ_CC = $(patsubst %.cc, %.o, $(filter %.cc, $(BIN_SRC)))
|
||||
BIN_OBJ_CXX = $(patsubst %.cxx, %.o, $(filter %.cxx, $(BIN_SRC)))
|
||||
BIN_OBJ_CC = $(patsubst %.cc, %.lo, $(filter %.cc, $(BIN_SRC)))
|
||||
BIN_OBJ_CXX = $(patsubst %.cxx, %.lo, $(filter %.cxx, $(BIN_SRC)))
|
||||
# all obj file in bin target
|
||||
BIN_OBJ = $(BIN_OBJ_CC) $(BIN_OBJ_CXX) $(BIN_OBJ_C) $(BIN_CLIENT_OBJ) $(BIN_SERVER_OBJ)
|
||||
|
||||
bin: $(BIN:%=$(top_builddir)/bin/salome/%) $(BIN) $(LIB) pyscripts sharedpyscripts
|
||||
bin: $(BIN) pyscripts sharedpyscripts
|
||||
|
||||
BIN_LIB=$(LIB:lib%.la=-l%)
|
||||
|
||||
$(BIN:%=$(top_builddir)/bin/salome/%) $(TEST_PROGS:%=$(top_builddir)/bin/salome/%): $(top_builddir)/bin/salome/%: %
|
||||
-$(RM) $@
|
||||
ln -sf $(CURDIR)/$< $@
|
||||
BIN_BUILDDIR=$(shell cd $(CURDIR)/$(top_builddir); pwd)/bin/salome
|
||||
|
||||
$(BIN) $(TEST_PROGS): %: %.lo $(BIN_OBJ)
|
||||
$(CXX) $(CXXFLAGS) -o $@ $^ $(BIN_LIB) $(LDFLAGSFORBIN) $(LIBSFORBIN)
|
||||
$(BIN) $(TEST_PROGS): %: %.lo $(BIN_OBJ) $(LIB)
|
||||
$(LT) --mode=uninstall $(RM) $(BIN_BUILDDIR)/$@
|
||||
$(LT) --mode=link $(CXX) -rpath $(BIN_BUILDDIR) -o $@ $^ $(CXXFLAGS) $(CPPFLAGS) $(BIN_LIB) $(LDFLAGSFORBIN) $(LIBSFORBIN)
|
||||
$(LT_INSTALL_PROG) $@ $(BIN_BUILDDIR)/$@
|
||||
|
||||
# copy python scripts in $(top_builddir)/bin/salome
|
||||
#
|
||||
@ -139,30 +121,39 @@ $(libdir) $(includedir) $(bindir) $(datadir) $(idldir) $(sharedpydir):
|
||||
|
||||
# Install the library, the public header files, and programs.
|
||||
install: $(LIB) $(BIN) $(TEST_PROGS) $(libdir) $(includedir) $(bindir) $(datadir) $(idldir) install-python install-sharedpyqt install-qm
|
||||
@for f in X $(LIB); do \
|
||||
if test $$f != X; then \
|
||||
($(LT_INSTALL_LIB) $$f $(libdir)/. || exit 1); \
|
||||
fi; \
|
||||
@for f in X $(LIB); do \
|
||||
if test $$f != X; then \
|
||||
echo "($(LT) --mode=link $(CXX) -shared -rpath '$(libdir)' -o '$$f' $(CXXFLAGS) $(LIB_OBJ) $(LDFLAGS) $(LIBS) || exit 1)"; \
|
||||
($(LT) --mode=link $(CXX) -shared -rpath "$(libdir)" -o "$$f" $(CXXFLAGS) $(LIB_OBJ) $(LDFLAGS) $(LIBS) || exit 1); \
|
||||
echo "($(LT_INSTALL_LIB) '$$f' '$(libdir)/$$f' || exit 1)"; \
|
||||
($(LT_INSTALL_LIB) "$$f" "$(libdir)/$$f" || exit 1); \
|
||||
fi; \
|
||||
done
|
||||
@if ! test -z $(LIB_SWIG) ; then \
|
||||
@if ! test -z $(LIB_SWIG) ; then \
|
||||
(cd $(libdir); ln -sf $(patsubst %.so, %cmodule.so, $(LIB_SWIG)) _$(LIB_SWIG) || true); \
|
||||
fi;
|
||||
@for f in X $(BIN); do \
|
||||
if test $$f != X; then \
|
||||
($(LT_INSTALL_PROG) $$f $(bindir)/. || exit 1); \
|
||||
fi; \
|
||||
@for f in X $(BIN); do \
|
||||
if test $$f != X; then \
|
||||
echo "($(LT) --mode=link $(CXX) -shared -rpath '$(bindir)' -o '$$f' $(CXXFLAGS) $(LIB_OBJ) $(LDFLAGS) $(LIBS) || exit 1)"; \
|
||||
($(LT) --mode=link $(CXX) -shared -rpath "$(bindir)" -o "$$f" $(CXXFLAGS) $(LIB_OBJ) $(LDFLAGS) $(LIBS) || exit 1); \
|
||||
echo "($(LT_INSTALL_PROG) '$$f' '$(bindir)/$$f' || exit 1)"; \
|
||||
($(LT_INSTALL_PROG) "$$f" "$(bindir)/$$f" || exit 1); \
|
||||
fi; \
|
||||
done
|
||||
# Install tests programmes in bindir
|
||||
@for f in X $(TEST_PROGS); do \
|
||||
if test $$f != X; then \
|
||||
($(LT_INSTALL_PROG) $$f $(bindir)/. || exit 1); \
|
||||
fi; \
|
||||
# Install tests programmes in bindir
|
||||
@for f in X $(TEST_PROGS); do \
|
||||
if test $$f != X; then \
|
||||
echo "($(LT) --mode=link $(CXX) -shared -rpath '$(bindir)' -o '$$f' $(CXXFLAGS) $(LIB_OBJ) $(LDFLAGS) $(LIBS) || exit 1)"; \
|
||||
($(LT) --mode=link $(CXX) -shared -rpath "$(bindir)" -o "$$f" $(CXXFLAGS) $(LIB_OBJ) $(LDFLAGS) $(LIBS) || exit 1); \
|
||||
echo "($(LT_INSTALL_PROG) '$$f' '$(bindir)/$$f' || exit 1)"; \
|
||||
($(LT_INSTALL_PROG) "$$f" "$(bindir)/$$f" || exit 1); \
|
||||
fi; \
|
||||
done
|
||||
# Install exported includes in includedir
|
||||
@for f in X $(EXPORT_HEADERS:%=$(srcdir)/%); do \
|
||||
if test $$f != X; then \
|
||||
(cp -p -f $$f $(includedir) || exit 1); \
|
||||
fi; \
|
||||
# Install exported includes in includedir
|
||||
@for f in X $(EXPORT_HEADERS:%=$(srcdir)/%); do \
|
||||
if test $$f != X; then \
|
||||
(cp -p -f $$f $(includedir) || exit 1); \
|
||||
fi; \
|
||||
done
|
||||
|
||||
# Install python script in $(bindir)
|
||||
@ -293,25 +284,31 @@ distclean: clean
|
||||
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
|
||||
|
||||
.cc.lo:
|
||||
$(LT) --mode=compile $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
|
||||
$(LT) --mode=compile --tag=CXX $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
|
||||
|
||||
.cxx.o:
|
||||
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
|
||||
|
||||
.cxx.lo:
|
||||
$(LT) --mode=compile $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
|
||||
$(LT) --mode=compile --tag=CXX $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
|
||||
|
||||
.c.lo:
|
||||
$(LT_COMPILE) $(CFLAGS) $(CPPFLAGS) -c $<
|
||||
$(LT) --mode=compile --tag=CC $(CFLAGS) $(CPPFLAGS) -c $<
|
||||
|
||||
.f.o:
|
||||
$(FC) $(FFLAGS) -c $< -o $@
|
||||
|
||||
.f.lo:
|
||||
$(LT) --mode=compile $(FC) $(FFLAGS) -c $<
|
||||
$(LT) --mode=compile --tag=F77 $(FC) $(FFLAGS) -c $<
|
||||
|
||||
.f90.o:
|
||||
$(FC) $(FFLAGS) -c $< -o $@
|
||||
|
||||
.f90.lo:
|
||||
$(LT) --mode=compile --tag=F90 $(FC) $(FFLAGS) -c $<
|
||||
|
||||
.ui.h:
|
||||
$(UIC) -o $@ $<
|
||||
|
@ -122,15 +122,15 @@ SMESH_ActorDef::SMESH_ActorDef()
|
||||
if ( mgr && mgr->booleanValue( "SMESH", "use_precision", false ) )
|
||||
myControlsPrecision = (long)SMESH::GetFloat( "SMESH", "controls_precision", -1 );
|
||||
|
||||
float aPointSize = SMESH::GetFloat("SMESH:node_size",3);
|
||||
float aLineWidth = SMESH::GetFloat("SMESH:element_width",1);
|
||||
vtkFloatingPointType aPointSize = SMESH::GetFloat("SMESH:node_size",3);
|
||||
vtkFloatingPointType aLineWidth = SMESH::GetFloat("SMESH:element_width",1);
|
||||
|
||||
vtkMatrix4x4 *aMatrix = vtkMatrix4x4::New();
|
||||
VTKViewer_ExtractUnstructuredGrid* aFilter = NULL;
|
||||
|
||||
//Definition 2D and 3D divices of the actor
|
||||
//-----------------------------------------
|
||||
float anRGB[3] = {1,1,1};
|
||||
vtkFloatingPointType anRGB[3] = {1,1,1};
|
||||
mySurfaceProp = vtkProperty::New();
|
||||
SMESH::GetColor( "SMESH", "fill_color", anRGB[0], anRGB[1], anRGB[2], QColor( 0, 170, 255 ) );
|
||||
mySurfaceProp->SetColor( anRGB[0], anRGB[1], anRGB[2] );
|
||||
@ -748,7 +748,7 @@ bool SMESH_ActorDef::Init(TVisualObjPtr theVisualObj,
|
||||
my2DActor->GetMapper()->SetLookupTable(myLookupTable);
|
||||
my3DActor->GetMapper()->SetLookupTable(myLookupTable);
|
||||
|
||||
float aFactor, aUnits;
|
||||
vtkFloatingPointType aFactor, aUnits;
|
||||
my2DActor->GetPolygonOffsetParameters(aFactor,aUnits);
|
||||
my2DActor->SetPolygonOffsetParameters(aFactor,aUnits*0.75);
|
||||
|
||||
@ -782,7 +782,7 @@ bool SMESH_ActorDef::Init(TVisualObjPtr theVisualObj,
|
||||
}
|
||||
|
||||
|
||||
float* SMESH_ActorDef::GetBounds(){
|
||||
vtkFloatingPointType* SMESH_ActorDef::GetBounds(){
|
||||
return myNodeActor->GetBounds();
|
||||
}
|
||||
|
||||
@ -847,11 +847,11 @@ void SMESH_ActorDef::SetIsShrunkable(bool theShrunkable){
|
||||
Modified();
|
||||
}
|
||||
|
||||
float SMESH_ActorDef::GetShrinkFactor(){
|
||||
vtkFloatingPointType SMESH_ActorDef::GetShrinkFactor(){
|
||||
return myBaseActor->GetShrinkFactor();
|
||||
}
|
||||
|
||||
void SMESH_ActorDef::SetShrinkFactor(float theValue){
|
||||
void SMESH_ActorDef::SetShrinkFactor(vtkFloatingPointType theValue){
|
||||
myBaseActor->SetShrinkFactor(theValue);
|
||||
|
||||
my1DActor->SetShrinkFactor(theValue);
|
||||
@ -898,7 +898,7 @@ int SMESH_ActorDef::GetNodeObjId(int theVtkID){
|
||||
return myPickableActor->GetNodeObjId(theVtkID);
|
||||
}
|
||||
|
||||
float* SMESH_ActorDef::GetNodeCoord(int theObjID){
|
||||
vtkFloatingPointType* SMESH_ActorDef::GetNodeCoord(int theObjID){
|
||||
return myPickableActor->GetNodeCoord(theObjID);
|
||||
}
|
||||
|
||||
@ -1269,15 +1269,15 @@ void SMESH_ActorDef::ReleaseGraphicsResources(vtkWindow *renWin){
|
||||
}
|
||||
|
||||
|
||||
static void GetColor(vtkProperty *theProperty, float& r,float& g,float& b){
|
||||
float* aColor = theProperty->GetColor();
|
||||
static void GetColor(vtkProperty *theProperty, vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b){
|
||||
vtkFloatingPointType* aColor = theProperty->GetColor();
|
||||
r = aColor[0];
|
||||
g = aColor[1];
|
||||
b = aColor[2];
|
||||
}
|
||||
|
||||
|
||||
void SMESH_ActorDef::SetOpacity(float theValue){
|
||||
void SMESH_ActorDef::SetOpacity(vtkFloatingPointType theValue){
|
||||
mySurfaceProp->SetOpacity(theValue);
|
||||
myBackSurfaceProp->SetOpacity(theValue);
|
||||
myEdgeProp->SetOpacity(theValue);
|
||||
@ -1287,74 +1287,74 @@ void SMESH_ActorDef::SetOpacity(float theValue){
|
||||
}
|
||||
|
||||
|
||||
float SMESH_ActorDef::GetOpacity(){
|
||||
vtkFloatingPointType SMESH_ActorDef::GetOpacity(){
|
||||
return mySurfaceProp->GetOpacity();
|
||||
}
|
||||
|
||||
|
||||
void SMESH_ActorDef::SetSufaceColor(float r,float g,float b){
|
||||
void SMESH_ActorDef::SetSufaceColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b){
|
||||
mySurfaceProp->SetColor(r,g,b);
|
||||
Modified();
|
||||
}
|
||||
|
||||
void SMESH_ActorDef::GetSufaceColor(float& r,float& g,float& b){
|
||||
void SMESH_ActorDef::GetSufaceColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b){
|
||||
::GetColor(mySurfaceProp,r,g,b);
|
||||
}
|
||||
|
||||
void SMESH_ActorDef::SetBackSufaceColor(float r,float g,float b){
|
||||
void SMESH_ActorDef::SetBackSufaceColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b){
|
||||
myBackSurfaceProp->SetColor(r,g,b);
|
||||
Modified();
|
||||
}
|
||||
|
||||
void SMESH_ActorDef::GetBackSufaceColor(float& r,float& g,float& b){
|
||||
void SMESH_ActorDef::GetBackSufaceColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b){
|
||||
::GetColor(myBackSurfaceProp,r,g,b);
|
||||
}
|
||||
|
||||
void SMESH_ActorDef::SetEdgeColor(float r,float g,float b){
|
||||
void SMESH_ActorDef::SetEdgeColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b){
|
||||
myEdgeProp->SetColor(r,g,b);
|
||||
my1DProp->SetColor(r,g,b);
|
||||
my1DExtProp->SetColor(1.0-r,1.0-g,1.0-b);
|
||||
Modified();
|
||||
}
|
||||
|
||||
void SMESH_ActorDef::GetEdgeColor(float& r,float& g,float& b){
|
||||
void SMESH_ActorDef::GetEdgeColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b){
|
||||
::GetColor(myEdgeProp,r,g,b);
|
||||
}
|
||||
|
||||
void SMESH_ActorDef::SetNodeColor(float r,float g,float b){
|
||||
void SMESH_ActorDef::SetNodeColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b){
|
||||
myNodeProp->SetColor(r,g,b);
|
||||
Modified();
|
||||
}
|
||||
|
||||
void SMESH_ActorDef::GetNodeColor(float& r,float& g,float& b){
|
||||
void SMESH_ActorDef::GetNodeColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b){
|
||||
::GetColor(myNodeProp,r,g,b);
|
||||
}
|
||||
|
||||
void SMESH_ActorDef::SetHighlightColor(float r,float g,float b){
|
||||
void SMESH_ActorDef::SetHighlightColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b){
|
||||
myHighlightProp->SetColor(r,g,b);
|
||||
Modified();
|
||||
}
|
||||
|
||||
void SMESH_ActorDef::GetHighlightColor(float& r,float& g,float& b){
|
||||
void SMESH_ActorDef::GetHighlightColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b){
|
||||
::GetColor(myHighlightProp,r,g,b);
|
||||
}
|
||||
|
||||
void SMESH_ActorDef::SetPreHighlightColor(float r,float g,float b){
|
||||
void SMESH_ActorDef::SetPreHighlightColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b){
|
||||
myPreselectProp->SetColor(r,g,b);
|
||||
Modified();
|
||||
}
|
||||
|
||||
void SMESH_ActorDef::GetPreHighlightColor(float& r,float& g,float& b){
|
||||
void SMESH_ActorDef::GetPreHighlightColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b){
|
||||
::GetColor(myPreselectProp,r,g,b);
|
||||
}
|
||||
|
||||
|
||||
float SMESH_ActorDef::GetLineWidth(){
|
||||
vtkFloatingPointType SMESH_ActorDef::GetLineWidth(){
|
||||
return myEdgeProp->GetLineWidth();
|
||||
}
|
||||
|
||||
|
||||
void SMESH_ActorDef::SetLineWidth(float theVal){
|
||||
void SMESH_ActorDef::SetLineWidth(vtkFloatingPointType theVal){
|
||||
myEdgeProp->SetLineWidth(theVal);
|
||||
|
||||
my1DProp->SetLineWidth(theVal + aLineWidthInc);
|
||||
@ -1364,7 +1364,7 @@ void SMESH_ActorDef::SetLineWidth(float theVal){
|
||||
}
|
||||
|
||||
|
||||
void SMESH_ActorDef::SetNodeSize(float theVal){
|
||||
void SMESH_ActorDef::SetNodeSize(vtkFloatingPointType theVal){
|
||||
myNodeProp->SetPointSize(theVal);
|
||||
myHighlightProp->SetPointSize(theVal);
|
||||
myPreselectProp->SetPointSize(theVal);
|
||||
@ -1375,7 +1375,7 @@ void SMESH_ActorDef::SetNodeSize(float theVal){
|
||||
Modified();
|
||||
}
|
||||
|
||||
float SMESH_ActorDef::GetNodeSize(){
|
||||
vtkFloatingPointType SMESH_ActorDef::GetNodeSize(){
|
||||
return myNodeProp->GetPointSize();
|
||||
}
|
||||
|
||||
@ -1448,21 +1448,21 @@ GetClippingPlane(vtkIdType theID)
|
||||
|
||||
|
||||
static void ComputeBoundsParam(vtkDataSet* theDataSet,
|
||||
float theDirection[3], float theMinPnt[3],
|
||||
float& theMaxBoundPrj, float& theMinBoundPrj)
|
||||
vtkFloatingPointType theDirection[3], vtkFloatingPointType theMinPnt[3],
|
||||
vtkFloatingPointType& theMaxBoundPrj, vtkFloatingPointType& theMinBoundPrj)
|
||||
{
|
||||
float aBounds[6];
|
||||
vtkFloatingPointType aBounds[6];
|
||||
theDataSet->GetBounds(aBounds);
|
||||
|
||||
//Enlarge bounds in order to avoid conflicts of precision
|
||||
for(int i = 0; i < 6; i += 2){
|
||||
static double EPS = 1.0E-3;
|
||||
float aDelta = (aBounds[i+1] - aBounds[i])*EPS;
|
||||
vtkFloatingPointType aDelta = (aBounds[i+1] - aBounds[i])*EPS;
|
||||
aBounds[i] -= aDelta;
|
||||
aBounds[i+1] += aDelta;
|
||||
}
|
||||
|
||||
float aBoundPoints[8][3] = { {aBounds[0],aBounds[2],aBounds[4]},
|
||||
vtkFloatingPointType aBoundPoints[8][3] = { {aBounds[0],aBounds[2],aBounds[4]},
|
||||
{aBounds[1],aBounds[2],aBounds[4]},
|
||||
{aBounds[0],aBounds[3],aBounds[4]},
|
||||
{aBounds[1],aBounds[3],aBounds[4]},
|
||||
@ -1475,7 +1475,7 @@ static void ComputeBoundsParam(vtkDataSet* theDataSet,
|
||||
theMaxBoundPrj = vtkMath::Dot(theDirection,aBoundPoints[aMaxId]);
|
||||
theMinBoundPrj = theMaxBoundPrj;
|
||||
for(int i = 1; i < 8; i++){
|
||||
float aTmp = vtkMath::Dot(theDirection,aBoundPoints[i]);
|
||||
vtkFloatingPointType aTmp = vtkMath::Dot(theDirection,aBoundPoints[i]);
|
||||
if(theMaxBoundPrj < aTmp){
|
||||
theMaxBoundPrj = aTmp;
|
||||
aMaxId = i;
|
||||
@ -1485,7 +1485,7 @@ static void ComputeBoundsParam(vtkDataSet* theDataSet,
|
||||
aMinId = i;
|
||||
}
|
||||
}
|
||||
float *aMinPnt = aBoundPoints[aMaxId];
|
||||
vtkFloatingPointType *aMinPnt = aBoundPoints[aMaxId];
|
||||
theMinPnt[0] = aMinPnt[0];
|
||||
theMinPnt[1] = aMinPnt[1];
|
||||
theMinPnt[2] = aMinPnt[2];
|
||||
@ -1493,11 +1493,11 @@ static void ComputeBoundsParam(vtkDataSet* theDataSet,
|
||||
|
||||
|
||||
static void DistanceToPosition(vtkDataSet* theDataSet,
|
||||
float theDirection[3], float theDist, float thePos[3])
|
||||
vtkFloatingPointType theDirection[3], vtkFloatingPointType theDist, vtkFloatingPointType thePos[3])
|
||||
{
|
||||
float aMaxBoundPrj, aMinBoundPrj, aMinPnt[3];
|
||||
vtkFloatingPointType aMaxBoundPrj, aMinBoundPrj, aMinPnt[3];
|
||||
ComputeBoundsParam(theDataSet,theDirection,aMinPnt,aMaxBoundPrj,aMinBoundPrj);
|
||||
float aLength = (aMaxBoundPrj-aMinBoundPrj)*theDist;
|
||||
vtkFloatingPointType aLength = (aMaxBoundPrj-aMinBoundPrj)*theDist;
|
||||
thePos[0] = aMinPnt[0]-theDirection[0]*aLength;
|
||||
thePos[1] = aMinPnt[1]-theDirection[1]*aLength;
|
||||
thePos[2] = aMinPnt[2]-theDirection[2]*aLength;
|
||||
@ -1505,29 +1505,29 @@ static void DistanceToPosition(vtkDataSet* theDataSet,
|
||||
|
||||
|
||||
static void PositionToDistance(vtkDataSet* theDataSet,
|
||||
float theDirection[3], float thePos[3], float& theDist)
|
||||
vtkFloatingPointType theDirection[3], vtkFloatingPointType thePos[3], vtkFloatingPointType& theDist)
|
||||
{
|
||||
float aMaxBoundPrj, aMinBoundPrj, aMinPnt[3];
|
||||
vtkFloatingPointType aMaxBoundPrj, aMinBoundPrj, aMinPnt[3];
|
||||
ComputeBoundsParam(theDataSet,theDirection,aMinPnt,aMaxBoundPrj,aMinBoundPrj);
|
||||
float aPrj = vtkMath::Dot(theDirection,thePos);
|
||||
vtkFloatingPointType aPrj = vtkMath::Dot(theDirection,thePos);
|
||||
theDist = (aPrj-aMinBoundPrj)/(aMaxBoundPrj-aMinBoundPrj);
|
||||
}
|
||||
|
||||
|
||||
void SMESH_ActorDef::SetPlaneParam(float theDir[3], float theDist, vtkPlane* thePlane)
|
||||
void SMESH_ActorDef::SetPlaneParam(vtkFloatingPointType theDir[3], vtkFloatingPointType theDist, vtkPlane* thePlane)
|
||||
{
|
||||
thePlane->SetNormal(theDir);
|
||||
float anOrigin[3];
|
||||
vtkFloatingPointType anOrigin[3];
|
||||
::DistanceToPosition(GetUnstructuredGrid(),theDir,theDist,anOrigin);
|
||||
thePlane->SetOrigin(anOrigin);
|
||||
}
|
||||
|
||||
|
||||
void SMESH_ActorDef::GetPlaneParam(float theDir[3], float& theDist, vtkPlane* thePlane)
|
||||
void SMESH_ActorDef::GetPlaneParam(vtkFloatingPointType theDir[3], vtkFloatingPointType& theDist, vtkPlane* thePlane)
|
||||
{
|
||||
thePlane->GetNormal(theDir);
|
||||
|
||||
float anOrigin[3];
|
||||
vtkFloatingPointType anOrigin[3];
|
||||
thePlane->GetOrigin(anOrigin);
|
||||
::PositionToDistance(GetUnstructuredGrid(),theDir,anOrigin,theDist);
|
||||
}
|
||||
@ -1617,21 +1617,21 @@ void SMESH_ActorDef::UpdateScalarBar()
|
||||
myScalarBarActor->SetOrientationToVertical();
|
||||
|
||||
|
||||
float aXVal = horiz ? 0.20 : 0.01;
|
||||
vtkFloatingPointType aXVal = horiz ? 0.20 : 0.01;
|
||||
if( mgr->hasValue( "SMESH", name + "x" ) )
|
||||
aXVal = mgr->doubleValue( "SMESH", name + "x", aXVal );
|
||||
|
||||
float aYVal = horiz ? 0.01 : 0.1;
|
||||
vtkFloatingPointType aYVal = horiz ? 0.01 : 0.1;
|
||||
if( mgr->hasValue( "SMESH", name + "y" ) )
|
||||
aYVal = mgr->doubleValue( "SMESH", name + "y", aYVal );
|
||||
myScalarBarActor->SetPosition( aXVal, aYVal );
|
||||
|
||||
float aWVal = horiz ? 0.60 : 0.10;
|
||||
vtkFloatingPointType aWVal = horiz ? 0.60 : 0.10;
|
||||
if( mgr->hasValue( "SMESH", name + "width" ) )
|
||||
aWVal = mgr->doubleValue( "SMESH", name + "width", aWVal );
|
||||
myScalarBarActor->SetWidth( aWVal );
|
||||
|
||||
float aHVal = horiz ? 0.12 : 0.80;
|
||||
vtkFloatingPointType aHVal = horiz ? 0.12 : 0.80;
|
||||
if( mgr->hasValue( "SMESH", name + "height" ) )
|
||||
aHVal = mgr->doubleValue( "SMESH", name + "height", aHVal );
|
||||
myScalarBarActor->SetHeight( aHVal );
|
||||
|
@ -50,29 +50,29 @@ class SMESH_Actor: public SALOME_Actor
|
||||
const char* theName,
|
||||
int theIsClear);
|
||||
|
||||
virtual void SetSufaceColor(float r,float g,float b) = 0;
|
||||
virtual void GetSufaceColor(float& r,float& g,float& b) = 0;
|
||||
virtual void SetSufaceColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b) = 0;
|
||||
virtual void GetSufaceColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b) = 0;
|
||||
|
||||
virtual void SetBackSufaceColor(float r,float g,float b) = 0;
|
||||
virtual void GetBackSufaceColor(float& r,float& g,float& b) = 0;
|
||||
virtual void SetBackSufaceColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b) = 0;
|
||||
virtual void GetBackSufaceColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b) = 0;
|
||||
|
||||
virtual void SetEdgeColor(float r,float g,float b) = 0;
|
||||
virtual void GetEdgeColor(float& r,float& g,float& b) = 0;
|
||||
virtual void SetEdgeColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b) = 0;
|
||||
virtual void GetEdgeColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b) = 0;
|
||||
|
||||
virtual void SetNodeColor(float r,float g,float b) = 0;
|
||||
virtual void GetNodeColor(float& r,float& g,float& b) = 0;
|
||||
virtual void SetNodeColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b) = 0;
|
||||
virtual void GetNodeColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b) = 0;
|
||||
|
||||
virtual void SetHighlightColor(float r,float g,float b) = 0;
|
||||
virtual void GetHighlightColor(float& r,float& g,float& b) = 0;
|
||||
virtual void SetHighlightColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b) = 0;
|
||||
virtual void GetHighlightColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b) = 0;
|
||||
|
||||
virtual void SetPreHighlightColor(float r,float g,float b) = 0;
|
||||
virtual void GetPreHighlightColor(float& r,float& g,float& b) = 0;
|
||||
virtual void SetPreHighlightColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b) = 0;
|
||||
virtual void GetPreHighlightColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b) = 0;
|
||||
|
||||
virtual float GetLineWidth() = 0;
|
||||
virtual void SetLineWidth(float theVal) = 0;
|
||||
virtual vtkFloatingPointType GetLineWidth() = 0;
|
||||
virtual void SetLineWidth(vtkFloatingPointType theVal) = 0;
|
||||
|
||||
virtual void SetNodeSize(float size) = 0;
|
||||
virtual float GetNodeSize() = 0;
|
||||
virtual void SetNodeSize(vtkFloatingPointType size) = 0;
|
||||
virtual vtkFloatingPointType GetNodeSize() = 0;
|
||||
|
||||
enum EReperesent { ePoint, eEdge, eSurface};
|
||||
|
||||
@ -85,7 +85,7 @@ class SMESH_Actor: public SALOME_Actor
|
||||
|
||||
virtual vtkUnstructuredGrid* GetUnstructuredGrid() = 0;
|
||||
|
||||
virtual void SetShrinkFactor(float theValue) = 0;
|
||||
virtual void SetShrinkFactor(vtkFloatingPointType theValue) = 0;
|
||||
|
||||
virtual void SetPointsLabeled(bool theIsPointsLabeled) = 0;
|
||||
virtual bool GetPointsLabeled() = 0;
|
||||
@ -101,8 +101,8 @@ class SMESH_Actor: public SALOME_Actor
|
||||
|
||||
virtual vtkScalarBarActor* GetScalarBarActor() = 0;
|
||||
|
||||
virtual void SetPlaneParam(float theDir[3], float theDist, vtkPlane* thePlane) = 0;
|
||||
virtual void GetPlaneParam(float theDir[3], float& theDist, vtkPlane* thePlane) = 0;
|
||||
virtual void SetPlaneParam(vtkFloatingPointType theDir[3], vtkFloatingPointType theDist, vtkPlane* thePlane) = 0;
|
||||
virtual void GetPlaneParam(vtkFloatingPointType theDir[3], vtkFloatingPointType& theDist, vtkPlane* thePlane) = 0;
|
||||
|
||||
virtual void RemoveAllClippingPlanes() = 0;
|
||||
virtual vtkIdType GetNumberOfClippingPlanes() = 0;
|
||||
|
@ -79,7 +79,8 @@ class vtkTimeStamp;
|
||||
class SMESH_DeviceActor;
|
||||
|
||||
|
||||
class SMESH_ActorDef : public SMESH_Actor{
|
||||
class SMESH_ActorDef : public SMESH_Actor
|
||||
{
|
||||
friend class SMESH_VisualObj;
|
||||
friend class SMESH_Actor;
|
||||
|
||||
@ -100,35 +101,35 @@ class SMESH_ActorDef : public SMESH_Actor{
|
||||
|
||||
virtual bool IsInfinitive();
|
||||
|
||||
virtual void SetOpacity(float theValue);
|
||||
virtual float GetOpacity();
|
||||
virtual void SetOpacity(vtkFloatingPointType theValue);
|
||||
virtual vtkFloatingPointType GetOpacity();
|
||||
|
||||
virtual void SetSufaceColor(float r,float g,float b);
|
||||
virtual void GetSufaceColor(float& r,float& g,float& b);
|
||||
virtual void SetSufaceColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b);
|
||||
virtual void GetSufaceColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b);
|
||||
|
||||
virtual void SetBackSufaceColor(float r,float g,float b);
|
||||
virtual void GetBackSufaceColor(float& r,float& g,float& b);
|
||||
virtual void SetBackSufaceColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b);
|
||||
virtual void GetBackSufaceColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b);
|
||||
|
||||
virtual void SetEdgeColor(float r,float g,float b);
|
||||
virtual void GetEdgeColor(float& r,float& g,float& b);
|
||||
virtual void SetEdgeColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b);
|
||||
virtual void GetEdgeColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b);
|
||||
|
||||
virtual void SetNodeColor(float r,float g,float b);
|
||||
virtual void GetNodeColor(float& r,float& g,float& b);
|
||||
virtual void SetNodeColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b);
|
||||
virtual void GetNodeColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b);
|
||||
|
||||
virtual void SetHighlightColor(float r,float g,float b);
|
||||
virtual void GetHighlightColor(float& r,float& g,float& b);
|
||||
virtual void SetHighlightColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b);
|
||||
virtual void GetHighlightColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b);
|
||||
|
||||
virtual void SetPreHighlightColor(float r,float g,float b);
|
||||
virtual void GetPreHighlightColor(float& r,float& g,float& b);
|
||||
virtual void SetPreHighlightColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b);
|
||||
virtual void GetPreHighlightColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b);
|
||||
|
||||
virtual float GetLineWidth();
|
||||
virtual void SetLineWidth(float theVal);
|
||||
virtual vtkFloatingPointType GetLineWidth();
|
||||
virtual void SetLineWidth(vtkFloatingPointType theVal);
|
||||
|
||||
virtual void SetNodeSize(float size) ;
|
||||
virtual float GetNodeSize() ;
|
||||
virtual void SetNodeSize(vtkFloatingPointType size) ;
|
||||
virtual vtkFloatingPointType GetNodeSize() ;
|
||||
|
||||
virtual int GetNodeObjId(int theVtkID);
|
||||
virtual float* GetNodeCoord(int theObjID);
|
||||
virtual vtkFloatingPointType* GetNodeCoord(int theObjID);
|
||||
|
||||
virtual int GetElemObjId(int theVtkID);
|
||||
virtual vtkCell* GetElemCell(int theObjID);
|
||||
@ -146,15 +147,15 @@ class SMESH_ActorDef : public SMESH_Actor{
|
||||
virtual void SetPointRepresentation(bool theIsPointsVisible);
|
||||
virtual bool GetPointRepresentation();
|
||||
|
||||
virtual float* GetBounds();
|
||||
virtual vtkFloatingPointType* GetBounds();
|
||||
virtual void SetTransform(VTKViewer_Transform* theTransform);
|
||||
|
||||
virtual vtkUnstructuredGrid* GetUnstructuredGrid();
|
||||
virtual vtkDataSet* GetInput();
|
||||
virtual vtkMapper* GetMapper();
|
||||
|
||||
virtual float GetShrinkFactor();
|
||||
virtual void SetShrinkFactor(float theValue);
|
||||
virtual vtkFloatingPointType GetShrinkFactor();
|
||||
virtual void SetShrinkFactor(vtkFloatingPointType theValue);
|
||||
|
||||
virtual bool IsShrunkable() { return myIsShrinkable;}
|
||||
virtual bool IsShrunk() { return myIsShrunk;}
|
||||
@ -172,8 +173,8 @@ class SMESH_ActorDef : public SMESH_Actor{
|
||||
|
||||
virtual vtkScalarBarActor* GetScalarBarActor(){ return myScalarBarActor;}
|
||||
|
||||
virtual void SetPlaneParam(float theDir[3], float theDist, vtkPlane* thePlane);
|
||||
virtual void GetPlaneParam(float theDir[3], float& theDist, vtkPlane* thePlane);
|
||||
virtual void SetPlaneParam(vtkFloatingPointType theDir[3], vtkFloatingPointType theDist, vtkPlane* thePlane);
|
||||
virtual void GetPlaneParam(vtkFloatingPointType theDir[3], vtkFloatingPointType& theDist, vtkPlane* thePlane);
|
||||
|
||||
virtual void RemoveAllClippingPlanes();
|
||||
virtual vtkIdType GetNumberOfClippingPlanes();
|
||||
|
@ -37,10 +37,10 @@ static int MYDEBUG = 0;
|
||||
|
||||
namespace SMESH{
|
||||
|
||||
float GetFloat( const QString& theValue, float theDefault )
|
||||
vtkFloatingPointType GetFloat( const QString& theValue, vtkFloatingPointType theDefault )
|
||||
{
|
||||
int pos = theValue.find( ":" );
|
||||
float val = theDefault;
|
||||
vtkFloatingPointType val = theDefault;
|
||||
if( pos>=0 )
|
||||
{
|
||||
QString name = theValue.right( theValue.length()-pos-1 ),
|
||||
@ -51,12 +51,12 @@ namespace SMESH{
|
||||
return val;
|
||||
}
|
||||
|
||||
float GetFloat( const QString& theValue, const QString& theSection, float theDefault )
|
||||
vtkFloatingPointType GetFloat( const QString& theValue, const QString& theSection, vtkFloatingPointType theDefault )
|
||||
{
|
||||
float val = theDefault;
|
||||
vtkFloatingPointType val = theDefault;
|
||||
SUIT_ResourceMgr* mgr = SUIT_Session::session()->resourceMgr();
|
||||
if( mgr )
|
||||
val = (float) mgr->doubleValue( theValue, theSection, theDefault );
|
||||
val = (vtkFloatingPointType) mgr->doubleValue( theValue, theSection, theDefault );
|
||||
|
||||
return val;
|
||||
}
|
||||
@ -90,7 +90,7 @@ namespace SMESH{
|
||||
SUIT_Tools::rgbSet( SUIT_Tools::rgbSet( c ), r, g, b );
|
||||
}
|
||||
|
||||
void GetColor( const QString& theSect, const QString& theName, float& r, float& g, float& b, const QColor& def )
|
||||
void GetColor( const QString& theSect, const QString& theName, vtkFloatingPointType& r, vtkFloatingPointType& g, vtkFloatingPointType& b, const QColor& def )
|
||||
{
|
||||
int ir( 0 ), ig( 0 ), ib( 0 );
|
||||
GetColor( theSect, theName, ir, ig, ib, def );
|
||||
|
@ -20,6 +20,8 @@
|
||||
#ifndef SMESH_ACTORUTILS_H
|
||||
#define SMESH_ACTORUTILS_H
|
||||
|
||||
#include "VTKViewer.h"
|
||||
|
||||
#include <qcolor.h>
|
||||
#include <qstring.h>
|
||||
|
||||
@ -27,12 +29,12 @@ class vtkUnstructuredGrid;
|
||||
|
||||
namespace SMESH{
|
||||
|
||||
float GetFloat( const QString& theValue, float theDefault = 0 );
|
||||
float GetFloat( const QString& theName, const QString& theSection, float theDefault = 0 );
|
||||
vtkFloatingPointType GetFloat( const QString& theValue, vtkFloatingPointType theDefault = 0 );
|
||||
vtkFloatingPointType GetFloat( const QString& theName, const QString& theSection, vtkFloatingPointType theDefault = 0 );
|
||||
|
||||
QColor GetColor( const QString& theSect, const QString& theName, const QColor&t = QColor() );
|
||||
void GetColor( const QString& theSect, const QString& theName, int&, int&, int&, const QColor&t = QColor() );
|
||||
void GetColor( const QString& theSect, const QString& theName, float&, float&, float&, const QColor&t = QColor() );
|
||||
void GetColor( const QString& theSect, const QString& theName, vtkFloatingPointType&, vtkFloatingPointType&, vtkFloatingPointType&, const QColor&t = QColor() );
|
||||
|
||||
void WriteUnstructuredGrid(vtkUnstructuredGrid* theGrid, const char* theFileName);
|
||||
|
||||
|
@ -55,7 +55,7 @@
|
||||
|
||||
#include <vtkCell.h>
|
||||
#include <vtkIdList.h>
|
||||
#include <vtkIntArray.h>
|
||||
#include <vtkIdTypeArray.h>
|
||||
#include <vtkCellArray.h>
|
||||
#include <vtkUnsignedCharArray.h>
|
||||
|
||||
@ -75,7 +75,8 @@ using namespace std;
|
||||
vtkStandardNewMacro(SMESH_DeviceActor);
|
||||
|
||||
|
||||
SMESH_DeviceActor::SMESH_DeviceActor()
|
||||
SMESH_DeviceActor
|
||||
::SMESH_DeviceActor()
|
||||
{
|
||||
if(MYDEBUG) MESSAGE("SMESH_DeviceActor - "<<this);
|
||||
|
||||
@ -113,7 +114,9 @@ SMESH_DeviceActor::SMESH_DeviceActor()
|
||||
}
|
||||
|
||||
|
||||
SMESH_DeviceActor::~SMESH_DeviceActor(){
|
||||
SMESH_DeviceActor
|
||||
::~SMESH_DeviceActor()
|
||||
{
|
||||
if(MYDEBUG) MESSAGE("~SMESH_DeviceActor - "<<this);
|
||||
|
||||
myProperty->Delete();
|
||||
@ -139,8 +142,8 @@ SMESH_DeviceActor::~SMESH_DeviceActor(){
|
||||
|
||||
|
||||
void
|
||||
SMESH_DeviceActor::
|
||||
SetStoreGemetryMapping(bool theStoreMapping)
|
||||
SMESH_DeviceActor
|
||||
::SetStoreGemetryMapping(bool theStoreMapping)
|
||||
{
|
||||
myGeomFilter->SetStoreMapping(theStoreMapping);
|
||||
SetStoreClippingMapping(theStoreMapping);
|
||||
@ -148,8 +151,8 @@ SetStoreGemetryMapping(bool theStoreMapping)
|
||||
|
||||
|
||||
void
|
||||
SMESH_DeviceActor::
|
||||
SetStoreClippingMapping(bool theStoreMapping)
|
||||
SMESH_DeviceActor
|
||||
::SetStoreClippingMapping(bool theStoreMapping)
|
||||
{
|
||||
myStoreClippingMapping = theStoreMapping;
|
||||
myExtractGeometry->SetStoreMapping(theStoreMapping && myIsImplicitFunctionUsed);
|
||||
@ -158,15 +161,17 @@ SetStoreClippingMapping(bool theStoreMapping)
|
||||
|
||||
|
||||
void
|
||||
SMESH_DeviceActor::
|
||||
SetStoreIDMapping(bool theStoreMapping)
|
||||
SMESH_DeviceActor
|
||||
::SetStoreIDMapping(bool theStoreMapping)
|
||||
{
|
||||
myExtractUnstructuredGrid->SetStoreMapping(theStoreMapping);
|
||||
}
|
||||
|
||||
|
||||
void SMESH_DeviceActor::Init(TVisualObjPtr theVisualObj,
|
||||
vtkImplicitBoolean* theImplicitBoolean)
|
||||
void
|
||||
SMESH_DeviceActor
|
||||
::Init(TVisualObjPtr theVisualObj,
|
||||
vtkImplicitBoolean* theImplicitBoolean)
|
||||
{
|
||||
myVisualObj = theVisualObj;
|
||||
myExtractGeometry->SetImplicitFunction(theImplicitBoolean);
|
||||
@ -175,8 +180,8 @@ void SMESH_DeviceActor::Init(TVisualObjPtr theVisualObj,
|
||||
|
||||
|
||||
void
|
||||
SMESH_DeviceActor::
|
||||
SetImplicitFunctionUsed(bool theIsImplicitFunctionUsed)
|
||||
SMESH_DeviceActor
|
||||
::SetImplicitFunctionUsed(bool theIsImplicitFunctionUsed)
|
||||
{
|
||||
int anId = 0;
|
||||
if(theIsImplicitFunctionUsed)
|
||||
@ -189,7 +194,10 @@ SetImplicitFunctionUsed(bool theIsImplicitFunctionUsed)
|
||||
}
|
||||
|
||||
|
||||
void SMESH_DeviceActor::SetUnstructuredGrid(vtkUnstructuredGrid* theGrid){
|
||||
void
|
||||
SMESH_DeviceActor
|
||||
::SetUnstructuredGrid(vtkUnstructuredGrid* theGrid)
|
||||
{
|
||||
if(theGrid){
|
||||
//myIsShrinkable = theGrid->GetNumberOfCells() > 10;
|
||||
myIsShrinkable = true;
|
||||
@ -231,20 +239,28 @@ void SMESH_DeviceActor::SetUnstructuredGrid(vtkUnstructuredGrid* theGrid){
|
||||
}
|
||||
|
||||
|
||||
VTKViewer_ExtractUnstructuredGrid* SMESH_DeviceActor::GetExtractUnstructuredGrid(){
|
||||
VTKViewer_ExtractUnstructuredGrid*
|
||||
SMESH_DeviceActor
|
||||
::GetExtractUnstructuredGrid()
|
||||
{
|
||||
return myExtractUnstructuredGrid;
|
||||
}
|
||||
|
||||
|
||||
vtkUnstructuredGrid* SMESH_DeviceActor::GetUnstructuredGrid(){
|
||||
vtkUnstructuredGrid*
|
||||
SMESH_DeviceActor
|
||||
::GetUnstructuredGrid()
|
||||
{
|
||||
myExtractUnstructuredGrid->Update();
|
||||
return myExtractUnstructuredGrid->GetOutput();
|
||||
}
|
||||
|
||||
|
||||
void SMESH_DeviceActor::SetControlMode(SMESH::Controls::FunctorPtr theFunctor,
|
||||
vtkScalarBarActor* theScalarBarActor,
|
||||
vtkLookupTable* theLookupTable)
|
||||
void
|
||||
SMESH_DeviceActor
|
||||
::SetControlMode(SMESH::Controls::FunctorPtr theFunctor,
|
||||
vtkScalarBarActor* theScalarBarActor,
|
||||
vtkLookupTable* theLookupTable)
|
||||
{
|
||||
bool anIsInitialized = theFunctor;
|
||||
if(anIsInitialized){
|
||||
@ -293,9 +309,11 @@ void SMESH_DeviceActor::SetControlMode(SMESH::Controls::FunctorPtr theFunctor,
|
||||
theScalarBarActor->SetVisibility(anIsInitialized);
|
||||
}
|
||||
|
||||
void SMESH_DeviceActor::SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor,
|
||||
vtkScalarBarActor* theScalarBarActor,
|
||||
vtkLookupTable* theLookupTable)
|
||||
void
|
||||
SMESH_DeviceActor
|
||||
::SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor,
|
||||
vtkScalarBarActor* theScalarBarActor,
|
||||
vtkLookupTable* theLookupTable)
|
||||
{
|
||||
bool anIsInitialized = theFunctor;
|
||||
myExtractUnstructuredGrid->ClearRegisteredCells();
|
||||
@ -347,7 +365,7 @@ void SMESH_DeviceActor::SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor
|
||||
}
|
||||
}
|
||||
|
||||
vtkIntArray* aCellLocationsArray = vtkIntArray::New();
|
||||
vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New();
|
||||
aCellLocationsArray->SetNumberOfComponents( 1 );
|
||||
aCellLocationsArray->SetNumberOfTuples( aNbCells );
|
||||
|
||||
@ -407,7 +425,7 @@ void SMESH_DeviceActor::SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor
|
||||
}
|
||||
}
|
||||
|
||||
vtkIntArray* aCellLocationsArray = vtkIntArray::New();
|
||||
vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New();
|
||||
aCellLocationsArray->SetNumberOfComponents( 1 );
|
||||
aCellLocationsArray->SetNumberOfTuples( aNbCells );
|
||||
|
||||
@ -432,7 +450,9 @@ void SMESH_DeviceActor::SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor
|
||||
theScalarBarActor->SetVisibility(anIsInitialized);
|
||||
}
|
||||
|
||||
void SMESH_DeviceActor::SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor)
|
||||
void
|
||||
SMESH_DeviceActor
|
||||
::SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor)
|
||||
{
|
||||
myExtractUnstructuredGrid->ClearRegisteredCells();
|
||||
myExtractUnstructuredGrid->ClearRegisteredCellsWithType();
|
||||
@ -487,7 +507,7 @@ void SMESH_DeviceActor::SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor
|
||||
}
|
||||
}
|
||||
|
||||
vtkIntArray* aCellLocationsArray = vtkIntArray::New();
|
||||
vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New();
|
||||
aCellLocationsArray->SetNumberOfComponents( 1 );
|
||||
aCellLocationsArray->SetNumberOfTuples( aNbCells );
|
||||
|
||||
@ -505,7 +525,10 @@ void SMESH_DeviceActor::SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor
|
||||
|
||||
|
||||
|
||||
unsigned long int SMESH_DeviceActor::GetMTime(){
|
||||
unsigned long int
|
||||
SMESH_DeviceActor
|
||||
::GetMTime()
|
||||
{
|
||||
unsigned long mTime = this->Superclass::GetMTime();
|
||||
mTime = max(mTime,myExtractGeometry->GetMTime());
|
||||
mTime = max(mTime,myExtractUnstructuredGrid->GetMTime());
|
||||
@ -516,12 +539,18 @@ unsigned long int SMESH_DeviceActor::GetMTime(){
|
||||
}
|
||||
|
||||
|
||||
void SMESH_DeviceActor::SetTransform(VTKViewer_Transform* theTransform){
|
||||
void
|
||||
SMESH_DeviceActor
|
||||
::SetTransform(VTKViewer_Transform* theTransform)
|
||||
{
|
||||
myTransformFilter->SetTransform(theTransform);
|
||||
}
|
||||
|
||||
|
||||
void SMESH_DeviceActor::SetShrink() {
|
||||
void
|
||||
SMESH_DeviceActor
|
||||
::SetShrink()
|
||||
{
|
||||
if ( !myIsShrinkable ) return;
|
||||
if ( vtkDataSet* aDataSet = myPassFilter[ 0 ]->GetOutput() )
|
||||
{
|
||||
@ -531,7 +560,10 @@ void SMESH_DeviceActor::SetShrink() {
|
||||
}
|
||||
}
|
||||
|
||||
void SMESH_DeviceActor::UnShrink() {
|
||||
void
|
||||
SMESH_DeviceActor
|
||||
::UnShrink()
|
||||
{
|
||||
if ( !myIsShrunk ) return;
|
||||
if ( vtkDataSet* aDataSet = myPassFilter[ 0 ]->GetOutput() )
|
||||
{
|
||||
@ -543,7 +575,10 @@ void SMESH_DeviceActor::UnShrink() {
|
||||
}
|
||||
|
||||
|
||||
void SMESH_DeviceActor::SetRepresentation(EReperesent theMode){
|
||||
void
|
||||
SMESH_DeviceActor
|
||||
::SetRepresentation(EReperesent theMode)
|
||||
{
|
||||
switch(theMode){
|
||||
case ePoint:
|
||||
myGeomFilter->SetInside(true);
|
||||
@ -572,7 +607,10 @@ void SMESH_DeviceActor::SetRepresentation(EReperesent theMode){
|
||||
}
|
||||
|
||||
|
||||
void SMESH_DeviceActor::SetVisibility(int theMode){
|
||||
void
|
||||
SMESH_DeviceActor
|
||||
::SetVisibility(int theMode)
|
||||
{
|
||||
if(!myExtractUnstructuredGrid->GetInput() ||
|
||||
GetUnstructuredGrid()->GetNumberOfCells())
|
||||
{
|
||||
@ -583,7 +621,10 @@ void SMESH_DeviceActor::SetVisibility(int theMode){
|
||||
}
|
||||
|
||||
|
||||
int SMESH_DeviceActor::GetVisibility(){
|
||||
int
|
||||
SMESH_DeviceActor
|
||||
::GetVisibility()
|
||||
{
|
||||
if(!GetUnstructuredGrid()->GetNumberOfCells()){
|
||||
vtkLODActor::SetVisibility(false);
|
||||
}
|
||||
@ -591,7 +632,10 @@ int SMESH_DeviceActor::GetVisibility(){
|
||||
}
|
||||
|
||||
|
||||
int SMESH_DeviceActor::GetNodeObjId(int theVtkID){
|
||||
int
|
||||
SMESH_DeviceActor
|
||||
::GetNodeObjId(int theVtkID)
|
||||
{
|
||||
vtkIdType anID = theVtkID;
|
||||
|
||||
if(IsImplicitFunctionUsed())
|
||||
@ -602,16 +646,22 @@ int SMESH_DeviceActor::GetNodeObjId(int theVtkID){
|
||||
return aRetID;
|
||||
}
|
||||
|
||||
float* SMESH_DeviceActor::GetNodeCoord(int theObjID){
|
||||
vtkFloatingPointType*
|
||||
SMESH_DeviceActor
|
||||
::GetNodeCoord(int theObjID)
|
||||
{
|
||||
vtkDataSet* aDataSet = myMergeFilter->GetOutput();
|
||||
vtkIdType anID = myVisualObj->GetNodeVTKId(theObjID);
|
||||
float* aCoord = aDataSet->GetPoint(anID);
|
||||
vtkFloatingPointType* aCoord = aDataSet->GetPoint(anID);
|
||||
if(MYDEBUG) MESSAGE("GetNodeCoord - theObjID = "<<theObjID<<"; anID = "<<anID);
|
||||
return aCoord;
|
||||
}
|
||||
|
||||
|
||||
int SMESH_DeviceActor::GetElemObjId(int theVtkID){
|
||||
int
|
||||
SMESH_DeviceActor
|
||||
::GetElemObjId(int theVtkID)
|
||||
{
|
||||
vtkIdType anId = myGeomFilter->GetElemObjId(theVtkID);
|
||||
if(anId < 0)
|
||||
return -1;
|
||||
@ -632,7 +682,10 @@ int SMESH_DeviceActor::GetElemObjId(int theVtkID){
|
||||
return aRetID;
|
||||
}
|
||||
|
||||
vtkCell* SMESH_DeviceActor::GetElemCell(int theObjID){
|
||||
vtkCell*
|
||||
SMESH_DeviceActor
|
||||
::GetElemCell(int theObjID)
|
||||
{
|
||||
vtkDataSet* aDataSet = myVisualObj->GetUnstructuredGrid();
|
||||
vtkIdType aGridID = myVisualObj->GetElemVTKId(theObjID);
|
||||
vtkCell* aCell = aDataSet->GetCell(aGridID);
|
||||
@ -642,33 +695,45 @@ vtkCell* SMESH_DeviceActor::GetElemCell(int theObjID){
|
||||
}
|
||||
|
||||
|
||||
float SMESH_DeviceActor::GetShrinkFactor(){
|
||||
vtkFloatingPointType
|
||||
SMESH_DeviceActor
|
||||
::GetShrinkFactor()
|
||||
{
|
||||
return myShrinkFilter->GetShrinkFactor();
|
||||
}
|
||||
|
||||
void SMESH_DeviceActor::SetShrinkFactor(float theValue){
|
||||
void
|
||||
SMESH_DeviceActor
|
||||
::SetShrinkFactor(vtkFloatingPointType theValue)
|
||||
{
|
||||
theValue = theValue > 0.1? theValue: 0.8;
|
||||
myShrinkFilter->SetShrinkFactor(theValue);
|
||||
Modified();
|
||||
}
|
||||
|
||||
|
||||
void SMESH_DeviceActor::SetHighlited(bool theIsHighlited){
|
||||
void
|
||||
SMESH_DeviceActor
|
||||
::SetHighlited(bool theIsHighlited)
|
||||
{
|
||||
if ( myIsHighlited == theIsHighlited )
|
||||
return;
|
||||
myIsHighlited = theIsHighlited;
|
||||
Modified();
|
||||
}
|
||||
|
||||
void SMESH_DeviceActor::Render(vtkRenderer *ren, vtkMapper* m){
|
||||
void
|
||||
SMESH_DeviceActor
|
||||
::Render(vtkRenderer *ren, vtkMapper* m)
|
||||
{
|
||||
int aResolveCoincidentTopology = vtkMapper::GetResolveCoincidentTopology();
|
||||
float aStoredFactor, aStoredUnit;
|
||||
vtkFloatingPointType aStoredFactor, aStoredUnit;
|
||||
vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(aStoredFactor,aStoredUnit);
|
||||
|
||||
vtkMapper::SetResolveCoincidentTopologyToPolygonOffset();
|
||||
float aFactor = myPolygonOffsetFactor, aUnits = myPolygonOffsetUnits;
|
||||
vtkFloatingPointType aFactor = myPolygonOffsetFactor, aUnits = myPolygonOffsetUnits;
|
||||
if(myIsHighlited){
|
||||
static float EPS = .01;
|
||||
static vtkFloatingPointType EPS = .01;
|
||||
aUnits *= (1.0-EPS);
|
||||
}
|
||||
vtkMapper::SetResolveCoincidentTopologyPolygonOffsetParameters(aFactor,aUnits);
|
||||
@ -679,7 +744,11 @@ void SMESH_DeviceActor::Render(vtkRenderer *ren, vtkMapper* m){
|
||||
}
|
||||
|
||||
|
||||
void SMESH_DeviceActor::SetPolygonOffsetParameters(float factor, float units){
|
||||
void
|
||||
SMESH_DeviceActor
|
||||
::SetPolygonOffsetParameters(vtkFloatingPointType factor,
|
||||
vtkFloatingPointType units)
|
||||
{
|
||||
myPolygonOffsetFactor = factor;
|
||||
myPolygonOffsetUnits = units;
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ class SMESH_DeviceActor: public vtkLODActor{
|
||||
void SetStoreIDMapping(bool theStoreMapping);
|
||||
|
||||
virtual int GetNodeObjId(int theVtkID);
|
||||
virtual float* GetNodeCoord(int theObjID);
|
||||
virtual vtkFloatingPointType* GetNodeCoord(int theObjID);
|
||||
|
||||
virtual int GetElemObjId(int theVtkID);
|
||||
virtual vtkCell* GetElemCell(int theObjID);
|
||||
@ -74,8 +74,8 @@ class SMESH_DeviceActor: public vtkLODActor{
|
||||
virtual void SetTransform(VTKViewer_Transform* theTransform);
|
||||
virtual unsigned long int GetMTime();
|
||||
|
||||
float GetShrinkFactor();
|
||||
void SetShrinkFactor(float value);
|
||||
vtkFloatingPointType GetShrinkFactor();
|
||||
void SetShrinkFactor(vtkFloatingPointType value);
|
||||
|
||||
bool IsShrunkable() { return myIsShrinkable;}
|
||||
bool IsShrunk() { return myIsShrunk;}
|
||||
@ -135,11 +135,17 @@ class SMESH_DeviceActor: public vtkLODActor{
|
||||
|
||||
bool myIsHighlited;
|
||||
|
||||
float myPolygonOffsetFactor;
|
||||
float myPolygonOffsetUnits;
|
||||
vtkFloatingPointType myPolygonOffsetFactor;
|
||||
vtkFloatingPointType myPolygonOffsetUnits;
|
||||
|
||||
void SetPolygonOffsetParameters(float factor, float units);
|
||||
void GetPolygonOffsetParameters(float& factor, float& units){
|
||||
void
|
||||
SetPolygonOffsetParameters(vtkFloatingPointType factor,
|
||||
vtkFloatingPointType units);
|
||||
|
||||
void
|
||||
GetPolygonOffsetParameters(vtkFloatingPointType& factor,
|
||||
vtkFloatingPointType& units)
|
||||
{
|
||||
factor = myPolygonOffsetFactor;
|
||||
units = myPolygonOffsetUnits;
|
||||
}
|
||||
|
@ -80,8 +80,8 @@ void SMESH_ExtractGeometry::Execute()
|
||||
vtkIdList *cellPts;
|
||||
vtkCell *cell;
|
||||
int numCellPts;
|
||||
float *x;
|
||||
float multiplier;
|
||||
vtkFloatingPointType *x;
|
||||
vtkFloatingPointType multiplier;
|
||||
vtkPoints *newPts;
|
||||
vtkIdList *newCellPts;
|
||||
vtkDataSet *input = this->GetInput();
|
||||
@ -156,7 +156,7 @@ void SMESH_ExtractGeometry::Execute()
|
||||
// To extract boundary cells, we have to create supplemental information
|
||||
if ( this->ExtractBoundaryCells )
|
||||
{
|
||||
float val;
|
||||
vtkFloatingPointType val;
|
||||
newScalars = vtkFloatArray::New();
|
||||
newScalars->SetNumberOfValues(numPts);
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
#include <vtkCell.h>
|
||||
#include <vtkIdList.h>
|
||||
#include <vtkIntArray.h>
|
||||
#include <vtkIdTypeArray.h>
|
||||
#include <vtkCellArray.h>
|
||||
#include <vtkUnsignedCharArray.h>
|
||||
|
||||
@ -418,7 +418,7 @@ void SMESH_VisualObjDef::buildElemPrs()
|
||||
|
||||
// Insert cells in grid
|
||||
|
||||
vtkIntArray* aCellLocationsArray = vtkIntArray::New();
|
||||
vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New();
|
||||
aCellLocationsArray->SetNumberOfComponents( 1 );
|
||||
aCellLocationsArray->SetNumberOfTuples( aNbCells );
|
||||
|
||||
|
@ -457,28 +457,28 @@ namespace{
|
||||
anActor->SetRepresentation(SMESH_Actor::ePoint);
|
||||
break;
|
||||
case 1132:{
|
||||
float color[3];
|
||||
vtkFloatingPointType color[3];
|
||||
anActor->GetSufaceColor(color[0], color[1], color[2]);
|
||||
int c0 = int (color[0] * 255);
|
||||
int c1 = int (color[1] * 255);
|
||||
int c2 = int (color[2] * 255);
|
||||
QColor c(c0, c1, c2);
|
||||
|
||||
float edgecolor[3];
|
||||
vtkFloatingPointType edgecolor[3];
|
||||
anActor->GetEdgeColor(edgecolor[0], edgecolor[1], edgecolor[2]);
|
||||
c0 = int (edgecolor[0] * 255);
|
||||
c1 = int (edgecolor[1] * 255);
|
||||
c2 = int (edgecolor[2] * 255);
|
||||
QColor e(c0, c1, c2);
|
||||
|
||||
float backfacecolor[3];
|
||||
vtkFloatingPointType backfacecolor[3];
|
||||
anActor->GetBackSufaceColor(backfacecolor[0], backfacecolor[1], backfacecolor[2]);
|
||||
c0 = int (backfacecolor[0] * 255);
|
||||
c1 = int (backfacecolor[1] * 255);
|
||||
c2 = int (backfacecolor[2] * 255);
|
||||
QColor b(c0, c1, c2);
|
||||
|
||||
float nodecolor[3];
|
||||
vtkFloatingPointType nodecolor[3];
|
||||
anActor->GetNodeColor(nodecolor[0], nodecolor[1], nodecolor[2]);
|
||||
c0 = int (nodecolor[0] * 255);
|
||||
c1 = int (nodecolor[1] * 255);
|
||||
@ -489,7 +489,7 @@ namespace{
|
||||
if(Edgewidth == 0)
|
||||
Edgewidth = 1;
|
||||
int intValue = int(anActor->GetNodeSize());
|
||||
float Shrink = anActor->GetShrinkFactor();
|
||||
vtkFloatingPointType Shrink = anActor->GetShrinkFactor();
|
||||
|
||||
SMESHGUI_Preferences_ColorDlg *aDlg =
|
||||
new SMESHGUI_Preferences_ColorDlg( SMESHGUI::GetSMESHGUI(), "" );
|
||||
@ -506,26 +506,26 @@ namespace{
|
||||
QColor nodecolor = aDlg->GetColor(3);
|
||||
QColor backfacecolor = aDlg->GetColor(4);
|
||||
/* actor color and backface color */
|
||||
anActor->SetSufaceColor(float (color.red()) / 255.,
|
||||
float (color.green()) / 255.,
|
||||
float (color.blue()) / 255.);
|
||||
anActor->SetBackSufaceColor(float (backfacecolor.red()) / 255.,
|
||||
float (backfacecolor.green()) / 255.,
|
||||
float (backfacecolor.blue()) / 255.);
|
||||
anActor->SetSufaceColor(vtkFloatingPointType (color.red()) / 255.,
|
||||
vtkFloatingPointType (color.green()) / 255.,
|
||||
vtkFloatingPointType (color.blue()) / 255.);
|
||||
anActor->SetBackSufaceColor(vtkFloatingPointType (backfacecolor.red()) / 255.,
|
||||
vtkFloatingPointType (backfacecolor.green()) / 255.,
|
||||
vtkFloatingPointType (backfacecolor.blue()) / 255.);
|
||||
|
||||
/* edge color */
|
||||
anActor->SetEdgeColor(float (edgecolor.red()) / 255.,
|
||||
float (edgecolor.green()) / 255.,
|
||||
float (edgecolor.blue()) / 255.);
|
||||
anActor->SetEdgeColor(vtkFloatingPointType (edgecolor.red()) / 255.,
|
||||
vtkFloatingPointType (edgecolor.green()) / 255.,
|
||||
vtkFloatingPointType (edgecolor.blue()) / 255.);
|
||||
|
||||
/* Shrink factor and size edges */
|
||||
anActor->SetShrinkFactor(aDlg->GetIntValue(3) / 100.);
|
||||
anActor->SetLineWidth(aDlg->GetIntValue(1));
|
||||
|
||||
/* Nodes color and size */
|
||||
anActor->SetNodeColor(float (nodecolor.red()) / 255.,
|
||||
float (nodecolor.green()) / 255.,
|
||||
float (nodecolor.blue()) / 255.);
|
||||
anActor->SetNodeColor(vtkFloatingPointType (nodecolor.red()) / 255.,
|
||||
vtkFloatingPointType (nodecolor.green()) / 255.,
|
||||
vtkFloatingPointType (nodecolor.blue()) / 255.);
|
||||
anActor->SetNodeSize(aDlg->GetIntValue(2));
|
||||
|
||||
delete aDlg;
|
||||
|
@ -121,7 +121,7 @@ namespace SMESH {
|
||||
myPreviewActor->VisibilityOff();
|
||||
myPreviewActor->SetMapper(myMapper);
|
||||
|
||||
float anRGB[3];
|
||||
vtkFloatingPointType anRGB[3];
|
||||
vtkProperty* aProp = vtkProperty::New();
|
||||
GetColor( "SMESH", "fill_color", anRGB[0], anRGB[1], anRGB[2], QColor( 0, 170, 255 ) );
|
||||
aProp->SetColor( anRGB[0], anRGB[1], anRGB[2] );
|
||||
|
@ -120,7 +120,7 @@ namespace SMESH {
|
||||
vtkUnstructuredGrid* myGrid;
|
||||
//vtkProperty* myBackProp, *myProp;
|
||||
|
||||
float anRGB[3], aBackRGB[3];
|
||||
vtkFloatingPointType myRGB[3], myBackRGB[3];
|
||||
|
||||
public:
|
||||
TElementSimulation (SalomeApp_Application* theApplication)
|
||||
@ -143,14 +143,14 @@ namespace SMESH {
|
||||
myPreviewActor->SetMapper(myMapper);
|
||||
|
||||
vtkProperty* myProp = vtkProperty::New();
|
||||
GetColor( "SMESH", "fill_color", anRGB[0], anRGB[1], anRGB[2], QColor( 0, 170, 255 ) );
|
||||
myProp->SetColor( anRGB[0], anRGB[1], anRGB[2] );
|
||||
GetColor( "SMESH", "fill_color", myRGB[0], myRGB[1], myRGB[2], QColor( 0, 170, 255 ) );
|
||||
myProp->SetColor( myRGB[0], myRGB[1], myRGB[2] );
|
||||
myPreviewActor->SetProperty( myProp );
|
||||
myProp->Delete();
|
||||
|
||||
vtkProperty* myBackProp = vtkProperty::New();
|
||||
GetColor( "SMESH", "backface_color", aBackRGB[0], aBackRGB[1], aBackRGB[2], QColor( 0, 0, 255 ) );
|
||||
myBackProp->SetColor( aBackRGB[0], aBackRGB[1], aBackRGB[2] );
|
||||
GetColor( "SMESH", "backface_color", myBackRGB[0], myBackRGB[1], myBackRGB[2], QColor( 0, 0, 255 ) );
|
||||
myBackProp->SetColor( myBackRGB[0], myBackRGB[1], myBackRGB[2] );
|
||||
myPreviewActor->SetBackfaceProperty( myBackProp );
|
||||
myBackProp->Delete();
|
||||
|
||||
@ -200,7 +200,7 @@ namespace SMESH {
|
||||
// take care of orientation
|
||||
if ( aType == VTK_CONVEX_POINT_SET ) {
|
||||
if ( theReverse && theMode == VTK_SURFACE ) {
|
||||
//myPreviewActor->GetProperty()->SetColor( aBackRGB[0], aBackRGB[1], aBackRGB[2] );
|
||||
//myPreviewActor->GetProperty()->SetColor( myBackRGB[0], myBackRGB[1], myBackRGB[2] );
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -230,7 +230,7 @@ namespace SMESH {
|
||||
// restore normal orientation
|
||||
if ( aType == VTK_CONVEX_POINT_SET ) {
|
||||
if ( theReverse && theMode == VTK_SURFACE ) {
|
||||
//myPreviewActor->GetProperty()->SetColor( anRGB[0], anRGB[1], anRGB[2] );
|
||||
//myPreviewActor->GetProperty()->SetColor( myRGB[0], myRGB[1], myRGB[2] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ protected:
|
||||
myActor->SetInfinitive(true);
|
||||
myActor->SetMapper(myMapper);
|
||||
|
||||
float anRGB[3];
|
||||
vtkFloatingPointType anRGB[3];
|
||||
vtkProperty* aProp = vtkProperty::New();
|
||||
SMESH::GetColor( "SMESH", "fill_color", anRGB[0], anRGB[1], anRGB[2], QColor( 0, 170, 255 ) );
|
||||
aProp->SetColor(anRGB[0],anRGB[1],anRGB[2]);
|
||||
@ -656,18 +656,18 @@ void SMESHGUI_ClippingDlg::SetCurrentPlaneParam()
|
||||
|
||||
OrientedPlane* aPlane = myPlanes[aCurPlaneIndex].GetPointer();
|
||||
|
||||
float aNormal[3];
|
||||
vtkFloatingPointType aNormal[3];
|
||||
SMESH::Orientation anOrientation;
|
||||
float aDir[3][3] = {{0, 0, 0}, {0, 0, 0}};
|
||||
vtkFloatingPointType aDir[3][3] = {{0, 0, 0}, {0, 0, 0}};
|
||||
{
|
||||
static double aCoeff = vtkMath::Pi()/180.0;
|
||||
|
||||
float aRot[2] = {getRotation1(), getRotation2()};
|
||||
vtkFloatingPointType aRot[2] = {getRotation1(), getRotation2()};
|
||||
aPlane->myAngle[0] = aRot[0];
|
||||
aPlane->myAngle[1] = aRot[1];
|
||||
|
||||
float anU[2] = {cos(aCoeff*aRot[0]), cos(aCoeff*aRot[1])};
|
||||
float aV[2] = {sqrt(1.0-anU[0]*anU[0]), sqrt(1.0-anU[1]*anU[1])};
|
||||
vtkFloatingPointType anU[2] = {cos(aCoeff*aRot[0]), cos(aCoeff*aRot[1])};
|
||||
vtkFloatingPointType aV[2] = {sqrt(1.0-anU[0]*anU[0]), sqrt(1.0-anU[1]*anU[1])};
|
||||
aV[0] = aRot[0] > 0? aV[0]: -aV[0];
|
||||
aV[1] = aRot[1] > 0? aV[1]: -aV[1];
|
||||
|
||||
@ -715,37 +715,37 @@ void SMESHGUI_ClippingDlg::SetCurrentPlaneParam()
|
||||
myActor->SetPlaneParam(aNormal, getDistance(), aPlane);
|
||||
|
||||
vtkDataSet* aDataSet = myActor->GetInput();
|
||||
float *aPnt = aDataSet->GetCenter();
|
||||
vtkFloatingPointType *aPnt = aDataSet->GetCenter();
|
||||
|
||||
float* anOrigin = aPlane->GetOrigin();
|
||||
float aDel = aDataSet->GetLength()/2.0;
|
||||
vtkFloatingPointType* anOrigin = aPlane->GetOrigin();
|
||||
vtkFloatingPointType aDel = aDataSet->GetLength()/2.0;
|
||||
|
||||
float aDelta[2][3] = {{aDir[0][0]*aDel, aDir[0][1]*aDel, aDir[0][2]*aDel},
|
||||
{aDir[1][0]*aDel, aDir[1][1]*aDel, aDir[1][2]*aDel}};
|
||||
float aParam, aPnt0[3], aPnt1[3], aPnt2[3];
|
||||
vtkFloatingPointType aDelta[2][3] = {{aDir[0][0]*aDel, aDir[0][1]*aDel, aDir[0][2]*aDel},
|
||||
{aDir[1][0]*aDel, aDir[1][1]*aDel, aDir[1][2]*aDel}};
|
||||
vtkFloatingPointType aParam, aPnt0[3], aPnt1[3], aPnt2[3];
|
||||
|
||||
float aPnt01[3] = {aPnt[0] - aDelta[0][0] - aDelta[1][0],
|
||||
aPnt[1] - aDelta[0][1] - aDelta[1][1],
|
||||
aPnt[2] - aDelta[0][2] - aDelta[1][2]};
|
||||
float aPnt02[3] = {aPnt01[0] + aNormal[0],
|
||||
aPnt01[1] + aNormal[1],
|
||||
aPnt01[2] + aNormal[2]};
|
||||
vtkFloatingPointType aPnt01[3] = {aPnt[0] - aDelta[0][0] - aDelta[1][0],
|
||||
aPnt[1] - aDelta[0][1] - aDelta[1][1],
|
||||
aPnt[2] - aDelta[0][2] - aDelta[1][2]};
|
||||
vtkFloatingPointType aPnt02[3] = {aPnt01[0] + aNormal[0],
|
||||
aPnt01[1] + aNormal[1],
|
||||
aPnt01[2] + aNormal[2]};
|
||||
vtkPlane::IntersectWithLine(aPnt01,aPnt02,aNormal,anOrigin,aParam,aPnt0);
|
||||
|
||||
float aPnt11[3] = {aPnt[0] - aDelta[0][0] + aDelta[1][0],
|
||||
aPnt[1] - aDelta[0][1] + aDelta[1][1],
|
||||
aPnt[2] - aDelta[0][2] + aDelta[1][2]};
|
||||
float aPnt12[3] = {aPnt11[0] + aNormal[0],
|
||||
aPnt11[1] + aNormal[1],
|
||||
aPnt11[2] + aNormal[2]};
|
||||
vtkFloatingPointType aPnt11[3] = {aPnt[0] - aDelta[0][0] + aDelta[1][0],
|
||||
aPnt[1] - aDelta[0][1] + aDelta[1][1],
|
||||
aPnt[2] - aDelta[0][2] + aDelta[1][2]};
|
||||
vtkFloatingPointType aPnt12[3] = {aPnt11[0] + aNormal[0],
|
||||
aPnt11[1] + aNormal[1],
|
||||
aPnt11[2] + aNormal[2]};
|
||||
vtkPlane::IntersectWithLine(aPnt11,aPnt12,aNormal,anOrigin,aParam,aPnt1);
|
||||
|
||||
float aPnt21[3] = {aPnt[0] + aDelta[0][0] - aDelta[1][0],
|
||||
aPnt[1] + aDelta[0][1] - aDelta[1][1],
|
||||
aPnt[2] + aDelta[0][2] - aDelta[1][2]};
|
||||
float aPnt22[3] = {aPnt21[0] + aNormal[0],
|
||||
aPnt21[1] + aNormal[1],
|
||||
aPnt21[2] + aNormal[2]};
|
||||
vtkFloatingPointType aPnt21[3] = {aPnt[0] + aDelta[0][0] - aDelta[1][0],
|
||||
aPnt[1] + aDelta[0][1] - aDelta[1][1],
|
||||
aPnt[2] + aDelta[0][2] - aDelta[1][2]};
|
||||
vtkFloatingPointType aPnt22[3] = {aPnt21[0] + aNormal[0],
|
||||
aPnt21[1] + aNormal[1],
|
||||
aPnt21[2] + aNormal[2]};
|
||||
vtkPlane::IntersectWithLine(aPnt21,aPnt22,aNormal,anOrigin,aParam,aPnt2);
|
||||
|
||||
vtkPlaneSource* aPlaneSource = aPlane->myPlaneSource;
|
||||
|
@ -115,12 +115,12 @@ class TPolySimulation{
|
||||
myPreviewActor->SetMapper( myMapper );
|
||||
myPreviewActor->SetRepresentation( 3 );
|
||||
|
||||
float anRGB[3];
|
||||
vtkFloatingPointType anRGB[3];
|
||||
vtkProperty* aProp = vtkProperty::New();
|
||||
GetColor( "SMESH", "selection_element_color", anRGB[0], anRGB[1], anRGB[2], QColor( 0, 170, 255 ) );
|
||||
aProp->SetColor(anRGB[0],anRGB[1],anRGB[2]);
|
||||
myPreviewActor->SetProperty( aProp );
|
||||
float aFactor,aUnits;
|
||||
vtkFloatingPointType aFactor,aUnits;
|
||||
myPreviewActor->SetResolveCoincidentTopology(true);
|
||||
myPreviewActor->GetPolygonOffsetParameters(aFactor,aUnits);
|
||||
myPreviewActor->SetPolygonOffsetParameters(aFactor,0.2*aUnits);
|
||||
|
@ -89,7 +89,7 @@
|
||||
// VTK Includes
|
||||
#include <vtkCell.h>
|
||||
#include <vtkIdList.h>
|
||||
#include <vtkIntArray.h>
|
||||
#include <vtkIdTypeArray.h>
|
||||
#include <vtkCellArray.h>
|
||||
#include <vtkUnsignedCharArray.h>
|
||||
#include <vtkUnstructuredGrid.h>
|
||||
@ -1226,7 +1226,7 @@ vtkUnstructuredGrid* SMESHGUI_MeshPatternDlg::getGrid()
|
||||
else aCellTypesArray->InsertNextValue(VTK_EMPTY_CELL);
|
||||
}
|
||||
|
||||
vtkIntArray* aCellLocationsArray = vtkIntArray::New();
|
||||
vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New();
|
||||
aCellLocationsArray->SetNumberOfComponents(1);
|
||||
aCellLocationsArray->SetNumberOfTuples(aNbCells);
|
||||
|
||||
|
@ -61,7 +61,7 @@
|
||||
// VTK includes
|
||||
#include <vtkCell.h>
|
||||
#include <vtkIdList.h>
|
||||
#include <vtkIntArray.h>
|
||||
#include <vtkIdTypeArray.h>
|
||||
#include <vtkCellArray.h>
|
||||
#include <vtkUnsignedCharArray.h>
|
||||
#include <vtkUnstructuredGrid.h>
|
||||
@ -547,7 +547,7 @@ void SMESHGUI_MoveNodesDlg::redisplayPreview()
|
||||
aCellTypesArray->InsertNextValue(VTK_VERTEX);
|
||||
anIdList->Delete();
|
||||
|
||||
vtkIntArray* aCellLocationsArray = vtkIntArray::New();
|
||||
vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New();
|
||||
aCellLocationsArray->SetNumberOfComponents(1);
|
||||
aCellLocationsArray->SetNumberOfTuples(1);
|
||||
|
||||
|
@ -68,7 +68,7 @@
|
||||
#include <vtkPolygon.h>
|
||||
#include <vtkConvexPointSet.h>
|
||||
#include <vtkIdList.h>
|
||||
#include <vtkIntArray.h>
|
||||
#include <vtkIdTypeArray.h>
|
||||
#include <vtkCellArray.h>
|
||||
#include <vtkUnsignedCharArray.h>
|
||||
#include <vtkUnstructuredGrid.h>
|
||||
@ -1320,7 +1320,7 @@ void SMESHGUI_CuttingOfQuadsDlg::displayPreview()
|
||||
}
|
||||
}
|
||||
|
||||
vtkIntArray* aCellLocationsArray = vtkIntArray::New();
|
||||
vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New();
|
||||
aCellLocationsArray->SetNumberOfComponents(1);
|
||||
aCellLocationsArray->SetNumberOfTuples(aNbCells);
|
||||
|
||||
|
@ -63,7 +63,7 @@
|
||||
// VTK Includes
|
||||
#include <vtkCell.h>
|
||||
#include <vtkIdList.h>
|
||||
#include <vtkIntArray.h>
|
||||
#include <vtkIdTypeArray.h>
|
||||
#include <vtkCellArray.h>
|
||||
#include <vtkUnsignedCharArray.h>
|
||||
#include <vtkUnstructuredGrid.h>
|
||||
@ -148,7 +148,7 @@ namespace SMESH {
|
||||
aCells->InsertNextCell(anIdList);
|
||||
aCellTypesArray->InsertNextValue(VTK_VERTEX);
|
||||
|
||||
vtkIntArray* aCellLocationsArray = vtkIntArray::New();
|
||||
vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New();
|
||||
aCellLocationsArray->SetNumberOfComponents(1);
|
||||
aCellLocationsArray->SetNumberOfTuples(1);
|
||||
|
||||
@ -179,11 +179,11 @@ namespace SMESH {
|
||||
vtkProperty* aProp = vtkProperty::New();
|
||||
aProp->SetRepresentationToPoints();
|
||||
|
||||
float anRGB[3];
|
||||
vtkFloatingPointType anRGB[3];
|
||||
GetColor( "SMESH", "node_color", anRGB[0], anRGB[1], anRGB[2], QColor( 0, 255, 0 ) );
|
||||
aProp->SetColor( anRGB[0], anRGB[1], anRGB[2] );
|
||||
|
||||
float aPointSize = GetFloat( "SMESH:node_size", 3 );
|
||||
vtkFloatingPointType aPointSize = GetFloat( "SMESH:node_size", 3 );
|
||||
aProp->SetPointSize( aPointSize );
|
||||
|
||||
myPreviewActor->SetProperty( aProp );
|
||||
|
@ -636,13 +636,13 @@ void SMESHGUI_Preferences_ScalarBarDlg::onSelectionChanged()
|
||||
vtkScalarBarActor* myScalarBarActor = myActor->GetScalarBarActor();
|
||||
|
||||
if ( myScalarBarActor->GetLookupTable() ) {
|
||||
float *range = myScalarBarActor->GetLookupTable()->GetRange();
|
||||
vtkFloatingPointType *range = myScalarBarActor->GetLookupTable()->GetRange();
|
||||
myMinEdit->setText( QString::number( range[0],'g',12 ) );
|
||||
myMaxEdit->setText( QString::number( range[1],'g',12 ) );
|
||||
}
|
||||
|
||||
vtkTextProperty* aTitleTextPrp = myScalarBarActor->GetTitleTextProperty();
|
||||
float aTColor[3];
|
||||
vtkFloatingPointType aTColor[3];
|
||||
aTitleTextPrp->GetColor( aTColor );
|
||||
myTitleColorBtn->setPaletteBackgroundColor( QColor( (int)( aTColor[0]*255 ), (int)( aTColor[1]*255 ), (int)( aTColor[2]*255 ) ) );
|
||||
myTitleFontCombo->setCurrentItem( aTitleTextPrp->GetFontFamily() );
|
||||
@ -651,7 +651,7 @@ void SMESHGUI_Preferences_ScalarBarDlg::onSelectionChanged()
|
||||
myTitleShadowCheck->setChecked( aTitleTextPrp->GetShadow() );
|
||||
|
||||
vtkTextProperty* aLabelsTextPrp = myScalarBarActor->GetLabelTextProperty();
|
||||
float aLColor[3];
|
||||
vtkFloatingPointType aLColor[3];
|
||||
aLabelsTextPrp->GetColor( aLColor );
|
||||
myLabelsColorBtn->setPaletteBackgroundColor( QColor( (int)( aLColor[0]*255 ), (int)( aLColor[1]*255 ), (int)( aLColor[2]*255 ) ) );
|
||||
myLabelsFontCombo->setCurrentItem( aLabelsTextPrp->GetFontFamily() );
|
||||
|
@ -174,7 +174,7 @@ namespace SMESH
|
||||
myStream << aSObject->GetID();
|
||||
} else if ( !CORBA::is_nil(theArg)) {
|
||||
if ( aSMESHGen->CanPublishInStudy( theArg )) // not published SMESH object
|
||||
myStream << "smeshObj_" << (int) theArg;
|
||||
myStream << "smeshObj_" << size_t(theArg);
|
||||
else
|
||||
myStream << NotPublishedObjectName();
|
||||
}
|
||||
|
@ -2511,11 +2511,12 @@ static LDOM_Element createFilterItem( const char* theName,
|
||||
{
|
||||
LDOM_Element aCriterionItem = theDoc.createElement( "criterion" );
|
||||
|
||||
aCriterionItem.setAttribute( ATTR_TYPE , toString( aCriteria[ i ].Type ) );
|
||||
aCriterionItem.setAttribute( ATTR_COMPARE , toString( aCriteria[ i ].Compare ) );
|
||||
aCriterionItem.setAttribute( ATTR_THRESHOLD , toString( aCriteria[ i ].Threshold ) );
|
||||
aCriterionItem.setAttribute( ATTR_UNARY , toString( aCriteria[ i ].UnaryOp ) );
|
||||
aCriterionItem.setAttribute( ATTR_BINARY , toString( aCriteria[ i ].BinaryOp ) );
|
||||
typedef long int TLongParam;
|
||||
aCriterionItem.setAttribute( ATTR_TYPE , toString( TLongParam( aCriteria[ i ].Type) ) );
|
||||
aCriterionItem.setAttribute( ATTR_COMPARE , toString( TLongParam( aCriteria[ i ].Compare ) ) );
|
||||
aCriterionItem.setAttribute( ATTR_THRESHOLD , toString( TLongParam( aCriteria[ i ].Threshold ) ) );
|
||||
aCriterionItem.setAttribute( ATTR_UNARY , toString( TLongParam( aCriteria[ i ].UnaryOp ) ) );
|
||||
aCriterionItem.setAttribute( ATTR_BINARY , toString( TLongParam( aCriteria[ i ].BinaryOp ) ) );
|
||||
|
||||
aCriterionItem.setAttribute( ATTR_THRESHOLD_STR, (const char*)aCriteria[ i ].ThresholdStr );
|
||||
aCriterionItem.setAttribute( ATTR_TOLERANCE , toString( aCriteria[ i ].Tolerance ) );
|
||||
|
@ -61,7 +61,7 @@ public :
|
||||
// IDL Methods
|
||||
void setProtocol(SALOME::TypeOfCommunication typ) {}
|
||||
void release() {}
|
||||
SALOME::SenderInt_ptr getSenderForNumber(long int) {return SALOME::SenderInt::_nil();}
|
||||
SALOME::SenderInt_ptr getSenderForNumber(SALOME_MED::medGeometryElement) {return SALOME::SenderInt::_nil();}
|
||||
SALOME::SenderInt_ptr getSenderForNumberIndex() {return SALOME::SenderInt::_nil();}
|
||||
|
||||
CORBA::Long getIdentifier()
|
||||
|
@ -45,195 +45,206 @@
|
||||
class SMESH_Mesh_i;
|
||||
|
||||
class SMESH_MEDMesh_i:
|
||||
public virtual POA_SALOME_MED::MESH, public virtual SALOME::GenericObj_i
|
||||
public virtual POA_SALOME_MED::MESH,
|
||||
public virtual SALOME::GenericObj_i
|
||||
{
|
||||
public: private: protected:
|
||||
// C++ object containing values
|
||||
::SMESH_Mesh_i * _mesh_i;
|
||||
SMESHDS_Mesh *_meshDS;
|
||||
protected:
|
||||
// C++ object containing values
|
||||
::SMESH_Mesh_i * _mesh_i;
|
||||
SMESHDS_Mesh *_meshDS;
|
||||
|
||||
string _meshId;
|
||||
bool _compte;
|
||||
bool _creeFamily;
|
||||
int _indexElts;
|
||||
int _indexEnts;
|
||||
int _famIdent;
|
||||
|
||||
map < SALOME_MED::medGeometryElement, int >_mapIndToSeqElts;
|
||||
SALOME_MED::long_array_var _seq_elemId[MED_NBR_GEOMETRIE_MAILLE];
|
||||
|
||||
map < SALOME_MED::medEntityMesh, int >_mapNbTypes;
|
||||
map < SALOME_MED::medEntityMesh, int >_mapIndToVectTypes;
|
||||
vector < SALOME_MED::medGeometryElement >
|
||||
_TypesId[MED_NBR_GEOMETRIE_MAILLE];
|
||||
|
||||
vector < SALOME_MED::FAMILY_ptr > _families;
|
||||
public:
|
||||
|
||||
// Constructors and associated internal methods
|
||||
SMESH_MEDMesh_i();
|
||||
SMESH_MEDMesh_i(SMESH_Mesh_i * m);
|
||||
~SMESH_MEDMesh_i();
|
||||
|
||||
// IDL Methods
|
||||
void setProtocol(SALOME::TypeOfCommunication typ) {}
|
||||
void release() {}
|
||||
SALOME::SenderDouble_ptr getSenderForCoordinates(SALOME_MED::medModeSwitch) {return SALOME::SenderDouble::_nil();}
|
||||
SALOME::SenderInt_ptr getSenderForConnectivity(SALOME_MED::medModeSwitch,
|
||||
SALOME_MED::medConnectivity,
|
||||
SALOME_MED::medEntityMesh,
|
||||
SALOME_MED::medGeometryElement)
|
||||
{
|
||||
return SALOME::SenderInt::_nil();
|
||||
}
|
||||
SALOME::SenderInt_ptr getSenderForPolygonsConnectivity(SALOME_MED::medConnectivity, SALOME_MED::medEntityMesh) {return SALOME::SenderInt::_nil();}
|
||||
SALOME::SenderInt_ptr getSenderForPolygonsConnectivityIndex(SALOME_MED::medConnectivity, SALOME_MED::medEntityMesh) {return SALOME::SenderInt::_nil();}
|
||||
SALOME::SenderInt_ptr getSenderForPolyhedronConnectivity(SALOME_MED::medConnectivity) {return SALOME::SenderInt::_nil();}
|
||||
SALOME::SenderInt_ptr getSenderForPolyhedronIndex(SALOME_MED::medConnectivity) {return SALOME::SenderInt::_nil();}
|
||||
SALOME::SenderInt_ptr getSenderForPolyhedronFacesIndex() {return SALOME::SenderInt::_nil();}
|
||||
|
||||
char *getName() throw(SALOME::SALOME_Exception);
|
||||
CORBA::Long getSpaceDimension() throw(SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Long getMeshDimension() throw(SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Boolean getIsAGrid() throw (SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Boolean
|
||||
existConnectivity(SALOME_MED::medConnectivity connectivityType,
|
||||
SALOME_MED::medEntityMesh entity)
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
char *getCoordinatesSystem() throw(SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Double getCoordinate(CORBA::Long Number, CORBA::Long Axis)
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::double_array * getCoordinates(SALOME_MED::medModeSwitch typeSwitch)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
string _meshId;
|
||||
bool _compte;
|
||||
bool _creeFamily;
|
||||
int _indexElts;
|
||||
int _indexEnts;
|
||||
int _famIdent;
|
||||
|
||||
map < SALOME_MED::medGeometryElement, int >_mapIndToSeqElts;
|
||||
SALOME_MED::long_array_var _seq_elemId[MED_NBR_GEOMETRIE_MAILLE];
|
||||
|
||||
map < SALOME_MED::medEntityMesh, int >_mapNbTypes;
|
||||
map < SALOME_MED::medEntityMesh, int >_mapIndToVectTypes;
|
||||
vector < SALOME_MED::medGeometryElement >
|
||||
_TypesId[MED_NBR_GEOMETRIE_MAILLE];
|
||||
|
||||
vector < SALOME_MED::FAMILY_ptr > _families;
|
||||
public:
|
||||
|
||||
// Constructors and associated internal methods
|
||||
SMESH_MEDMesh_i();
|
||||
SMESH_MEDMesh_i(SMESH_Mesh_i * m);
|
||||
~SMESH_MEDMesh_i();
|
||||
|
||||
// IDL Methods
|
||||
void setProtocol(SALOME::TypeOfCommunication typ) {}
|
||||
void release() {}
|
||||
SALOME::SenderDouble_ptr getSenderForCoordinates(long int) {return SALOME::SenderDouble::_nil();}
|
||||
SALOME::SenderInt_ptr getSenderForConnectivity(long int, long int, long int, long int) {return SALOME::SenderInt::_nil();}
|
||||
SALOME::SenderInt_ptr getSenderForPolygonsConnectivity(SALOME_MED::medConnectivity, SALOME_MED::medEntityMesh) {return SALOME::SenderInt::_nil();}
|
||||
SALOME::SenderInt_ptr getSenderForPolygonsConnectivityIndex(SALOME_MED::medConnectivity, SALOME_MED::medEntityMesh) {return SALOME::SenderInt::_nil();}
|
||||
SALOME::SenderInt_ptr getSenderForPolyhedronConnectivity(SALOME_MED::medConnectivity) {return SALOME::SenderInt::_nil();}
|
||||
SALOME::SenderInt_ptr getSenderForPolyhedronIndex(SALOME_MED::medConnectivity) {return SALOME::SenderInt::_nil();}
|
||||
SALOME::SenderInt_ptr getSenderForPolyhedronFacesIndex() {return SALOME::SenderInt::_nil();}
|
||||
|
||||
char *getName() throw(SALOME::SALOME_Exception);
|
||||
CORBA::Long getSpaceDimension() throw(SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Long getMeshDimension() throw(SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Boolean getIsAGrid() throw (SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Boolean
|
||||
existConnectivity(SALOME_MED::medConnectivity connectivityType,
|
||||
SALOME_MED::medEntityMesh entity)
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
char *getCoordinatesSystem() throw(SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Double getCoordinate(CORBA::Long Number, CORBA::Long Axis)
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::double_array * getCoordinates(SALOME_MED::medModeSwitch typeSwitch)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::string_array * getCoordinatesNames()
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::string_array * getCoordinatesUnits()
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Long getNumberOfNodes() throw(SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Long getNumberOfTypes(SALOME_MED::medEntityMesh entity)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::medGeometryElement_array *
|
||||
getTypes(SALOME_MED::medEntityMesh entity) throw(SALOME::
|
||||
SALOME_Exception);
|
||||
|
||||
SALOME_MED::medGeometryElement
|
||||
getElementType(SALOME_MED::medEntityMesh entity,
|
||||
CORBA::Long number)
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Long getNumberOfElements(SALOME_MED::medEntityMesh entity,
|
||||
SALOME_MED::medGeometryElement geomElement)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::long_array *
|
||||
getConnectivity(SALOME_MED::medModeSwitch typeSwitch,
|
||||
SALOME_MED::medConnectivity mode,
|
||||
SALOME_MED::medEntityMesh entity,
|
||||
SALOME_MED::medGeometryElement geomElement)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::long_array *
|
||||
getConnectivityIndex(SALOME_MED::medConnectivity mode,
|
||||
SALOME_MED::medEntityMesh entity)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::long_array*
|
||||
getGlobalNumberingIndex(SALOME_MED::medEntityMesh entity)
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Long getElementNumber(SALOME_MED::medConnectivity mode,
|
||||
SALOME_MED::medEntityMesh entity,
|
||||
SALOME_MED::medGeometryElement type,
|
||||
const SALOME_MED::long_array & connectivity)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::long_array *
|
||||
getReverseConnectivity(SALOME_MED::medConnectivity mode)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::long_array *
|
||||
getReverseConnectivityIndex(SALOME_MED::
|
||||
medConnectivity mode) throw(SALOME::SALOME_Exception);
|
||||
|
||||
// Family and Group
|
||||
CORBA::Long getNumberOfFamilies(SALOME_MED::medEntityMesh entity)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Long getNumberOfGroups(SALOME_MED::medEntityMesh entity)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::Family_array *
|
||||
getFamilies(SALOME_MED::medEntityMesh entity)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::FAMILY_ptr getFamily(SALOME_MED::medEntityMesh entity,
|
||||
CORBA::Long i) throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::Group_array * getGroups(SALOME_MED::medEntityMesh entity)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::GROUP_ptr getGroup(SALOME_MED::medEntityMesh entity,
|
||||
CORBA::Long i) throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::SUPPORT_ptr
|
||||
getBoundaryElements(SALOME_MED::medEntityMesh entity)
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::SUPPORT_ptr getSkin(SALOME_MED::SUPPORT_ptr mySupport3D)
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::FIELD_ptr getVolume(SALOME_MED::SUPPORT_ptr mySupport)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::FIELD_ptr getArea(SALOME_MED::SUPPORT_ptr mySupport)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::FIELD_ptr getLength(SALOME_MED::SUPPORT_ptr mySupport)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::FIELD_ptr getNormal(SALOME_MED::SUPPORT_ptr mySupport)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::FIELD_ptr getBarycenter(SALOME_MED::SUPPORT_ptr mySupport)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::FIELD_ptr getNeighbourhood(SALOME_MED::SUPPORT_ptr mySupport)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
// Others
|
||||
void addInStudy(SALOMEDS::Study_ptr myStudy,
|
||||
SALOME_MED::MESH_ptr myIor) throw(SALOME::SALOME_Exception);
|
||||
CORBA::Long addDriver(SALOME_MED::medDriverTypes driverType,
|
||||
const char *fileName, const char *meshName)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
void rmDriver(CORBA::Long i) throw(SALOME::SALOME_Exception);
|
||||
void read(CORBA::Long i) throw(SALOME::SALOME_Exception);
|
||||
void write(CORBA::Long i, const char *driverMeshName)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
// Cuisine interne
|
||||
CORBA::Long getCorbaIndex() throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::MESH::meshInfos * getMeshGlobal()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
bool areEquals(SALOME_MED::MESH_ptr other) { return false;};
|
||||
|
||||
SALOME_MED::MESH::coordinateInfos * getCoordGlobal()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::MESH::connectivityInfos *
|
||||
getConnectGlobal(SALOME_MED::medEntityMesh entity)
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
//
|
||||
void calculeNbElts() throw(SALOME::SALOME_Exception);
|
||||
void createFamilies() throw(SALOME::SALOME_Exception);
|
||||
SALOME_MED::string_array * getCoordinatesNames()
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::string_array * getCoordinatesUnits()
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Long getNumberOfNodes() throw(SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Long getNumberOfTypes(SALOME_MED::medEntityMesh entity)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::medGeometryElement_array *
|
||||
getTypes(SALOME_MED::medEntityMesh entity) throw(SALOME::
|
||||
SALOME_Exception);
|
||||
|
||||
SALOME_MED::medGeometryElement
|
||||
getElementType(SALOME_MED::medEntityMesh entity,
|
||||
CORBA::Long number)
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Long getNumberOfElements(SALOME_MED::medEntityMesh entity,
|
||||
SALOME_MED::medGeometryElement geomElement)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::long_array *
|
||||
getConnectivity(SALOME_MED::medModeSwitch typeSwitch,
|
||||
SALOME_MED::medConnectivity mode,
|
||||
SALOME_MED::medEntityMesh entity,
|
||||
SALOME_MED::medGeometryElement geomElement)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::long_array *
|
||||
getConnectivityIndex(SALOME_MED::medConnectivity mode,
|
||||
SALOME_MED::medEntityMesh entity)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::long_array*
|
||||
getGlobalNumberingIndex(SALOME_MED::medEntityMesh entity)
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Long getElementNumber(SALOME_MED::medConnectivity mode,
|
||||
SALOME_MED::medEntityMesh entity,
|
||||
SALOME_MED::medGeometryElement type,
|
||||
const SALOME_MED::long_array & connectivity)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::long_array *
|
||||
getReverseConnectivity(SALOME_MED::medConnectivity mode)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::long_array *
|
||||
getReverseConnectivityIndex(SALOME_MED::medConnectivity mode)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
// Family and Group
|
||||
CORBA::Long getNumberOfFamilies(SALOME_MED::medEntityMesh entity)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
CORBA::Long getNumberOfGroups(SALOME_MED::medEntityMesh entity)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::Family_array *
|
||||
getFamilies(SALOME_MED::medEntityMesh entity)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::FAMILY_ptr getFamily(SALOME_MED::medEntityMesh entity,
|
||||
CORBA::Long i)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::Group_array * getGroups(SALOME_MED::medEntityMesh entity)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::GROUP_ptr getGroup(SALOME_MED::medEntityMesh entity,
|
||||
CORBA::Long i)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::SUPPORT_ptr
|
||||
getBoundaryElements(SALOME_MED::medEntityMesh entity)
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::SUPPORT_ptr getSkin(SALOME_MED::SUPPORT_ptr mySupport3D)
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::FIELD_ptr getVolume(SALOME_MED::SUPPORT_ptr mySupport)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::FIELD_ptr getArea(SALOME_MED::SUPPORT_ptr mySupport)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::FIELD_ptr getLength(SALOME_MED::SUPPORT_ptr mySupport)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::FIELD_ptr getNormal(SALOME_MED::SUPPORT_ptr mySupport)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::FIELD_ptr getBarycenter(SALOME_MED::SUPPORT_ptr mySupport)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::FIELD_ptr getNeighbourhood(SALOME_MED::SUPPORT_ptr mySupport)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
// Others
|
||||
void addInStudy(SALOMEDS::Study_ptr myStudy,
|
||||
SALOME_MED::MESH_ptr myIor)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
CORBA::Long addDriver(SALOME_MED::medDriverTypes driverType,
|
||||
const char *fileName, const char *meshName)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
void rmDriver(CORBA::Long i) throw(SALOME::SALOME_Exception);
|
||||
void read(CORBA::Long i) throw(SALOME::SALOME_Exception);
|
||||
void write(CORBA::Long i, const char *driverMeshName)
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
// Cuisine interne
|
||||
CORBA::Long getCorbaIndex()
|
||||
throw(SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::MESH::meshInfos * getMeshGlobal()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
bool areEquals(SALOME_MED::MESH_ptr other) { return false;};
|
||||
|
||||
SALOME_MED::MESH::coordinateInfos * getCoordGlobal()
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
SALOME_MED::MESH::connectivityInfos *
|
||||
getConnectGlobal(SALOME_MED::medEntityMesh entity)
|
||||
throw (SALOME::SALOME_Exception);
|
||||
|
||||
//
|
||||
void calculeNbElts() throw(SALOME::SALOME_Exception);
|
||||
void createFamilies() throw(SALOME::SALOME_Exception);
|
||||
};
|
||||
|
||||
#endif /* _MED_MESH_I_HXX_ */
|
||||
|
@ -1639,7 +1639,7 @@ SMESH::ElementType SMESH_Mesh_i::GetElementType( const CORBA::Long id, const boo
|
||||
|
||||
CORBA::Long SMESH_Mesh_i::GetMeshPtr()
|
||||
{
|
||||
return (CORBA::Long)_impl;
|
||||
return CORBA::Long(size_t(_impl));
|
||||
}
|
||||
|
||||
|
||||
|
@ -78,8 +78,10 @@ StdMeshers_NumberOfSegments_i::~StdMeshers_NumberOfSegments_i()
|
||||
* Builds point distribution according to passed function
|
||||
*/
|
||||
//=============================================================================
|
||||
SMESH::double_array* StdMeshers_NumberOfSegments_i::BuildDistributionExpr( const char* func, long nbSeg, long conv )
|
||||
throw ( SALOME::SALOME_Exception )
|
||||
SMESH::double_array* StdMeshers_NumberOfSegments_i::BuildDistributionExpr( const char* func,
|
||||
CORBA::Long nbSeg,
|
||||
CORBA::Long conv )
|
||||
throw ( SALOME::SALOME_Exception )
|
||||
{
|
||||
MESSAGE( "StdMeshers_NumberOfSegments_i::BuildDistribution" );
|
||||
ASSERT( myBaseImpl );
|
||||
@ -99,8 +101,9 @@ throw ( SALOME::SALOME_Exception )
|
||||
}
|
||||
|
||||
SMESH::double_array* StdMeshers_NumberOfSegments_i::BuildDistributionTab( const SMESH::double_array& func,
|
||||
long nbSeg, long conv )
|
||||
throw ( SALOME::SALOME_Exception )
|
||||
CORBA::Long nbSeg,
|
||||
CORBA::Long conv )
|
||||
throw ( SALOME::SALOME_Exception )
|
||||
{
|
||||
MESSAGE( "StdMeshers_NumberOfSegments_i::BuildDistribution" );
|
||||
ASSERT( myBaseImpl );
|
||||
|
Loading…
Reference in New Issue
Block a user