// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
//
//
// Module : GEOM
// $Header$
-using namespace std;
/*!
\class GEOM_AISShape GEOM_AISShape.hxx
\brief ....
#include <Prs3d_ShadingAspect.hxx>
#include <SelectBasics_SensitiveEntity.hxx>
#include <SelectMgr_EntityOwner.hxx>
+#include <StdSelect_BRepOwner.hxx>
#include <SelectMgr_IndexedMapOfOwner.hxx>
#include <SelectMgr_Selection.hxx>
#include <StdSelect_DisplayMode.hxx>
#include <TopoDS_Shape.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
+using namespace std;
+
static void getEntityOwners( const Handle(AIS_InteractiveObject)& theObj,
const Handle(AIS_InteractiveContext)& theIC,
SelectMgr_IndexedMapOfOwner& theMap )
TopExp::MapShapes(aMainShape, aMapOfShapes);
for ( Standard_Integer i = 1, n = anAllMap.Extent(); i <= n; i++ ) {
- Handle(SelectMgr_EntityOwner) anOwner = anAllMap( i );
+ Handle(StdSelect_BRepOwner) anOwner = Handle(StdSelect_BRepOwner)::DownCast(anAllMap( i ));
if ( anOwner.IsNull() || !anOwner->HasShape() )
continue;
}
GEOM_AISShape::GEOM_AISShape(const TopoDS_Shape& shape,
- const Standard_CString aName): SALOME_AISShape(shape)
+ const Standard_CString aName)
+ : SALOME_AISShape(shape), myName(aName)
{
- myName = new char [strlen(aName)+1];
- strcpy( myName, aName);
-
myShadingColor = Quantity_Color( Quantity_NOC_GOLDENROD );
}
void GEOM_AISShape::setName(const Standard_CString aName)
{
- myName = new char [strlen(aName)+1];
- strcpy( myName, aName);
+ myName = aName;
Handle(SALOME_InteractiveObject) IO = getIO();
if ( !IO.IsNull() )
}
Standard_CString GEOM_AISShape::getName(){
- return myName;
+ return myName.ToCString();
}
void GEOM_AISShape::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
//a4bis->SetInteriorColor(myShadingColor);
myDrawer->ShadingAspect()->SetColor(myShadingColor);
- StdPrs_ShadedShape::Add(aPrs,myshape,myDrawer);
+ // PAL12113: AIS_Shape::Compute() works correctly with shapes containing no faces
+ //StdPrs_ShadedShape::Add(aPrs,myshape,myDrawer);
+ AIS_Shape::Compute(aPresentationManager, aPrs, aMode);
break;
}
}