Skip to content

Commit a2404f9

Browse files
authored
Merge pull request #34 from aws-cqc/gp/docs-build
docs: Update docstrings and .md to reflect build! not being necessary
2 parents 258fb8e + fb7a01b commit a2404f9

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

docs/src/schematicdriven/schematics.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ you want. Maybe a wire needs to be routed differently, or a component needs to b
6565
based on its position.
6666

6767
SchematicDrivenLayout allows you to inspect and modify a `Schematic` to make these sorts of
68-
changes before `build` renders it into polygons.
68+
changes before `render!` renders it into polygons.
6969

7070
When you construct a `SchematicGraph`, you don't need to know exactly where a component will
7171
end up. You can usually calculate it yourself, but there are some built-in utilities to
@@ -100,7 +100,7 @@ One other useful trick allows a kind of interactive routing. When you view your
100100
built from the schematic, you may find that a route bends too sharply or goes too close to a
101101
component. You can write down the points it needs to go to in the schematic's global coordinate system,
102102
and add them as waypoints to the route. That is, if you go back to your layout script,
103-
before you `build!` the layout, you can do something like
103+
before you `render!` the layout, you can do something like
104104

105105
```julia
106106
### original script
@@ -115,8 +115,8 @@ check!(floorplan)
115115
route_node.component.global_waypoints = true
116116
route_node.component.r.waypoints = [Point(600.0μm, -3000.0μm)]
117117
route_node.component.r.waydirs = [90°]
118-
### finalize
119-
build!(floorplan)
118+
### render to `cell` with options from `target`
119+
render!(cell, floorplan, target)
120120
```
121121

122122
Now the route in `route_node` is guaranteed to pass through the point (600.0μm, -3000.0μm)
@@ -136,16 +136,16 @@ SchematicDrivenLayout.crossovers!
136136
It is often necessary to check that a planned `Schematic` obeys a set of constraints set
137137
by the fabrication process. For instance, one may want to verify that all the junctions
138138
in a floorplan are oriented in the right direction, e.g. pointing north. Instead of doing
139-
this by eye, users should call `check!(sch::Schematic)`. In the future, this method could
140-
run any number of checks, but at present it only checks the global orientation of
139+
this by eye, users should call `check!(sch::Schematic)`. This method can
140+
run any number of checks provided by the user, but by default it only checks the global orientation of
141141
[_checkable_](@ref SchematicDrivenLayout.check_rotation) components via the following methods:
142142

143143
```@docs
144144
SchematicDrivenLayout.rotations_valid
145145
```
146146

147-
To be able to `build!` a floorplan (i.e. turn components into their `CoordinateSystem` geometries), users _must_
148-
run `check!` first, otherwise `build` will throw an error.
147+
To be able to `build!` or `render!` a floorplan (i.e. turn components into their geometries), users _must_
148+
run `check!` first. Otherwise, these functions will throw an error.
149149

150150
## Visualization
151151

src/schematics/schematics.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1345,7 +1345,9 @@ end
13451345
kwargs...
13461346
)
13471347
1348-
Run `build!(sch, target)` and render the resulting geometry to `cs` using `target`'s rendering options.
1348+
Render the schematic `sch` to `cs` using `target`'s rendering options, without modifying `sch`.
1349+
1350+
Users must run `check!(sch)` before calling this method; otherwise, it will throw an error.
13491351
13501352
The `strict` keyword should be `:error`, `:warn`, or `:no`.
13511353

0 commit comments

Comments
 (0)