Problem with rebuilding the copy of a surface

Hi everyone. I’m trying to create a grasshopper code by which a user can manipulate the surface of a yacht or ship. I want to let users:

  1. extend the length by extruding the mid section linearly
  2. scale non uniformally the fore part of the surface (based on x axis direction) starting at a user selected section
  3. select 3 sections and manipulate the section curves and rebuild the surface automatically

Yacht form will be set manually at the beginning, along x axis, and the sections will be taken through y axis. At the end of the progress i need to take user defined amount of equivalent spaced sections through both x and y axises and then transfer the point coordinates which will be obtained from the intersection points of section curves to another program and calculate the resistance of the new manipulated ship hull form.

The problem starts when i want to trim and split the surfaces. After splitting or trimming, grasshopper shows the trimmed or splitted surfaces but (i guess) it still recognizes the main surface which is the one before the trim/split progress. Because when i want to obtain the surface points, it shows me the main surface’s points while the command is connected to a half surface.

So i wanted to create and add a surface rebuild component after every trim/split step, so i can have a one-piece newly defined solid surface and keep on with it. I tried to get this done this way:

  1. create equivalent spaced lines which match with the maximum length of the surface on both x and y axises seperately.
  2. project these curves onto the surface and obtain the network curves.
  3. Try to form a new surface using these curves, by using network surface

Then i got some really bad formed shapes, and tried patch and loft components to obtain the new surface but the result is still the same.

If you can offer any other methods for obtaining the trimmed/splitted surface as a one-piece surface, or a better way to produce a new surface, i would appreciate that.

I’m adding the hull surface which i am using right now, and my grasshopper code. Just set the surface in rhino folder to the first two simple surface commands at grasshopper code to run it. Thank you.

GhSrff.gh (30.7 KB)
Tez basis1.3dm (62.5 KB)

Well … I’m not sure that you date the right girl on that matter (lot’s of reasons, the main: R is just a surface modeller). On the other hand people indeed use R for hull design (up to some level).

Anyway I have a variety of C++/C# stuff that do a variety of things for speed boats (NOT sail boats: I hate them). I could port some simple (derestricted) examples for R/GH (they are used in Generative Components and/or CATIA/Siemens NX). But If you don’t speak some similar language what could be the usage of any of them?

BTW: If you are familiar with 3D PDF tech (dead by now: just another BIG Adobe mistake) amuse yourself with the attached stuff (DO NOT attempt to read these with some client in your e-mail app: Load the latest Adobe Reader DS and then open the file ).

171_hull-hull-011.pdf (4.6 MB)

171_hull-hull-008.pdf (968.4 KB)

1 Like

Hate is a path to the dark side. But you know that, right?:grinning:

@caganpekkucuk, you might wanna try the ‘contour’ command(in Rhino) and I believe there is a component with the same name in Grasshopper. That will give you the curves (sections) you need.

Just out of curiosity, what software are you planning to use for the resistance prediction?

The only side is the Dark Side - with some Devil Red spots (BTW: That’s a thing that I do like).

That is done with Catia v5.

Hello, do you want something like this?

No, Tom, for most power/resistance prediction software up to 3 groups of intersections are required all parallel to the main planes XY, YZ and XZ. Called respectively Waterlines, Frames, Buttocks.

That is if I got it right :wink:

He is describing that GH Split is what’s in Rhino known as “Trim”.

that’s what I did not really understand. What’s a solid surface?

I understand here that he is complaining that split actually is not splitting the surface but masking it (just like Rhino trim does). A true surface split would do something like my example shows and return an untrimmed surface patch.

Never mind anyway…

Off topic: Every time I see a screenshot from you I wonder what your wire colors mean. Do they have some meaning or just random? Either way I like them.

This:

But who wants a sailboat? To do what? (try windsurfing: 500% faster).




1 Like

I think he’s confused tries to use trim for getting intersection curves

I think you’re wrong Peter, I think he meant a solid created by closing the Ship’s Hull. Such that you can measure the volume enclosed by the surface for further calculations.

Not a thickened plate, Thickened plate is useless in Ship Initial Design (even Basic design) stage

I think that I’m wrong. But that’s not a “solid Surface” by any means.

It is in Naval Architect’s lingo/slang :wink:

do you mean the cp polygon or the wires between the components?

GH Wires: It currently creates random blue-greenish colours between each component based on their relative position in the canvas. I coloured them in order to distinguish wires on spaghetti definitions. Since this is based on a difficult hack, I couldn‘t make them component specific. If you like, I‘ll post if I find time. I‘ll need to comment, since it works in unsafe mode.

CP Polygon: 2 colours for u and v, you might also see the little arrow indicating u, v direction.
Quite useful to immediately control surface directions and cp distribution. Its not that difficult to implement.

I meant the wires. You can post if you want but I don’t need them :smiley: was just curious if you devised some cool color coded wire logic. Also, is that a secret AST update in the works I see :wink: ?

Wires: Actually the hack is quite interesting since it allows you to modify grasshopper on runtime, by basically replacing class methods. In combination with a decompiler this allows to tweak almost every method unless this method accesses another classmember or if it needs refernces from outside. But especially static methods are replacable. You could do a lot of funny stuff with it, unfortunately replacing wires or disabling cluster passwords are the only two useful things I did with it… :wink:

No this is still AsTools when I stopped working on it, 2 years ago. I use it for my daily work, but its not finished and probably never will. Too many bugs, wrong audience. If I work on it again, I will start from scratch, limit functionality but decrease bugs. I learned a lot about defensive programming, algorithms, Nurbs and other stuff during the last 2 years. Or I will do something with broader application. Bezier modelling definitely is not🙄

1 Like

What is this for?

:thinking: did you have problems with crackers? You who introduced me to ilspy :smile:?

Surface tools, such as blending, matching, fillets, real trimming, flanges (taper), approximation (fitting), extrapolation, crowning, analysis. The public release I released (and deleted) only worked with Bezier surfaces. The Unofficial version can deal with rational and even periodic Nurbs. But since I coded it on the lowest level, complexity soon became to high for a hobby project not to speak of all the bugs. That’s why I stopped working on it.In addition Bezier modelling is more an automotive thing, so complains started: What is this good for and why can’t I input my 30 x 300 Nurbspatch I usually do?

Defensive programming is about creating reliable software. Reducing bugs to a minimum, due to mechanisms like oop, unit testing,documentation and error awareness . Its quite a complex topic. The mindset is the following. No software is bugfree, and as a concequence every line of code needs to be proven. There are some good tutorials out there, even on YouTube. I starting learning about it when diving in to plain C. But its language independent knowledge.

Defensive programming includes secure programming, which deals with security issues as well. If you think like a hacker you can protect better. When working in development department, like I do this should be a concern as well (most people still don’t care or are aware of it at all)