execuc / LCInterlocking

FreeCAD module to create laser cut interlocking parts.
GNU Lesser General Public License v2.1
144 stars 33 forks source link

Crosspiece make wrong parts #47

Open Raulvgz opened 3 years ago

Raulvgz commented 3 years ago

Using the Crosspiece function I get wrong parts like in the picture: [

2020-12-28 22_50_52-FreeCAD 0 19

](url)

I use: OS: Windows 10 (10.0) Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.19.23141 (Git) Build type: Release Branch: master Hash: 0eba78d40096720f7a637a9a73c382a08b820bca Python version: 3.8.6 Qt version: 5.12.5 Coin version: 4.0.0 OCC version: 7.4.0 Locale: Spanish/Spain (es_ES)

The example file is this: TestLCI.zip

At the moment I "solved" the problem with this changes in "%username%AppData\Roaming\FreeCAD\Mod\LCInterlocking\lasercut\crosspart.py":

Known problem #43 Line 372:

else:
    remove_intersections(first_part, second_part, referential_faces, axis, True) #new line
    print ("AppData\\Roaming\\FreeCAD\\Mod\\LCInterlocking\\lasercut\\crosspart.py") #new line
    #raise ValueError("Not managed") #comment line

In Lines 290/292 add "*1.1" after "second_part.properties.thickness":

    second_box = make_cross_box(second_part.properties.thickness *1.1, second_box_y, height,
                                second_part.properties.node_type, second_part.properties.node_thickness)
    second_box = make_nodes_yz(second_box, second_part.properties.thickness *1.1, second_box_y, height,
                               second_part.properties.node_type, second_part.properties.node_thickness)
execuc commented 3 years ago

Hello,

Thank you for the attached example. This solution looks good to me. I will modify the code as soon as I have time.