mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-24 16:30:34 +05:00
0021141: EDF 1758 SMESH: Salome doesn't stop when assigning a composite side discretization hypothesis
Fix invalid discretization of EDGEs: in GetCurve3d(), set Closed flag to WIRE wrapped into BRepAdaptor_CompCurve
This commit is contained in:
parent
910eadfc30
commit
17b5f093a6
@ -20,7 +20,6 @@
|
|||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
|
||||||
// SMESH SMESH : implementaion of SMESH idl descriptions
|
|
||||||
// File : StdMeshers_FaceSide.hxx
|
// File : StdMeshers_FaceSide.hxx
|
||||||
// Created : Wed Jan 31 18:41:25 2007
|
// Created : Wed Jan 31 18:41:25 2007
|
||||||
// Author : Edward AGAPOV (eap)
|
// Author : Edward AGAPOV (eap)
|
||||||
@ -40,9 +39,10 @@
|
|||||||
|
|
||||||
#include <Adaptor2d_Curve2d.hxx>
|
#include <Adaptor2d_Curve2d.hxx>
|
||||||
#include <BRepAdaptor_CompCurve.hxx>
|
#include <BRepAdaptor_CompCurve.hxx>
|
||||||
#include <BRepAdaptor_Curve.hxx>
|
|
||||||
#include <BRep_Builder.hxx>
|
#include <BRep_Builder.hxx>
|
||||||
#include <BRep_Tool.hxx>
|
#include <BRep_Tool.hxx>
|
||||||
|
#include <GCPnts_AbscissaPoint.hxx>
|
||||||
|
#include <Geom2dAdaptor_Curve.hxx>
|
||||||
#include <TopExp.hxx>
|
#include <TopExp.hxx>
|
||||||
#include <TopExp_Explorer.hxx>
|
#include <TopExp_Explorer.hxx>
|
||||||
#include <TopoDS.hxx>
|
#include <TopoDS.hxx>
|
||||||
@ -50,9 +50,6 @@
|
|||||||
#include <TopoDS_Vertex.hxx>
|
#include <TopoDS_Vertex.hxx>
|
||||||
#include <TopoDS_Wire.hxx>
|
#include <TopoDS_Wire.hxx>
|
||||||
|
|
||||||
#include <GCPnts_AbscissaPoint.hxx>
|
|
||||||
#include <Geom2dAdaptor_Curve.hxx>
|
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
@ -536,14 +533,15 @@ BRepAdaptor_CompCurve* StdMeshers_FaceSide::GetCurve3d() const
|
|||||||
if ( myEdge.empty() )
|
if ( myEdge.empty() )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
// if ( myEdge.size() == 1 )
|
|
||||||
// return new BRepAdaptor_Curve( myEdge[0] );
|
|
||||||
|
|
||||||
TopoDS_Wire aWire;
|
TopoDS_Wire aWire;
|
||||||
BRep_Builder aBuilder;
|
BRep_Builder aBuilder;
|
||||||
aBuilder.MakeWire(aWire);
|
aBuilder.MakeWire(aWire);
|
||||||
for ( int i=0; i<myEdge.size(); ++i )
|
for ( int i=0; i<myEdge.size(); ++i )
|
||||||
aBuilder.Add( aWire, myEdge[i] );
|
aBuilder.Add( aWire, myEdge[i] );
|
||||||
|
|
||||||
|
if ( myEdge.size() == 2 && FirstVertex().IsSame( LastVertex() ))
|
||||||
|
aWire.Closed(true); // issue 0021141
|
||||||
|
|
||||||
return new BRepAdaptor_CompCurve( aWire );
|
return new BRepAdaptor_CompCurve( aWire );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user