Grasshopper

algorithmic modeling for Rhino

 Hi All...

I have a stupid question regarding Non-Uniform Scale..in C#

I want to scale my surface just in ZAxis direction.. so I did try like this...

 

Surface s = Rhino.Geometry.RevSurface.Create(ec, ln, Math.PI, 0.0);

s.Transform(Transform.Scale(Plane.WorldXY, 1.0, 1.0, z));

(z is scale factor as an input)

 

BUT never ever...changed.. What is the secret of the grasshopper component, Non-Uniform Scale??? lol Please help me..

Views: 1466

Replies to This Discussion

Hi JHLee, it's not a stupid question, it's just that the S.Transform results in a Boolean that indicates whether the transformation has succeeded or not. So I translated my VB script using this snippet converter to this:

Surface res = null;
if (S.Transform(transform.Scale(Plane.WorldXY, 1.0, 1.0, z))) {
    res = S;
}
A = res;

OMG... ok so that was my stupidness ;p

Thank you so much!!  I think this forum is really awesome especially for me, beginner of Rhinocommon script user!

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service