|
8 | 8 |
|
9 | 9 | from compas.geometry import Circle |
10 | 10 | from compas.geometry import Frame |
| 11 | +from compas.geometry import Line |
11 | 12 | from compas.geometry import Point |
12 | 13 | from compas.geometry import Vector |
13 | 14 |
|
@@ -162,6 +163,39 @@ def from_three_points(cls, a, b, c): |
162 | 163 | # Methods |
163 | 164 | # ============================================================================= |
164 | 165 |
|
| 166 | + def isocurve_u(self, u): |
| 167 | + """Compute the isoparametric curve at parameter u. |
| 168 | +
|
| 169 | + Parameters |
| 170 | + ---------- |
| 171 | + u : float |
| 172 | +
|
| 173 | + Returns |
| 174 | + ------- |
| 175 | + :class:`compas.geometry.Line` |
| 176 | +
|
| 177 | + """ |
| 178 | + base = self.point_at(u=u, v=0.5) |
| 179 | + return Line.from_point_direction_length(base, self.frame.zaxis, 1.0) |
| 180 | + |
| 181 | + def isocurve_v(self, v): |
| 182 | + """Compute the isoparametric curve at parameter v. |
| 183 | +
|
| 184 | + Parameters |
| 185 | + ---------- |
| 186 | + v : float |
| 187 | +
|
| 188 | + Returns |
| 189 | + ------- |
| 190 | + :class:`compas.geometry.Circle` |
| 191 | +
|
| 192 | + """ |
| 193 | + point = self.center + self.frame.zaxis * v |
| 194 | + xaxis = self.frame.xaxis |
| 195 | + yaxis = self.frame.yaxis |
| 196 | + frame = Frame(point, xaxis, yaxis) |
| 197 | + return Circle(radius=self.radius, frame=frame) |
| 198 | + |
165 | 199 | def point_at(self, u, v, world=True): |
166 | 200 | """Compute a point on the surface at the given parameters. |
167 | 201 |
|
|
0 commit comments