Grasshopper

algorithmic modeling for Rhino

Access to new offset surface option in Python and Rhino 5

Hi all,

I am trying to offset a surface into a solid and i would like to use the new feature of rhino 5 that allows to do it straight away with the Offset surface command.

I tried to make a simple python component by using the syntax below but the command does accept only the first three parameters and doesn't allow me to choose the both_sides or create_solids...

any idea??

thanks

ed 

OffsetSurface

Offsets a trimmed or untrimmed surface by a distance. The offset surface will be added to Rhino.

Syntax

rhinoscriptsyntax.OffsetSurface (surface_id, distance, tolerance=None, both_sides=False, create_solid=False)

rhinoscript.surface.OffsetSurface (surface_id, distance, tolerance=None, both_sides=False, create_solid=False)

Parameters

surface_id

Required.  String or Guid.  The object's identifier.

distance

Required.  Number.  The distance to offset.

tolerance

Optional.  Number. The offset tolerance. Use 0.0 to make a loose offset. Otherwise, the document's absolute tolerance is usually sufficient.

both_sides

Optional. Boolean. Offset to both sides of input surface. The default is False

create_solid

Optional. Boolean. Make a solid object. The default is False

Views: 2748

Replies to This Discussion

Hi Ed -

I was able to use this method as described. The only limitation I see is that it requires a surface, and not a Brep - so it will ignore any surface trims. The attached GH file/python script shows the working implementation of the method you describe as well as a direct RhinoCommon method that does the same but works on BrepFaces, allowing you to incorporate trims. 

Attachments:

Thank you Andrew for sharing this!

I've been looking for this for entire morning!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service