Finding center curve of a tube like solid
 1-11  12-31  32-36

Previous
Next
 From:  Frenchy Pilou (PILOU)
10098.12 In reply to 10098.11 
Ok we progress but your volume is made by a Sweep or made by any other method ?

Because if it's made by a Sweep any modify of the rail (s) will made a new volume in real Time :)



If you want Control Points on the curve (rail) : Select the curve (rail), Press Tab , write Rebuild and enter number of Points wanted
Relaunch your Sweep, Move Points etc...

Ps If you Modify the Profil Start / End that will works also but only with generic transformations (move, Scale etc...)
not with a total changement like a "D" to "U" !

EDITED: 4 Jan 2021 by PILOU

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  HansChristian
10098.13 In reply to 10098.12 
The way I got to that was by following Chipp Walter tutorial on solids: https://www.youtube.com/watch?v=jQl-0waABAM

I had some minor changes that was the following: Instead of using a closed curve and thereby slicing a piece of the box out I just separated the piece. Afterwards I took it out and shelled it to remove everything but the tube like outline:

First I booleaned the box with the two open curves.



Result seen in perspective:




Part taken out but before using shell (not needed to show the point).



So I can't see any other way to do what I want than having the center points afterwards some how. I can't get the centerline from the curves because the curves doent go in depth and the box has fillets so there is also some bending after final results.

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
10098.14 In reply to 10098.1 
Hi Hans, sorry no there isn't any tool in MoI for calculating a centerline curve like that from an arbitrary tube-like shaped object.

I'm not really sure how that could be calculated.

re:
> I know it is mathematically possible to get the center or centroid of a surface but is there a function or
> way to do it in Moi or get the same result with another approach?

Yes getting the centroid of a surface is doable but for the case you are asking about you don't have a set of surfaces yet. Just finding the set of surfaces for cross sections of your shape is going to be difficult to do already.

There is a thing called the "straight skeleton" of a 2D polygon shape which is a type of centerline.
https://en.wikipedia.org/wiki/Straight_skeleton
I guess there may be some corresponding thing for a polyhedron as well. I'm not familiar with the details of the current research in this area myself though.


re:
> The result I'm after is something like the following - I want to keep the shape of the curve but have a
> different surface and swap the new solid with the old one:

Sorry I'm not really understanding what the end goal is here. Do you want the tube to slice away additional area of base solid to extend the cut out area?

Or is the tube going to sit on top of the solid like as if you put a line of grout squeezed onto it or something like that?


- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
10098.15 In reply to 10098.13 
Take a look here : https://moi3d.com/forum/index.php?webtag=MOI&msg=8847.20
it was a variation of the Chipp Walters trick ! ;)

Maybe you will obtain the result you want without use a middle curve! :)
---
Pilou
Is beautiful that please without concept!
My Moi French Site My Gallery My MagicaVoxel Gallery
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Phiro
10098.16 
Hi,

Is this result you wanted ?




Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  renklint
10098.17 
In Grasshopper for Rhino it is possible to get section frames, instersect them with the solid, get the centroids and connect them to a curve.





  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  HansChristian
10098.18 In reply to 10098.16 
Hi Phiro

Yes more or less. How did you do that? Manually?
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  HansChristian
10098.19 In reply to 10098.15 
Hi Pilou
It's looks very nice I must say :-). I'm not sure that this would solve the problem in general if the cut out shape is formed by fillets/bevels. I would also like to be able to shape the surface afterwards. For example change the surface from a tube to a more elipse-like shape.

Anyway I can get some inspiration and tricks for Moi in general from you and others in that thread. Thanks!
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  HansChristian
10098.20 In reply to 10098.17 
Hi renklint

That looks very interesting. Seems like exactly what I want if I understand it correctly. I have Rhino also (of course as a supplement to Moi ;-) ).

The accuracy of the center curve must be a function of the number of "section frames". When zooming in it looks like a very precise approximation.

Thanks a lot. Do you happend to know where to read more about this?


Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
10098.21 In reply to 10098.20 
If it's a GrassHopper fonction, maybe you can make the same with Elephant by Max SMirnov
but that is a little time consuming for elaborate that! :)
---
Pilou
Is beautiful that please without concept!
My Moi French Site My Gallery My MagicaVoxel Gallery
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Phiro
10098.22 
We have two methods.

For your special case, after cutting the cube (but it's optional to cut it), you could simply sweep a circle with the edge (created by the cutting) as the rail.
Why it is optional to cut ? if you use the function Curve/Project, you could create the rail withut cutting.

The second method is for to find the center curve.
You could use two opposite edges, then you loft between these two curves to have a surface.
Then with the ISO function, you have a center curve as you wanted.

I will post the file with step by step.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Phiro
10098.23 
The file with step by step...





  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  renklint
10098.24 In reply to 10098.20 
It follows your idea. But I don't think you need Grasshopper, Phiros step-by-step guide is excellent!
If you want to try out Grasshopper I post the .gh-file here.
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
10098.25 
Something i don't understand

A simple circle by 3 points taken on the cubic "tube" Sweeping on a internal perimeter is not sufficient ?

And you can adjust the radius/diameter of the final tube in real time at the end after the sweep...

---
Pilou
Is beautiful that please without concept!
My Moi French Site My Gallery My MagicaVoxel Gallery
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  HansChristian
10098.26 In reply to 10098.23 
Phiro:
Thank you very much for your efforts. I really appreciate it. It looks like a very smart way.
I probably need to get it spelled out though sorry :-/. I'm still pretty new in Moi.

In step two - what did you do? Did you join those connected edges and copy them so you have the next step? Did you choose those because together they seemed to be the best approximation for at surface going through the center line?





In the step after you just make a loft it seems when I replicate. In the step after that do you do an offset to make that midpoint line? And the final step why didnt you just make a sweep? But maybe you did?

Again thank you very much.


Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  HansChristian
10098.27 In reply to 10098.24 
renklint: Thanks a lot. I will look into it. If the beginning solid shape is more complicated I don't think its possible to do in any other way so still probably good to know that function.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  HansChristian
10098.28 In reply to 10098.25 
Pilou: I dont know if I understand you correctly but in the meantime before I got all those great suggestions/solutions i tried to do something more like Phiro did. Not as sophisticated but anyway.
First I took one of the selected curves he made. Then I made a sweep:













Is that what you mean is good enough? I agree that its definitely close to acceptable.
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  HansChristian
10098.29 In reply to 10098.14 
Hi Michael

Sorry for my late answer. I wanted to wait with a reply until I gained a little bit more knowledge in general.

Even though I still don't think I understand why there is no surface like you stated?

For a calculation of the center curve I am thinking of first slicing the tube/solid/shape in little pieces. Then find the midpoint for each piece by integration. Then connect the midpoints to a single center curve and finally smooth out the edges if need by some smooth algorithm.

The smaller pieces (and thereby larger amounts) the better approximation for the curve. And of course calculation and processor time will increase:

Example with tube and cuts.








I briefly checked the skeleton about dividing the surface into minor shapes. I might have to dig deeper into this.


>Sorry I'm not really understanding what the end goal is here. Do you want the tube to slice away additional area of base solid to extend the cut out area?

<Or is the tube going to sit on top of the solid like as if you put a line of grout squeezed onto it or something like that?

Yes exactly - well a bit of both. My idea is that I can cut out an interesting shape and then change the surface on that shape. For example it could be some kind of wall design where the wall goes "in and out". Along the wall there could be a cut out for wires. The cut out could come from a curve and there after the wire gets put in the hole.

It could also be to slice additional area as you suggested and then put a wire in that fit that cut (the same wire).



Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Phiro
10098.30 In reply to 10098.25 
@Pilou

>>> A simple circle by 3 points taken on the cubic "tube" Sweeping on a internal perimeter is not sufficient ?
>>> And you can adjust the radius/diameter of the final tube in real time at the end after the sweep...

I think, because of the cutting made in the problem presented, the cubic tube don't have a regular section square.
So it doesn't match .

When I tested it, it didn't match.
I tested a double rail too, and the size if circle was not regular.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
10098.31 In reply to 10098.29 
Hi Hans,

re:
> Even though I still don't think I understand why there is no surface like you stated?

I meant that in your post you showed this:


Were those meant to be planar cross-section surfaces? Those are the ones you don't have in your .3dm file. But it sounds like there is a Grasshopper method to generate those for you automatically?


> For a calculation of the center curve I am thinking of first slicing the tube/solid/shape in little pieces.
> Then find the midpoint for each piece by integration. Then connect the midpoints to a single center
> curve and finally smooth out the edges if need by some smooth algorithm.

Sounds good - I thought that you were asking for a fully automated calculation.


> Yes exactly - well a bit of both. My idea is that I can cut out an interesting shape and then change the surface on that shape

Ok, but to get a tube like that another approach that would be simpler could be to project just one curve onto your solid and then sweep with that rather than cutting out a channel with 2 curves:

For example, just one profile curve:



Construct > Curve >Project to project it onto the solid:



Construct > Sweep using the projected curve as the rail curve for a one-rail sweep:



- Michael

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
Show messages:  1-11  12-31  32-36