From 7831c6e25914fed529dece102e320d949a991a0d Mon Sep 17 00:00:00 2001 From: mpv Date: Fri, 17 Apr 2015 17:30:00 +0300 Subject: [PATCH] Make unit tests adopted to the updated API --- src/FeaturesPlugin/Test/TestBoolean.py | 9 ++------- src/FeaturesPlugin/Test/TestExtrusion.py | 11 ++++------- src/FeaturesPlugin/Test/TestGroup.py | 5 +---- src/FeaturesPlugin/Test/TestMultiBoolean.py | 14 ++++---------- src/SketchPlugin/Test/TestConstraintConcidence.py | 2 -- src/SketchPlugin/Test/TestConstraintDistance.py | 2 -- src/SketchPlugin/Test/TestConstraintEqual.py | 4 +--- src/SketchPlugin/Test/TestConstraintHorizontal.py | 4 +--- src/SketchPlugin/Test/TestConstraintLength.py | 2 -- src/SketchPlugin/Test/TestConstraintMirror.py | 4 +--- src/SketchPlugin/Test/TestConstraintParallel.py | 2 -- .../Test/TestConstraintPerpendicular.py | 2 -- src/SketchPlugin/Test/TestConstraintRadius.py | 2 -- src/SketchPlugin/Test/TestConstraintRigid.py | 2 -- src/SketchPlugin/Test/TestConstraintTangent.py | 4 +--- src/SketchPlugin/Test/TestConstraintVertical.py | 4 +--- src/SketchPlugin/Test/TestHighload.py | 2 -- src/SketchPlugin/Test/TestSketchArcCircle.py | 2 -- src/SketchPlugin/Test/TestSketchPointLine.py | 6 ------ src/SketchPlugin/Test/TestSnowflake.py | 2 -- 20 files changed, 16 insertions(+), 69 deletions(-) diff --git a/src/FeaturesPlugin/Test/TestBoolean.py b/src/FeaturesPlugin/Test/TestBoolean.py index d9a33eb19..767e51e15 100644 --- a/src/FeaturesPlugin/Test/TestBoolean.py +++ b/src/FeaturesPlugin/Test/TestBoolean.py @@ -26,8 +26,8 @@ aSession = ModelAPI_Session.get() # Create a part for extrusions & boolean aSession.startOperation() aPartFeature = aSession.moduleDocument().addFeature("Part") -aPart = aSession.activeDocument() aSession.finishOperation() +aPart = aSession.activeDocument() #========================================================================= # Create a sketch with circle to extrude #========================================================================= @@ -37,8 +37,6 @@ origin = geomDataAPI_Point(aCircleSketchFeature.attribute("Origin")) origin.setValue(0, 0, 0) dirx = geomDataAPI_Dir(aCircleSketchFeature.attribute("DirX")) dirx.setValue(1, 0, 0) -diry = geomDataAPI_Dir(aCircleSketchFeature.attribute("DirY")) -diry.setValue(0, 1, 0) norm = geomDataAPI_Dir(aCircleSketchFeature.attribute("Norm")) norm.setValue(0, 0, 1) aSketchCircle = aCircleSketchFeature.addFeature("SketchCircle") @@ -56,8 +54,6 @@ origin = geomDataAPI_Point(aTriangleSketchFeature.attribute("Origin")) origin.setValue(0, 0, 0) dirx = geomDataAPI_Dir(aTriangleSketchFeature.attribute("DirX")) dirx.setValue(1, 0, 0) -diry = geomDataAPI_Dir(aTriangleSketchFeature.attribute("DirY")) -diry.setValue(0, 1, 0) norm = geomDataAPI_Dir(aTriangleSketchFeature.attribute("Norm")) norm.setValue(0, 0, 1) aSketchLineA = aTriangleSketchFeature.addFeature("SketchLine") @@ -88,11 +84,10 @@ for eachSketchFeature in [aCircleSketchFeature, aTriangleSketchFeature]: aSketchEdges = modelAPI_ResultConstruction(aSketchResult).shape() origin = geomDataAPI_Point(eachSketchFeature.attribute("Origin")).pnt() dirX = geomDataAPI_Dir(eachSketchFeature.attribute("DirX")).dir() - dirY = geomDataAPI_Dir(eachSketchFeature.attribute("DirY")).dir() norm = geomDataAPI_Dir(eachSketchFeature.attribute("Norm")).dir() aSketchFaces = ShapeList() GeomAlgoAPI_SketchBuilder.createFaces( - origin, dirX, dirY, norm, aSketchEdges, aSketchFaces) + origin, dirX, norm, aSketchEdges, aSketchFaces) # Create extrusion on them anExtrusionFt = aPart.addFeature("Extrusion") anExtrusionFt.selectionList("base").append( diff --git a/src/FeaturesPlugin/Test/TestExtrusion.py b/src/FeaturesPlugin/Test/TestExtrusion.py index fd2c2a8fa..bf5a2c082 100644 --- a/src/FeaturesPlugin/Test/TestExtrusion.py +++ b/src/FeaturesPlugin/Test/TestExtrusion.py @@ -4,9 +4,9 @@ class FeaturesPlugin_Extrusion : public ModelAPI_Feature static const std::string MY_EXTRUSION_ID("Extrusion"); - static const std::string MY_FACE_ID("extrusion_face"); - static const std::string MY_SIZE_ID("extrusion_size"); - static const std::string MY_REVERSE_ID("extrusion_reverse"); + static const std::string MY_FACE_ID("base"); + static const std::string MY_SIZE_ID("size"); + static const std::string MY_REVERSE_ID("reverse"); data()->addAttribute(FeaturesPlugin_Extrusion::FACE_ID(), ModelAPI_AttributeSelection::typeId()); data()->addAttribute(FeaturesPlugin_Extrusion::SIZE_ID(), ModelAPI_AttributeDouble::typeId()); @@ -42,8 +42,6 @@ origin = geomDataAPI_Point(aSketchFeature.attribute("Origin")) origin.setValue(0, 0, 0) dirx = geomDataAPI_Dir(aSketchFeature.attribute("DirX")) dirx.setValue(1, 0, 0) -diry = geomDataAPI_Dir(aSketchFeature.attribute("DirY")) -diry.setValue(0, 1, 0) norm = geomDataAPI_Dir(aSketchFeature.attribute("Norm")) norm.setValue(0, 0, 1) # Create circle @@ -61,11 +59,10 @@ aSketchResult = aSketchFeature.firstResult() aSketchEdges = modelAPI_ResultConstruction(aSketchResult).shape() origin = geomDataAPI_Point(aSketchFeature.attribute("Origin")).pnt() dirX = geomDataAPI_Dir(aSketchFeature.attribute("DirX")).dir() -dirY = geomDataAPI_Dir(aSketchFeature.attribute("DirY")).dir() norm = geomDataAPI_Dir(aSketchFeature.attribute("Norm")).dir() aSketchFaces = ShapeList() GeomAlgoAPI_SketchBuilder.createFaces( - origin, dirX, dirY, norm, aSketchEdges, aSketchFaces) + origin, dirX, norm, aSketchEdges, aSketchFaces) assert (len(aSketchFaces) > 0) assert (aSketchFaces[0] is not None) # Create extrusion diff --git a/src/FeaturesPlugin/Test/TestGroup.py b/src/FeaturesPlugin/Test/TestGroup.py index 41f6a6cc0..4fda808d6 100644 --- a/src/FeaturesPlugin/Test/TestGroup.py +++ b/src/FeaturesPlugin/Test/TestGroup.py @@ -33,8 +33,6 @@ origin = geomDataAPI_Point(aTriangleSketchFeature.attribute("Origin")) origin.setValue(0, 0, 0) dirx = geomDataAPI_Dir(aTriangleSketchFeature.attribute("DirX")) dirx.setValue(1, 0, 0) -diry = geomDataAPI_Dir(aTriangleSketchFeature.attribute("DirY")) -diry.setValue(0, 1, 0) norm = geomDataAPI_Dir(aTriangleSketchFeature.attribute("Norm")) norm.setValue(0, 0, 1) aSketchLineA = aTriangleSketchFeature.addFeature("SketchLine") @@ -59,11 +57,10 @@ aSketchResult = aTriangleSketchFeature.firstResult() aSketchEdges = modelAPI_ResultConstruction(aSketchResult).shape() origin = geomDataAPI_Point(aTriangleSketchFeature.attribute("Origin")).pnt() dirX = geomDataAPI_Dir(aTriangleSketchFeature.attribute("DirX")).dir() -dirY = geomDataAPI_Dir(aTriangleSketchFeature.attribute("DirY")).dir() norm = geomDataAPI_Dir(aTriangleSketchFeature.attribute("Norm")).dir() aSketchFaces = ShapeList() GeomAlgoAPI_SketchBuilder.createFaces( - origin, dirX, dirY, norm, aSketchEdges, aSketchFaces) + origin, dirX, norm, aSketchEdges, aSketchFaces) # Create extrusion on them anExtrusionFt = aPart.addFeature("Extrusion") anExtrusionFt.selectionList("base").append( diff --git a/src/FeaturesPlugin/Test/TestMultiBoolean.py b/src/FeaturesPlugin/Test/TestMultiBoolean.py index 953ffc4ee..8ff8dabb1 100644 --- a/src/FeaturesPlugin/Test/TestMultiBoolean.py +++ b/src/FeaturesPlugin/Test/TestMultiBoolean.py @@ -50,13 +50,11 @@ aSketchFeatures = [] for i in xrange(0, N): for j in xrange(0, N): # Create circle - aSketchFeature = modelAPI_CompositeFeature(aPart.addFeature("Sketch")) + aSketchFeature = featureToCompositeFeature(aPart.addFeature("Sketch")) origin = geomDataAPI_Point(aSketchFeature.attribute("Origin")) origin.setValue(0, 0, 0) dirx = geomDataAPI_Dir(aSketchFeature.attribute("DirX")) dirx.setValue(1, 0, 0) - diry = geomDataAPI_Dir(aSketchFeature.attribute("DirY")) - diry.setValue(0, 1, 0) norm = geomDataAPI_Dir(aSketchFeature.attribute("Norm")) norm.setValue(0, 0, 1) aSketchCircle = aSketchFeature.addFeature("SketchCircle") @@ -82,11 +80,10 @@ for i in xrange(0, N * N): aSketchEdges = modelAPI_ResultConstruction(aSketchResult).shape() origin = geomDataAPI_Point(aSketchFeatures[i].attribute("Origin")).pnt() dirX = geomDataAPI_Dir(aSketchFeatures[i].attribute("DirX")).dir() - dirY = geomDataAPI_Dir(aSketchFeatures[i].attribute("DirY")).dir() norm = geomDataAPI_Dir(aSketchFeatures[i].attribute("Norm")).dir() aSketchFaces = ShapeList() GeomAlgoAPI_SketchBuilder.createFaces( - origin, dirX, dirY, norm, aSketchEdges, aSketchFaces) + origin, dirX, norm, aSketchEdges, aSketchFaces) anExtrusionFt = aPart.addFeature("Extrusion") assert (anExtrusionFt.getKind() == "Extrusion") @@ -108,13 +105,11 @@ aSession.finishOperation() # Make rectangle sketch: base for the box, size 100x100 #========================================================================= aSession.startOperation() -aQuadrangleSketchFeature = modelAPI_CompositeFeature(aPart.addFeature("Sketch")) +aQuadrangleSketchFeature = featureToCompositeFeature(aPart.addFeature("Sketch")) origin = geomDataAPI_Point(aQuadrangleSketchFeature.attribute("Origin")) origin.setValue(0, 0, 0) dirx = geomDataAPI_Dir(aQuadrangleSketchFeature.attribute("DirX")) dirx.setValue(1, 0, 0) -diry = geomDataAPI_Dir(aQuadrangleSketchFeature.attribute("DirY")) -diry.setValue(0, 1, 0) norm = geomDataAPI_Dir(aQuadrangleSketchFeature.attribute("Norm")) norm.setValue(0, 0, 1) aSketchLineA = aQuadrangleSketchFeature.addFeature("SketchLine") @@ -148,11 +143,10 @@ aSketchResult = aQuadrangleSketchFeature.firstResult() aSketchEdges = modelAPI_ResultConstruction(aSketchResult).shape() origin = geomDataAPI_Point(aQuadrangleSketchFeature.attribute("Origin")).pnt() dirX = geomDataAPI_Dir(aQuadrangleSketchFeature.attribute("DirX")).dir() -dirY = geomDataAPI_Dir(aQuadrangleSketchFeature.attribute("DirY")).dir() norm = geomDataAPI_Dir(aQuadrangleSketchFeature.attribute("Norm")).dir() aSketchFaces = ShapeList() GeomAlgoAPI_SketchBuilder.createFaces( - origin, dirX, dirY, norm, aSketchEdges, aSketchFaces) + origin, dirX, norm, aSketchEdges, aSketchFaces) # Create extrusion on them aBox = aPart.addFeature("Extrusion") aBox.selectionList("base").append( diff --git a/src/SketchPlugin/Test/TestConstraintConcidence.py b/src/SketchPlugin/Test/TestConstraintConcidence.py index 79589ac4c..580a45e32 100644 --- a/src/SketchPlugin/Test/TestConstraintConcidence.py +++ b/src/SketchPlugin/Test/TestConstraintConcidence.py @@ -36,8 +36,6 @@ origin = geomDataAPI_Point(aSketchFeature.attribute("Origin")) origin.setValue(0, 0, 0) dirx = geomDataAPI_Dir(aSketchFeature.attribute("DirX")) dirx.setValue(1, 0, 0) -diry = geomDataAPI_Dir(aSketchFeature.attribute("DirY")) -diry.setValue(0, 1, 0) norm = geomDataAPI_Dir(aSketchFeature.attribute("Norm")) norm.setValue(0, 0, 1) aSession.finishOperation() diff --git a/src/SketchPlugin/Test/TestConstraintDistance.py b/src/SketchPlugin/Test/TestConstraintDistance.py index 13aeada6f..1e0880e68 100644 --- a/src/SketchPlugin/Test/TestConstraintDistance.py +++ b/src/SketchPlugin/Test/TestConstraintDistance.py @@ -50,8 +50,6 @@ origin = geomDataAPI_Point(aSketchFeature.attribute("Origin")) origin.setValue(0, 0, 0) dirx = geomDataAPI_Dir(aSketchFeature.attribute("DirX")) dirx.setValue(1, 0, 0) -diry = geomDataAPI_Dir(aSketchFeature.attribute("DirY")) -diry.setValue(0, 1, 0) norm = geomDataAPI_Dir(aSketchFeature.attribute("Norm")) norm.setValue(0, 0, 1) aSession.finishOperation() diff --git a/src/SketchPlugin/Test/TestConstraintEqual.py b/src/SketchPlugin/Test/TestConstraintEqual.py index 5e99e0512..751be751d 100644 --- a/src/SketchPlugin/Test/TestConstraintEqual.py +++ b/src/SketchPlugin/Test/TestConstraintEqual.py @@ -24,13 +24,11 @@ aDocument = aSession.moduleDocument() #========================================================================= aSession.startOperation() aSketchCommonFeature = aDocument.addFeature("Sketch") -aSketchFeature = modelAPI_CompositeFeature(aSketchCommonFeature) +aSketchFeature = featureToCompositeFeature(aSketchCommonFeature) origin = geomDataAPI_Point(aSketchFeature.attribute("Origin")) origin.setValue(0, 0, 0) dirx = geomDataAPI_Dir(aSketchFeature.attribute("DirX")) dirx.setValue(1, 0, 0) -diry = geomDataAPI_Dir(aSketchFeature.attribute("DirY")) -diry.setValue(0, 1, 0) norm = geomDataAPI_Dir(aSketchFeature.attribute("Norm")) norm.setValue(0, 0, 1) aSession.finishOperation() diff --git a/src/SketchPlugin/Test/TestConstraintHorizontal.py b/src/SketchPlugin/Test/TestConstraintHorizontal.py index 050c60f24..7a7a7d3fa 100644 --- a/src/SketchPlugin/Test/TestConstraintHorizontal.py +++ b/src/SketchPlugin/Test/TestConstraintHorizontal.py @@ -22,13 +22,11 @@ aDocument = aSession.moduleDocument() #========================================================================= aSession.startOperation() aSketchCommonFeature = aDocument.addFeature("Sketch") -aSketchFeature = modelAPI_CompositeFeature(aSketchCommonFeature) +aSketchFeature = featureToCompositeFeature(aSketchCommonFeature) origin = geomDataAPI_Point(aSketchFeature.attribute("Origin")) origin.setValue(0, 0, 0) dirx = geomDataAPI_Dir(aSketchFeature.attribute("DirX")) dirx.setValue(1, 0, 0) -diry = geomDataAPI_Dir(aSketchFeature.attribute("DirY")) -diry.setValue(0, 1, 0) norm = geomDataAPI_Dir(aSketchFeature.attribute("Norm")) norm.setValue(0, 0, 1) aSession.finishOperation() diff --git a/src/SketchPlugin/Test/TestConstraintLength.py b/src/SketchPlugin/Test/TestConstraintLength.py index 4dc391889..87a388a65 100644 --- a/src/SketchPlugin/Test/TestConstraintLength.py +++ b/src/SketchPlugin/Test/TestConstraintLength.py @@ -29,8 +29,6 @@ origin = geomDataAPI_Point(aSketchFeature.attribute("Origin")) origin.setValue(0, 0, 0) dirx = geomDataAPI_Dir(aSketchFeature.attribute("DirX")) dirx.setValue(1, 0, 0) -diry = geomDataAPI_Dir(aSketchFeature.attribute("DirY")) -diry.setValue(0, 1, 0) norm = geomDataAPI_Dir(aSketchFeature.attribute("Norm")) norm.setValue(0, 0, 1) aSession.finishOperation() diff --git a/src/SketchPlugin/Test/TestConstraintMirror.py b/src/SketchPlugin/Test/TestConstraintMirror.py index 4f85ec44e..43d2c45bb 100644 --- a/src/SketchPlugin/Test/TestConstraintMirror.py +++ b/src/SketchPlugin/Test/TestConstraintMirror.py @@ -25,13 +25,11 @@ aDocument = aSession.moduleDocument() #========================================================================= aSession.startOperation() aSketchCommonFeature = aDocument.addFeature("Sketch") -aSketchFeature = modelAPI_CompositeFeature(aSketchCommonFeature) +aSketchFeature = featureToCompositeFeature(aSketchCommonFeature) origin = geomDataAPI_Point(aSketchFeature.attribute("Origin")) origin.setValue(0, 0, 0) dirx = geomDataAPI_Dir(aSketchFeature.attribute("DirX")) dirx.setValue(1, 0, 0) -diry = geomDataAPI_Dir(aSketchFeature.attribute("DirY")) -diry.setValue(0, 1, 0) norm = geomDataAPI_Dir(aSketchFeature.attribute("Norm")) norm.setValue(0, 0, 1) aSession.finishOperation() diff --git a/src/SketchPlugin/Test/TestConstraintParallel.py b/src/SketchPlugin/Test/TestConstraintParallel.py index 965193b4e..03eba23cc 100644 --- a/src/SketchPlugin/Test/TestConstraintParallel.py +++ b/src/SketchPlugin/Test/TestConstraintParallel.py @@ -29,8 +29,6 @@ origin = geomDataAPI_Point(aSketchFeature.attribute("Origin")) origin.setValue(0, 0, 0) dirx = geomDataAPI_Dir(aSketchFeature.attribute("DirX")) dirx.setValue(1, 0, 0) -diry = geomDataAPI_Dir(aSketchFeature.attribute("DirY")) -diry.setValue(0, 1, 0) norm = geomDataAPI_Dir(aSketchFeature.attribute("Norm")) norm.setValue(0, 0, 1) aSession.finishOperation() diff --git a/src/SketchPlugin/Test/TestConstraintPerpendicular.py b/src/SketchPlugin/Test/TestConstraintPerpendicular.py index 64e15c899..837eb2626 100644 --- a/src/SketchPlugin/Test/TestConstraintPerpendicular.py +++ b/src/SketchPlugin/Test/TestConstraintPerpendicular.py @@ -36,8 +36,6 @@ origin = geomDataAPI_Point(aSketchFeature.attribute("Origin")) origin.setValue(0, 0, 0) dirx = geomDataAPI_Dir(aSketchFeature.attribute("DirX")) dirx.setValue(1, 0, 0) -diry = geomDataAPI_Dir(aSketchFeature.attribute("DirY")) -diry.setValue(0, 1, 0) norm = geomDataAPI_Dir(aSketchFeature.attribute("Norm")) norm.setValue(0, 0, 1) aSession.finishOperation() diff --git a/src/SketchPlugin/Test/TestConstraintRadius.py b/src/SketchPlugin/Test/TestConstraintRadius.py index 175823e1e..9349352b3 100644 --- a/src/SketchPlugin/Test/TestConstraintRadius.py +++ b/src/SketchPlugin/Test/TestConstraintRadius.py @@ -38,8 +38,6 @@ origin = geomDataAPI_Point(aSketchFeature.attribute("Origin")) origin.setValue(0, 0, 0) dirx = geomDataAPI_Dir(aSketchFeature.attribute("DirX")) dirx.setValue(1, 0, 0) -diry = geomDataAPI_Dir(aSketchFeature.attribute("DirY")) -diry.setValue(0, 1, 0) norm = geomDataAPI_Dir(aSketchFeature.attribute("Norm")) norm.setValue(0, 0, 1) aSession.finishOperation() diff --git a/src/SketchPlugin/Test/TestConstraintRigid.py b/src/SketchPlugin/Test/TestConstraintRigid.py index e00acda2c..6a3a352c9 100644 --- a/src/SketchPlugin/Test/TestConstraintRigid.py +++ b/src/SketchPlugin/Test/TestConstraintRigid.py @@ -36,8 +36,6 @@ origin = geomDataAPI_Point(aSketchFeature.attribute("Origin")) origin.setValue(0, 0, 0) dirx = geomDataAPI_Dir(aSketchFeature.attribute("DirX")) dirx.setValue(1, 0, 0) -diry = geomDataAPI_Dir(aSketchFeature.attribute("DirY")) -diry.setValue(0, 1, 0) norm = geomDataAPI_Dir(aSketchFeature.attribute("Norm")) norm.setValue(0, 0, 1) aSession.finishOperation() diff --git a/src/SketchPlugin/Test/TestConstraintTangent.py b/src/SketchPlugin/Test/TestConstraintTangent.py index a64b8a3a8..225447d3e 100644 --- a/src/SketchPlugin/Test/TestConstraintTangent.py +++ b/src/SketchPlugin/Test/TestConstraintTangent.py @@ -25,13 +25,11 @@ aDocument = aSession.moduleDocument() #========================================================================= aSession.startOperation() aSketchCommonFeature = aDocument.addFeature("Sketch") -aSketchFeature = modelAPI_CompositeFeature(aSketchCommonFeature) +aSketchFeature = featureToCompositeFeature(aSketchCommonFeature) origin = geomDataAPI_Point(aSketchFeature.attribute("Origin")) origin.setValue(0, 0, 0) dirx = geomDataAPI_Dir(aSketchFeature.attribute("DirX")) dirx.setValue(1, 0, 0) -diry = geomDataAPI_Dir(aSketchFeature.attribute("DirY")) -diry.setValue(0, 1, 0) norm = geomDataAPI_Dir(aSketchFeature.attribute("Norm")) norm.setValue(0, 0, 1) aSession.finishOperation() diff --git a/src/SketchPlugin/Test/TestConstraintVertical.py b/src/SketchPlugin/Test/TestConstraintVertical.py index 9272b21ec..3a03d1d0e 100644 --- a/src/SketchPlugin/Test/TestConstraintVertical.py +++ b/src/SketchPlugin/Test/TestConstraintVertical.py @@ -22,13 +22,11 @@ aDocument = aSession.moduleDocument() #========================================================================= aSession.startOperation() aSketchCommonFeature = aDocument.addFeature("Sketch") -aSketchFeature = modelAPI_CompositeFeature(aSketchCommonFeature) +aSketchFeature = featureToCompositeFeature(aSketchCommonFeature) origin = geomDataAPI_Point(aSketchFeature.attribute("Origin")) origin.setValue(0, 0, 0) dirx = geomDataAPI_Dir(aSketchFeature.attribute("DirX")) dirx.setValue(1, 0, 0) -diry = geomDataAPI_Dir(aSketchFeature.attribute("DirY")) -diry.setValue(0, 1, 0) norm = geomDataAPI_Dir(aSketchFeature.attribute("Norm")) norm.setValue(0, 0, 1) aSession.finishOperation() diff --git a/src/SketchPlugin/Test/TestHighload.py b/src/SketchPlugin/Test/TestHighload.py index 819cb00a5..f745cdfa5 100644 --- a/src/SketchPlugin/Test/TestHighload.py +++ b/src/SketchPlugin/Test/TestHighload.py @@ -95,8 +95,6 @@ origin = geomDataAPI_Point(aSketchFeature.attribute("Origin")) origin.setValue(0, 0, 0) dirx = geomDataAPI_Dir(aSketchFeature.attribute("DirX")) dirx.setValue(1, 0, 0) -diry = geomDataAPI_Dir(aSketchFeature.attribute("DirY")) -diry.setValue(0, 1, 0) norm = geomDataAPI_Dir(aSketchFeature.attribute("Norm")) norm.setValue(0, 0, 1) aSession.finishOperation() diff --git a/src/SketchPlugin/Test/TestSketchArcCircle.py b/src/SketchPlugin/Test/TestSketchArcCircle.py index 9927598a6..9ab1394e0 100644 --- a/src/SketchPlugin/Test/TestSketchArcCircle.py +++ b/src/SketchPlugin/Test/TestSketchArcCircle.py @@ -37,8 +37,6 @@ origin = geomDataAPI_Point(aSketchFeature.attribute("Origin")) origin.setValue(0, 0, 0) dirx = geomDataAPI_Dir(aSketchFeature.attribute("DirX")) dirx.setValue(1, 0, 0) -diry = geomDataAPI_Dir(aSketchFeature.attribute("DirY")) -diry.setValue(0, 1, 0) norm = geomDataAPI_Dir(aSketchFeature.attribute("Norm")) norm.setValue(0, 0, 1) aSession.finishOperation() diff --git a/src/SketchPlugin/Test/TestSketchPointLine.py b/src/SketchPlugin/Test/TestSketchPointLine.py index cbf0d05bf..b37b0f61d 100644 --- a/src/SketchPlugin/Test/TestSketchPointLine.py +++ b/src/SketchPlugin/Test/TestSketchPointLine.py @@ -19,8 +19,6 @@ origin = geomDataAPI_Point(aSketchFeature.attribute("Origin")) origin.setValue(0, 0, 0) dirx = geomDataAPI_Dir(aSketchFeature.attribute("DirX")) dirx.setValue(1, 0, 0) -diry = geomDataAPI_Dir(aSketchFeature.attribute("DirY")) -diry.setValue(0, 1, 0) norm = geomDataAPI_Dir(aSketchFeature.attribute("Norm")) norm.setValue(0, 0, 1) aSession.finishOperation() @@ -33,10 +31,6 @@ dirx = geomDataAPI_Dir(aSketchFeature.attribute("DirX")) assert (dirx.x() == 1) assert (dirx.y() == 0) assert (dirx.z() == 0) -diry = geomDataAPI_Dir(aSketchFeature.attribute("DirY")) -assert (diry.x() == 0) -assert (diry.y() == 1) -assert (diry.z() == 0) norm = geomDataAPI_Dir(aSketchFeature.attribute("Norm")) assert (norm.x() == 0) assert (norm.y() == 0) diff --git a/src/SketchPlugin/Test/TestSnowflake.py b/src/SketchPlugin/Test/TestSnowflake.py index 4a0a31e53..e324fd2da 100644 --- a/src/SketchPlugin/Test/TestSnowflake.py +++ b/src/SketchPlugin/Test/TestSnowflake.py @@ -109,8 +109,6 @@ origin = geomDataAPI_Point(aSketchFeature.attribute("Origin")) origin.setValue(0, 0, 0) dirx = geomDataAPI_Dir(aSketchFeature.attribute("DirX")) dirx.setValue(1, 0, 0) -diry = geomDataAPI_Dir(aSketchFeature.attribute("DirY")) -diry.setValue(0, 1, 0) norm = geomDataAPI_Dir(aSketchFeature.attribute("Norm")) norm.setValue(0, 0, 1) #========================================================================= -- 2.39.2