Skip to content

Commit 1815437

Browse files
committed
Merge pull request #121 from tpaviot/review/prepare-0.16.2
review/prepare 0.16.2
2 parents f8bfb74 + 49187eb commit 1815437

File tree

5 files changed

+80
-2
lines changed

5 files changed

+80
-2
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ set(PYTHONOCC_VERSION_MAJOR 0)
2222
set(PYTHONOCC_VERSION_MINOR 16)
2323
set(PYTHONOCC_VERSION_PATCH 2)
2424
# Empty for official releases, set to -dev, -rc1, etc for development releases
25-
set(PYTHONOCC_VERSION_DEVEL -dev)
25+
set(PYTHONOCC_VERSION_DEVEL)
2626

2727
cmake_minimum_required(VERSION 2.6)
2828

NEWS

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
==========================
2+
Version 0.16.2 - July 2015
3+
4+
This release requires oce-0.16.0 or oce-0.16.1
5+
6+
* New examples : display_quality, surface_from_curve, export_to_image,
7+
shape_pickling, display_linewidth, prs3d_customization, textured_shape,
8+
faircurve, topology_prism, topology_pipe, evolved_shape, draft_angle,
9+
through_section, topology_face, topology_edge, vertex_filleting,
10+
export_to_EF(PDF, PS, tex, SVG)
11+
12+
* Mingw64 compilation fix
13+
14+
* Fixed wrapper for Standard_Boolean returned by reference as parameters
15+
116
==========================
217
Version 0.16.1 - June 2015
318

cmake/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION = "0.16.2-dev"
1+
VERSION = "0.16.2"

examples/core_display_export_to_EF.py

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
##Copyright 2015 Thomas Paviot ([email protected])
2+
##
3+
##This file is part of pythonOCC.
4+
##
5+
##pythonOCC is free software: you can redistribute it and/or modify
6+
##it under the terms of the GNU Lesser General Public License as published by
7+
##the Free Software Foundation, either version 3 of the License, or
8+
##(at your option) any later version.
9+
##
10+
##pythonOCC is distributed in the hope that it will be useful,
11+
##but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
##MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
##GNU Lesser General Public License for more details.
14+
##
15+
##You should have received a copy of the GNU Lesser General Public License
16+
##along with pythonOCC. If not, see <http://www.gnu.org/licenses/>.
17+
18+
from OCC.Display.SimpleGui import init_display
19+
from OCC.BRepPrimAPI import BRepPrimAPI_MakeTorus
20+
from OCC.Graphic3d import (Graphic3d_EF_PDF,
21+
Graphic3d_EF_SVG,
22+
Graphic3d_EF_TEX,
23+
Graphic3d_EF_PostScript,
24+
Graphic3d_EF_EnhPostScript)
25+
26+
display, start_display, add_menu, add_function_to_menu = init_display()
27+
my_box = BRepPrimAPI_MakeTorus(40., 20.).Shape()
28+
29+
display.DisplayShape(my_box, update=True)
30+
f = display.View.View().GetObject()
31+
32+
33+
def export_to_PDF(event=None):
34+
f.Export('torus_export.pdf', Graphic3d_EF_PDF)
35+
36+
37+
def export_to_SVG(event=None):
38+
f.Export('torus_export.svg', Graphic3d_EF_SVG)
39+
40+
41+
def export_to_PS(event=None):
42+
f.Export('torus_export.ps', Graphic3d_EF_PostScript)
43+
44+
45+
def export_to_EnhPS(event=None):
46+
f.Export('torus_export_enh.ps', Graphic3d_EF_EnhPostScript)
47+
48+
49+
def export_to_TEX(event=None):
50+
f.Export('torus_export.tex', Graphic3d_EF_TEX)
51+
52+
53+
if __name__ == '__main__':
54+
add_menu('screencapture')
55+
add_function_to_menu('screencapture', export_to_PDF)
56+
add_function_to_menu('screencapture', export_to_SVG)
57+
add_function_to_menu('screencapture', export_to_PS)
58+
add_function_to_menu('screencapture', export_to_EnhPS)
59+
add_function_to_menu('screencapture', export_to_TEX)
60+
start_display()

examples/core_display_export_to_image.py

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
##You should have received a copy of the GNU Lesser General Public License
1616
##along with pythonOCC. If not, see <http://www.gnu.org/licenses/>.
1717

18+
import sys
19+
1820
from OCC.Display.SimpleGui import init_display
1921
from OCC.BRepPrimAPI import BRepPrimAPI_MakeBox
2022

@@ -27,6 +29,7 @@
2729
# oce must have been compiled with FreeImage
2830
# otherwise, images will be exported to PPM format
2931

32+
3033
def export_to_BMP(event=None):
3134
display.View.Dump('./capture_bmp.bmp')
3235

0 commit comments

Comments
 (0)