1 // Copyright (C) 2014-2020 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef PartSet_FieldStepPrs_H
21 #define PartSet_FieldStepPrs_H
24 #include <ModuleBase_IStepPrs.h>
26 #include <ModelAPI_ResultField.h>
27 #include <ModelAPI_Feature.h>
29 #include <ViewerData_AISShape.hxx>
30 #include <TopoDS_Shape.hxx>
35 DEFINE_STANDARD_HANDLE(PartSet_FieldStepPrs, ViewerData_AISShape)
39 * A redefinition of standard AIS Interactive Object in order to provide specific behaviour
40 * for wire presentations based in a one plane
42 class PartSet_FieldStepPrs : public ViewerData_AISShape, public ModuleBase_IStepPrs
46 /// \param theResult a result object
47 Standard_EXPORT PartSet_FieldStepPrs(FieldStepPtr theStep);
49 ModelAPI_AttributeTables::ValueType dataType() const;
51 bool dataRange(double& theMin, double& theMax) const;
53 DEFINE_STANDARD_RTTIEXT(PartSet_FieldStepPrs, ViewerData_AISShape)
56 //! Compute presentation considering sub-shape color map.
57 virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
58 const Handle(Prs3d_Presentation)& thePrs, const Standard_Integer theMode);
61 QList<double> range(double& theMin, double& theMax) const;
62 QList<double> booleanValues() const;
63 QStringList strings() const;
64 bool computeMassCenter(const TopoDS_Shape& theShape, gp_Pnt& theCenter);