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

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

Post by Gauthier »

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 2064 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
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

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

Post by Kunda1 »

Can anyone test this on the latest 0.17 and confirm?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

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

Post by Kunda1 »

DeepSOIC wrote:ping
@DeepSOIC do you mind weighing in on this ticket? Thanks in advance!
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

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

Post by DeepSOIC »

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
Veteran
Posts: 18589
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

Post by NormandC »

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 37 times
User avatar
Chris_G
Veteran
Posts: 2598
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

Post by Chris_G »

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 pmPing
Maybe this can help narrow down the origin of this bug ?

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

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

Post by freecad-heini-1 »

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