topologicpy 0.6.3__py3-none-any.whl → 0.7.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
topologicpy/Aperture.py CHANGED
@@ -14,23 +14,22 @@
14
14
  # You should have received a copy of the GNU Affero General Public License along with
15
15
  # this program. If not, see <https://www.gnu.org/licenses/>.
16
16
 
17
- import topologicpy
18
17
  import topologic_core as topologic
19
18
 
20
- class Aperture(topologic.Aperture):
19
+ class Aperture():
21
20
  @staticmethod
22
- def Topology(aperture: topologic.Aperture) -> topologic.Topology:
21
+ def Topology(aperture):
23
22
  """
24
23
  Returns the topology of the input aperture.
25
24
 
26
25
  Parameters
27
26
  ----------
28
- aperture : topologic.Aperture
27
+ aperture : Aperture
29
28
  The input aperture.
30
29
 
31
30
  Returns
32
31
  -------
33
- topologic.Topology
32
+ Topology
34
33
  The topology of the input aperture.
35
34
 
36
35
  """
@@ -38,36 +37,36 @@ class Aperture(topologic.Aperture):
38
37
  if not Topology.IsInstance(aperture, "aperture"):
39
38
  print("Aperture.Topology - Error: The input aperture parameter is not a valid topologic aperture. Returning None.")
40
39
  return None
41
- return topologic.Aperture.Topology(aperture)
40
+ return topologic.Aperture.Topology(aperture) # Hook to Core
42
41
 
43
42
  @staticmethod
44
- def ByTopologyContext(topology: topologic.Topology, context: topologic.Context) -> topologic.Aperture:
43
+ def ByTopologyContext(topology, context):
45
44
  """
46
45
  Creates an aperture object represented by the input topology and one that belongs to the input context.
47
46
 
48
47
  Parameters
49
48
  ----------
50
- topology : topologic.Topology
49
+ topology : topologic_core.Topology
51
50
  The input topology that represents the aperture.
52
- context : topologic.Context
51
+ context : Context
53
52
  The context of the aperture. See Context class.
54
53
 
55
54
  Returns
56
55
  -------
57
- topologic.Aperture
56
+ Aperture
58
57
  The created aperture.
59
58
 
60
59
  """
61
60
  from topologicpy.Topology import Topology
62
- if not Topology.IsInstance(topology, "topology"):
61
+ if not Topology.IsInstance(topology, "Topology"):
63
62
  print("Aperture.ByTopologyContext - Error: The input topology parameter is not a valid topologic topology. Returning None.")
64
63
  return None
65
- if not isinstance(context, topologic.Context):
64
+ if not Topology.IsInstance(context, "Context"):
66
65
  print("Aperture.ByTopologyContext - Error: The input context parameter is not a valid topologic context. Returning None.")
67
66
  return None
68
67
  aperture = None
69
68
  try:
70
- aperture = topologic.Aperture.ByTopologyContext(topology, context)
69
+ aperture = topologic.Aperture.ByTopologyContext(topology, context) # Hook to Core
71
70
  except:
72
71
  print("Aperture.ByTopologyContext - Error: The operation failed. Returning None.")
73
72
  aperture = None