From 618d4718c92916cc9ab4620c2f43516af53c4857 Mon Sep 17 00:00:00 2001 From: "qihao.gong@jikimo.com" Date: Fri, 15 Sep 2023 14:36:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88=E6=B3=A8=E9=87=8Aocc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/product_template.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sf_manufacturing/models/product_template.py b/sf_manufacturing/models/product_template.py index 03f22bea..baf86eb6 100644 --- a/sf_manufacturing/models/product_template.py +++ b/sf_manufacturing/models/product_template.py @@ -1,8 +1,8 @@ from odoo import models, fields, api from odoo.exceptions import ValidationError from odoo.modules import get_resource_path -# from OCC.Extend.DataExchange import read_step_file -# from OCC.Extend.DataExchange import write_stl_file +from OCC.Extend.DataExchange import read_step_file +from OCC.Extend.DataExchange import write_stl_file import logging import base64 import hashlib @@ -738,7 +738,7 @@ class ResProductMo(models.Model): def transition_glb_file(self, report_path, code): shapes = read_step_file(report_path) output_file = os.path.join('/tmp', str(code) + '.stl') - # write_stl_file(shapes, output_file, 'binary', 0.03, 0.5) + write_stl_file(shapes, output_file, 'binary', 0.03, 0.5) # 转化为glb output_glb_file = os.path.join('/tmp', str(code) + '.glb') util_path = get_resource_path('sf_dlm', 'static/util')