/// \return the sub-feature unique identifier in this composite feature by zero-base index.
FEATURESPLUGIN_EXPORT virtual int subFeatureId(const int theIndex) const;
- /// \return true if feature or reuslt belong to this composite feature as subs.
+ /// \return true if feature or result belong to this composite feature as subs.
FEATURESPLUGIN_EXPORT virtual bool isSub(ObjectPtr theObject) const;
/// This method to inform that sub-feature is removed and must be removed from the internal data
class Model_AttributeRefAttr : public ModelAPI_AttributeRefAttr
{
Handle_TDF_Reference myRef; ///< reference to the feature label
- ///< ID of the referenced attirbute (empty if this is a reference to a feature)
+ ///< ID of the referenced attribute (empty if this is a reference to a feature)
Handle_TDataStd_Comment myID;
public:
/// Returns true if this attribute references to a object (not to the attribute)
#ifdef DEB_NAMING
#include <BRepTools.hxx>
#endif
-/// adeed to the index in the packed map to signalize that the vertex of edge is seleted
+/// added to the index in the packed map to signalize that the vertex of edge is selected
/// (multiplied by the index of the edge)
static const int kSTART_VERTEX_DELTA = 1000000;
// identifier that there is simple reference: selection equals to context
bool Model_AttributeSelection::isInitialized()
{
- if (ModelAPI_AttributeSelection::isInitialized()) { // additional checkings if it is initialized
+ if (ModelAPI_AttributeSelection::isInitialized()) { // additional checks if it is initialized
std::shared_ptr<GeomAPI_Shape> aResult;
if (myRef.isInitialized()) {
TDF_Label aSelLab = selectionLabel();
TDF_LabelMap& Model_AttributeSelection::scope()
{
if (myScope.IsEmpty()) { // create a new scope if not yet done
- // gets all featueres with named shapes that are bofore this feature label (before in history)
+ // gets all features with named shapes that are before this feature label (before in history)
DocumentPtr aMyDoc = owner()->document();
std::list<std::shared_ptr<ModelAPI_Feature> > allFeatures = aMyDoc->allFeatures();
std::list<std::shared_ptr<ModelAPI_Feature> >::iterator aFIter = allFeatures.begin();
if (aNoIndexes) {
aNewSelected = aConstructionContext->face(0);
} else { // searching for most looks-like initial face by the indexes
- // prepare edges of the current resut for the fast searching
+ // prepare edges of the current result for the fast searching
NCollection_DataMap<Handle(Geom_Curve), int> allCurves; // curves and orientations of edges
const int aSubNum = aComposite->numberOfSubs();
for(int a = 0; a < aSubNum; a++) {
aName<<"f";
else if (theOrientation == -1)
aName<<"r";
- } else { // make a compisite name from all sub-elements indexes: "1_2_3_4"
+ } else { // make a composite name from all sub-elements indexes: "1_2_3_4"
TColStd_MapIteratorOfPackedMapOfInteger aRef(theRefs->GetMap());
for(; aRef.More(); aRef.Next()) {
aName<<"-"<<aRef.Key();
}
std::shared_ptr<Model_Data> aData = std::dynamic_pointer_cast<Model_Data>(owner()->data());
TDF_Label aLab = myRef.myRef->Label();
- // identify the reuslts of sub-object of the composite by edges
+ // identify the results of sub-object of the composite by edges
// save type of the selected shape in integer attribute
TopAbs_ShapeEnum aShapeType = aSubShape.ShapeType();
TDataStd_Integer::Set(aLab, (int)aShapeType);
}
return true; // nothing to do, referencing just by name
}
- // store the shape (in case part is not loaded it should be usefull
+ // store the shape (in case part is not loaded it should be useful
TopoDS_Shape aShape;
std::string aName = theContext->data()->name();
if (!theSubShape.get() || theSubShape->isNull()) {// the whole part shape is selected
/// Selects sub-shape by the textual Name
virtual void selectSubShape(const std::string& theType, const std::string& theSubShapeName) = 0;
- /// Returns true if recomute of selection become impossible
+ /// Returns true if recompute of selection become impossible
virtual bool isInvalid() = 0;
/// To virtually destroy the fields of successors
/// \param theContext object where the sub-shape was selected
/// \param theSubShape selected sub-shape (if null, the whole context is selected)
/// \param theTemporarily if it is true, do not store and name the added in the data framework
- /// (used to remove immideately, without the following updates)
+ /// (used to remove immediately, without the following updates)
virtual void append(const ResultPtr& theContext,
const GeomShapePtr& theSubShape,
const bool theTemporarily = false) = 0;
//! To virtually destroy the fields of successors
MODELAPI_EXPORT virtual ~ModelAPI_Document();
- //! Creates a construction cresult
+ //! Creates a construction result
virtual std::shared_ptr<ModelAPI_ResultConstruction> createConstruction(
const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0) = 0;
//! Creates a body result
const int theIndex);
/// removes the result from the feature
MODELAPI_EXPORT void removeResult(const std::shared_ptr<ModelAPI_Result>& theResult);
- /// removes all results starting from the gived index (zero-based)
+ /// removes all results starting from the given index (zero-based)
/// \param theSinceIndex - index of the deleted result and all after also will be deleted
/// \param theFlush - if it is false, REDISPLAY message is not flushed
MODELAPI_EXPORT void removeResults(const int theSinceIndex, const bool theFlush = true);
// do not activate part by simple execution if it is not loaded yet: it must be explicitly
// activated for this
if (!ModelAPI_Session::get()->isLoadByDemand(aResult->data()->name())) {
- // On undo/redo creation of the part result the Object Borwser must get creation event
- // earlier that activation of this part event (otherwise the crash is producted)
+ // On undo/redo creation of the part result the Object Browser must get creation event
+ // earlier that activation of this part event (otherwise the crash is produced)
// So, send a creation event earlier, without any grouping
static Events_ID aCreateID = Events_Loop::eventByName(EVENT_OBJECT_CREATED);
ModelAPI_EventCreator::get()->sendUpdated(aResult, aCreateID, false);