[Feature Request] [Draft] [UI/UX] Remove the center arrow on radial dimensions (#10655)
Related to issue #7573 Forum discussion https://forum.freecadweb.org/viewtopic.php?p=631252#p631252 These modifications don't add the new properties suggested on the issue mentioned above and suggested on the forum discussion but just remove the center arrow Other info and discussion can be found at https://gitlab.com/calligarov/FreeCAD/-/merge_requests/1
This commit is contained in:
@@ -350,10 +350,14 @@ def _svg_dimension(obj, plane, scale, linewidth, fontsize,
|
||||
if vobj.FlipArrows:
|
||||
angle = angle + math.pi
|
||||
|
||||
svg += get_arrow(obj,
|
||||
vobj.ArrowType,
|
||||
p2, arrowsize, stroke, linewidth,
|
||||
angle)
|
||||
if not hasattr(obj, "Diameter") \
|
||||
or obj.Diameter \
|
||||
or not prx.is_linked_to_circle():
|
||||
svg += get_arrow(obj,
|
||||
vobj.ArrowType,
|
||||
p2, arrowsize, stroke, linewidth,
|
||||
angle)
|
||||
|
||||
svg += get_arrow(obj,
|
||||
vobj.ArrowType,
|
||||
p3, arrowsize, stroke, linewidth,
|
||||
|
||||
@@ -367,7 +367,7 @@ class ViewProviderLinearDimension(ViewProviderDimensionBase):
|
||||
|
||||
It only runs if `Start`, `End`, `Dimline`, or `Direction` changed.
|
||||
"""
|
||||
if prop not in ("Start", "End", "Dimline", "Direction"):
|
||||
if prop not in ("Start", "End", "Dimline", "Direction", "Diameter"):
|
||||
return
|
||||
|
||||
if obj.Start == obj.End:
|
||||
@@ -378,6 +378,16 @@ class ViewProviderLinearDimension(ViewProviderDimensionBase):
|
||||
|
||||
vobj = obj.ViewObject
|
||||
|
||||
if prop == "Diameter":
|
||||
if hasattr(vobj, "Override") and vobj.Override:
|
||||
if obj.Diameter:
|
||||
vobj.Override = vobj.Override.replace("R $dim", "Ø $dim")
|
||||
else:
|
||||
vobj.Override = vobj.Override.replace("Ø $dim", "R $dim")
|
||||
|
||||
self.onChanged(vobj, "ArrowType")
|
||||
return
|
||||
|
||||
# Calculate the 4 points
|
||||
#
|
||||
# | d |
|
||||
@@ -728,14 +738,15 @@ class ViewProviderLinearDimension(ViewProviderDimensionBase):
|
||||
self.marks = coin.SoSeparator()
|
||||
self.marks.addChild(self.linecolor)
|
||||
|
||||
s1 = coin.SoSeparator()
|
||||
if symbol == "Circle":
|
||||
s1.addChild(self.coord1)
|
||||
else:
|
||||
s1.addChild(self.trans1)
|
||||
if vobj.Object.Diameter or not self.is_linked_to_circle():
|
||||
s1 = coin.SoSeparator()
|
||||
if symbol == "Circle":
|
||||
s1.addChild(self.coord1)
|
||||
else:
|
||||
s1.addChild(self.trans1)
|
||||
|
||||
s1.addChild(gui_utils.dim_symbol(symbol, invert=not inv))
|
||||
self.marks.addChild(s1)
|
||||
s1.addChild(gui_utils.dim_symbol(symbol, invert=not inv))
|
||||
self.marks.addChild(s1)
|
||||
|
||||
s2 = coin.SoSeparator()
|
||||
if symbol == "Circle":
|
||||
|
||||
Reference in New Issue
Block a user