add Library functions for finding instances and extracting hierarchy
added child_graph, parent_graph, child_order, find_refs_local and find_refs_global
This commit is contained in:
parent
a54ee5a26c
commit
febaaeff0b
4 changed files with 218 additions and 18 deletions
|
|
@ -183,6 +183,16 @@ class Ref(
|
|||
self.rotation += pi
|
||||
return self
|
||||
|
||||
def as_transforms(self) -> NDArray[numpy.float64]:
|
||||
xys = self.offset[None, :]
|
||||
if self.repetition is not None:
|
||||
xys = xys + self.repetition.displacements
|
||||
transforms = numpy.empty((xys.shape[0], 4))
|
||||
transforms[:, :2] = xys
|
||||
transforms[:, 2] = self.rotation
|
||||
transforms[:, 3] = self.mirrored
|
||||
return transforms
|
||||
|
||||
def get_bounds_single(
|
||||
self,
|
||||
pattern: 'Pattern',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue