Changes between Version 58 and Version 59 of PythonOcc


Ignore:
Timestamp:
Nov 15, 2015, 1:18:24 PM (8 years ago)
Author:
dpenko
Comment:

Posodobil kodo pri "Prikaz enostavnega izvoza STEP formata za eno obliko" in "Prikaz enostavnega izvoza STEP formata za več oblik"

Legend:

Unmodified
Added
Removed
Modified
  • PythonOcc

    v58 v59  
    602602#!python
    603603# Vključimo knjižnico za izvoz STEP formata
    604 from OCC.Utils.DataExchange.STEP import STEPExporter
     604from OCC.STEPControl import *
    605605
    606606from OCC.BRepPrimAPI import *
     
    610610
    611611# Obliko my_box_shape izvozimo v STEP format
    612 my_step_exporter = STEPExporter("result_export_single.stp") # Določitev imena file.a
    613 my_step_exporter.add_shape(my_box_shape)
    614 my_step_exporter.write_file()
     612step_writer = STEPControl_Writer()
     613step_writer.Transfer(my_box_shape, STEPControl_AsIs)
     614step_writer.Write("result_export_single.stp")
    615615
    616616}}}
     
    620620#!python
    621621# Vključimo knjižnico za izvoz STEP formata
    622 from OCC.Utils.DataExchange.STEP import STEPExporter
     622from OCC.STEPControl import *
    623623
    624624from OCC.BRepPrimAPI import *
     
    629629
    630630# Obliki my_box_shape in my_sphere_shape izvozimo v STEP format
    631 my_step_exporter = STEPExporter("result_export_multi.stp") # Določitev imena file.a
    632 my_step_exporter.add_shape(my_box_shape)
    633 my_step_exporter.add_shape(my_sphere_shape) #funkcijo ADD uporabimo za dodajanje oblik v STEP format
    634 my_step_exporter.write_file()
     631step_writer = STEPControl_Writer()
     632step_writer.Transfer(my_box_shape, STEPControl_AsIs)
     633step_writer.Transfer(my_sphere_shape, STEPControl_AsIs)
     634step_writer.Write("result_export_multi.stp")
    635635}}}
    636636