Draft: Update Draft example file (#23284)

* Draft: Update Draft example file

Fixes #23198

I have added osifont-lgpl3fe.ttf to the example folder. The ShapeString in draft_test_objects.FCStd references it using a
relative path. I am not sure if including the font here is allowed though.

Additionally: The example file showed up an error in view_wire.py. It is also used for fillets (which do not have a Points property).

* Updated

* Also use a relative path for the PAT file.
* Subfolder for the PAT and TTF files.

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt
This commit is contained in:
Roy-043
2025-09-25 14:21:12 +02:00
committed by GitHub
parent e13e2dace7
commit 9a722c7105
7 changed files with 40 additions and 5 deletions

View File

@@ -452,7 +452,7 @@ def _create_objects(doc=None,
# Circular array
_msg(16 * "-")
_msg("Circular array")
polygon = Draft.make_polygon(5, 30)
polygon = Draft.make_polygon(3, 30)
polygon.Placement.Base = Vector(4250, 4250, 0)
if App.GuiUp:
polygon.ViewObject.Visibility = False
@@ -463,14 +463,14 @@ def _create_objects(doc=None,
3,
1,
Vector(0, 0, 1),
Vector(0, 0, 0),
Vector(4250, 4250, 0),
use_link=False)
_set_text(["Circular array"], Vector(4000, 3800, 0))
# Circular link array
_msg(16 * "-")
_msg("Circular link array")
polygon = Draft.make_polygon(6, 30)
polygon = Draft.make_polygon(4, 30)
polygon.Placement.Base = Vector(5250, 4250, 0)
if App.GuiUp:
polygon.ViewObject.Visibility = False
@@ -481,7 +481,7 @@ def _create_objects(doc=None,
3,
1,
Vector(0, 0, 1),
Vector(0, 0, 0),
Vector(5250, 4250, 0),
use_link=True)
_set_text(["Circular link array"], Vector(5000, 3800, 0))

View File

@@ -122,6 +122,7 @@ class ViewProviderWire(ViewProviderDraft):
def updateData(self, obj, prop):
if prop == "Points" \
and hasattr(obj, "Points") \
and len(obj.Points) >= 2 \
and hasattr(self, "coords1") \
and hasattr(self, "coords2"):