Hello,

I have been working on an a script at one point I am required to make only a portion of a sphere. Now this is not a regular portion or just cut via a cutting plane but rather created off the edge of a cylinder to a point. I have tried various sweep methods but unless Rhino can treat a point as a curve (which I tried and it doesn't) then sweeps don't produce a proper semi sphere, from what I have seen. The next technique I tried was trimming a full sphere but what I thought was quite simple and very easy to do via commands appears next to impossible in script. I have made a closed curve on the surface of the sphere which within its interior exists the portion of the sphere I want to keep. Now preforming a trim manually via commands is the easiest thing ever but there is not a method I have seen for trimming a surface by a curve. I really want to avoid using a split then delete since the sphere can be located anywhere and it may not remain consistent which index to delete and adding another calculations to determine which to delete would further increase processing time. The ideal method would be to create only the portion of the sphere required but that may not be possible.

Just another idea but I have no idea how to accomplish this, deforming a triangle from all its surface points to a distance r from the centre of the sphere where its vertices already are distance r from the centre.

If anyone has suggestions or know how to accomplish this task any feedback is appreciated

Thank you in advance,

Jesse L.

oh and here are two pics for visualization:

Views: 733

Replies to This Discussion

Hi Jesse,

> but rather created off the edge of a cylinder to a point

Can you post your "before" geometry - the sphere and the cylinder?

Thanks,

 -- Dale

Oops! Well I forgot to mention but its only a portion of a cylinder. In that case it may have been more accurate to say that the semi-sphere is made off the edge of the semi-cylinder. I hope this helps describe it better, there never was a full cylinder.

I recently tried using a network surface and although it is close the way I have tried doesn't maintain a surface distance r from the centre.

If you need any further clarification or information is needed feel free to ask

Jesse L.

When you do this by hand, what geometry to you use? Can you post it along with the instruction on how you would do this by hand?

Thanks,

 -- Dale

When I trim the sphere by hand I trim the sphere surface by the highlighted closed non-planar curve in the pictures, simply clicking outside the curve when selecting which portion to trim away.

Jesse - post your geometry!

 -- Dale

I am not sure what you mean. Do you want me to post my script? As is all the objects are generated dynamically using a script. Do you want me to attach the 3dm file?

Your original post:

>The next technique I tried was trimming a full sphere but what I thought was >quite simple and very easy to do via commands appears next to impossible in >script.

I want to see what you are doing by hand. Yes, I want to see the geometry, or 3DM file. I want a "before" 3DM file and an "after" 3DM file.

 -- Dale

Alright here are two 3dm files before and after named accordingly

I used the trim command then selected the closed curve as the cutting object and then selected the sphere outside of the closed curve as the object to be trimmed.

Jesse L.

Attachments:

Hi Jesse,

In "before", where did the curves from from?

The semi-cylinder was created from the portion along its edge via a sweep. Now the other two curves were made as arcs using three vectors drawn in the original pictures. I set the x directions of the the two planes required (one for each arch) to be in the direction of the the start and end points of the first arch and create the rest of the directions accordingly to arc to the common point. The three curves are then joined.

Jesse L.

Hi Jesse,

Try creating a line from one of the curve corners that is normal to the sphere - 1 unit in length should do it. Then extrude the curve along that line curve. Finally split the extruded surface with the sphere using SplitBrep. Delete what you don't want.

 -- Dale

I figured I would have to resort to something like that, I wanted to avoid having to split than determine the exterior as much as possible. Ideally I would just create the portion of the sphere without cutting up a full sphere but I guess that was just asking for too much. I don't suppose TrimBrep would work? I tried it in another task and it simply deleted the objects behind the normal direction of the cutting object but I am not sure there is a way to consistently delete the exterior of the curve after extrusion no matter the orientation or position of the point and semi-cylinder.

Another question while I was working with the network surface technique which evidently didn't create a spherical surface, I noticed there was a tangency condition that existed. Unfortunately this tangency only existed on only one of the three curves and as a result the surface lost its spherical curvature. It might be salvageable if there was a way to force all three curves to have the tangency constraint. I am not sure if this is possible and I have yet to try the second network surface method.

I will continue my effort to create the shape but I am positive that the trimming suggested will work, although with added processing.

Thank you again,

Jesse L.

RSS

Translate

© 2014   Created by McNeel Admin.

Badges  |  Report an Issue  |  Terms of Service