# Test results
assert (len(anEdgeFeature.results()) == aNumOfLines)
+
+import model
+assert(model.checkPythonDump())
# Test results
assert (len(aFaceFeature.results()) > 0)
+
+import model
+assert(model.checkPythonDump())
# Test results
assert (len(aShellFeature.results()) > 0)
+
+import model
+assert(model.checkPythonDump())
# Test results
assert (len(aSubShapesFeature.results()) > 0)
+
+import model
+assert(model.checkPythonDump())
# Test results
assert (len(aVertexFeature.results()) == aNumOfPoints)
+
+import model
+assert(model.checkPythonDump())
# Test results
assert (len(aWireFeature.results()) > 0)
+
+import model
+assert(model.checkPythonDump())
import ModelAPI
import ConstructionAPI
+import model
class AxisTestCase(unittest.TestCase):
self.session.finishOperation()
def tearDown(self):
+ assert(model.checkPythonDump())
self.session.closeAll()
def test_ConstructorWithDimensions(self):
import ModelAPI
import ConstructionAPI
+import model
class PointTestCase(unittest.TestCase):
self.session.finishOperation()
def tearDown(self):
+ assert(model.checkPythonDump())
self.session.closeAll()
def test_ConstructorWithValues(self):
anAxis = model.addAxis(aPart, aPlane1.result()[0], 50, False, aPlane2.result()[0], 100, True)
aSession.finishOperation()
assert (len(anAxis.result()) > 0)
+
+#import model
+#assert(model.checkPythonDump())
aPlane = model.addPlane(aDocument, aCoincidentPlane.result()[0], aPlane.result()[0])
aSession.finishOperation()
assert (len(aPlane.result()) > 0)
+
+import model
+assert(model.checkPythonDump())
# aSession.finishOperation()
# assert (len(aPoint.result()) > 0)
-assert(model.checkPythonDump())
\ No newline at end of file
+assert(model.checkPythonDump())
aFeature1Name = aFeature1.data().name()
assert (aFeatureName == aFeature1Name)
+
+import model
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
import ModelAPI
import ExchangeAPI
+import model
class ExchangeTestCase(unittest.TestCase):
self.doc = self.session.moduleDocument()
def tearDown(self):
+ assert(model.checkPythonDump())
self.session.closeAll()
def test_addImport(self):
#=========================================================================
# End of test
#=========================================================================
+
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
aBoolean = model.addFill(aDocument, [anExtrusion.result()[0]], [anExtrusion.result()[1]])
assert (len(aBoolean.result()) > 0)
aSession.finishOperation()
+
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
assert (len(anRevolutionFuseFt.results()) > 0)
aCurrentResult = modelAPI_ResultBody(anRevolutionFuseFt.firstResult())
assert (aCurrentResult is not None)
+
+import model
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
assert (len(anExtrusionCutFt.results()) > 0)
aCurrentResult = modelAPI_ResultBody(anExtrusionCutFt.firstResult())
assert (aCurrentResult is not None)
+
+import model
+assert(model.checkPythonDump())
assert (len(anExtrusionFuseFt.results()) > 0)
aCurrentResult = modelAPI_ResultBody(anExtrusionFuseFt.firstResult())
assert (aCurrentResult is not None)
+
+import model
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
assert (len(anIntersectionFt.results()) > 0)
anItersectionResult = modelAPI_ResultBody(anIntersectionFt.firstResult())
assert (anItersectionResult is not None)
+
+import model
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
assert (len(aPartitionFt.results()) > 0)
aPartitionResult = modelAPI_ResultBody(aPartitionFt.firstResult())
assert (aPartitionResult is not None)
+
+import model
+assert(model.checkPythonDump())
# Test results
assert (len(aPipeFeature.results()) > 0)
+
+import model
+assert(model.checkPythonDump())
assert (len(aPlacementFt.results()) > 0)
aPlacementResult = modelAPI_ResultBody(aPlacementFt.firstResult())
assert (aPlacementResult is not None)
+
+import model
+assert(model.checkPythonDump())
model.end()
# only two booleans
assert(mypart.size("Bodies") == 2)
+
+assert(model.checkPythonDump())
assert (len(aRemoveSubShapesFeature.results()) > 0)
anUnionResult = modelAPI_ResultCompSolid(modelAPI_ResultBody(aRemoveSubShapesFeature.firstResult()))
assert (anUnionResult.numberOfSubs() == 2)
+
+import model
+assert(model.checkPythonDump())
assert (len(aRevolFt.results()) > 0)
aRevolResult = modelAPI_ResultBody(aRevolFt.firstResult())
assert (aRevolResult is not None)
+
+import model
+assert(model.checkPythonDump())
assert (len(anRevolutionCutFt.results()) > 0)
aCurrentResult = modelAPI_ResultBody(anRevolutionCutFt.firstResult())
assert (aCurrentResult is not None)
+
+import model
+assert(model.checkPythonDump())
assert (len(anRevolutionFuseFt.results()) > 0)
aCurrentResult = modelAPI_ResultBody(anRevolutionFuseFt.firstResult())
assert (aCurrentResult is not None)
+
+import model
+assert(model.checkPythonDump())
aMoveResult = modelAPI_ResultBody(aRotateFt.firstResult())
assert (aMoveResult is not None)
+import model
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
aMoveResult = modelAPI_ResultBody(aMoveFt.firstResult())
assert (aMoveResult is not None)
+import model
+assert(model.checkPythonDump())
assert (len(aUnionFeature.results()) > 0)
anUnionResult = modelAPI_ResultCompSolid(modelAPI_ResultBody(aUnionFeature.firstResult()))
assert (anUnionResult.numberOfSubs() == 0)
+
+import model
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
aSession.finishOperation()
assert(aSession.moduleDocument().size("Parts") == 0)
assert(aSession.activeDocument())
+
+import model
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
aSession.finishOperation()
+import model
+assert(model.checkPythonDump())
assert(aDoc.size("Construction") == 8)\r
assert(aSession.canUndo())\r
assert(not aSession.canRedo())\r
+\r
+import model\r
+assert(model.checkPythonDump())\r
__updated__ = "2016-07-20"
aSession = ModelAPI_Session.get()
+
+import model
+assert(model.checkPythonDump())
#include <ModelAPI_AttributeSelectionList.h>
#include <ModelAPI_AttributeString.h>
#include <ModelAPI_AttributeDoubleArray.h>
+#include <ModelAPI_Validator.h>
#include <GeomDataAPI_Dir.h>
#include <GeomDataAPI_Point.h>
return "original model had no attribute '" + aThisIter->first + "'";
}
if (theAttrs[aThisIter->first] != aThisIter->second) {
- return "attribute '" + aThisIter->first + "' is different '" +
- theAttrs[aThisIter->first] + "' != '" + aThisIter->second;
+ return "attribute '" + aThisIter->first + "' is different (original != current) '" +
+ theAttrs[aThisIter->first] + "' != '" + aThisIter->second + "'";
}
}
// iterate back to find lack attribute in the current model
}
std::string ModelHighAPI_FeatureStore::dumpAttr(const AttributePtr& theAttr) {
+ static ModelAPI_ValidatorsFactory* aFactory = ModelAPI_Session::get()->validators();
+ FeaturePtr aFeatOwner = std::dynamic_pointer_cast<ModelAPI_Feature>(theAttr->owner());
+ if (aFeatOwner.get() && !aFactory->isCase(aFeatOwner, theAttr->id())) {
+ return "__notcase__";
+ }
if (!theAttr->isInitialized()) {
return "__notinitialized__";
}
}
}
return "For document '" + theDocName +
- "' the number of features becomes smaller, there is no feature '" + aLostName + "'";
+ "' the number of features is decreased, there is no feature '" + aLostName + "'";
}
}
return ""; // ok
from ModelAPI import *
import math
import unittest
+import model
__updated__ = "2015-04-27"
self.createFeature()
def tearDown(self):
+ assert(model.checkPythonDump())
self.aSession.closeAll()
def createParameters(self):
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
from ModelAPI import *
import math
import unittest
+import model
__updated__ = "2015-04-27"
self.createFeature()
def tearDown(self):
+ assert(model.checkPythonDump())
self.aSession.closeAll()
def createParameters(self):
def tearDown(self):
model.end()
+ assert(model.checkPythonDump())
model.reset()
#-----------------------------------------------------------------------------
def tearDown(self):
model.end()
+ assert(model.checkPythonDump())
model.reset()
def tearDown(self):
model.end()
+ assert(model.checkPythonDump())
model.reset()
def tearDown(self):
model.end()
+ assert(model.checkPythonDump())
def test_add_sketch(self):
plane = model.defaultPlane("XOY")
def tearDown(self):
model.end()
+ assert(model.checkPythonDump())
model.reset()
mybase.setValue(mylength, 100)
mybox.setSize(80)
model.end()
+
+assert(model.checkPythonDump())
mybase.setValue(mylength, 100)
mybox.setSize(20)
model.end()
+
+assert(model.checkPythonDump())
\ No newline at end of file
extension.addBoxScript( mypart, 10, 20, 30 )
model.end()
+assert(model.checkPythonDump())
\ No newline at end of file
boolean = model.addFuse(part, boolean.result() + b4.result())
model.end()
+
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())
aShape = aResultConstruction.shape()
assert (aShape is not None)
assert (not aShape.isNull())
+
+import model
+assert(model.checkPythonDump())
#=========================================================================
# End of test
#=========================================================================
+
+import model
+assert(model.checkPythonDump())