Extend Surface all directions

hello,

I am trying to extend a surface in ALL directions by a fixed length.
But some how i can not get it working.
I found this to extend in 1 direction. but need it for al edges at ones.


Const rhSurface = 8

Dim arrParameter,arrPick

arrPick = Rhino.GetObjectEx("Select surface to extend", rhSurface)

If IsArray(arrPick) Then

	arrParameter = Rhino.Surfaceedge(arrPick(0), arrPick(3))

	Call Rhino.ExtendSurface(arrPick(0), arrParameter, 5.0)

End If

I have tried it in several ways.but don’t get it working

I need to do it in .rvb as i need to implement it in a other script.

Many thanx
nick

Hi nick – Extending surfaces needs an input for the Isostatus at the edge - it looks like RhinoScript is finding that for you from the parameter - that is it is extending only the edge nearest to the pick point - you’d need to run this multiple times with different pick points - you might be able to just get those from the edge curve mid points, say.
Probably, using RhinoCommon is the way to go here, as you can specify the edge isostatus in the script and not depend on a pick location.

https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_Surface_Extend.htm

https://developer.rhino3d.com/api/RhinoCommon/html/P_Rhino_Geometry_BrepTrim_IsoStatus.htm

@nk1 - this is python, but maybe it will help -

ExtendSrfAll.py (931 Bytes)

-Pascal

Thanx Pascal,

I give it a try to get it in.

An thanx for the python script. This is what i need in the future as i need to learn python :slight_smile: or when i need to rewrite it.

Nick