Loading x3d_step_assy.py +2 −7 Original line number Original line Diff line number Diff line Loading @@ -1297,7 +1297,7 @@ class X3dStepAssyDialog(QtGui.QWidget): if path: if path: return path return path if mode == "assy": if mode == "assy": return "Active document" return "Active FreeCAD document" elif mode == "log": elif mode == "log": return "none" # stdout" return "none" # stdout" else: else: Loading Loading @@ -1660,10 +1660,7 @@ class X3dStepAssyDialog(QtGui.QWidget): return return FreeCAD.Console.PrintMessage("Getting BOM...") FreeCAD.Console.PrintMessage("Getting BOM...") self.preRun() self.preRun() offsets = list_parts_offsets() bom = getBOM() bom = getBOM() # sys.stdout.close() # sys.stdout = sys.__stdout__ try: try: if self.assembly_path: if self.assembly_path: aname,_ = os.path.splitext(os.path.basename(assembly_path)) aname,_ = os.path.splitext(os.path.basename(assembly_path)) Loading @@ -1677,7 +1674,7 @@ class X3dStepAssyDialog(QtGui.QWidget): self.bom_btn.setToolTip("Generate Bill of Materials (parts list)") self.bom_btn.setToolTip("Generate Bill of Materials (parts list)") txt="Bill of Materials for %s \n\n"%(aname) txt="Bill of Materials for %s \n\n"%(aname) for i, m in enumerate(bom): for i, m in enumerate(bom): txt += "%3d\t%s\t%d\n"%(i,m[0],int(m[1])) txt += "%3d\t%s\t%d\n"%(i+1,m[0],int(m[1])) txt_edit = X3dStepAssyDialog.TextViewerWindow(txt,"Bill of Materials for %s"%(aname),(400,10,300,500),False,False,self.x3d_root_path) txt_edit = X3dStepAssyDialog.TextViewerWindow(txt,"Bill of Materials for %s"%(aname),(400,10,300,500),False,False,self.x3d_root_path) txt_edit.show() txt_edit.show() Loading @@ -1688,8 +1685,6 @@ class X3dStepAssyDialog(QtGui.QWidget): FreeCAD.Console.PrintMessage("Starting parts offsets calculation...") FreeCAD.Console.PrintMessage("Starting parts offsets calculation...") self.preRun() self.preRun() offsets = list_parts_offsets() offsets = list_parts_offsets() # sys.stdout.close() # sys.stdout = sys.__stdout__ txt=("Parts volume centers distance from the coordinate origin. " txt=("Parts volume centers distance from the coordinate origin. " "Keeping this distance reasonably small (not larger than the object size) " "Keeping this distance reasonably small (not larger than the object size) " Loading Loading
x3d_step_assy.py +2 −7 Original line number Original line Diff line number Diff line Loading @@ -1297,7 +1297,7 @@ class X3dStepAssyDialog(QtGui.QWidget): if path: if path: return path return path if mode == "assy": if mode == "assy": return "Active document" return "Active FreeCAD document" elif mode == "log": elif mode == "log": return "none" # stdout" return "none" # stdout" else: else: Loading Loading @@ -1660,10 +1660,7 @@ class X3dStepAssyDialog(QtGui.QWidget): return return FreeCAD.Console.PrintMessage("Getting BOM...") FreeCAD.Console.PrintMessage("Getting BOM...") self.preRun() self.preRun() offsets = list_parts_offsets() bom = getBOM() bom = getBOM() # sys.stdout.close() # sys.stdout = sys.__stdout__ try: try: if self.assembly_path: if self.assembly_path: aname,_ = os.path.splitext(os.path.basename(assembly_path)) aname,_ = os.path.splitext(os.path.basename(assembly_path)) Loading @@ -1677,7 +1674,7 @@ class X3dStepAssyDialog(QtGui.QWidget): self.bom_btn.setToolTip("Generate Bill of Materials (parts list)") self.bom_btn.setToolTip("Generate Bill of Materials (parts list)") txt="Bill of Materials for %s \n\n"%(aname) txt="Bill of Materials for %s \n\n"%(aname) for i, m in enumerate(bom): for i, m in enumerate(bom): txt += "%3d\t%s\t%d\n"%(i,m[0],int(m[1])) txt += "%3d\t%s\t%d\n"%(i+1,m[0],int(m[1])) txt_edit = X3dStepAssyDialog.TextViewerWindow(txt,"Bill of Materials for %s"%(aname),(400,10,300,500),False,False,self.x3d_root_path) txt_edit = X3dStepAssyDialog.TextViewerWindow(txt,"Bill of Materials for %s"%(aname),(400,10,300,500),False,False,self.x3d_root_path) txt_edit.show() txt_edit.show() Loading @@ -1688,8 +1685,6 @@ class X3dStepAssyDialog(QtGui.QWidget): FreeCAD.Console.PrintMessage("Starting parts offsets calculation...") FreeCAD.Console.PrintMessage("Starting parts offsets calculation...") self.preRun() self.preRun() offsets = list_parts_offsets() offsets = list_parts_offsets() # sys.stdout.close() # sys.stdout = sys.__stdout__ txt=("Parts volume centers distance from the coordinate origin. " txt=("Parts volume centers distance from the coordinate origin. " "Keeping this distance reasonably small (not larger than the object size) " "Keeping this distance reasonably small (not larger than the object size) " Loading