return aRes;
}
+std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_PointBuilder::point(
+ const double theX, const double theY, const double theZ)
+{
+ const gp_Pnt aPnt(theX, theY, theZ);
+ BRepBuilderAPI_MakeVertex aMaker(aPnt);
+ TopoDS_Vertex aVertex = aMaker.Vertex();
+ std::shared_ptr<GeomAPI_Vertex> aRes(new GeomAPI_Vertex);
+ aRes->setImpl(new TopoDS_Shape(aVertex));
+ return aRes;
+}
std::shared_ptr<GeomAPI_Pnt> GeomAlgoAPI_PointBuilder::point(std::shared_ptr<GeomAPI_Shape> theVertex)
{
/// Creates a shape by point
static std::shared_ptr<GeomAPI_Shape> point(std::shared_ptr<GeomAPI_Pnt> thePoint);
+ /// Creates a shape by point coordinates
+ static std::shared_ptr<GeomAPI_Shape> point(
+ const double theX, const double theY, const double theZ);
+
/// Return point by shape vertex
static std::shared_ptr<GeomAPI_Pnt> point(std::shared_ptr<GeomAPI_Shape> theVertex);
};
return std::shared_ptr<ModelAPI_Feature>(); // null feature means the higher than first
}
-void Model_Document::setCurrentFeature(std::shared_ptr<ModelAPI_Feature> theCurrent,
- const bool theVisible, const bool theFlushUpdates)
+void Model_Document::setCurrentFeature(
+ std::shared_ptr<ModelAPI_Feature> theCurrent, const bool theVisible)
{
// blocks the flush signals to avoid each objects visualization in the viewer
// they should not be shown once after all modifications are performed
}
// unblock the flush signals and up them after this
aLoop->activateFlushes(isActive);
-
- if (theFlushUpdates) {
- aLoop->flush(aCreateEvent);
- aLoop->flush(aRedispEvent);
- aLoop->flush(aDeleteEvent);
- }
}
void Model_Document::setCurrentFeatureUp()
if (aCurrent.get()) { // if not, do nothing because null is the upper
FeaturePtr aPrev = myObjs->nextFeature(aCurrent, true);
// do not flush: it is called only on remove, it will be flushed in the end of transaction
- setCurrentFeature(aPrev, false, false);
+ setCurrentFeature(aPrev, false);
}
}
//! will be appended after this one.
//! \param theCurrent the selected feature as current: blow it everythin become disabled
//! \param theVisible use visible features only: flag is true for Object Browser functionality
- //! \param theFlushUpdates if it is true method calls flushes for creation/redisplay/delete messages
MODEL_EXPORT virtual void setCurrentFeature(std::shared_ptr<ModelAPI_Feature> theCurrent,
- const bool theVisible, const bool theFlushUpdates = true);
+ const bool theVisible);
//! Makes the current feature one feature upper
MODEL_EXPORT virtual void setCurrentFeatureUp();
//! will be appended after this one.
//! \param theCurrent the selected feature as current: blow it everythin become disabled
//! \param theVisible use visible features only: flag is true for Object Browser functionality
- //! \param theFlushUpdates if it is true (default) it flashes creation/redisplay/delete messages
virtual void setCurrentFeature(std::shared_ptr<ModelAPI_Feature> theCurrent,
- const bool theVisible, const bool theFlushUpdates = true) = 0;
+ const bool theVisible) = 0;
//! Makes the current feature one feature upper
virtual void setCurrentFeatureUp() = 0;