Grasshopper

algorithmic modeling for Rhino

Dear All,
I have a problem with this script included in the component "GHPython"...
apparently there are no errors but the result is null.
I used these two components for surfaces:

rs.AddSrfControlPtGrid(arrCount, Grid, degree=(5,5))
rs.AddSrfPtGrid(arrCount, Grid, degree=(5,5), closed=(False, False))

And this is the script:

SurfaceTest.py


Thank you in advance for any help!
Thank you! ^__^

||||||||||||||||| SCRIPT BEGIN |||||||||||||||||||

import scriptcontext
import math
import Rhino
import System.Guid
import rhinoscriptsyntax as rs
## from curve import __CurveFromId
## import object as rhobject
## import utility as rhutil



def CreaNuovaSuperficieBezier ():

        
        arrCount = []
        arrCount.append(6)
        arrCount.append(6)
        Grid= []
        Grid.append(rs.AddPoint(Pos0))
        Grid.append(rs.AddPoint(Pos1))
        Grid.append(rs.AddPoint(Pos2))
        Grid.append(rs.AddPoint(Pos3))
        Grid.append(rs.AddPoint(Pos4))
        Grid.append(rs.AddPoint(Pos5))
        Grid.append(rs.AddPoint(Tan0))
        Grid.append(rs.AddPoint(Tan1))
        Grid.append(rs.AddPoint(Tan2))
        Grid.append(rs.AddPoint(Tan3))
        Grid.append(rs.AddPoint(Tan4))
        Grid.append(rs.AddPoint(Tan5))
        Grid.append(rs.AddPoint(Cur0))
        Grid.append(rs.AddPoint(Cur1))
        Grid.append(rs.AddPoint(Cur2))
        Grid.append(rs.AddPoint(Cur3))
        Grid.append(rs.AddPoint(Cur4))
        Grid.append(rs.AddPoint(Cur5))
        Grid.append(rs.AddPoint(SecondCur0))
        Grid.append(rs.AddPoint(SecondCur1))
        Grid.append(rs.AddPoint(SecondCur2))
        Grid.append(rs.AddPoint(SecondCur3))
        Grid.append(rs.AddPoint(SecondCur4))
        Grid.append(rs.AddPoint(SecondCur5))
        Grid.append(rs.AddPoint(SecondTan0))
        Grid.append(rs.AddPoint(SecondTan1))
        Grid.append(rs.AddPoint(SecondTan2))
        Grid.append(rs.AddPoint(SecondTan3))
        Grid.append(rs.AddPoint(SecondTan4))
        Grid.append(rs.AddPoint(SecondTan5))
        Grid.append(rs.AddPoint(SecondPos0))
        Grid.append(rs.AddPoint(SecondPos1))
        Grid.append(rs.AddPoint(SecondPos2))
        Grid.append(rs.AddPoint(SecondPos3))
        Grid.append(rs.AddPoint(SecondPos4))
        Grid.append(rs.AddPoint(SecondPos5))
        
        surfaceNewCPG = rs.AddSrfControlPtGrid(arrCount, Grid, degree=(5,5))
        surfaceNewPT  = rs.AddSrfPtGrid(arrCount, Grid, degree=(5,5), closed=(False, False))

        print(Pos0)
        print(Pos1)
        print(Pos2)
        print(Pos3)
        print(Pos4)
        print(Pos5)
        print(Tan0)
        print(Tan1)
        print(Tan2)
        print(Tan3)
        print(Tan4)
        print(Tan5)
        print(Cur0)
        print(Cur1)
        print(Cur2)
        print(Cur3)
        print(Cur4)
        print(Cur5)
        print(SecondCur0)
        print(SecondCur1)
        print(SecondCur2)
        print(SecondCur3)
        print(SecondCur4)
        print(SecondCur5)
        print(SecondTan0)
        print(SecondTan1)
        print(SecondTan2)
        print(SecondTan3)
        print(SecondTan4)
        print(SecondTan5)
        print(SecondPos0)
        print(SecondPos1)
        print(SecondPos2)
        print(SecondPos3)
        print(SecondPos4)
        print(SecondPos5)
        print(surfaceNewCPG)
        print(surfaceNewPT)

CreaNuovaSuperficieBezier ()

 ||||||||||||||||| SCRIPT END |||||||||||||||||||

Views: 208

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service