How to remove points from Polyline?

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
Mishich
Posts: 18
Joined: Mon Jan 21, 2019 4:20 pm

How to remove points from Polyline?

Postby Mishich » Mon Aug 19, 2019 8:19 am

How to remove points from Polyline in Draft workbench?

When I click button "Remove points..." in "Draft Edit" mode and trying to select point to remove I get following error:
Traceback (most recent call last):
File "C:\Users\User\Downloads\FreeCAD_0.19.17477_x64_LP_12.1.2_PY3QT5-WinVS2015\Mod\Draft\DraftEdit.py", line 238, in action
ep = self.lookForClickedNode(selobjs,tolerance=20)
File "C:\Users\User\Downloads\FreeCAD_0.19.17477_x64_LP_12.1.2_PY3QT5-WinVS2015\Mod\Draft\DraftEdit.py", line 297, in lookForClickedNode
if ('EditNode' in info["Component"]):#True as a result of getObjectInfo
KeyError: 'Component'

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17477 (Git)
Build type: Release
Branch: master
Hash: 8806e4490606d7a1be52c831049b17d8c8d9c320
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Russian/Russia (ru_RU)
User avatar
Mishich
Posts: 18
Joined: Mon Jan 21, 2019 4:20 pm

Re: How to remove points from Polyline?

Postby Mishich » Tue Aug 20, 2019 4:43 am

In current stable FreeCAD 18.3 this function works fine, but "Create a planar image in 3D space" does not work. I need them both together.
Help please!

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16131 (Git)
Build type: Release
Branch: releases/FreeCAD-0-18
Hash: 3129ae4296e40ed20e7b3d460b86e6969acbe1c3
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Russian/Russia (ru_RU)
kisolre
Posts: 1234
Joined: Wed Nov 21, 2018 1:13 pm

Re: How to remove points from Polyline?

Postby kisolre » Tue Aug 20, 2019 7:32 am

Both work as expected here with

OS: Windows 8.1 (6.3)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17651 (Git)
Build type: Release
Branch: master
Hash: 16c26cb3b1cd7209ea8efc8cb30b3b18fd80cf95
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Bulgarian/Bulgaria (bg_BG)

Could you explain in detail what are you doing and what fails? If posible add a screenshot of the failed state, provide failed file, ...
User avatar
Mishich
Posts: 18
Joined: Mon Jan 21, 2019 4:20 pm

Re: How to remove points from Polyline?

Postby Mishich » Tue Aug 20, 2019 9:01 am

Yep! You right - in this build both functions are working well

Thank you, kisolre!
User avatar
Mishich
Posts: 18
Joined: Mon Jan 21, 2019 4:20 pm

Re: How to remove points from Polyline?

Postby Mishich » Thu Aug 22, 2019 8:58 am

Next problem: I cannot edit an existing wire (polyline) when it is above the visible ImagePlane. The point I am trying to move doesn't become active and i get error:

<class 'KeyError'>
Traceback (most recent call last):
File "C:\Users\User\Downloads\FreeCAD_0.19.17651_x64_LP_12.1.2_PY3QT5-WinVS2015\Mod\Draft\DraftEdit.py", line 246, in action
ep = self.lookForClickedNode(selobjs,tolerance=20)
File "C:\Users\User\Downloads\FreeCAD_0.19.17651_x64_LP_12.1.2_PY3QT5-WinVS2015\Mod\Draft\DraftEdit.py", line 305, in lookForClickedNode
if ('EditNode' in info["Component"]):#True as a result of getObjectInfo
KeyError: 'Component'

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17651 (Git)
Build type: Release
Branch: master
Hash: 16c26cb3b1cd7209ea8efc8cb30b3b18fd80cf95
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Russian/Russia (ru_RU)
Attachments
screenshot.png
screenshot.png (802.17 KiB) Viewed 260 times
kisolre
Posts: 1234
Joined: Wed Nov 21, 2018 1:13 pm

Re: How to remove points from Polyline?

Postby kisolre » Thu Aug 22, 2019 10:05 am

Cant try now but have you tried moving the imageplane down a little bit so it is not at Z=0?
User avatar
Mishich
Posts: 18
Joined: Mon Jan 21, 2019 4:20 pm

Re: How to remove points from Polyline?

Postby Mishich » Thu Aug 22, 2019 10:22 am

Yes, I did. I am aware of this feature.
Syres
Posts: 311
Joined: Thu Aug 09, 2018 11:14 am

Re: How to remove points from Polyline?

Postby Syres » Thu Aug 22, 2019 10:27 am

The only solution I could find with imageplane at Z -0.5mm (my 0.19.17651 build hard crashed) swiftly was to use the Link3 merge build:

OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17803 (Git)
Build type: Release
Branch: master
Hash: 89961a33d46063a43e9fb5b0308ca95d559eca94
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)

and I'm also using @Carlopav's src\Mod\Draft\DraftEdit.py see https://forum.freecadweb.org/viewtopic. ... 37#p328413 for the attachment if you can't wait for the new build to be published.