Object options have strange numbers when units converted in opened file.

Issue #80 resolved
Juan Pablo Caram repo owner created an issue

No description provided.

Comments (5)

  1. Juan Pablo Caram reporter

    During Gerber parsing, the units property is changed by assignment: self.units = .... This results in information loss in the object's options.

  2. Juan Pablo Caram reporter

    Original sequence of events...

    FlatCAMApp.open_gerber()
      FlatCAMApp.new_object(initialize)
        obj = FlatCAMGerbre()
        initialize(obj)
          obj.parse_file()
            self.parse_lines()
              self.units = something  # Assignment here
    

    Changed the last line above with: self.convert_units(something):

    self.convert_units(something)
      # This is FlatCAMGerber
      factor = Gerber.convert_units(something)
      self.options["..."] *= factor
    

    At the time during parsing when units are set there shouldn't be any geometry in the object yet. If there is (non-compliant Gerber) then it could call convert_options_units() only (not implemented yet).

  3. Log in to comment