Grasshopper

algorithmic modeling for Rhino

Hi,

I have a component that accepts a geometry type and need to cast to Rhino.Geometry.GeometryBase.

Works fine with most geometry, but when the input is simple geometry like circle or sphere for example, the cast fails.  This is how I am casting:

gh_geom.CastTo<Rhino.Geometry.GeometryBase>(out rh_geom)

Is this a bug, or there is a way to deal with this case?

Thanks in advance.

Views: 1546

Replies to This Discussion

Hi Rajaa,

it seems those simple types don't handle casting to GeometryBase yet. You can use Kernel.GH_Convert.ToGeometryBase() for these kinds of casts.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Hi David,

This covered most of the cases of simple geometry created inside GH (sphere, box, line), but oddly enough, a circle cannot be converted still, even if the circle is created in Rhino and selected as a curve.

Thanks.

-Rajaa

Intranet is down?

I like to read this conversations here :) You learn things that you don't know when you'll need them :P

Sure, I would also like that they had all internal comunications in public.

I just found it strange.

We do have Skype and email of course, but I might not be the only one who knows the answer to a question and my track record of answering questions quickly is not particularly great. Might as well make it public.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Skype and email? don't you have a Sharepoint type intranet?

It's not like they have satellite offices...  just satellite people!

I'd use some sort of intranet once the number of employees is > 2.

Why bother when the good people at Skype could be handling all the maintenance for free? 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

When I say intranet i just mean some sort of private colaborative environment. It can be hosted and mantained by a third party and offered as a service (like Ning).

Some offer free plans, like Google Apps. Sharepoint, the most widely used solution, is offered very cheaply through Office 365.

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