CAM: Fix and enable TestPathHelix again
Since the fixture in use has holes smaller than the default tool dimeter, executing a helix operation with default parameters (i.e. all holes) used to fail with an exception. Some tests work around this by actively chaning the tool diameter, and this fix is now moved into the global setup where the respective fixture is loaded. The reason why the tests got disabled in the first place is unclear.
This commit is contained in:
@@ -43,6 +43,9 @@ class TestPathHelix(PathTestUtils.PathTestBase):
|
||||
self.doc = FreeCAD.open(FreeCAD.getHomePath() + "Mod/CAM/CAMTests/test_holes00.fcstd")
|
||||
self.job = PathJob.Create("Job", [self.doc.Body])
|
||||
|
||||
# the smallest hole in the fixture is 1mm in diameter, so our tool must be smaller.
|
||||
self.job.Tools.Group[0].Tool.Diameter = 0.9
|
||||
|
||||
def tearDown(self):
|
||||
FreeCAD.closeDocument(self.doc.Name)
|
||||
|
||||
@@ -66,8 +69,6 @@ class TestPathHelix(PathTestUtils.PathTestBase):
|
||||
def test02(self):
|
||||
"""Verify Helix generates proper holes for rotated model"""
|
||||
|
||||
self.job.Tools.Group[0].Tool.Diameter = 0.5
|
||||
|
||||
op = PathHelix.Create("Helix")
|
||||
proxy = op.Proxy
|
||||
model = self.job.Model.Group[0]
|
||||
|
||||
@@ -37,9 +37,8 @@ from CAMTests.TestPathGeneratorDogboneII import TestGeneratorDogboneII
|
||||
from CAMTests.TestPathGeom import TestPathGeom
|
||||
from CAMTests.TestPathLanguage import TestPathLanguage
|
||||
from CAMTests.TestPathOpDeburr import TestPathOpDeburr
|
||||
|
||||
# from CAMTests.TestPathHelix import TestPathHelix
|
||||
from CAMTests.TestPathHelpers import TestPathHelpers
|
||||
from CAMTests.TestPathHelix import TestPathHelix
|
||||
from CAMTests.TestPathHelixGenerator import TestPathHelixGenerator
|
||||
from CAMTests.TestPathLog import TestPathLog
|
||||
from CAMTests.TestPathOpUtil import TestPathOpUtil
|
||||
@@ -98,7 +97,7 @@ False if TestPathOpDeburr.__name__ else True
|
||||
False if TestPathDrillable.__name__ else True
|
||||
False if TestPathGeom.__name__ else True
|
||||
False if TestPathHelpers.__name__ else True
|
||||
# False if TestPathHelix.__name__ else True
|
||||
False if TestPathHelix.__name__ else True
|
||||
False if TestPathLog.__name__ else True
|
||||
False if TestPathOpUtil.__name__ else True
|
||||
# False if TestPathPost.__name__ else True
|
||||
|
||||
Reference in New Issue
Block a user