#include <ShapeAnalysis_Wire.hxx>
#include <BRepAlgo_NormalProjection.hxx>
+#include <BRepBuilderAPI_MakePolygon.hxx>
IMPLEMENT_STANDARD_HANDLE( HYDROData_DTM, HYDROData_Bathymetry )
void HYDROData_DTM::PointToWire(const AltitudePoints& pnts, TopoDS_Wire& W )
{
- BRepLib_MakeWire WM;
+ /*BRepLib_MakeWire WM;
if (pnts.empty())
return;
for (int i = 0; i < pnts.size() - 1; i++)
gp_Pnt p2(pnts[i+1].X, pnts[i+1].Y, pnts[i+1].Z);
WM.Add(BRepLib_MakeEdge(p1, p2).Edge());
}
- if (WM.IsDone())
- W = WM.Wire();
+ if (WM.IsDone())*/
+
+ BRepBuilderAPI_MakePolygon PM;
+ for (int i = 0; i < pnts.size(); i++)
+ PM.Add(gp_Pnt(pnts[i].X, pnts[i].Y, pnts[i].Z));
+
+ W = PM.Wire();
}
TopTools_IndexedMapOfOrientedShape HYDROData_DTM::Create3DShape(const AltitudePoints& left,
}
// Get a boundary polyline if any
- aSeq.Append( myEditedObject->GetBoundaryPolyline() );
+ if (Handle(HYDROData_PolylineXY) aBPoly = myEditedObject->GetBoundaryPolyline())
+ aSeq.Append( aBPoly );
module()->removeViewShapes( HYDROGUI_Module::VMR_PreviewCaseZones );
HYDROData_SequenceOfObjects::Iterator anIter( aSeq );
for ( ; anIter.More(); anIter.Next() )
{
- setObjectVisibility( anIter.Value(), true );
+ const Handle_HYDROData_Entity& ent = anIter.Value();
+ if (!ent.IsNull())
+ setObjectVisibility( ent, true );
}
//Process the draw events for viewer
QApplication::processEvents( QEventLoop::ExcludeUserInputEvents );
- if ( OCCViewer_ViewWindow* vw = (OCCViewer_ViewWindow*)myPreviewViewManager->getActiveView() )
- vw->onTopView();
}
module()->update( UF_OCCViewer | UF_FitAll );
+
+ if ( OCCViewer_ViewWindow* vw = (OCCViewer_ViewWindow*)myPreviewViewManager->getActiveView() )
+ vw->onTopView();
}
}