Skip to content

Commit

Permalink
[Refactor] Removed the to-lp-pd-seq function
Browse files Browse the repository at this point in the history
I had previously added this because the `bounds` function
was looking for a `LandPatternPad` type as its argument.
This is yet another case where attempting to use types is
difficult if not impossible in JITX. I've converted `bounds`
to use `JITXObject` instead and this removes the
need for the seq function.
  • Loading branch information
callendorph committed Oct 2, 2024
1 parent ca74d72 commit ef76ac8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
7 changes: 0 additions & 7 deletions src/design/introspection.stanza
Original file line number Diff line number Diff line change
Expand Up @@ -285,13 +285,6 @@ public defn get-pads-from-ports (pts:Seqable<JITXObject>, cxt:JITXObject = self)
val pds? = get-pads-from-port(pt, cxt)
value-or(pds?, [])

doc: \<DOC>
Convert a Sequence of JITXObjects to LandPatternPad objects.
<DOC>
public defn to-lp-pad-seq (objs:Seq<JITXObject>) -> Seq<LandPatternPad> :
for obj in objs seq:
obj as LandPatternPad

doc: \<DOC>
Retrieve the parent instance (component or module) for a port.

Expand Down
5 changes: 3 additions & 2 deletions src/landpatterns/leads.stanza
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ doc: \<DOC>
Generate the Bounding Dims of a sequence of pads
@param lp-pads the pads that we want to create a bounding
rectangle of. These pads should be in the same component for
this function to make sense.
this function to make sense. It should be either a
LandPatternPad or a VirtualPad.
@param layer-spec Optional layer specifier that will compute
the bounds based on the geometry in a particular layer.
If this value is false - we compute the boundary based on the
Expand All @@ -27,7 +28,7 @@ this function to make sense.
that this box is in the frame of reference of the associated component.
<DOC>
public defn bounds (
lp-pads:Seqable<LandPatternPad|VirtualPad>
lp-pads:Seqable<JITXObject|VirtualPad>
--
layer-spec:LayerSpecifier|False = false
expand-by:Double = 0.0
Expand Down

0 comments on commit ef76ac8

Please sign in to comment.