diff --git a/data/examples/CMakeLists.txt b/data/examples/CMakeLists.txt index 74d22099ca..6a3a6dbd07 100644 --- a/data/examples/CMakeLists.txt +++ b/data/examples/CMakeLists.txt @@ -8,6 +8,9 @@ SET(Examples_Files FEMExample.FCStd AssemblyExample.FCStd ArchDetail.FCStd + draft_test_objects_files/FCPAT.pat + draft_test_objects_files/osifont.license + draft_test_objects_files/osifont-lgpl3fe.ttf ) ADD_CUSTOM_TARGET(Example_data ALL @@ -132,4 +135,3 @@ INSTALL( DESTINATION ${CMAKE_INSTALL_DATADIR}/examples ) - diff --git a/data/examples/draft_test_objects.FCStd b/data/examples/draft_test_objects.FCStd index 28b01b44aa..739aa7e0d4 100644 Binary files a/data/examples/draft_test_objects.FCStd and b/data/examples/draft_test_objects.FCStd differ diff --git a/data/examples/draft_test_objects_files/FCPAT.pat b/data/examples/draft_test_objects_files/FCPAT.pat new file mode 100644 index 0000000000..12318767b7 --- /dev/null +++ b/data/examples/draft_test_objects_files/FCPAT.pat @@ -0,0 +1,23 @@ +; standard PAT patterns + +*Diamond, 45 diagonals L & R, Solid, 1.0 mm separation +45,0,0,0,1.0 +-45,0,0,0,1.0 +*Diamond2, 45 diagonals L & R, Solid, 2.0 mm separation +45,0,0,0,2.0 +-45,0,0,0,2.0 +*Diamond4, 45 diagonals L & R, Solid, 4.0 mm separation +45,0,0,0,4.0 +-45,0,0,0,4.0 +*Diagonal4, 45 diagonal R, Solid, 4.0 mm separation +45,0,0,0,4.0 +*Diagonal5, 45 diagonal L, Solid, 4.0 mm separation +-45,0,0,0,4.0 +*Square, square grid, Solid, 5.0 mm separation +90,1,1,0,5.0 +0,0,0,1,5.0 +*Horizontal5, horizontal lines, Solid 5.0 separation +0,0,0,0,5.0 +*Vertical5, vertical lines, Solid, 5.0 separation +90,0,0,0,5.0 + diff --git a/data/examples/draft_test_objects_files/osifont-lgpl3fe.ttf b/data/examples/draft_test_objects_files/osifont-lgpl3fe.ttf new file mode 100644 index 0000000000..7658be84da Binary files /dev/null and b/data/examples/draft_test_objects_files/osifont-lgpl3fe.ttf differ diff --git a/data/examples/draft_test_objects_files/osifont.license b/data/examples/draft_test_objects_files/osifont.license new file mode 100644 index 0000000000..b04111e275 --- /dev/null +++ b/data/examples/draft_test_objects_files/osifont.license @@ -0,0 +1,9 @@ +osifont license: + +osifont-lgpl3fe.ttf is used under one or more of the following licenses: +- GNU GPL licence version 3 with GPL font exception, +- GNU GPL licence version 2 with GPL font exception, +- GNU LGPL licence version 3 with GPL font exception. + + + https://github.com/hikikomori82/osifont/ diff --git a/src/Mod/Draft/drafttests/draft_test_objects.py b/src/Mod/Draft/drafttests/draft_test_objects.py index 657f8e6d31..3283a657f1 100644 --- a/src/Mod/Draft/drafttests/draft_test_objects.py +++ b/src/Mod/Draft/drafttests/draft_test_objects.py @@ -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)) diff --git a/src/Mod/Draft/draftviewproviders/view_wire.py b/src/Mod/Draft/draftviewproviders/view_wire.py index bd5a76e236..685f83dfdd 100644 --- a/src/Mod/Draft/draftviewproviders/view_wire.py +++ b/src/Mod/Draft/draftviewproviders/view_wire.py @@ -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"):