Offset

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
JussyAD
Posts: 377
Joined: Tue Apr 20, 2021 4:30 pm

Offset

Post by JussyAD »

Any word on the possibility of an all important offset tool for sketcher?
JussyAD
Posts: 377
Joined: Tue Apr 20, 2021 4:30 pm

Re: Offset

Post by JussyAD »

and arrays in sketcher?
chrisb
Veteran
Posts: 53938
Joined: Tue Mar 17, 2015 9:14 am

Re: Offset

Post 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.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
JussyAD
Posts: 377
Joined: Tue Apr 20, 2021 4:30 pm

Re: Offset

Post 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!
User avatar
Cekuhnen
Posts: 443
Joined: Sat Jul 10, 2021 11:37 pm

Re: Offset

Post 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
MacOS Big Sur / Win 10

Designer | Faculty
Wayne State University
Interior - Industrial Design
ideasvacuum
Posts: 29
Joined: Thu Mar 14, 2019 3:08 pm

Re: Offset

Post 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'
chrisb
Veteran
Posts: 53938
Joined: Tue Mar 17, 2015 9:14 am

Re: Offset

Post 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.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
ideasvacuum
Posts: 29
Joined: Thu Mar 14, 2019 3:08 pm

Re: Offset

Post 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
Attachments
MacroOffsetProblem.FCStd
(4.07 KiB) Downloaded 61 times
chrisb
Veteran
Posts: 53938
Joined: Tue Mar 17, 2015 9:14 am

Re: Offset

Post 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)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
kisolre
Veteran
Posts: 4164
Joined: Wed Nov 21, 2018 1:13 pm

Re: Offset

Post 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.
Post Reply