void Model_ExpressionDouble::setValue(const double theValue)
{
- if (!myIsInitialized) {
+ if (!myIsInitialized || myReal.IsNull()) {
myReal = TDataStd_Real::Set(myText->Label(), theValue);
myIsInitialized = true;
} else if (value() != theValue) {
void Model_ExpressionInteger::setValue(const int theValue)
{
- if (!myIsInitialized) {
+ if (!myIsInitialized || myInteger.IsNull()) {
myInteger = TDataStd_Integer::Set(myText->Label(), theValue);
myIsInitialized = true;
} else if (value() != theValue) {
mybase.setPerpendicular(l1, l4)
+mybase.setVertical(l1)
+mybase.setFixed(l1.startPoint())
+
mywidth = mybase.setLength(l1, 50)
mylength = mybase.setDistance(l1.startPoint(), l3, 50)
# Creating the extrusion
mybox = model.addExtrusion(mypart, mybase.selectFace(), 50)
+model.do()
# Creating a cylinder on a face of the box
thisface = "Extrusion_1_1/Generated_Face_2"
-thisxmin = "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/Generated_Face_2"
-thisxmax = "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/Generated_Face_1"
-thiszmin = "Sketch_1/Edge5_1"
+thisxmax = "Extrusion_1_1/Generated_Face_3&Extrusion_1_1/Generated_Face_2"
thiszmax = "Extrusion_1_1/Generated_Face_2&Extrusion_1_1/To_Face_1_1"
mystand = model.addSketch(mypart, thisface)
c1 = mystand.addCircle(0, 25, 5)
-mystand.setDistance(c1.center(), mystand.addLine(thisxmin), 10)
-mystand.setDistance(c1.center(), mystand.addLine(thiszmax), 10)
+l1 = mystand.addLine(thisxmax)
+l2 = mystand.addLine(thiszmax)
+model.do()
+mystand.setDistance(c1.center(), l1, 10)
+mystand.setDistance(c1.center(), l2, 10)
+model.do()
myboss = model.addExtrusion(mypart, mystand.selectFace(), -5)
model.begin()
mybase.setValue(mylength, 100)
+model.do()
mybox.setSize(80)
model.end()