View Issue Details

IDProjectCategoryView StatusLast Update
0002670FreeCADBugpublic2017-10-16 10:07
Reporterworldmaker Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionwon't fix 
OSWindows 7 
Product Version0.17 
Target Version0.17 
Summary0002670: Deprecated and inactive Mesh Boolean Python commands still permitted
DescriptionSince FreeCAD v0.14, native Mesh Boolean operations were replaced with OpenSCAD algorithms thus require third-party open source program OpenSCAD to be installed. When calling Mesh Booleans from the GUI, if the path to OpenSCAD executable is not found, an error message appears. But deprecated python commands do not warn the user, and an empty or broken mesh is created in the document.
Steps To Reproduce1. Open FreeCAD
2. Press the "create new document" button
3. enter the python codes:
import Mesh
m1 = Mesh.createSphere(1, 50)
m1.translate(1,0,0)
m2 = Mesh.createSphere(1, 50)
m2.translate(0,0,1)
m3 = m1.intersect(m2)
Mesh.show(m3)
Additional InformationOS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.7745 (Git)
Build type: Release
Branch: master
Hash: 79dcdfbc782e24bb34db882143af7ce8ebd237bd
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
TagsMesh
FreeCAD Information

Activities

worldmaker

2016-08-14 08:01

reporter  

bug2.png (Attachment missing)

normandc

2016-08-14 19:59

manager   ~0007270

Last edited: 2017-10-10 19:11

Since some time (0.15.4671 I believe, maybe sooner) mesh Booleans are managed by OpenSCAD. Therefore you must install OpenSCAD. The python code will be different. It will be something like this (output from doing it through the GUI):

import OpenSCADUtils
mesh = OpenSCADUtils.meshoptempfile('intersection',(App.ActiveDocument.Sphere.Mesh,App.ActiveDocument.Sphere001.Mesh))
The real bug here may be that "m3 = m1.intersect(m2)" does not produce a warning/error.

Kunda1

2017-01-15 01:24

administrator   ~0007775

Forum thread: http://forum.freecadweb.org/viewtopic.php?f=10&t=19905

Kunda1

2017-03-02 12:45

administrator   ~0008510

Last edited: 2017-03-28 19:25

@normandc please advise. Shall we open a new ticket based on:

The real bug here may be that "m3 = m1.intersect(m2)" does not produce a warning/error.

NormandC

If so do you mind opening it since I'm not sure the verbiage or the problem exactly. Thanks!

Kunda1

2017-05-10 11:57

administrator   ~0008932

Ping @normandc

Kunda1

2017-06-28 14:29

administrator   ~0009578

@NormandC just making sure we don't lose track. Do you mind following up? Thanks!

normandc

2017-07-01 05:45

manager   ~0009626

Changed report summary and description to what is the real issue.

The following wiki page also still provides obsolete information:
https://www.freecadweb.org/wiki/Mesh_Scripting

The following wiki pages don't mention the OpenSCAD prerequisite:
https://www.freecadweb.org/wiki/Mesh_Union
https://www.freecadweb.org/wiki/Mesh_Intersection
https://www.freecadweb.org/wiki/Mesh_Difference

Kunda1

2017-10-10 19:09

administrator   ~0010285

@keithsloan52 do you have any time to put this on your 'plate' ?

keithsloan52

2017-10-10 21:30

developer   ~0010286

@Kunda1 Sorry, not at the moment. I have just started an Open University course and the power supply on my Linux machine died. As it was 32bit and an old Graphics card I have bought a new one, but it will take me some time to setup and get back to the stage where I can do development type work

wmayer

2017-10-16 10:07

administrator   ~0010298

This is not a bug at all. Why should the (low-level) Python functions raise a warning when it's used?
It's simply up to the user to use the API of OpenSCAD to perform reliably boolean operations and this he can easily find out by macro recording.

Issue History

Date Modified Username Field Change
2016-08-14 08:01 worldmaker New Issue
2016-08-14 08:01 worldmaker File Added: bug2.png
2016-08-14 19:59 normandc Note Added: 0007270
2017-01-15 01:22 Kunda1 Tag Attached: Mesh
2017-01-15 01:24 Kunda1 Note Added: 0007775
2017-01-24 22:20 Kunda1 Status new => feedback
2017-03-02 12:45 Kunda1 Note Added: 0008510
2017-03-28 19:25 Kunda1 Note Edited: 0008510
2017-05-10 11:57 Kunda1 Note Added: 0008932
2017-06-28 14:29 Kunda1 Note Added: 0009578
2017-07-01 05:45 normandc Status feedback => confirmed
2017-07-01 05:45 normandc Product Version 0.16 => 0.17
2017-07-01 05:45 normandc Summary Bad boolean operations on meshes => Deprecated and inactive Mesh Boolean Python commands still permitted
2017-07-01 05:45 normandc Description Updated
2017-07-01 05:45 normandc Note Added: 0009626
2017-09-25 13:21 Kunda1 Target Version => 0.17
2017-10-10 19:09 Kunda1 Note Added: 0010285
2017-10-10 19:10 Kunda1 Steps to Reproduce Updated
2017-10-10 19:11 Kunda1 Note Edited: 0007270
2017-10-10 21:30 keithsloan52 Note Added: 0010286
2017-10-16 10:07 wmayer Status confirmed => closed
2017-10-16 10:07 wmayer Resolution open => won't fix
2017-10-16 10:07 wmayer Note Added: 0010298