Skip to content

Commit ea47337

Browse files
committed
Added winterops and remove duplicate Rhino module
1 parent 935e01b commit ea47337

23 files changed

+5007
-64
lines changed

npw/extras/__init__.py

Lines changed: 0 additions & 7 deletions
This file was deleted.

npw/extras/rhino.py

Lines changed: 0 additions & 57 deletions
This file was deleted.

winterops/__init__.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
"""Interoperability with other applications."""
2+
3+
import sys
4+
import os
5+
6+
binary_path = os.path.join(os.path.dirname(__file__), 'bin')
7+
sys.path.append(binary_path)
8+
9+
# pylama:ignore=E402,W0611
10+
import clr
11+
clr.AddReference('System')
12+
13+
import System
14+
15+
import winterops.bbx
16+
import winterops.dxf
17+
import winterops.ifc
18+
import winterops.pts
19+
import winterops.rhino
20+
import winterops.stl
21+
import winterops.xl
22+
import winterops.yaml
23+
24+
25+
__version__ = '0.2'

winterops/bbx.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
"""Read and Write Bounding Box Files."""
2+
3+
4+
def load(inputfile):
5+
bboxes = []
6+
with open(inputfile, 'r') as bbxfile:
7+
bbox_count = int(bbxfile.readline()) #noqa
8+
for line in bbxfile:
9+
data = line.split(' ')
10+
bboxes.append(
11+
((float(data[0]), float(data[1]), float(data[2])),
12+
(float(data[3]), float(data[4]), float(data[5])))
13+
)
14+
return bboxes
15+
16+
17+
def dump(outputfile, bbox_list):
18+
bbox_count = len(bbox_list)
19+
with open(outputfile, 'w') as bbxfile:
20+
bbxfile.write(str(bbox_count) + '\n')
21+
for bbox in bbox_list:
22+
minx, miny, minz = bbox[0]
23+
maxx, maxy, maxz = bbox[1]
24+
bbxfile.write(
25+
'{:.02f} {:.02f} {:.02f} {:.02f} {:.02f} {:.02f}\n'
26+
.format(minx, miny, minz, maxx, maxy, maxz)
27+
)
3.84 MB
Binary file not shown.

winterops/bin/Ifc.NET.dll

4.63 MB
Binary file not shown.

winterops/bin/IxMilia.Dxf.dll

720 KB
Binary file not shown.
File renamed without changes.

winterops/bin/YamlDotNet.dll

201 KB
Binary file not shown.

0 commit comments

Comments
 (0)