74 |
returns the name of a tag |
returns the name of a tag |
75 |
""" |
""" |
76 |
return self.__map[tag] |
return self.__map[tag] |
77 |
|
def getNames(self): |
78 |
|
""" |
79 |
|
returns the name keys |
80 |
|
""" |
81 |
|
return self.__map.values() |
82 |
|
|
83 |
def getMapping(self): |
def getMapping(self): |
84 |
""" |
""" |
85 |
returns a dictionary where the tags define the keys and the values the corresposnding names. |
returns a dictionary where the tags define the keys and the values the corresposnding names. |
86 |
""" |
""" |
87 |
return self.__map |
return self.__map |
88 |
|
|
89 |
def map(self,default=0,**kwargs): |
def map(self,default=0,**kwargs): |
90 |
""" |
""" |
91 |
returns a dictionary where the tags define the keys and the values give the values assigned to the tag via name |
returns a dictionary where the tags define the keys and the values give the values assigned to the tag via name |
308 |
if isinstance(p, PropertySet): |
if isinstance(p, PropertySet): |
309 |
if p.getDim() == 1: m[ p.getTag() ] = p.getName() |
if p.getDim() == 1: m[ p.getTag() ] = p.getName() |
310 |
return TagMap(m) |
return TagMap(m) |
311 |
def getSurfaceTagMap(self): |
def getTagMap(self): |
|
""" |
|
|
returns a L{TagMap} to map the name of L{Manifold2D} L{PropertySet}s to tags |
|
|
""" |
|
|
m={} |
|
|
for p in self.getAllPrimitives(): |
|
|
if isinstance(p, PropertySet): |
|
|
if p.getDim() == 2: m[ p.getTag() ] = p.getName() |
|
|
return TagMap(m) |
|
|
def getVolumeTagMap(self): |
|
312 |
""" |
""" |
313 |
returns a L{TagMap} to map the name of L{Manifold3D} L{PropertySet}s to tags |
returns a L{TagMap} to map the name of L{Manifold3D} L{PropertySet}s to tags |
314 |
""" |
""" |
315 |
m={} |
m={} |
316 |
for p in self.getAllPrimitives(): |
for p in self.getAllPrimitives(): |
317 |
if isinstance(p, PropertySet): |
if isinstance(p, PropertySet): m[ p.getTag() ] = p.getName() |
|
if p.getDim() == 3: m[ p.getTag() ] = p.getName() |
|
318 |
return TagMap(m) |
return TagMap(m) |