+ Reply to Thread
Results 1 to 7 of 7

Thread: Move selected Surface's CV along UV!!

  1. #1

    Move selected Surface's CV along UV!!

    Hello Everyone,
    is the first time i write and i am a beginner in programming! And i apologize for my English
    Now, please, i would understand how to move the CV of a existing surface ... and in particular I would understand how to move them along a direction (U or V) so that in a view (so in projection) is aligned to a curve (not only a straight line).
    First of all, I can not even figure out how to identify a single point of this surface!

    Thank you so much for your professional help!





    Thank you so much for your professional help!
    Last edited by Lucius Santo; 09-18-2012 at 06:49 PM. Reason: wrong image

  2. #2
    Lucius,
    here is an example from the helpfile of how to access the controllpoints:
    http://www.rhino3d.com/5/ironpython/...facepoints.htm
    It is probably easier to recreate a new surface from the points after you modified them instead of trying to move around an existing control point.

    If you want to learn more about programming in rhinopython in general I would recommend this pdf:
    http://s3.amazonaws.com/mcneel/misc/...PrimerRev3.pdf

  3. #3
    Many thanks Goswin ! But I thought it was possible to directly manipulate the CV of a surface (each CV callable) ...
    But I realized that perhaps it is too difficult for me to try to use some functions ... such as lists without confusion.
    And I also tried to read the book but I have to perform the operations that are unfortunately too complex (for me I think). Maybe I'm missing practice to develop routines and is logic ...

    Many thanks!!!
    But I'll try!

  4. #4
    Lucius,
    I think you can use Object Grips too to move Controlpoints of a surface around, for example:
    http://www.rhino3d.com/5/ironpython/...iplocation.htm

  5. #5
    Thanks Goswin, I try now, You're a friend!
    And then I'll tell you ...
    ^____^
    I LOVE RHINO 3D!!!

  6. #6

    Surface Creation by CV (non NURBS please)

    Hi All ^_^,
    I tried to build a surface from his CV.

    The surface should be simple:
    U = 6 CV degree 5
    V = 6 CV degree 5

    I thought about using the command "AddSrfControlPtGrid."
    I provide 36 CV as input but I have several errors, probably mistake the syntax ... Can you help me? Thank you so much!

    Here's the listing:

    |||||||||||||||||| BEGIN |||||||||||||||

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

    def arrDegree
    arrDegree = 5

    def arrCount As New ArrayList(1)
    arrCount(0) = 6
    arrCount(1) = 6

    def Grid As New ArrayList(35)
    Grid(0) = Pos0
    Grid(1) = Pos1
    Grid(2) = Pos2
    Grid(3) = Pos3
    Grid(4) = Pos4
    Grid(5) = Pos5
    Grid(6) = Tan0
    Grid(7) = Tan1
    Grid(8) = Tan2
    Grid(9) = Tan3
    Grid(10) = Tan4
    Grid(11) = Tan5
    Grid(12) = Cur0
    Grid(13) = Cur1
    Grid(14) = Cur2
    Grid(15) = Cur3
    Grid(16) = Cur4
    Grid(17) = Cur5
    Grid(18) = Second0Cur
    Grid(19) = Second1Cur
    Grid(20) = Second2Cur
    Grid(21) = Second3Cur
    Grid(22) = Second4Cur
    Grid(23) = Second5Cur
    Grid(24) = Second0Tan
    Grid(25) = Second1Tan
    Grid(26) = Second2Tan
    Grid(27) = Second3Tan
    Grid(28) = Second4Tan
    Grid(29) = Second5Tan
    Grid(30) = Second0Pos
    Grid(31) = Second1Pos
    Grid(32) = Second2Pos
    Grid(33) = Second3Pos
    Grid(34) = Second4Pos
    Grid(35) = Second5Pos


    rs.AddSrfControlPtGrid(arrCount, Grid, arrDegree)

    ||||||||||||||||||| END ||||||||||||||||

    I LOVE RHINO 3D!!!

  7. #7
    This Script is in Python (maybe) but does not work

    |||||||||||||||||| BEGIN ||||||||||||||||||

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

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


    |||||||||||||||||| END ||||||||||||||||||

    -_____- so sad...
    I LOVE RHINO 3D!!!

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts