Grasshopper

algorithmic modeling for Rhino

I want to find the projection of an object to the XYplane,so i write the VB script as follow:
Private Sub RunScript(ByVal x As Brep, ByRef A As Object)
Dim xf As transform = transform.PlanarProjection(plane.WorldXY)
x.Transform(xf)
A = x
End Sub

but i get the result as the Attach File shows

the projection of a sphere is still a sphere!!!!

so ,Is there something wrong with method "transform"?
or can anybody explain “how to use 'transform'”?

 

i'm using the GH0.80010

Views: 498

Attachments:

Replies to This Discussion

Hi CY,

 

A sphere is defined by a base plane and a radius, it cannot be squashed in one direction only. It also cannot be skewed, sheared or tapered. If you want to transform an object like a Sphere (or a Circle or an Arc or a SumSurface or a RevSurface etc.) using non-linear transform, then you need to convert your geometry into a more complex type that does support squishy transforms.

 

For example you could convert your Sphere to a NurbsSurface or a Brep.

 

--

David Rutten

david@mcneel.com

London, UK

It works .thank you very much!

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