Trying to fix 1.6e-14

This commit is contained in:
L-Nafaryus 2021-03-05 15:57:14 +05:00
parent 8eca4d0491
commit 7fce26a618

View File

@ -101,6 +101,12 @@ class simpleCubic:
self.rombus = geompy.MakeCutList(rombus, [sphere], True) self.rombus = geompy.MakeCutList(rombus, [sphere], True)
self.rombusbbox = rombus self.rombusbbox = rombus
Operators = ["FixShape"]
Parameters = ["FixShape.Tolerance3d"]
Values = ["1e-7"]
PS = geompy.ProcessShape(self.rombusbbox, Operators, Parameters, Values)
self.rombusbbox = PS
geompy.addToStudy(self.rombus, "rombus") geompy.addToStudy(self.rombus, "rombus")
return self.geometry return self.geometry
@ -214,7 +220,7 @@ class simpleCubic:
planeNorm = geompy.GetNormal(plane) planeNorm = geompy.GetNormal(plane)
n += 1 n += 1
geompy.addToStudy(planeNorm, "normalplane-{}".format(n)) geompy.addToStudy(planeNorm, "normalplane-{}".format(n))
angle = int(abs(geompy.GetAngle(planeNorm, norm))) angle = abs(geompy.GetAngle(planeNorm, norm))
logging.info("angle = {}".format(angle)) logging.info("angle = {}".format(angle))
if angle == 0 or angle == 180: if angle == 0 or angle == 180:
vplanes.append(plane) vplanes.append(plane)