Import Dxf as Geometry Object on Linux Fedora doesn't display anything - fixed for next version

Issue #569 new
max xam created an issue

Hi Marius,

I have checked the Gui preferences Edit Color:

but the object selected it’s not showed on linux Fedora:

if I make a remote connection from Mac to Fedora using vnc I can see correctly:

Do you have any idea for the issue ?

If I open gerber and excellon everything it’s correct:

Comments (29)

  1. max xam reporter

    Hi Marius,

    on the same object from Gui executing cncjob the following error:

    FlatCAM Evo Unstable - Type >help< to get started
    

[SUCCESS] Opened: /Users/max/Txt/3d_cnc/laser/modelli/riferimento_x100-100.DXF
    New object with name: riferimento_x100-100.DXF. 0.023778 seconds executing initialize().
    [SUCCESS] Done.
    [SUCCESS] Origin set...
    Indexing geometry before generating G-Code...
    Starting G-Code for tool with diameter: 2.4MM.
    [ERROR] An internal error has occurred.
    See shell.
    Object (cncjob) failed because: '<=' not supported between instances of 'NoneType' and 'int' 
    

Traceback (most recent call last):File "/Users/max/flatcam95/appObjects/AppObject.py", line 168, in new_objectreturn_value = initialize(obj, self.app)
    File "/Users/max/flatcam95/appPlugins/ToolMilling.py", line 3446, in job_init_multi_geometryres, start_gcode = new_cncjob_obj.geometry_tool_gcode_gen(tooluid_key, tools_dict, first_pt=first_pt,
    File "/Users/max/flatcam95/camlib.py", line 3984, in geometry_tool_gcode_gent_gcode += self.create_gcode_single_pass(geo, current_tooldia, self.extracut,
    File "/Users/max/flatcam95/camlib.py", line 6463, in create_gcode_single_passgcode_single_pass = self.linear2gcode(geometry, cdia, z_move=z_move, tolerance=tolerance,
    File "/Users/max/flatcam95/camlib.py", line 7330, in linear2gcodepath = self.segment(target_linear.coords)File "/Users/max/flatcam95/camlib.py", line 7225, in segmentif len(coords) < 2 or self.segx <= 0 and self.segy <= 0:
    TypeError: '<=' not supported between instances of 'NoneType' and 'int'


    

  2. Marius Stanciu

    Hello,

    The DXF file you attached is opening without issues with the latest commit of FlatCAM Evo (beta).
    Can you share the cncjob TclCommand with the parameters that you have used and which used gave you errors?

    Thanks,
    Marius

  3. max xam reporter

    Hello Marius,

    I don’t use TclCommand, from the Gui interface I import the dxf like geometry object and after I use the Milling procedure with preprocessor GRBL_laser:

  4. Marius Stanciu

    Hi Max,
    The issue with not creating CNCJob objects due of the changes I made last evening, should be fixed now.

    As for why plotting doesn’t work in Linux or MacOS that’s beyond me, it’s a thing of drivers or upstream bugs. You should check in that case the 2D Graphic Engine in Preferences. It’s a low performance mode but at least you should see if it works this way.

  5. max xam reporter

    Hi Marius,

    I imported a dxf as geometry object and it gives error again :

    New object with name: Aspiratore_raccordo.DXF. 0.016315 seconds executing initialize().
    [SUCCESS] Done.
    [SUCCESS] Origin set...
    [SUCCESS] Tool was edited in Tool Table.
    Indexing geometry before generating G-Code...
    Starting G-Code for tool with diameter: 0.125MM.
    [ERROR] An internal error has occurred. 
    See shell.Object (cncjob) failed because: '<=' not supported between instances of 'NoneType' and 'int' 

Traceback (most recent call last)
    File "/Users/max/flatcam95/appObjects/AppObject.py", line 168, in new_object
    return_value = initialize(obj, self.app)
    File "/Users/max/flatcam95/appPlugins/ToolMilling.py", line 3446, in job_init_multi_geometry
    res, start_gcode = new_cncjob_obj.geometry_tool_gcode_gen(tooluid_key, tools_dict, first_pt=first_pt,
    File "/Users/max/flatcam95/camlib.py", line 3984, in geometry_tool_gcode_gen
    t_gcode += self.create_gcode_single_pass(geo, current_tooldia, self.extracut,
    File "/Users/max/flatcam95/camlib.py", line 6463, in create_gcode_single_pass
    gcode_single_pass = self.linear2gcode(geometry, cdia, z_move=z_move, tolerance=tolerance,
    File "/Users/max/flatcam95/camlib.py", line 7330, in linear2gcode
    path = self.segment(target_linear.coords)
    File "/Users/max/flatcam95/camlib.py", line 7225, in segment
    if len(coords) < 2 or self.segx <= 0 and self.segy <= 0:TypeError: '<=' not supported between instances of 'NoneType' and 'int'


    

  6. Marius Stanciu

    Hello Max,

    I'm in a remote area in the mountains without my notebook so I will see what can be done next week.

    Best regards,

    Marius

  7. max xam reporter

    Hello Marius,

    it’s ok, after when you have time if you can explain me the funcion Paint.

    Have a nice week end.

    Max

  8. max xam reporter

    Yes, maybe I forgot to update Mac with marius_stanciu-flatcam_beta-88d9d6aeb48c.zip, now it’s working.

    😉

  9. Koon Wong

    I noticed one difference in the ParseDXF.py the very first line, the one without “Point” DXF does not import DXF with the circle or round drill shape.

    from shapely.geometry import LineString, Point

  10. Marius Stanciu

    Hi @Koon Wong ,

    DXF does not import DXF with the circle or round drill shape.

    You should create a separate “issue” where you can share the file that cannot be loaded.

  11. Koon Wong

    The file can not be loaded is “riferimento_x100-100.DXF” at the beginning of this issue. Commit Fix .dxf import:

    https://bitbucket.org/jpcgt/flatcam/commits/2e3590182fb18f2794b53c82fd57d2e7ce5afe44

    I found a Windows complied version here http://217.129.211.236/eagle/ but your site have only source code for Ver 8.994.

    Now I got it working with my WinPython so I have access to the code to test. For any issue I will create it, thank for the great work, and I can also compare the result with CopperCam gcode to Mach3/Mach4.

  12. Marius Stanciu

    Hi @Koon Wong ,

    I apologize for the confusion. If you look on the Downloads section of this repository you will see some text files that hold inside the download link. The reason for this is because uploads of large files fails on Bitbucket and I had to use this solution.

    More than that. I upload code to the Beta branch only when I feel that I reached a stable point in my working copy. My actual work is kept elsewhere:
    https://bitbucket.org/marius_stanciu/flatcam_beta/branch/Beta_8.995
    and this issue refer to that work.
    Almost all the bugs fixes that I personally solved since the last release (8.994) are only in my working copy.

    I know that is confusing , and those issues should be open on that repository, I hope that soon we will clear this mixup.
    The reported bug in this issue is solved in my working copy.

  13. max xam reporter

    Hello Marius,

    long time I don’t contact you.

    I have a new issue.

    After importing a dxf like Geometry Object, I used Geometry editor to delete some parts not interesting, after exiting from editorit ask to me to save but it really don’t save.

    [WARNING] Editor is activated ...
Loading the Geometry into the Editor...
Last selected shape ID: 5609243888
Last selected shape ID: 5656684672
Last selected shape ID: 5609243888
Last selected shape ID: 5609682448
Last selected shape ID: 5609684896
Last selected shape ID: 5662374640
Last selected shape ID: 5609467472
Last selected shape ID: 5609467664
Last selected shape ID: 5609467760
Last selected shape ID: 5641416368
Last selected shape ID: 5553171424
Last selected shape ID: 5553061744
Last selected shape ID: 5655377664
Last selected shape ID: 5609682304
[SUCCESS] Editor exited. Editor content saved.
Editor Exit. Geometry object was updated ...
[WARNING] Editor is activated ...
Loading the Geometry into the Editor...

  14. Marius Stanciu

    Hi Max,

    We need to dig deeper about this. What version of Flatcam are you using? Can you share the DXF file and tell what you deleted?

  15. max xam reporter
      <div class="preview-container wiki-content"><!-- loaded via ajax --></div>
      <div class="mask"></div>
    </div>
    

    </div> </form>

  16. max xam reporter

    The selected parts (in red) must remain, all the other parts (in blue ) must be deleted.

    The installed version is : marius_stanciu-flatcam_beta-43fd141b8e2e.zip

  17. max xam reporter

    I cannot run the last version:

    Traceback (most recent call last):
    File "/Users/max/flatcam95/FlatCAM.py", line 8, in <module>
    from appMain import App
    File "/Users/max/flatcam95/appMain.py", line 85, in <module>
    from appGUI.MainGUI import *
    File "/Users/max/flatcam95/appGUI/MainGUI.py", line 44, in <module>
    import darkdetect
    ModuleNotFoundError: No module named 'darkdetect'

    I try with:

    Successfully installed pip-22.1
    (flt) max@macMax:~$ pip install darktheme
    ERROR: Could not find a version that satisfies the requirement darktheme (from versions: none)
    ERROR: No matching distribution found for darktheme

  18. Marius Stanciu

    Always look in the requirements.txt file for any packages that are required.
    You need to install: pyqtdarktheme and darkdetect

    pip install darkdetect pyqtdarktheme
    

  19. Marius Stanciu

    With welcome!
    But Max, try not to resurrect old threads like this, if you have issues it is best to open a new one. This way we can keep track of things.

  20. Log in to comment