statz = interpolZ(nomCas, fichierMaillage, dicoGroupeRegion, zUndef, interpolMethod, m3d)
#print statz
refstatz = {'riveDroite': (10.88, 32.61, 24.09, 5.13, 17.57, 31.33, 0.2),
- 'riveGauche': (7.72, 72.40, 21.59, 8.37, 16.71, 35.71, 0.2),
+ 'riveGauche': (7.72, 72.40, 21.59, 8.37, 16.71, 35.71, 0.3),
'litMineur': (2.06, 25.41, 13.93, 4.33, 8.47, 21.78),
'digue': (14.10, 27.09, 22.01, 2.56, 18.15, 25.02)}
controlStatZ(statz, refstatz)
# --- Z interpolation on the bathymety/altimetry on the mesh nodes
statz = interpolZ(nomCas, fichierMaillage, dicoGroupeRegion, zUndef, interpolMethod, m3d)
#print statz
-refstatz = {'domaine': (27.10, 168.28, 91.77, 46.047, 28.637, 161.17)}
+refstatz = {'domaine': (27.10, 168.28, 91.77, 46.047, 28.637, 161.17, 0.2)}
controlStatZ(statz, refstatz)
# --- add a field on nodes of type double with z values, named "BOTTOM"
# --- manual definition: useful groups of edges
Case_1_plaine_Outer = geompy.CreateGroup(HYDRO_Case_1, geompy.ShapeType["EDGE"])
geompy.UnionIDs(Case_1_plaine_Outer, [4, 12, 19, 23, 25, 21, 14, 9])
+
+# --- manual identification of all useful edge groups (boundary conditions)
+
+allEdgesIds = geompy.SubShapeAllIDs(HYDRO_Case_1, geompy.ShapeType["EDGE"])
+print "allEdgesIds", allEdgesIds
+
+(isDone, ClosedFreeBoundary, OpenFreeBoundary) = geompy.GetFreeBoundary(HYDRO_Case_1)
+geompy.addToStudyInFather(HYDRO_Case_1, ClosedFreeBoundary[0], "ClosedFreeBoundary")
+
+freeBoundary = geompy.ExtractShapes(ClosedFreeBoundary[0], geompy.ShapeType["EDGE"], True)
+freeBoundaryIds = [ geompy.GetSubShapeID(HYDRO_Case_1, freeBoundary[i]) for i in range(len(freeBoundary)) ]
+print "freeBoundaryIds", freeBoundaryIds
+
+edges_litMineur = geompy.GetSharedShapesMulti([HYDRO_Case_1, litMineur], geompy.ShapeType["EDGE"], True)
+edges_litMineurIds = [ geompy.GetSubShapeID(HYDRO_Case_1, edges_litMineur[i]) for i in range(len(edges_litMineur)) ]
+sectionsIds = [Id for Id in edges_litMineurIds if Id in freeBoundaryIds]
+print "sectionsIds", sectionsIds
sections = geompy.CreateGroup(HYDRO_Case_1, geompy.ShapeType["EDGE"])
-geompy.UnionIDs(sections, [14, 12])
+geompy.UnionIDs(sections, sectionsIds)
# --- publish in study
geompy.addToStudyInFather( HYDRO_Case_1, riveGauche, 'riveGauche' )
QString& theErrorMsg,
QString& statMess) const
{
+ DEBTRACE("Export");
HYDROData_ShapesGroup::SeqOfGroupsDefs aSeqOfGroupsDefs;
// Get groups definitions
#include "gp_Pln.hxx"
#include "BRepTools_ReShape.hxx"
+//#define _DEVDEBUG_
+#include "HYDRO_trace.hxx"
+
//#define DEB_GET_REGION_SHAPE
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Region, HYDROData_Entity)
TopoDS_Shape HYDROData_Region::GetShape( HYDROData_ShapesGroup::SeqOfGroupsDefs* theSeqOfGroups, const TopTools_SequenceOfShape* IntSh ) const
{
+ DEBTRACE("GetShape");
HYDROData_ShapesGroup::SeqOfGroupsDefs aSeqOfGroups;
HYDROData_ShapesGroup::SeqOfGroupsDefs aSeqOfUsedGroups;
if ( theSeqOfGroups )
getUsedGroups( aZoneFace, aSeqOfGroups, aSeqOfUsedGroups );
} // zones iterator
+ DEBTRACE("--- IntSh->Length():" << IntSh->Length());
for (int i = 1; i <= IntSh->Length(); i++)
{
const TopoDS_Shape& CS = (*IntSh)(i);
if ( aRegionFacesList.Extent() == 1 )
{
+ DEBTRACE("--- aRegionFacesList.Extent() == 1 ");
aResShape = TopoDS::Face( aRegionFacesList.First() );
}
else
//update history of internal edges
TopTools_IndexedMapOfShape DIE;
TopTools_ListOfShape newSh1, newSh2;
+ DEBTRACE("IE.Extent():" << IE.Extent());
for (int i = 1; i <= IE.Extent(); i++)
{
const TopoDS_Shape& CSH = IE(i);
TopoDS_Face DF;
if (!IE.IsEmpty())
{
+ DEBTRACE("---!IE.IsEmpty() ");
//add dummy face to existing shell
//this face contains all internal edges
//USD algo will skip such edges and will not perform unifying through them
#include <ShapeUpgrade_UnifySameDomain.hxx>
#include <BRepTools_ReShape.hxx>
+//#define _DEVDEBUG_
+#include "HYDRO_trace.hxx"
+
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_ShapesGroup,HYDROData_Entity)
void HYDROData_ShapesGroup::GroupDefinition::Update( SeqOfGroupsDefs* theGroupsDefs,
{
TopoDS_Shape aShape = aGroupDef.Shapes.Value( i );
- TopoDS_Shape aGeneratedByAlgo = theAlgo->History()->Modified(aShape).First(); //??TODO check
+ TopoDS_Shape aGeneratedByAlgo = TopoDS_Shape();
+ if ( !theAlgo->History().IsNull() && ! aShape.IsNull())
+ {
+ const TopTools_ListOfShape& listModified = theAlgo->History()->Modified(aShape);
+ if (listModified.Extent() > 0)
+ aGeneratedByAlgo = listModified.First();
+ }
if ( aGeneratedByAlgo.IsNull() )
{
// Edge has been removed