[Fixed in v0.20] [CSG import] Structures get doubled when importing certain groups with offset2D

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
Knochi
Posts: 10
Joined: Tue Sep 03, 2019 2:07 pm

[Fixed in v0.20] [CSG import] Structures get doubled when importing certain groups with offset2D

Post by Knochi »

Hi,

today I saw an odd behaviour with one of my models I prepared for KiCAD.

Structures containing Offset2D features and gets translated in a group with another grouped object, leave a ghost at the origin position.

I use openSCAD to create the model --> export CSG --> import in freecad --> export to .stp, .wrl using kicad stepup.

So i reduced the code to the minimum that sill produces an error:

Code: Select all

translate([0,0,10]){
    for (i=[0:3])
       translate([0,i*3,i*5]) coilShape([10,10],5,3);
    cube(10,true);
}

module coilShape(innerDims, thick, width){
    translate([0,0,-width/2]) linear_extrude(width) difference(){
      offset(thick) square(innerDims,true);
      square(innerDims,true);
    }
  }
This produces this:
view in openSCAD
view in openSCAD
FreeCadCSG_OffsetBug.png (21.3 KiB) Viewed 1070 times
And this is how it looks like in FreeCad 0.19:
view in FreeCad
view in FreeCad
FreeCadCSG_OffsetBug_FC.png (29.46 KiB) Viewed 1070 times
Version Info:
OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24267 +148 (Git)
Build type: Release
Branch: Branch_0.19.4
Hash: 476ecf091941bead59b14e44afa6064d5a66afa3
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: German/Germany (de_DE)
Attachments
FreeCadCSG_OffsetBug.scad
openSCAD script
(320 Bytes) Downloaded 24 times
FreeCadCSG_OffsetBug.csg
exported CSG file
(644 Bytes) Downloaded 21 times
Last edited by Kunda1 on Thu Apr 28, 2022 10:34 pm, edited 1 time in total.
Reason: Added [Fixed] to thread title
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [CSG import] Structures get doubled when importing certain groups with offset2D

Post by Kunda1 »

Moved to open discussion subforum and x-posted to https://forum.freecadweb.org/viewtopic. ... 16#p588416
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: [CSG import] Structures get doubled when importing certain groups with offset2D

Post by Kunda1 »

keithsloan52 wrote: pinged by pinger macro
chennes wrote: pinged by pinger macro
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
keithsloan52
Veteran
Posts: 2764
Joined: Mon Feb 27, 2012 5:31 pm

Re: [CSG import] Structures get doubled when importing certain groups with offset2D

Post by keithsloan52 »

Not seeing the problem with the Alternate Importer https://github.com/KeithSloan/OpenSCAD_Alt_Import
Image 24-04-2022 at 18.15.jpg
Image 24-04-2022 at 18.15.jpg (189.33 KiB) Viewed 712 times
But head full of COVID so maybe.
User avatar
chennes
Veteran
Posts: 3914
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: [CSG import] Structures get doubled when importing certain groups with offset2D

Post by chennes »

It's working fine in 0.20 as well, so one of the many changes we made in this development cycle has fixed the issue.
67836_fixed.png
67836_fixed.png (34.04 KiB) Viewed 620 times
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
Post Reply