Page 1 of 2

Offset

Posted: Thu Sep 16, 2021 6:32 pm
by JussyAD
Any word on the possibility of an all important offset tool for sketcher?

Re: Offset

Posted: Thu Sep 16, 2021 6:48 pm
by JussyAD
and arrays in sketcher?

Re: Offset

Posted: Thu Sep 16, 2021 9:53 pm
by chrisb
There is a macro for offsets.

The array issue was discussed recently quite lengthy. Instead of making sketches more complicated, it is rather advised to use pattern functions.

Re: Offset

Posted: Fri Sep 17, 2021 4:17 pm
by JussyAD
chrisb wrote: Thu Sep 16, 2021 9:53 pm There is a macro for offsets.

The array issue was discussed recently quite lengthy. Instead of making sketches more complicated, it is rather advised to use pattern functions.
Thank you, glad to hear it.
Yes, those functions will suffice!

Re: Offset

Posted: Sat Sep 18, 2021 10:11 pm
by Cekuhnen
chrisb wrote: Thu Sep 16, 2021 9:53 pm There is a macro for offsets.

The array issue was discussed recently quite lengthy. Instead of making sketches more complicated, it is rather advised to use pattern functions.
Yeah I agree - I stay away from sketch patter tools also in my commercial cad apps

They slow the sketches down

Re: Offset

Posted: Sun Sep 19, 2021 11:36 pm
by ideasvacuum
Tried the Macro in v0.19.2 - fails:

00:34:11 Traceback (most recent call last):
00:34:11 File "C:/Users/Chris_Ward/AppData/Roaming/FreeCAD/Macro/SketcherOffset.FCMacro", line 77, in getPoint
00:34:11 OffsetInSketcher.addOffset(self.SelGeoId,self.OffsetLine)
00:34:11 AttributeError: 'OffsetDialog' object has no attribute 'SelGeoId'

Re: Offset

Posted: Mon Sep 20, 2021 6:55 am
by chrisb
ideasvacuum wrote: Sun Sep 19, 2021 11:36 pm Tried the Macro in v0.19.2 - fails:
Add your file and describe in detail what you did.

Re: Offset

Posted: Mon Sep 20, 2021 10:54 pm
by ideasvacuum
Hi

In the Sketcher

1) Draw a line at a random location/angle/size
2) Select it
3) Apply the Macro - instead of an offset line, an enclosed rectangle is created
4) The rectangle has redundant constraints
5) Report View: Attribute Error

Re: Offset

Posted: Mon Sep 20, 2021 11:24 pm
by chrisb
Confirmed. A single line is probably too simple :) .
edi wrote: pinged by pinger macro
OS: macOS 10.16
Word size of FreeCAD: 64-bit
Version: 0.20.25645 (Git)
Build type: Release
Branch: master
Hash: 37d9757399b4c2ec30318eb88d7cd7c508246345
Python version: 3.9.7
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.2
Locale: C/Default (C)

Re: Offset

Posted: Tue Sep 21, 2021 4:21 am
by kisolre
This is not a rectangle. the extra two lines are construction lines defining the Offset. With other contours they are also generated. The overconstraining is not a problem IMO because it is better to let the solver show the extra constraints and you manually delete them later (usually just two in my tests) than to make the script more cumbersome and trying to solve all corner cases for all geometries.