Draft: minor fixes (#17793)
- more tolerance on faultly solids in shape2Dview - fixed display of dimensions in arch override unit
This commit is contained in:
@@ -291,15 +291,20 @@ class Shape2DView(DraftObject):
|
||||
for s in shapes:
|
||||
shapes_to_cut.extend(s.Faces)
|
||||
for sh in shapes_to_cut:
|
||||
if cutv:
|
||||
if cutv and (not cutv.isNull()) and (not sh.isNull()):
|
||||
if sh.Volume < 0:
|
||||
sh.reverse()
|
||||
#if cutv.BoundBox.intersect(sh.BoundBox):
|
||||
# c = sh.cut(cutv)
|
||||
#else:
|
||||
# c = sh.copy()
|
||||
c = sh.cut(cutv)
|
||||
cuts.extend(self._get_shapes(c, onlysolids))
|
||||
try:
|
||||
c = sh.cut(cutv)
|
||||
except ValueError:
|
||||
print("DEBUG: Error subtracting shapes in", obj.Label)
|
||||
cuts.extend(self._get_shapes(sh, onlysolids))
|
||||
else:
|
||||
cuts.extend(self._get_shapes(c, onlysolids))
|
||||
else:
|
||||
cuts.extend(self._get_shapes(sh, onlysolids))
|
||||
comp = Part.makeCompound(cuts)
|
||||
|
||||
@@ -582,7 +582,7 @@ class ViewProviderLinearDimension(ViewProviderDimensionBase):
|
||||
unit = vobj.UnitOverride
|
||||
|
||||
# Special representation if we use 'Building US' scheme
|
||||
if params.get_param("UserSchema", path="Units") == 5:
|
||||
if (params.get_param("UserSchema", path="Units") == 5) or (unit == "arch"):
|
||||
self.string = App.Units.Quantity(length, App.Units.Length).UserString
|
||||
if self.string.count('"') > 1:
|
||||
# multiple inch tokens
|
||||
|
||||
Reference in New Issue
Block a user