TCL commands "add_rectangle" and "new" not working in 8.994 BETA

Issue #485 new
Harald Bauer created an issue

The Tcl command “add_rectangle” is not working in 8.994 BETA:

Error message:

add_rectangle schrubben.geo 0 0 10 10ERROR REPORT: 'NONETYPE' OBJECT HAS NO ATTRIBUTE 'APPEND'PYTHON TRACEBACK: <CLASS 'ATTRIBUTEERROR'>FILE "C:USERSHARALD?IN?CCAMLIB.PY", LINE 645, IN ADD_POLYGON > SELF.TOOLS[TOOL]['solid_geometry'].append(new_poly)File "C:UsersHarald?in?c  clCommandsTclCommandAddRectangle.py", line 73, in execute > obj.add_polygon([(x0, y0), (x1, y0), (x1, y1), (x0, y1)])File "C:UsersHarald?in?c    clCommandsTclCommand.py", line 343, in execute_call > self.output = self.execute(args, unnamed_args)while executing"add_rectangle schrubben.geo 0 0 10 10"

The command “new” is also not working.

Error message:

ERROR Report: 'App' object has no attribute 'on_file_new'

Copy & paste from TCL window does not include line feeds.

Comments (5)

  1. Marius Stanciu

    Hi Harald,

    The ‘new’ command issue was already reported and solved.
    If adding rectangle to a Geometry object created with the command ‘new_geometry’ then this is a valid issue and I just solved it.

  2. Harald Bauer reporter

    Hi Marius,

    Thanks for your very quick reply!

    I noticed that the command “add_polygon” is also not working.
    For compatibility with existing scripts, it would be nice if the old “add_rect” would still be supported.
    Comments after a command (e.g. set OVERLAP 0.2 # in %: 0.2 = 20%) seem not to be possible:

    New object with name: new_script. 0.000000 seconds executing initialize().
ERROR: wrong # args: should be "set varName ?newValue?"
    while executing
"set OVERLAP 0.2     # in %: 0.2 = 20%"

    

  3. Marius Stanciu

    Hi Harald,
    Inline comments are not supported, in a script add the comments before the actual Tcl command.
    The ‘add something’ are not working with Geometry objects created in the Tcl Shel with commmand new_geometry in the current version. As I mentioned before, the issue is fixed. The fix will be made available on the new release 8.995 (changes made by me are made on my working copy and are not posted to the Beta branch until there is the time for a new release).

  4. Marius Stanciu

    Actually, since I was at this subject, I’ve just added three new Tcl commands: add_drill / add_slot (which work on Excellon objects) and add_aperture (works on Gerber objects but for now is kind of not useful until I add the ability to add also some geometry in the apertures, maybe flash's).

  5. Log in to comment