View Issue Details

IDProjectCategoryView StatusLast Update
0004642AssemblyBugpublic2021-06-02 22:41
Reporterle_top Assigned To 
PrioritynormalSeverityblockReproducibilityhave not tried
Status newResolutionopen 
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 (Attachment missing)

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

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