Although we would qualify a lot of the surfaces we see as surfaces,
Rhino thinks of them as single face breps. Therefore, its really a
very rare instance where a surface actually is just a plain old
surface. The good news is that if you know that those breps are
supposed to be single faces, then you can extract those faces (which
are just surfaces) and be on your merry way. I asked Dale (Fugier)
about this a while back, and this is the code snippet he gave me. The
first line is really the most relevant here.
Sub RunScript(ByVal B As OnBrep, ByVal P0 As On3dPoint, ByVal P1 As
On3dPoint)
Dim face As OnBrepFace = B.m_F(0)
Dim u As Double = 0.0
Dim v As Double = 0.0
face.GetClosestPoint(P0, u, v)
Dim uv0 As New On2dPoint(u, v)
face.GetClosestPoint(P1, u, v)
Dim uv1 As New On2dPoint(u, v)
Dim tol As Double = RhUtil.RhinoApp().ActiveDoc().AbsoluteTolerance
()
Dim crv As OnCurve = RhUtil.RhinoShortPath(face, uv0, uv1, tol)
End Sub
Hope that helps
-Damien
On Mar 27, 7:19 am, bildsoe <[email protected]> wrote:
> Hi all
>
> I don't know i this is an error or there is a work around, but when i
> set surfaces using the surface geometry component and then wan't to
> use it as input in a vb.script component the surfaces are recognized
> as breps, and if i try to change the hint to surface the component
> turns red. Is this an error or is there a work around?
>
> http://grasshopper3d.googlegroups.com/web/surfacebrep.jpg?hl=en&gsc=8...
>
> /Thomas