Skip to content

Commit 5d3e75b

Browse files
committed
Merge branch 'developement'
2 parents 666c30a + 57897e6 commit 5d3e75b

File tree

96 files changed

+730
-70
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+730
-70
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,4 +141,5 @@ pycatia-exe.dist
141141
zip_win32_dist.py
142142
win_32/pycatia
143143
pycatia-exe.py
144-
logo*
144+
logo*
145+
*.cgr

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,23 @@
11
# Changelog
22

3+
4+
## 0.4.4
5+
Many thanks to Tian-Jionglu for his contributions.
6+
* Improved checks for malformed filenames.
7+
* Add method Application.setting_controllers.
8+
* Improvements to export_data.
9+
* Added Product.type.
10+
* Docstring fix for Measurable.get_minimum_distance.
11+
* Added __iter__ method to collections.
12+
13+
314
## 0.4.3
415
* Updated ViewPoint3D get methods so they now work.
516
* Updated Viewer so Viewer2D and Viewer3D can be called.
17+
* Fix issue #58.
18+
* Change file_name argument so that it now expects Path().
19+
* Log warning to console if full path isn't provided.
20+
* Raise error if directory doesn't exist.
621

722
## 0.4.2
823
* Added missing methods Parameter.rename(), Parameter.valuate_from_string(),

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ To run a specific test:
123123
124124
To stop tests running after first failure.
125125

126-
py.text -vx
126+
py.test -vx
127127

128128
Release process
129129
---------------

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def __getattr__(cls, name):
3636
author = 'Paul Bourne'
3737

3838
# The short X.Y version
39-
version = '0.4.3'
39+
version = '0.4.4'
4040
# The full version, including alpha/beta/rc tags
4141
release = version
4242

docs/examples.rst

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Example 1
1010

1111
Get the center of gravity for the part body 'PartBody'.
1212

13-
`Example 1 <https://github.com/evereux/pycatia/blob/master/example_001.py>`_
13+
`Example 1 <https://github.com/evereux/pycatia/blob/master/examples/example_001.py>`_
1414

1515

1616
Example 2
@@ -20,23 +20,23 @@ Get all the points in the geometrical set 'Points' and output co-ordinate to con
2020

2121
Create your own CATPart with a Geometrical Set called construction_points. Add some points to the Geometrical Set.
2222

23-
`Example 2 <https://github.com/evereux/pycatia/blob/master/example_002.py>`_
23+
`Example 2 <https://github.com/evereux/pycatia/blob/master/examples/example_002.py>`_
2424

2525

2626
Example 3
2727
---------
2828

2929
Find all points in the CATPart and print to console and export to csv.
3030

31-
`Example 3 <https://github.com/evereux/pycatia/blob/master/example_003.py>`_
31+
`Example 3 <https://github.com/evereux/pycatia/blob/master/examples/example_003.py>`_
3232

3333

3434
Example 4
3535
---------
3636

3737
Loop through a CATProduct and find if sub component is a CATPart or CATProduct.
3838

39-
`Example 4 <https://github.com/evereux/pycatia/blob/master/example_004.py>`_
39+
`Example 4 <https://github.com/evereux/pycatia/blob/master/examples/example_004.py>`_
4040

4141

4242
Example 5
@@ -49,7 +49,7 @@ Formatting of csv data should be:
4949

5050
<point_name>,<x coordinate>,<y coordinate>,<z coordinate>
5151

52-
`Example 5 <https://github.com/evereux/pycatia/blob/master/example_005.py>`_
52+
`Example 5 <https://github.com/evereux/pycatia/blob/master/examples/example_005.py>`_
5353

5454

5555
Example 6
@@ -61,31 +61,31 @@ Export catia file to igs.
6161

6262
Close a catia file.
6363

64-
`Example 6 <https://github.com/evereux/pycatia/blob/master/example_006.py>`_
64+
`Example 6 <https://github.com/evereux/pycatia/blob/master/examples/example_006.py>`_
6565

6666

6767
Example 7
6868
---------
6969

7070
Use the context manager to open CATIA documents and close.
7171

72-
`Example 7 <https://github.com/evereux/pycatia/blob/master/example_007.py>`_
72+
`Example 7 <https://github.com/evereux/pycatia/blob/master/examples/example_007.py>`_
7373

7474

7575
Example 8
7676
---------
7777

7878
Open all CATParts in source directory and save to IGS in target directory.
7979

80-
`Example 8 <https://github.com/evereux/pycatia/blob/master/example_008.py>`_
80+
`Example 8 <https://github.com/evereux/pycatia/blob/master/examples/example_008.py>`_
8181

8282

8383
Example 9
8484
---------
8585

8686
Get the position matrix of products (CATPart or CATProduct) in product.
8787

88-
`Example 9 <https://github.com/evereux/pycatia/blob/master/example_009.py>`_
88+
`Example 9 <https://github.com/evereux/pycatia/blob/master/examples/example_009.py>`_
8989

9090

9191
Example 10
@@ -95,15 +95,15 @@ Loop through a CATProduct and analyse children if CATPart.
9595

9696
Only goes two levels deep.
9797

98-
`Example 10 <https://github.com/evereux/pycatia/blob/master/example_010.py>`_
98+
`Example 10 <https://github.com/evereux/pycatia/blob/master/examples/example_010.py>`_
9999

100100

101101
Example 11
102102
----------
103103

104104
Move the first child in product.
105105

106-
`Example 11 <https://github.com/evereux/pycatia/blob/master/example_011.py>`_
106+
`Example 11 <https://github.com/evereux/pycatia/blob/master/examples/example_011.py>`_
107107

108108

109109
Example 12
@@ -114,31 +114,31 @@ each parameter along with its name, value and its associated parameter set.
114114

115115
# todo: need to create a source part to support this example.
116116

117-
`Example 12 <https://github.com/evereux/pycatia/blob/master/example_012.py>`_
117+
`Example 12 <https://github.com/evereux/pycatia/blob/master/examples/example_012.py>`_
118118

119119

120120
Example 13
121121
----------
122122

123123
3D Points, Spline, Extrusion and Generate Thickness.
124124

125-
`Example 13 <https://github.com/evereux/pycatia/blob/master/example_013.py>`_
125+
`Example 13 <https://github.com/evereux/pycatia/blob/master/examples/example_013.py>`_
126126

127127

128128
Example 14
129129
----------
130130

131131
Logging.
132132

133-
`Example 14 <https://github.com/evereux/pycatia/blob/master/example_014.py>`_
133+
`Example 14 <https://github.com/evereux/pycatia/blob/master/examples/example_014.py>`_
134134

135135

136136
Example 15
137137
----------
138138

139139
Draw a line between two points.
140140

141-
`Example 15 <https://github.com/evereux/pycatia/blob/master/example_016.py>`_
141+
`Example 15 <https://github.com/evereux/pycatia/blob/master/examples/example_016.py>`_
142142

143143

144144
Example 16
@@ -147,7 +147,7 @@ Example 16
147147
Creates a square in a sketch and fully constrains it. Sketch then used to pad.
148148

149149

150-
`Example 16 <https://github.com/evereux/pycatia/blob/master/example_016.py>`_
150+
`Example 16 <https://github.com/evereux/pycatia/blob/master/examples/example_016.py>`_
151151

152152

153153
Example 17
@@ -156,7 +156,7 @@ Example 17
156156
Drafting: create a border template in the background view of the currently opened A0 landscape CATDrawing.
157157

158158

159-
`Example 17 <https://github.com/evereux/pycatia/blob/master/example_017.py>`_
159+
`Example 17 <https://github.com/evereux/pycatia/blob/master/examples/example_017.py>`_
160160

161161

162162
Example 18
@@ -174,7 +174,7 @@ Example 18
174174
Assembly Design: Reorder a Product tree alphabetically. The Product shall
175175
already be loaded.
176176

177-
`Example 18 <https://github.com/evereux/pycatia/blob/master/example_018.py>`_
177+
`Example 18 <https://github.com/evereux/pycatia/blob/master/examples/example_018.py>`_
178178

179179

180180
Example 19
@@ -183,15 +183,15 @@ Example 19
183183
Searching and changing visual properties. Find all Red points and make them
184184
Pink.
185185

186-
`Example 19 <https://github.com/evereux/pycatia/blob/master/example_019.py>`_
186+
`Example 19 <https://github.com/evereux/pycatia/blob/master/examples/example_019.py>`_
187187

188188

189189
Example 20
190190
----------
191191

192192
This creates a message box with the buttons abort, retry ignore and displays the Warning Query icon.
193193

194-
`Example 20 <https://github.com/evereux/pycatia/blob/master/example_020.py>`_
194+
`Example 20 <https://github.com/evereux/pycatia/blob/master/examples/example_020.py>`_
195195

196196

197197
Example 21
@@ -200,7 +200,7 @@ Example 21
200200
Sequentially rename all points in geometric set (hybrid body) Points in the geometric set MasterGeometry.
201201

202202

203-
`Example 21 <https://github.com/evereux/pycatia/blob/master/example_021.py>`_
203+
`Example 21 <https://github.com/evereux/pycatia/blob/master/examples/example_021.py>`_
204204

205205

206206
Example 22
@@ -215,7 +215,7 @@ Requires an active part document open with a geometrical set called
215215
and line generated using HybridShapeLinePtPt
216216

217217

218-
`Example 22 <https://github.com/evereux/pycatia/blob/master/example_022.py>`_
218+
`Example 22 <https://github.com/evereux/pycatia/blob/master/examples/example_022.py>`_
219219

220220

221221
Example 23
@@ -224,21 +224,21 @@ Example 23
224224
Fix the first Sub Product in Product using constraints. The Sketch examples
225225
also show further usage of constraints.
226226

227-
`Example 23 <https://github.com/evereux/pycatia/blob/master/example_023.py>`_
227+
`Example 23 <https://github.com/evereux/pycatia/blob/master/examples/example_023.py>`_
228228

229229
Example 24
230230
----------
231231

232232
Basic license checking.
233233

234-
`Example 24 <https://github.com/evereux/pycatia/blob/master/example_024.py>`_
234+
`Example 24 <https://github.com/evereux/pycatia/blob/master/examples/example_024.py>`_
235235

236236
Example 25
237237
----------
238238

239239
Write the contents of a product to a html file.
240240

241-
`Example 25 <https://github.com/evereux/pycatia/blob/master/example_025.py>`_
241+
`Example 25 <https://github.com/evereux/pycatia/blob/master/examples/example_025.py>`_
242242

243243
Example 26
244244
----------
@@ -252,7 +252,7 @@ Prompt the user to select a product and get it's bounding box parameters
252252
product you have selected.
253253

254254

255-
`Example 26 <https://github.com/evereux/pycatia/blob/master/example_026.py>`_
255+
`Example 26 <https://github.com/evereux/pycatia/blob/master/examples/example_026.py>`_
256256

257257

258258
Example 27
@@ -264,4 +264,4 @@ END VIEW and ISO pngs for each part.
264264
The tree is turned off and the background turned white for the screen
265265
capture and then turned back on.
266266

267-
`Example 27 <https://github.com/evereux/pycatia/blob/master/example_027.py>`_
267+
`Example 27 <https://github.com/evereux/pycatia/blob/master/examples/example_027.py>`_

example_001.py renamed to examples/example_001.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@
88
99
"""
1010

11+
##########################################################
12+
# insert syspath to project folder so examples can be run.
13+
# for development purposes.
14+
import os
15+
import sys
16+
17+
sys.path.insert(0, os.path.abspath('..\\pycatia'))
18+
##########################################################
19+
1120
from pycatia import catia
1221

1322
# initialise the catia automation application

example_002.py renamed to examples/example_002.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@
99
Create your own CATPart with a Geometrical Set called construction_points. Add some points to the Geometrical Set.
1010
1111
"""
12+
13+
##########################################################
14+
# insert syspath to project folder so examples can be run.
15+
# for development purposes.
16+
import os
17+
import sys
18+
19+
sys.path.insert(0, os.path.abspath('..\\pycatia'))
20+
##########################################################
21+
1222
from pycatia import catia
1323

1424
caa = catia()

example_003.py renamed to examples/example_003.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@
88
99
"""
1010

11+
##########################################################
12+
# insert syspath to project folder so examples can be run.
13+
# for development purposes.
14+
import os
15+
import sys
16+
17+
sys.path.insert(0, os.path.abspath('..\\pycatia'))
18+
##########################################################
19+
1120
import csv
1221

1322
from pycatia import catia

example_004.py renamed to examples/example_004.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@
88
99
"""
1010

11+
##########################################################
12+
# insert syspath to project folder so examples can be run.
13+
# for development purposes.
14+
import os
15+
import sys
16+
17+
sys.path.insert(0, os.path.abspath('..\\pycatia'))
18+
##########################################################
19+
1120
from pycatia import catia
1221
from pycatia.enumeration.enumeration_types import cat_work_mode_type
1322

example_005.py renamed to examples/example_005.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@
1313
1414
"""
1515

16+
##########################################################
17+
# insert syspath to project folder so examples can be run.
18+
# for development purposes.
19+
import os
20+
import sys
21+
22+
sys.path.insert(0, os.path.abspath('..\\pycatia'))
23+
##########################################################
24+
1625
from pycatia import catia
1726
from pycatia.scripts.csv_tools import create_points
1827

0 commit comments

Comments
 (0)