forked from tpaviot/pythonocc-utils
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplane.py
More file actions
50 lines (40 loc) · 1.48 KB
/
plane.py
File metadata and controls
50 lines (40 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
##Copyright 2008-2013 Jelle Feringa (jelleferinga@gmail.com)
##
##This file is part of pythonOCC.
##
##pythonOCC is free software: you can redistribute it and/or modify
##it under the terms of the GNU Lesser General Public License as published by
##the Free Software Foundation, either version 3 of the License, or
##(at your option) any later version.
##
##pythonOCC is distributed in the hope that it will be useful,
##but WITHOUT ANY WARRANTY; without even the implied warranty of
##MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
##GNU Lesser General Public License for more details.
##
##You should have received a copy of the GNU Lesser General Public License
##along with pythonOCC. If not, see <http://www.gnu.org/licenses/>
from OCC.Geom import Geom_Plane
from OCC.gp import gp_Pln
class Plane(object): # HalfSpace
def __init__(self, pln):
self.pln = None
self.geom_plane = None # property
if isinstance(pln, gp_Pln.__class__):
self.pln = pln
elif isinstance(pln, Geom_Plane):
self.pln = pln.Pln()
self.geom_plane = pln
def intersect_curve(self):
"""
any line!
"""
raise NotImplementedError
def intersect_surface(self):
raise NotImplementedError
def intersect_plane_plane(self, pln1, pln2):
raise NotImplementedError
def project_curve(self):
raise NotImplementedError
def project_surface(self):
raise NotImplementedError