# =============================================================================
# Test 12. Check Python dump
# =============================================================================
-assert(model.checkPythonDump())
+assert(model.checkPythonDump(model.ModelHighAPI.CHECK_NAMING))
aPart.removeFeature(aWireFeature3)
aSession.finishOperation()
-assert(model.checkPythonDump())
+assert(model.checkPythonDump(model.ModelHighAPI.CHECK_NAMING))
aShapeToBeSelected->setImpl<TopoDS_Shape>(new TopoDS_Shape(aSelectorShape));
// make the context result the latest existing
aContext = newestContext(aContext, aShapeToBeSelected);
- if (myIsGeometricalSelection) { // store the currently generated name
+ if (myIsGeometricalSelection || aCenterType == NOT_CENTER) { // store the currently generated name
selectionLabel().ForgetAllAttributes(true);
bool aToUnblock = false;
aToUnblock = !owner()->data()->blockSendAttributeUpdated(true);
myRef.setValue(aContext);
aSelector.store();
+ aSelector.solve(aContextShape);
owner()->data()->sendAttributeUpdated(this);
if (aToUnblock)
owner()->data()->blockSendAttributeUpdated(false);
return;
- } else { // re-select by context and value
- if (aCenterType != NOT_CENTER) {
- if (!aShapeToBeSelected->isEdge())
- continue;
- std::shared_ptr<GeomAPI_Edge> aSelectedEdge(new GeomAPI_Edge(aShapeToBeSelected));
- setValueCenter(aContext, aSelectedEdge, aCenterType);
- }
- else
- setValue(aContext, aShapeToBeSelected);
+ } else { // re-select center of circle/arc by context and value
+ if (!aShapeToBeSelected->isEdge())
+ continue;
+ std::shared_ptr<GeomAPI_Edge> aSelectedEdge(new GeomAPI_Edge(aShapeToBeSelected));
+ setValueCenter(aContext, aSelectedEdge, aCenterType);
}
return;
}
return false;
}
- bool isOk;
+ bool isOk = true;
if (theCheckType & CHECK_NAMING) {
// check dump with the selection by names
isOk = checkDump(aSession, aFileForNamingDump, aStore, anErrorByNaming);
model.testNbSubShapes(Result, GeomAPI_Shape.VERTEX, [732])
model.testResultsVolumes(Result, [14144.443128843522572424262762070])
-Group_1 = model.addGroup(Part_1_doc, [model.selection("FACE", "(Plug/Modified_Face&Sketch_1/SketchLine_4)(Plug/Modified_Face&Sketch_2/SketchCircle_1_2)(Plug/Modified_Face&Sketch_1/SketchLine_28)(Plug/Modified_Face&Sketch_1/SketchLine_3)(Plug/Modified_Face&Sketch_1/SketchLine_29)(Plug/Modified_Face&Sketch_1/SketchLine_30)(Plug/Modified_Face&Sketch_1/SketchLine_31)(Plug/Modified_Face&Sketch_1/SketchLine_33)(Plug/Modified_Face&Sketch_1/SketchLine_34)(Plug/Modified_Face&Sketch_1/SketchLine_1)(Plug/Modified_Face&Sketch_1/SketchLine_2)(Plug/Modified_Face&Sketch_1/SketchLine_32)"), model.selection("FACE", "(Plug/Modified_Face&Sketch_1/SketchLine_10)(Plug/Modified_Face&Sketch_1/SketchLine_9)(Plug/Modified_Face&Sketch_1/SketchArc_1_2)(Plug/Modified_Face&Sketch_1/SketchLine_7)(Plug/Modified_Face&Sketch_5/SketchLine_64)(Plug/Modified_Face&Sketch_1/SketchLine_8)(Plug/Modified_Face&Sketch_1/SketchLine_11)(Plug/Modified_Face&Sketch_1/SketchLine_12)(Plug/Modified_Face&Sketch_1/SketchLine_13)(Plug/Modified_Face&Sketch_1/SketchLine_14)(Plug/Modified_Face&Sketch_1/SketchLine_15)(Plug/Modified_Face&Sketch_1/SketchLine_16)(Plug/Modified_Face&Sketch_1/SketchLine_17)(Plug/Modified_Face&Sketch_1/SketchLine_18)(Plug/Modified_Face&Sketch_1/SketchLine_19)(Plug/Modified_Face&Sketch_1/SketchLine_20)(Plug/Modified_Face&Sketch_1/SketchLine_6)(Plug/Modified_Face&Sketch_1/SketchLine_5)(Plug/Modified_Face&Sketch_1/SketchLine_4)(Plug/Modified_Face&Sketch_2/SketchCircle_1_2)(Plug/Modified_Face&Sketch_1/SketchLine_28)(Plug/Modified_Face&Sketch_1/SketchLine_27)(Plug/Modified_Face&Sketch_1/SketchLine_26)(Plug/Modified_Face&Sketch_1/SketchLine_25)(Plug/Modified_Face&Sketch_1/SketchLine_24)(Plug/Modified_Face&Sketch_1/SketchLine_23)(Plug/Modified_Face&Sketch_1/SketchLine_22)(Plug/Modified_Face&Sketch_1/SketchLine_21)"), model.selection("FACE", "(Plug/Modified_Face&Sketch_1/SketchArc_1_2)(Plug/Modified_Face&Sketch_4/SketchLine_57)(Plug/Modified_Face&Sketch_4/SketchLine_58)(Plug/Modified_Face&Sketch_4/SketchArc_2_2)(Plug/Modified_Face&Sketch_4/SketchLine_55)(Plug/Modified_Face&Sketch_1/SketchLine_6)(Plug/Modified_Face&Sketch_1/SketchLine_5)(Plug/Modified_Face&Sketch_1/SketchLine_4)(Plug/Modified_Face&Sketch_1/SketchLine_28)(Plug/Modified_Face&Sketch_1/SketchLine_27)(Plug/Modified_Face&Sketch_1/SketchLine_26)(Plug/Modified_Face&Sketch_1/SketchLine_25)(Plug/Modified_Face&Sketch_1/SketchLine_24)(Plug/Modified_Face&Sketch_1/SketchLine_23)(Plug/Modified_Face&Sketch_1/SketchLine_22)(Plug/Modified_Face&Sketch_1/SketchLine_21)(Plug/Modified_Face&Sketch_1/SketchLine_3)(Plug/Modified_Face&Sketch_1/SketchLine_29)(Plug/Modified_Face&Sketch_1/SketchLine_30)(Plug/Modified_Face&Sketch_1/SketchLine_31)(Plug/Modified_Face&Sketch_3/SketchLine_42)(Plug/Modified_Face&Sketch_3/SketchLine_41)(Plug/Modified_Face&Sketch_3/SketchLine_40)(Plug/Modified_Face&Sketch_1/SketchLine_33)(Plug/Modified_Face&Sketch_1/SketchLine_34)(Plug/Modified_Face&Sketch_1/SketchLine_1)(Plug/Modified_Face&Sketch_1/SketchLine_2)"), model.selection("FACE", "(Plug/Modified_Face&Sketch_1/SketchLine_10)(Plug/Modified_Face&Sketch_1/SketchLine_9)(Plug/Modified_Face&Sketch_1/SketchArc_1_2)(Plug/Modified_Face&Sketch_1/SketchLine_7)(Plug/Modified_Face&Sketch_5/SketchLine_64)(Plug/Modified_Face&Sketch_1/SketchLine_8)(Plug/Modified_Face&Sketch_1/SketchLine_11)(Plug/Modified_Face&Sketch_1/SketchLine_12)(Plug/Modified_Face&Sketch_1/SketchLine_13)(Plug/Modified_Face&Sketch_1/SketchLine_14)(Plug/Modified_Face&Sketch_1/SketchLine_15)(Plug/Modified_Face&Sketch_1/SketchLine_16)(Plug/Modified_Face&Sketch_1/SketchLine_17)(Plug/Modified_Face&Sketch_1/SketchLine_18)(Plug/Modified_Face&Sketch_1/SketchLine_19)(Plug/Modified_Face&Sketch_1/SketchLine_20)(Plug/Modified_Face&Sketch_4/SketchLine_57)(Plug/Modified_Face&Sketch_4/SketchLine_58)(Plug/Modified_Face&Sketch_4/SketchArc_2_2)(Plug/Modified_Face&Sketch_4/SketchLine_55)")])
-Group_1.result().setColor(68, 68, 68)
-# check Group_1
-model.checkGroup(Group_1, GeomAPI_Shape.FACE)
-
model.do()
# change parameters of the model
model.testNbSubShapes(Result, GeomAPI_Shape.VERTEX, [728])
model.testResultsVolumes(Result, [23373.503259112552768783643841743])
-model.checkGroup(Group_1, GeomAPI_Shape.FACE)
-
model.end()
assert(model.checkPythonDump())