}
aFathers[anAttr->contextObject()] = anObj;
if (aFatherGroup.find(anObj) == aFatherGroup.end()) {
- int aSize = aFatherGroup.size();
+ int aSize = (int)aFatherGroup.size();
aFatherGroup[anObj] = aSize; // the first is zero
}
}
void Config_XMLReader::readAll()
{
if (isFromMemory) {
- myXmlDoc = xmlParseMemory(myRootFileName.c_str(), myRootFileName.length());
+ myXmlDoc = xmlParseMemory(myRootFileName.c_str(), (int)myRootFileName.length());
xmlNodePtr aRoot = xmlDocGetRootElement(myXmlDoc);
readRecursively(aRoot);
return;
aStepValAsStr << aStepVal;
ModelHighAPI_Integer aNumber = aStepStr == aStepValAsStr.str()
- ? ModelHighAPI_Integer(aStepVal)
+ ? ModelHighAPI_Integer((int)aStepVal)
: ModelHighAPI_Integer(aStepStr);
aResult.reset(new FeaturesAPI_MultiRotation(aFeature, theMainObjects, theAxis, aNumber));
}
%include "GeomAlgoAPI_MakeShapeCustom.h"
%include "GeomAlgoAPI_MakeShapeList.h"
%include "GeomAlgoAPI_MakeSweep.h"
+%include "GeomAlgoAPI_Transform.h"
%include "GeomAlgoAPI_Translation.h"
%include "GeomAlgoAPI_Placement.h"
%include "GeomAlgoAPI_PointBuilder.h"
%include "GeomAlgoAPI_IGESImport.h"
%include "GeomAlgoAPI_STEPImport.h"
%include "GeomAlgoAPI_Tools.h"
-%include "GeomAlgoAPI_Transform.h"
%include "GeomAlgoAPI_PaveFiller.h"
%include "GeomAlgoAPI_Intersection.h"
%include "GeomAlgoAPI_Pipe.h"
#include <GeomAlgoAPI_Exception.h>
+#ifdef WIN32
+#pragma warning(disable : 4290)
+#endif
+
namespace GeomAlgoAPI_ShapeAPI
{
/**\class GeomAlgoAPI_ShapeAPI
#include "GeomAlgoAPI_MakeShapeCustom.h"
#include "GeomAlgoAPI_MakeShapeList.h"
#include "GeomAlgoAPI_MakeSweep.h"
+ #include "GeomAlgoAPI_Transform.h"
#include "GeomAlgoAPI_Translation.h"
#include "GeomAlgoAPI_Placement.h"
#include "GeomAlgoAPI_PointBuilder.h"
#include "GeomAlgoAPI_IGESImport.h"
#include "GeomAlgoAPI_STEPImport.h"
#include "GeomAlgoAPI_Tools.h"
- #include "GeomAlgoAPI_Transform.h"
#include "GeomAlgoAPI_PaveFiller.h"
#include "GeomAlgoAPI_Intersection.h"
#include "GeomAlgoAPI_Pipe.h"
%shared_ptr(ModelAPI_ResultField)
%shared_ptr(ModelAPI_ResultParameter)
%shared_ptr(ModelAPI_ResultCompSolid)
-%shared_ptr(ModelAPI_ObjectUpdatedMessage)
%typecheck(SWIG_TYPECHECK_POINTER) const ModelAPI_AttributeTables::Value {
$1 = (PyFloat_Check($input) || PyLong_Check($input) || PyUnicode_Check($input) || PyBool_Check($input)) ? 1 : 0;
Handle(SelectMgr_SensitiveEntity) anEntity = anIt.Value();
Handle(SelectBasics_EntityOwner) aBasicsOwner = anEntity->BaseSensitive()->OwnerId();
if (!aBasicsOwner.IsNull())
- aBasicsOwner->Set(aBasicsOwner->Priority() + myAdditionalSelectionPriority);
+ aBasicsOwner->SetPriority(aBasicsOwner->Priority() + myAdditionalSelectionPriority);
}
}
}
anIt.More();
anIt.Next()) {
Handle(SelectMgr_SensitiveEntity) anEntity = anIt.Value();
- Handle(SelectMgr_EntityOwner) anOwner =
- Handle(SelectMgr_EntityOwner)
- ::DownCast(anEntity->BaseSensitive()->OwnerId());
- anOwner->Set(this);
+ Handle(SelectMgr_EntityOwner) anOwner = anEntity->BaseSensitive()->OwnerId();
+ anOwner->SetSelectable(this);
}
return true;
#include <TopoDS_Vertex.hxx>
#include <TopExp_Explorer.hxx>
#include <Prs3d_Root.hxx>
+#include <Graphic3d_Text.hxx>
IMPLEMENT_STANDARD_RTTIEXT(PartSet_FieldStepPrs, ViewerData_AISShape);
TopoDS_Shape aShape = aShapePtr->impl<TopoDS_Shape>();
gp_Pnt aCenter;
if (computeMassCenter(aShape, aCenter)) {
- Graphic3d_Vertex aVertex(aCenter.X(), aCenter.Y(), aCenter.Z());
-
Handle(Graphic3d_AspectText3d) anAspectText3d = new Graphic3d_AspectText3d();
anAspectText3d->SetStyle(Aspect_TOST_ANNOTATION);
anAspectText3d->SetColor(aLabelColor);
int aT = aResMgr->integerValue("Viewer", "scalar_bar_text_height", 14);
QString aString = aValues.at(i);
- aGroup->Text(aString.toUtf8().constData(), aVertex, aT);
+ Handle(Graphic3d_Text) aText = new Graphic3d_Text(aT);
+ aText->SetText(aString.toUtf8().constData());
+ aText->SetPosition(aCenter);
+ aGroup->AddText(aText);
}
}
}
gp_Pnt SketcherPrs_SensitivePoint::Point() const
{
- const Handle(SelectMgr_EntityOwner)& anOwner =
- Handle(SelectMgr_EntityOwner)::DownCast(OwnerId());
+ const Handle(SelectMgr_EntityOwner)& anOwner = OwnerId();
const Handle(SketcherPrs_SymbolPrs)& aSymbPrs =
Handle(SketcherPrs_SymbolPrs)::DownCast(anOwner->Selectable());
return aSymbPrs->pointsArray()->Vertice(myId);
gp_Pnt SketcherPrs_SensitivePoint::CenterOfGeometry() const
{
#ifdef DEBUG_SENSITIVE_TO_BE_CORRECTED
- const Handle(SelectMgr_EntityOwner)& anOwner =
- Handle(SelectMgr_EntityOwner)::DownCast(OwnerId());
+ const Handle(SelectMgr_EntityOwner)& anOwner = OwnerId();
const Handle(SketcherPrs_SymbolPrs)& aSymbPrs =
Handle(SketcherPrs_SymbolPrs)::DownCast(anOwner->Selectable());
if (aSymbPrs->pointsArray()->VertexNumber() < myId)
Select3D_BndBox3d SketcherPrs_SensitivePoint::BoundingBox()
{
#ifdef DEBUG_SENSITIVE_TO_BE_CORRECTED
- const Handle(SelectMgr_EntityOwner)& anOwner =
- Handle(SelectMgr_EntityOwner)::DownCast(OwnerId());
+ const Handle(SelectMgr_EntityOwner)& anOwner = OwnerId();
const Handle(SketcherPrs_SymbolPrs)& aSymbPrs =
Handle(SketcherPrs_SymbolPrs)::DownCast(anOwner->Selectable());
if (aSymbPrs->pointsArray()->VertexNumber() < myId)
aSizedMap->InitTrash(aPixMap->Format(), aWidth, aHeigh);
for (Standard_Size i = 0; i < aWidth; i++) {
for (Standard_Size j = 0; j < aHeigh; j++) {
- aSizedMap->SetPixelColor(int(i), int(j), aPixMap->PixelColor(i / aRatio, j / aRatio));
+ aSizedMap->SetPixelColor(int(i), int(j),
+ aPixMap->PixelColor(int(i / aRatio), int(j / aRatio)));
}
}
aPixMap = aSizedMap;
throw (XAO_Exception)
{
checkElementIndex(element);
- checkNbComponents(elements.size());
+ checkNbComponents((int)elements.size());
for (int i = 0; i < m_nbComponents; ++i)
m_values[element][i] = elements[i];
throw (XAO_Exception)
{
checkComponentIndex(component);
- checkNbElements(components.size());
+ checkNbElements((int)components.size());
for (int i = 0; i < m_nbElements; ++i)
m_values[i][component] = components[i];
void DoubleStep::setValues(const std::vector<double>& values)
throw (XAO_Exception)
{
- checkNbValues(values.size());
+ checkNbValues((int)values.size());
for (int i = 0; i < m_nbElements; ++i)
{
throw (XAO_Exception)
{
checkElementIndex(element);
- checkNbComponents(elements.size());
+ checkNbComponents((int)elements.size());
for (int i = 0; i < m_nbComponents; ++i)
m_values[element][i] = elements[i];
throw (XAO_Exception)
{
checkElementIndex(component);
- checkNbElements(components.size());
+ checkNbElements((int)components.size());
for (int i = 0; i < m_nbElements; ++i)
m_values[i][component] = components[i];
#include "XAO_Step.hxx"
#ifdef WIN32
+#pragma warning(disable:4251) // std::vector needs dll-interface
#pragma warning(disable:4290) // Warning Exception ...
#endif
#include "XAO.hxx"
#include <exception>
+#ifdef WIN32
+#pragma warning(disable : 4275) // for std::exception
+#endif
+
namespace XAO
{
/**
* Gets the number of the steps.
* @return the number of steps.
*/
- const int countSteps() const { return m_steps.size(); }
+ const int countSteps() const { return (int)m_steps.size(); }
/**
* Gets the name of a component.
*/
const int count() const
{
- return m_elements.size();
+ return (int)m_elements.size();
}
/**
void IntegerStep::setValues(const std::vector<int>& values)
throw (XAO_Exception)
{
- checkNbValues(values.size());
+ checkNbValues((int)values.size());
for (int i = 0; i < m_nbElements; ++i)
{
throw (XAO_Exception)
{
checkElementIndex(element);
- checkNbComponents(elements.size());
+ checkNbComponents((int)elements.size());
for (int i = 0; i < m_nbComponents; ++i)
m_values[element][i] = elements[i];
throw (XAO_Exception)
{
checkElementIndex(component);
- checkNbElements(components.size());
+ checkNbElements((int)components.size());
for (int i = 0; i < m_nbElements; ++i)
m_values[i][component] = components[i];
void StringStep::setValues(const std::vector<std::string>& values)
throw (XAO_Exception)
{
- checkNbValues(values.size());
+ checkNbValues((int)values.size());
for (int i = 0; i < m_nbElements; ++i)
{
throw (XAO_Exception)
{
checkElementIndex(element);
- checkNbComponents(elements.size());
+ checkNbComponents((int)elements.size());
for (int i = 0; i < m_nbComponents; ++i)
m_values[element][i] = elements[i];
throw (XAO_Exception)
{
checkElementIndex(component);
- checkNbElements(components.size());
+ checkNbElements((int)components.size());
for (int i = 0; i < m_nbElements; ++i)
m_values[i][component] = components[i];
const int Xao::countGroups() const
{
- return m_groups.size();
+ return (int)m_groups.size();
}
Group* Xao::getGroup(const int& index)
const int Xao::countFields() const
{
- return m_fields.size();
+ return (int)m_fields.size();
}
const XAO::Type Xao::getFieldType(const int& index)
{
// export the shape in the XAO file
std::string txtShape = xaoGeometry->getShapeString();
- xmlNodePtr cdata = xmlNewCDataBlock(doc, BAD_CAST txtShape.c_str(), txtShape.size());
+ xmlNodePtr cdata = xmlNewCDataBlock(doc, BAD_CAST txtShape.c_str(), (int)txtShape.size());
xmlAddChild(shape, cdata);
}
else
/// OCCT: to write about the problem that active owners method returns one owner several times
QList<size_t> aSelectedIds; // Remember of selected address in order to avoid duplicates
for (; anOwnersIt.More(); anOwnersIt.Next()) {
- anOwner = Handle(SelectMgr_EntityOwner)::DownCast (anOwnersIt.Value());
+ anOwner = anOwnersIt.Value();
if (aSelectedIds.contains((size_t)anOwner.get()))
continue;
aSelectedIds.append((size_t)anOwner.get());
#include <list>
#include <memory>
+#ifdef WIN32
+#pragma warning(disable : 4251) // std::string needs dll-interface
+#endif
+
class Config_FeatureMessage;
/**
#include <list>
#include <memory>
+#ifdef WIN32
+#pragma warning(disable : 4251) // std::string needs dll-interface
+#endif
+
class XGUI_MenuGroup;
/**
Handle(SelectMgr_SensitiveEntity) anEntity = anIt.Value();
if (anEntity.IsNull())
continue;
- Handle(SelectMgr_EntityOwner) anOwner =
- Handle(SelectMgr_EntityOwner)::DownCast(anEntity->BaseSensitive()->OwnerId());
+ Handle(SelectMgr_EntityOwner) anOwner = anEntity->BaseSensitive()->OwnerId();
if (!anOwner.IsNull())
theOwners.Add(anOwner);
}
// loading the interactive object allowing the decomposition
if (aTColModes.IsEmpty() || !aHasValidMode) {
- aContext->Load(theIO, -1, true);
+ aContext->Load(theIO);
Handle(AIS_Trihedron) aTrihedron = Handle(AIS_Trihedron)::DownCast(theIO);
if (!aTrihedron.IsNull()) {
// Workaround for Trihedron. It should be loaded using the next Load method to
NCollection_List<Handle(SelectBasics_EntityOwner)>::Iterator anOwnersIt (aResultOwners);
Handle(SelectMgr_EntityOwner) anOwner;
for (; anOwnersIt.More(); anOwnersIt.Next()) {
- anOwner = Handle(SelectMgr_EntityOwner)::DownCast(anOwnersIt.Value());
+ anOwner = anOwnersIt.Value();
if (!anOwner.IsNull())
aContext->AddOrRemoveSelected(anOwner, false);
}