View Issue Details

IDProjectCategoryView StatusLast Update
0004642AssemblyBugpublic2021-08-09 17:15
Reporterle_top Assigned Tochennes  
PrioritynormalSeverityblockReproducibilityhave not tried
Status closedResolutionfixed 
Product Version0.19 
Summary0004642: Worked in 0.18 -
DescriptionThe following openscad content does not work with Freecad V0.19, but it does with V0.18.
module testModule() {
union() {
  translate([-0.75, 0])
    rotate([90, 0, 90])
      linear_extrude(height=1.5)
        polygon(
          points=[
                   [1.75, 0], [15, 0], [15, 4], [1.75, 18]
          ]
        )
      ;
}
}

module testcase() {
    for (i=[0, 90.4, 125.4]) {
      translate([i, 0])
        testModule();
    }
}


testcase();

The python script lauched under Windows 10, using FreeCAD's version is:

#!/usr/bin/python
import sys
import FreeCAD
import Part
# This should read any type of file
FreeCAD.loadFile("tc.scad")
outfilename="tc.step"

# iterate through all objects
for o in App.ActiveDocument.Objects:
  # find root object and export the shape
  if len(o.InList)==0:
    o.Shape.exportStep(outfilename)
    sys.exit(0)

print("Error: can't find any object")
sys.exit(1)
Steps To ReproduceLaunch the python script provided in the description or attached zip file using:


REM WORKS:
"c:\Program Files\FreeCAD 0.18\bin\python.exe" tc.py
REM DOES NOT WORK:
"c:\Program Files\FreeCAD 0.19\bin\python.exe" tc.py
Additional InformationThe python script ends with:
Traceback (most recent call last):
  File "tc.py", line 6, in <module>
    FreeCAD.loadFile("tc.scad")
AttributeError: Traceback (most recent call last):
  File "<string>", line 2, in <module>
  File "C:\Program Files\FreeCAD 0.19\Mod\OpenSCAD\importCSG.py", line 146, in insert
    processcsg(tmpfile)
  File "C:\Program Files\FreeCAD 0.19\Mod\OpenSCAD\importCSG.py", line 182, in processcsg
    fixVisibility()
  File "C:\Program Files\FreeCAD 0.19\Mod\OpenSCAD\importCSG.py", line 88, in fixVisibility
    obj.ViewObject.Visibility=False
<class 'AttributeError'>: 'NoneType' object has no attribute 'Visibility'
TagsNo tags attached.
FreeCAD InformationOS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16110 (Git)
Build type: Release
Branch: (HEAD detached at upstream/releases/FreeCAD-0-18)
Hash: f7dccfaa909e5b9da26bf50c4a22ccca9bb10c40
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)

Activities

le_top

2021-04-24 14:22

reporter  

tc.zip (30,119 bytes)

Kunda1

2021-06-02 21:10

administrator   ~0015689

Where's the forum thread referencing this ticket?

le_top

2021-06-02 22:41

reporter   ~0015690

Hi
Thank you for your followup.
There is no forum entry for this issue.
Kind Regards
Mario

chennes

2021-08-09 17:15

administrator   ~0015789

This works as of:

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.25442 (Git)
Build type: Debug
Branch: master
Hash: d635f03a60a7ae1e6f9d390b9cbd7bdb91692996
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)

Issue History

Date Modified Username Field Change
2021-04-24 14:22 le_top New Issue
2021-04-24 14:22 le_top File Added: tc.zip
2021-06-02 21:10 Kunda1 Status new => feedback
2021-06-02 21:10 Kunda1 Note Added: 0015689
2021-06-02 22:41 le_top Note Added: 0015690
2021-06-02 22:41 le_top Status feedback => new
2021-08-09 17:15 chennes Assigned To => chennes
2021-08-09 17:15 chennes Status new => closed
2021-08-09 17:15 chennes Resolution open => fixed
2021-08-09 17:15 chennes Note Added: 0015789