Bug report 0003020: 2D offset of circle are not in the right place

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!
User avatar
Gauthier
Posts: 71
Joined: Fri Jul 04, 2014 10:00 am
Location: Audenge, France

Bug report 0003020: 2D offset of circle are not in the right place

Postby Gauthier » Tue May 09, 2017 6:53 am

Hi,

Recently, I found a curious behavior using the offset function to prepare a sketch for laser cutting (need offseting by the half of cutting width to have the exact dimention) :

URL : https://freecadweb.org/tracker/view.php?id=3020

When using the Part/2D offset of a circle, the resulting offset is moved to a XY parallel plane or/and translated from the original position of the origin circle.
The only solution to have the right offset from a circle is if the origine circle is in the XY plan and centered on the origine or the circle is inside a sketch and if the sketch is not moved in the XY plan.

- Start new model
- In the Draft workbench, draw a circle not centered on the origine or not on the XY plan then select the circle
- In the Part workbench, select 2D Offset
=> The offset geometry of the circle is moved on the XY plan if the circle is not on this plan
And the offset geometry is not centered on the circle.

Ex :
BugOffset.png
BugOffset.png (88.24 KiB) Viewed 819 times
This strange behavior is the same on Linux or Windows :
FreeCAD version on Linux :
OS: Debian GNU/Linux 9.0 (stretch)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10967 (Git)
Build type: Release
Branch: master
Hash: 38388cf650ef49cbce48af5dd33bdbe2487c8cbe
Python version: 2.7.13
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17

FreeCAD version on Windows :
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10993 (Git)
Build type: Release
Branch: master
Hash: bf5f3484f6f5506795b6e9b86288c75ab7357291
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
User avatar
Kunda1
Posts: 4240
Joined: Thu Jan 05, 2017 9:03 pm

Re: Bug report 0003020: 2D offset of circle are not in the right place

Postby Kunda1 » Thu May 11, 2017 3:12 am

Can anyone test this on the latest 0.17 and confirm?
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
Kunda1
Posts: 4240
Joined: Thu Jan 05, 2017 9:03 pm

Re: Bug report 0003020: 2D offset of circle are not in the right place

Postby Kunda1 » Sat Jun 03, 2017 3:30 pm

DeepSOIC wrote:ping
@DeepSOIC do you mind weighing in on this ticket? Thanks in advance!
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
DeepSOIC
Posts: 6536
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Bug report 0003020: 2D offset of circle are not in the right place

Postby DeepSOIC » Sat Jun 03, 2017 5:04 pm

This isn't the first time I see strange behavior of Part 2D offset on circles, but this one is new. I can reproduce something similar in:
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11018 (Git)
Build type: Release
Branch: master
Hash: 0ad2e47f4d611a22f679e5b3ef5ed6851f8a02be
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Bug report 0003020: 2D offset of circle are not in the right place

Postby NormandC » Sun Sep 17, 2017 5:00 pm

This is still happening in latest freecad-daily package (slightly behind current master), and not only with Draft Circles, but with a Part primitive circle or a Sketch containing a circle.

And if you change the position of the circle in X/Y/Z, the resulting 2D Offset can flip up or down... Very weird!

OS: Ubuntu 16.04.3 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12124 (Git)
Build type: None
Branch: master
Hash: 76e8d81ae24ab898396571898525f78e1efbbcba
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: French/Canada (fr_CA)
Attachments
FC017_Circle_2D_Offset_bug.fcstd
(15.51 KiB) Downloaded 12 times
User avatar
Chris_G
Posts: 1010
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Bug report 0003020: 2D offset of circle are not in the right place

Postby Chris_G » Mon Jan 01, 2018 11:38 am

Hi,
I had a look on this bug.
I don't know if it is of any help, but the Offset2D of circles seems to need an inversed Placement of its source circle.
The attached file contains primitives with random placements, and Offset2D applied on them later.
All is good, except for the circle Offset.
It gets fixed by typing :

Code: Select all

obj = App.getDocument("Offset2DBug").getObject("Offset2D004")
obj.Placement = obj.Source.Placement.inverse()
DeepSOIC wrote:
Sat Jun 03, 2017 5:04 pm
Ping
Maybe this can help narrow down the origin of this bug ?

Offset2DBug.fcstd
(9.21 KiB) Downloaded 12 times
freecad-heini-1
Posts: 5397
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Bug report 0003020: 2D offset of circle are not in the right place

Postby freecad-heini-1 » Mon Jan 01, 2018 1:43 pm

I remember a similar problem to create a parting plane along a silhoutte for plastic injection mold inserts.
Shape2DView from the Draft workbench are not working as expected. Why?
Here you can see what I mean with video:
https://forum.freecadweb.org/viewtopic. ... 00#p193700
wmayer
Site Admin
Posts: 14213
Joined: Thu Feb 19, 2009 10:32 am

Re: Bug report 0003020: 2D offset of circle are not in the right place

Postby wmayer » Sat Jan 26, 2019 9:56 pm