Feature: offset tool in sketcher

About the development of the Part Design module/workbench. PLEASE DO NOT POST HELP REQUESTS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
edi
Posts: 482
Joined: Fri Jan 17, 2020 1:32 pm

Re: Feature: offset tool in sketcher

Post by edi »

I am sorry, but I think its not a problem of the macro, but an installation problem.

Did you find the files in your computer ?

You can look for accessible python modules in the console. Just type

Code: Select all

>>> import DraftTrackers
Hopefully somebody else using 0.19 can help us ?
User avatar
Pauvres_honteux
Posts: 728
Joined: Sun Feb 16, 2014 12:05 am
Location: Far side of the moon

Re: Feature: offset tool in sketcher

Post by Pauvres_honteux »

Running "import DraftTrackers in the Python console gives:
.

Code: Select all

Python 3.6.10 (default, Jan 16 2020, 09:12:04) [GCC] on linux
Type 'help', 'copyright', 'credits' or 'license' for more information.
>>> import DraftTrackers
Traceback (most recent call last):
  File "<input>", line 1, in <module>
ModuleNotFoundError: No module named 'DraftTrackers'
>>> 
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Feature: offset tool in sketcher

Post by GeneFC »

edi wrote: Tue Sep 22, 2020 1:05 pm Hopefully somebody else using 0.19 can help us ?
I just checked the source master, which was updated about an hour ago. There is no longer a DraftTracker.py module in FreeCAD 0.19.

I did find it in an older version 0.18 I have on my computer, but Draft WB has been completely redesigned since then.

Gene
Rana
Posts: 31
Joined: Tue Oct 01, 2019 6:37 pm

Re: Feature: offset tool in sketcher

Post by Rana »

On Latest 0.19, for DraftTrackers try :
import draftguitools.gui_trackers as DraftTrackers

and remove original DraftTrackers import.
User avatar
-alex-
Veteran
Posts: 1861
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: Feature: offset tool in sketcher

Post by -alex- »

Thank you @edi for this great feature :D
edi wrote: Tue Sep 01, 2020 7:45 am
I may add that some kind of continuation mode would be great: just select one edge and all subsequently connected lines are offset as well.
I will keep this idea in mind.
You could use Path_SelectLoop feature for that maybe. Just my 2 cents. (BTW it's already pretty convenient to use it by gui, as an end user I mean).

... import draftguitools.gui_trackers as DraftTrackers
It works like a charme, thank you @Rana.

About OffsetInSketcher03: works fine, sometimes overconstrained, but it's easy to autoremove redundants in sketcherWB.
Thank you again!
bleber
Posts: 259
Joined: Thu Jun 30, 2016 5:12 pm

Re: Feature: offset tool in sketcher

Post by bleber »

Testing version 3.
Freecat quit when make a a offset with popup winfow that says "Inner radius becomes negativ"
Attachments
Captura de pantalla_2020-09-23_00-16-46.png
Captura de pantalla_2020-09-23_00-16-46.png (11.24 KiB) Viewed 2383 times
edi
Posts: 482
Joined: Fri Jan 17, 2020 1:32 pm

Re: Feature: offset tool in sketcher

Post by edi »

Imagine the radius of your original arc is 3. If you want to create an offset line in distance 4 at the inner side, the radius becomes -1. That is not possible, so the script stops. The outside radius would be 7.
User avatar
Pauvres_honteux
Posts: 728
Joined: Sun Feb 16, 2014 12:05 am
Location: Far side of the moon

Re: Feature: offset tool in sketcher

Post by Pauvres_honteux »

edi wrote: Wed Sep 23, 2020 5:46 am ... the radius becomes -1.
And that is exactly why you must add

Code: Select all

.... if radius <=0 then trim offseted lines/curves at intersection ...
to your macro.
User avatar
Pauvres_honteux
Posts: 728
Joined: Sun Feb 16, 2014 12:05 am
Location: Far side of the moon

Re: Feature: offset tool in sketcher

Post by Pauvres_honteux »

Here's a guy who created a macro for extending lines. Have a chat with him and see if you can get forward from that chat.
.
Stq_Niko wrote: Tue Jul 14, 2020 9:33 pm
Extend :
Extend.PNG
Select a cosmetic edge and run the macro :
Panel.PNG

Enter a value for the Start point (marked by a red circle on the view) and end point, then click on "OK" to execute one time and exit or use "Apply" to do the action more than one time.
edi
Posts: 482
Joined: Fri Jan 17, 2020 1:32 pm

Re: Feature: offset tool in sketcher

Post by edi »

And that is exactly why you must add

.... if radius <=0 then trim offseted lines/curves at intersection ...

to your macro.
Thanks for that idea, I will reflect it. The problem is not the calculation of the intersection point. The problem is to keep the overview when numbering lines, arcs, edges etc. if the offset lines are less than the original lines.
Post Reply