Centerline between lines not working

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
domad
Veteran
Posts: 2096
Joined: Mon Jun 22, 2020 12:16 pm

Re: Centerline between lines not working

Post by domad »

uwestoehr wrote: Sat Apr 24, 2021 10:57 pm .............
run_the_race wrote: Sat Apr 24, 2021 9:35 am ..............
OS: Windows 8 (6.2)
Word size of FreeCAD: 64-bit
Version: 0.20.24720 (Git)
Build type: Release
Branch: master
Hash: 8b0c58d1b45017ad42bf0fa8f827f1cf22a398e7
Python version: 3.8.8
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.1
Local: Italian / Italy (it_IT)

Good evening to the Community!
...... no problem found.
I take advantage of this to report this to "run_the_race": https://forum.freecadweb.org/viewtopic.php?f=35&t=57994
Attachments
Middle lines.gif
Middle lines.gif (980.31 KiB) Viewed 2089 times
run_the_race
Posts: 161
Joined: Mon Feb 01, 2021 7:22 pm

Re: Centerline between lines not working

Post by run_the_race »

uwestoehr wrote: Sat Apr 24, 2021 10:57 pm
run_the_race wrote: Sat Apr 24, 2021 9:35 am In the following example, I think cause the diagonals intersect each other, the length of the center line seems to be 0. And for some reason this is just how it *always* is for me unless I select `flip ends`.
For now you select the two lines and then have to take care of the orientation. Then close the dialog with OK. First then you will see the centerline.
For me it doesnt create the center lines after clicking OK (as shown in that image). Try again and select `flip ends`, then it works. For me everytime I must choose `flip ends`.

I downloaded some screen recording software, this is my first screen recording, to try show what I mean:
centerlinegif.gif
centerlinegif.gif (1.12 MiB) Viewed 2035 times
You can see in the report view, theres a message:

Code: Select all

16:46:07  CenterLineBuilder - endpoints are equal:  (0.000,0.000,0.000) 
16:46:07  CenterLineBuilder - check V/H/A and/or Flip parameters
Using the latest stable:

Code: Select all

OS: Windows 10 Version 2004
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24276 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: a88db11e0a908f6e38f92bfc5187b13ebe470438
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United Kingdom (en_GB)
chrisb
Veteran
Posts: 54280
Joined: Tue Mar 17, 2015 9:14 am

Re: Centerline between lines not working

Post by chrisb »

run_the_race wrote: Fri Apr 30, 2021 2:42 pm
FreeCAD file?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
run_the_race
Posts: 161
Joined: Mon Feb 01, 2021 7:22 pm

Re: Centerline between lines not working

Post by run_the_race »

chrisb wrote: Fri Apr 30, 2021 10:20 pm
run_the_race wrote: Fri Apr 30, 2021 2:42 pm
FreeCAD file?
Attached!
Attachments
pi_terminal_baseplate.FCStd
(28.8 KiB) Downloaded 53 times
chrisb
Veteran
Posts: 54280
Joined: Tue Mar 17, 2015 9:14 am

Re: Centerline between lines not working

Post by chrisb »

Confirmed. Works here if and only if I check Flip lines. A preview would be nice!
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
domad
Veteran
Posts: 2096
Joined: Mon Jun 22, 2020 12:16 pm

Re: Centerline between lines not working

Post by domad »

chrisb wrote: Sat May 01, 2021 12:12 am ping
Hi chrisb
After some experimentation, I confirm the wrong behavior.
I add that the problem occurs with the objects generated by sketcher -> PartDesign or by draft -> part. (Also with 2D objects)
There is no problem using Part primitives.
If instead you select two unequal edges, it works but generates a very small center line, it also happens with two fillets or with two chamfers.
The wrong behavior was triggered when the "uwestoehr" file was opened, before this happened everything was working correctly.
I am afraid that the file has generated a fatal error in the FreeCad code and that it is not possible to handle the preferences.
Did the same thing happen to you too?
chrisb
Veteran
Posts: 54280
Joined: Tue Mar 17, 2015 9:14 am

Re: Centerline between lines not working

Post by chrisb »

domad wrote: Sat May 01, 2021 7:19 pm Did the same thing happen to you too?
No. I just retried with a plain vanilla config and freshly started FreeCAD.
- Opened the file of run_the_race
- double clicked the Page
- selected the lines
- switched to TechDraw
- created the centerline
- selected Horizontal (but not the flip checkbox
- confirmed and nothing happened, well not nothing, report view says

Code: Select all

CenterLineBuilder - endpoints are equal:  (0.000,0.000,0.000) 
CenterLineBuilder - check V/H/A and/or Flip parameters
So it is recognized by FreeCAD, that there is a problem.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
domad
Veteran
Posts: 2096
Joined: Mon Jun 22, 2020 12:16 pm

Re: Centerline between lines not working

Post by domad »

chrisb wrote: Sat May 01, 2021 10:54 pm .........
So it is recognized by FreeCAD, that there is a problem.
Hi chrisb
Yes, there is a problem on FreeCad but what happened to me is really curious:
- once the run_the_race file is opened the problem (at least on my system) is repeated even creating new objects.
Before, as you can see on the gif in my previous replica to run_the_race, everything worked correctly, now if I create a new object (starting from a sketch or a Draft wire) also on a new file and create a view on TechDraw the line of center between two lines behaves incorrectly.
Can you check if it happens to you too, even by creating a new file?
However, this is not a problem, just check the flip option and everything is solved, but the fact remains that the function behaves incorrectly (and this after opening the run_the_race file).
In my opinion developers should also investigate the run_the_race file to see if this file, in any way, changes a FreeCad parameter making it default without the possibility of resetting it through properties or preferences.
chrisb
Veteran
Posts: 54280
Joined: Tue Mar 17, 2015 9:14 am

Re: Centerline between lines not working

Post by chrisb »

domad wrote: Sun May 02, 2021 6:22 am Can you check if it happens to you too, even by creating a new file?
I cannot reproduce the inconsistency. Can you please explain in much detail how exactly you create the new object? In case it is a sketch: in wich order do you create the geometric elements? Where do you start and end?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
domad
Veteran
Posts: 2096
Joined: Mon Jun 22, 2020 12:16 pm

Re: Centerline between lines not working

Post by domad »

chrisb wrote: Sun May 02, 2021 8:20 am ...............
Can you please explain in much detail how exactly you create the new object? In case it is a sketch: in wich order do you create the geometric elements? Where do you start and end?
........ this is what happens:
Attachments
1.gif
1.gif (566.27 KiB) Viewed 1858 times
2.gif
2.gif (585.21 KiB) Viewed 1858 times
3.gif
3.gif (386.5 KiB) Viewed 1858 times
Post Reply