# Problem of duplicated result

Hello; the problem always happens when i use many inputs
in x input: 4 curves (item access)
in y input: 2 surfaces (item access)
The result:
a >> 4 curves divides
b >> 4 branches (number of x input) with 2 items ( number of y input)

``````import rhinoscriptsyntax as rs

def div(crv):
return rs.DivideCurve(crv,10,True)

def cen(surf):
return rs.SurfaceAreaCentroid(surf)

a = div(x)

b = cen(y)``````

I still have the first problem but i solve it by separate inputs in two components, my problem now is with Normal and UV
The surface have normal in -Z direction but SurfaceFrame or Surface Normal with GhPython give me the normal in +Z direction !

The second problem, i tried to reparameterize the surface and this work for flat surface but don’t work for Sphere always half V and the domainV don’t change to 1

``````import rhinoscriptsyntax as rs
import Rhino as rh
import Rhino.Geometry as rg
from ghpythonlib.componentbase import executingcomponent as component
import Grasshopper, GhPython
import System

numa = []
numb = []
lines = []
frames = []

#Change domain----------------------------------------------------------------
intr1 = rg.Interval(0,1)
intr2 = rg.Interval(0,1)
rg.Surface.SetDomain(x,0,intr1)
rg.Surface.SetDomain(x,0,intr2)
domainU = rs.SurfaceDomain(x, 0)
domainV = rs.SurfaceDomain(x, 1)
u = domainU[1]
v = domainV[1]
#-----------------------------------------------------------------------------
if n>1:
for i in range(n):
for j in range(n):
#print(i/(n-1),j/(n-1))
frame = rs.SurfaceFrame(x, ((u*i)/(n-1),(v*j)/(n-1)))
line = rh.Geometry.Line(frame[0],frame[3],3)
frames.append(frame)
lines.append(line)

c = lines
d = frames
``````

prob.gh (7.5 KB)

Hello, i solve the problem of the sphere but i get another problem with triangle surface
the points created in uv directions outside the triangle
is there a way to create divide surface like in grasshopper?