[Plugin] Simple Loft alpha 0.1b -- UPDATED May-15-09

Re: [Plugin] Simple Loft alpha 0.1b -- UPDATED May-15-09

Postby abspandey » Tue May 19, 2009 7:44 am

works perfectly now. Thanks a ton....!
0

abspandey 
 

Re: [Plugin] Simple Loft alpha 0.1b -- UPDATED May-15-09

Postby abspandey » Tue May 19, 2009 7:48 am

another query...uve already mentioned that the number of nodes in the different curves needs to be the same... is there a way to change the number of nodes in a curve to match the other ?
Thanks
A
0

abspandey 
 

Re: [Plugin] Simple Loft alpha 0.1b -- UPDATED May-15-09

Postby fakircho » Tue May 19, 2009 1:52 pm

Thanks man, have only been waiting for this for like 5 years :D
It is a very good start and i am looking forward to this becoming a real loft tool.

Thanks again!
0

fakircho 
 

Re: [Plugin] Simple Loft alpha 0.1b -- UPDATED May-15-09

Postby Chris Fullmer » Tue May 19, 2009 5:56 pm

@abspandey - glad its working now. Check back regularly or in a few days or something. I'm working on making it work with splines of different segment lengths, but currently its still a little buggy. It works about 90% of the time, but that 10% has been difficult to pin down. So once I get it debugged, I'll post the working version. And that will hopefully be in a few days.

@fakircho - Glad you like it. and yes, its just a simple loft tool for now. I have some VERY big plans for it, assuming a find some VERY big chunks of time in my life to devote to it. So hopefully over the next year or so I'll get a full version released. But I make no promises.

Chris
0
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer 
SketchUp Team
SketchUp Team
 

Re: [Plugin] Simple Loft alpha 0.1b -- UPDATED May-15-09

Postby AcesHigh » Tue May 19, 2009 9:14 pm

Chris Fullmer wrote:So hopefully over the next year or so I'll get a full version released. But I make no promises.

Chris


you mean... by 2010???? :cry: :cry:

and I was thinking it would be like... next month...
0

AcesHigh 
 

Re: [Plugin] Simple Loft alpha 0.1b -- UPDATED May-15-09

Postby remus » Tue May 19, 2009 9:16 pm

Theyre very time consuming things, these ruby scripts.
0

remus 
 

Re: [Plugin] Simple Loft alpha 0.1b -- UPDATED May-15-09

Postby Chris Fullmer » Wed May 20, 2009 4:10 am

If I had your math brain Remus, it might be easier. And in fact, what I have in mind to implement should simplify some of the script, while exponenetially increasing the "awesomeness" of it. But seriously, I have to learn some math first.

And I'm sorry I haven't released the version that accepts splines of any amount of segments. Its still being worked on.....grrrr

Chris
0
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer 
SketchUp Team
SketchUp Team
 

Re: [Plugin] Simple Loft alpha 0.1b -- UPDATED May-15-09

Postby pr0 » Wed May 20, 2009 5:42 am

Guys, don't know what to tell you, the combination of working plugins by the community especially this one!! and the free transform 2 tools make sketchup more powerful than 3ds max and hopefully soon even rhino. I can't believe it, thanks alot!
0

pr0 
 

Re: [Plugin] Simple Loft alpha 0.1b -- UPDATED May-15-09

Postby thomthom » Wed May 20, 2009 7:24 am

Chris Fullmer wrote:If I had your math brain Remus, it might be easier.

Theehee! I just had an image of me and Chris as zombies drooling over Remus' brain. Braaaaaaain! Maaaath-Braaaaaaain!
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Simple Loft alpha 0.1b -- UPDATED May-15-09

Postby silver_shadow » Wed May 20, 2009 8:54 am

Great stuff
What you should look at is this.
Can you try to let the plugin look for the highest amount of divisions in the selection, say you have 3 curves.
one has 25 divisions the next one has 10 and the third one has 6. Now instead of going manually of dividing those other curves to 25 divisions, it should re divide those other curves to match the 25 which is the most.

or

can someone make a plugin that recognizes a welded line and re divide it. on second thought..its kind of an impossible one request lol

Pretty cool plugin i must say.
0

silver_shadow 
 

Re: [Plugin] Simple Loft alpha 0.1b -- UPDATED May-15-09

Postby pibuz » Wed May 20, 2009 10:41 am

Thank you Chris.
This is simply amazing. You're really turning Sketchy into a professional tool.

The version Google releases should be called "Google almost-Pro"... :roll:

GREAT WORK!
0

pibuz 
 

Re: [Plugin] Simple Loft alpha 0.1b -- UPDATED May-15-09

Postby TIG » Wed May 20, 2009 2:18 pm

My thinking for joining curves with unequal numbers of edges is this:
[list]Let's say curve1 has 3 edges and curve2 has 4 edges
Split (divide) each of curve1's edges into 4 equal bits
Split (divide) each of curve2's edges into 3 equal bits
Taking the pairs of vertices for curve1 and curve2 starting at the same end (find curve1's ends and then pair curve2 start with the nearer of curve1's ends) make edges between the vertices pairs, make diagonals between pairs with one offset so face is triangulated...
Use find_faces on the edges and you should now have a form
Smooth and erase coplanar edges...
HandStichedCurves.jpg
0
Last edited by TIG on Thu May 21, 2009 9:41 am, edited 1 time in total.
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Simple Loft alpha 0.1b -- UPDATED May-15-09

Postby Chris Fullmer » Wed May 20, 2009 4:59 pm

Thanks everyone! Silver, that is what my first idea was, but when I got into programming it, but then I decided to make each spline transpose its endpoints onto each other line. Its has a few added benefits, but its essentially the same idea. And I've got it working.

Tig, I think what I've done is similar to what you're showing there - except I have not got it erasing coplanar faces yet. This new overkill method of adding segments is creating so much more geometry than before that it is becoming VERY slow. Checking for coplanar faces at this point might not be desirable.

So its working with varying segments counts. Just every once in a while, it will encounter something that will break it. And I haven't quite put my finger on what the problem is. Because I've done some very complex shapes that work, then I'll try something more simple and it won't work. And I play around with it and determine it to be one of the splines will crash it for no apparent reason. So once I figure that out, I'll release it. With a sweet new icon from Free Agent!

Chris
0
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer 
SketchUp Team
SketchUp Team
 

Re: [Plugin] Simple Loft alpha 0.1b -- UPDATED May-15-09

Postby TIG » Wed May 20, 2009 5:45 pm

Deleting coplanar edges is relatively quick - it just sorts the edges that are dispensable...
Code: Select all
### assumes you have made the faces and now have an array of these new edges called 'edges' - that's all that needs checking.
edges.each{|e|
  if e.faces.length == 0 ### for some reason it hasn't faced !!!
    e.erase! if e.valid?
  elsif e.faces.length == 2
    if (e.faces[0].normal == e.faces[1].normal or e.faces[0].normal == Geom::Vector3d.linear_combination(-1,e.faces[1].normal,1,[0,0,0])) and e.faces[0].material == e.faces[1].material
      ### you'll probably not need the material check, as it's all new stuff, but it's useful generally so that materials' dividing coplanar edges aren't removed...
      e.erase! if e.valid?
    end
  end
}

Quickest way without 'a safety-net' is...
Code: Select all
edges.each|e|e.erase! if e.valid? and e.faces.length==2 and (e.faces[0].normal==e.faces[1].normal or e.faces[0].normal==Geom::Vector3d.linear_combination(-1,e.faces[1].normal,1,[0,0,0]))
###
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Simple Loft alpha 0.1b -- UPDATED May-15-09

Postby AcesHigh » Wed May 20, 2009 6:07 pm

You ruby geniuses should work together in creating ruby awesomeness... speeding up plugin creation... you know... like a softhouse... haha, I have no idea on the workflow of writing rubies, I am just daydreaming :)
0

AcesHigh 
 

Re: [Plugin] Simple Loft alpha 0.1b -- UPDATED May-15-09

Postby mike d » Wed May 20, 2009 6:49 pm

funky pumpkin.jpg
0
The grass is always GREENER on the roof.

mike d 
 

Re: [Plugin] Simple Loft alpha 0.1b -- UPDATED May-15-09

Postby modelhead » Wed May 20, 2009 7:36 pm

I'm going to buy you a pint sometime if I don't get fired for playing with your tools all day. Great tool for hull construction...and I guess a million other things.
Once again, can't thank you enough!
0

modelhead 
 

Re: [Plugin] Simple Loft alpha 0.1b -- UPDATED May-15-09

Postby driven » Thu May 21, 2009 7:13 am

Hi Chris,

I've been having real problems trying to download this for hours, do I need special permissions for your stuff?

I can download everything else I've tried today?

cheers
john
0
learn from the mistakes of others, you may not live long enough to make them all yourself...

driven 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Simple Loft alpha 0.1b -- UPDATED May-15-09

Postby Chris Fullmer » Thu May 21, 2009 3:51 pm

Nope John, my stuff is just the same as everyone else'e. I don't know why it doesn't ever seem to work for you. If you don't get it downloaded, I can email you a copy later.

Chris
0
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer 
SketchUp Team
SketchUp Team
 

Re: [Plugin] Simple Loft alpha 0.1b -- UPDATED May-15-09

Postby driven » Thu May 21, 2009 4:38 pm

Still no joy, tried all sort of things from this end, so if you can forward that's great,

I took advantage of selectbylength with xformclone to make a quick, low poly candy-stripe pole and then animate it spinning..link over on that topic..

cheers

john
0
learn from the mistakes of others, you may not live long enough to make them all yourself...

driven 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Simple Loft alpha 0.1b -- UPDATED May-15-09

Postby ideas_arte » Sun May 24, 2009 9:36 am

:berserk: :berserk: :berserk:

incredible…. a million thanks..!

:ecstatic: :ecstatic: :ecstatic:
0

ideas_arte 
 

Re: [Plugin] Simple Loft alpha 0.1b -- UPDATED May-15-09

Postby utiler » Mon May 25, 2009 1:04 am

This looks like a tutorial subject.....
RoomDivider-SangHoonKim.jpg

http://www.contemporist.com/2009/05/23/ ... -hoon-kim/
0
purpose/expression/purpose/....
User avatar
utiler 
Top SketchUcator
 

Re: [Plugin] Simple Loft alpha 0.1b -- UPDATED May-15-09

Postby August » Mon May 25, 2009 7:33 am

Hi Chris,

Echoing everyone else: Sweet tool!

I have some questions based on the sample video and other examples that folks have posted. The feeling I keep getting is that for any set of curves, there is a range of possible solutions that could be the desired result from those curves and it's not clear how the tool decides what to do.

Certainly, like making a Raku pot, one can just keep trying until something nice results, but this algorithm is not random and it would be nice to have an idea of the parameters to be able to predict what the results might be like in a broad sense.

You seem to be making some assumptions about the angle of the surface as it meets the curves. For instance, in the video, you show two curves first connected by 1 segments, resulting in lines, then connected by 10 segments, resulting in Bezier curves. In that example, it looks as if the tool attempts to have the Bezier curves perpendicular (Blue-parallel) at their ends, but other examples where the curves are a bit more staggered in their alignment, the ends of the Beziers are clearly at an angle.

How is that angle determined? There is clearly something a bit complex going on.

In the example with the pleated curtain top and the simple curve at the bottom, when you introduce the middle curve, the surface goes down from the pleats and meets the middle curve smoothly and then in the lower half the pleats reappear and disappear again by the time the surface reaches the bottom curve.

Personally, I would not have predicted from any of the previous examples that the pleats would reappear in the bottom half. But they do, and clearly that is a result of the angle assumptions that you are making. Might there be settings that would restrict the pleats to only appear in the top half, or is the connection in the lower half between the two non-pleated curves likely to be always pleated because the top half is pleated?

The pleats also seem to ripple in the alternate direction from the top half, again because of some assumptions of smoothness and angles being "transmitted" across the middle curve. If there were two intermediate curves, would the middle section have pleats opposite the top section and the bottom section have pleats pointing the same way as the top? From what I see, I think so.

The result of this transmission of the pleating across the smooth curve makes the result seem more like the folds of a bamboo or reed mat or curtain rather than fabric. Fabric would never have those reverse pleats but a bamboo mat, by it's having more stiffness in one direction than the other, would certainly "transmit" the pleats across the middle curve.

This also gets to the heart of a question that was raised about joining two surfaces as an alternative to using closed curves. On 5/15, watkins posted an image of a bowl or flange shape (Full Bowl) that had circular top and and bottom and about 5 hours later showed the results of trying to use half circles to create the same shape. (Half bowl) As watkins said, "The edges are not suitable for joining."

Would the half-bowl be suitable for joining if straight extensions were added to each end of each half-circle curve and then the last column of facets deleted after generating the loft surface? Always? Only under certain circumstances?

Whether it is always or only sometimes depends on the details of what the algorithm is doing, the assumptions it makes about how it positions the Bezier curves and the angles with which those curves meet the original curves. That is what I'm asking about.

Can you clarify?

I hope this helps,
August
0
“An idea, like a ghost, must be spoken to a little before it will explain itself.”
-- Charles Dickens

August 
 

Re: [Plugin] Simple Loft alpha 0.1b -- UPDATED May-15-09

Postby Chris Fullmer » Mon May 25, 2009 8:25 am

August wrote:it's not clear how the tool decides what to do

Perfect, its a trade secret!

Just kidding. I'll try to explain the process I wen through to get the curves working how they are. This should clear up a few things.

The curves I use are bezier curves. You'll need to think of each curve as 4 points, much like Adobe's pen tool. A start point, a start handle, an end point and a handle for the endpoint.

With just 2 splines, I take the centerpoint of each collective spline. Then get the vector between those 2 centerpoints. That is the vector I use on each vertex to find the handle point - just follow the vector 1/2 the distance to the other point that the curve will connect to.

Hmm, it all sounds more complex than it is. I probably will have to do a video to show the workings of it.

I can also say that the reason that the version with 1 segment does not have a curve is that, well, it does have a curve. Its still using the curve calculation, but its only finding the first and last point and drawing straight lines between them. So you can't see any of the curve. If you choose 2 segments and then do it again useing 10 segments, you'll see that the middle point that is created on the 2 segment version will match the middle point on the 10 segment curve.

I'm sure that doesn't answer all the questions. But I'm also not entirely sure what all the questions are. Do you just want to understand how the curves are working? THat is what I think you're asking. I'll just have to do a video to explain that I think. I'll see if I can get one done in the next few days.

Chris
0
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer 
SketchUp Team
SketchUp Team
 

Re: [Plugin] Simple Loft alpha 0.1b -- UPDATED May-15-09

Postby erikB » Mon May 25, 2009 10:43 am

great tool !!
Thanks chris
0
User avatar
erikB 
 

Re: [Plugin] Simple Loft alpha 0.1b -- UPDATED May-15-09

Postby pr0 » Mon May 25, 2009 3:37 pm

Hey guys, i was posted this on the main forum but no one seems to know or want to answer, or maybe this was asked before. But is it possible to offset a 3d Bezier curve? i.e. one that goes into the z axis?
0

pr0 
 

Re: [Plugin] Simple Loft alpha 0.1b -- UPDATED May-15-09

Postby thomthom » Mon May 25, 2009 3:41 pm

pr0 wrote:Hey guys, i was posted this on the main forum but no one seems to know or want to answer, or maybe this was asked before. But is it possible to offset a 3d Bezier curve? i.e. one that goes into the z axis?

It's best to create a separate thread on this. (Sorry, don't have an answer for your question.)
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Simple Loft alpha 0.1b -- UPDATED May-15-09

Postby Chris Fullmer » Mon May 25, 2009 5:24 pm

His original post is here:

viewtopic.php?f=180&t=19327&start=0&st=0&sk=t&sd=a

I've responded (well, just asking for clarification).

Thanks everyone else for the comments.

Chris
0
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer 
SketchUp Team
SketchUp Team
 

Re: [Plugin] Simple Loft alpha 0.1b -- UPDATED May-15-09

Postby August » Mon May 25, 2009 9:05 pm

Chris Fullmer wrote:With just 2 splines, I take the centerpoint of each collective spline. Then get the vector between those 2 centerpoints. That is the vector I use on each vertex to find the handle point - just follow the vector 1/2 the distance to the other point that the curve will connect to.

Hmm. First, terminology: The splines are the starting curves and the Beziers are the curves that connect the vertexes of those starting curves. Right?

(An aside, what is a "loft"? Is that a standard term? Where does it come from? Is is meant to convey an image of a sail filled with wind or a bedsheet settling down after you've fluffed it in the air? If so, then fabric metaphors rule and the bamboo-mat, reversed pleats glitch.)

So, you find the centerpoint of each collective spline. One point for the top spline and one point for the bottom spline. I'm assuming not the center vertex but the geometrical center of the extents of the spline, right?

A vector between them. A line from the geometrical center of one spline to the geometrical center of the other, then half that distance to create top and bottom vectors. Then those half-vectors are applied to each point on each of the splines and a Bezier generated between them, with those half-vectors determining the angle at which the Bezier curves connect to that splines, top an bottom.

OK, that was one question, the attachment angles.

That explains why the half circles don't generate edges that will join with other half circles. The centerpoint of each half-circle spline is not the center of the arc, it it offset, so the Beziers at the ends of each spline start at each end with an inward tilt, even if all four endpoints of the splines are coplanar. Knowing that should also give the solution to the half-circle joining problem. Extend the ends of arcs with lines until the center of the arc-plus-lines spline lands at the center of the arc.

I probably will have to do a video to show the workings of it.

Not needed for me. But, like with the "bug" about not being able to join half-circle lofts, knowing what it is doing internally can help solve problems.

Chris Fullmer wrote:I'm sure that doesn't answer all the questions. ... Do you just want to understand how the curves are working?

I'm looking for explanations of the behaviors that don't match my expectations. The half circles not generating edges that could join is one. I think I've got that one, including a work-around.

The other is the three-spline example with all the pleats in the top spline. The pleats "transmit" from the top half to the bottom half while being exactly gone when the surface passes through the middle spline. That is really counter intuitive to me, from the perspective of what you appear to be trying to do. So it falls in the category of a "bug" to me. Not one that stops the tool from performing, but one that generates slightly undesirable results.

The fact that the pleats are gone at the middle spline and reappear, reversed, in the bottom half is indeed explained. You are generating Beziers that run from the top through the middle to the bottom, and each Bezier has four vectors, top, two in the middle, and bottom, that all have identical angles. The path of each Bezier as it passes through the middle is affected by the offset of the pleats and thus transmits that pleating to the bottom half.

All explained, it is indeed doing what you told it to do. No bugs there. But is that the result you actually desired, or did you stop there because the results were pretty?

What I'm getting at is that I think the reversed pleats are somehow wrong. One alternative would be to have no pleats in the bottom half, with the center spline essentially forcing an end to the pleats, but I think that's not right either.

Personally, in the pleats example, I would rather have the center spline modify the path but not force the surface to go exactly through it because that forces the pleats to disappear and reappear reversed, which just looks wrong to me. And I assume it is not an effect that people will be actually trying for very often. The tool generates pretty results and I think people would not encounter that "bug" very often and would ignore it when they do, but it still strikes me as somehow wrong.

I think where I'm leading to is to have the top and bottom be absolutes and have middle splines be guides, not necessarily exact matches. If the middle spline modified the path of what you would get without it, but without forcing an absolute match at that place, I think the feel of using the tool would be more "organic" and the results more like what I think people would expect. I think my desired result in that example would be to have the pleats continue through the middle spline without going to zero and without reversing, but with that spline having an influence on the flow of the pleats.

Maybe I'm looking for the vertexes of the middle spline to act more like Bezier control points rather than absolute vertexes.

Maybe you find the Bezier curve center (inflection point?) between the top and the bottom and then deflect that toward the corresponding point in the middle control spline. Where there is only one control spline, you deflect it half way between? When there are two control curves, you deflect each Bezier inflection point by 1/3 from the control spline point towards the no-controls Bezier point? Or maybe a slider could adjust the influence of the intermediate control splines from zero to absolute. At zero, it would be as if there were no intermediate curves and at 100 you would get the current effect, including the forced alignment to the curve and the pleat flipping.

Personally, since I asked the question that you were suggesting you answer with a video, I'd rather you spend the time trying my slider idea than making a video. But it's your project.

I hope this helps,
August
0
“An idea, like a ghost, must be spoken to a little before it will explain itself.”
-- Charles Dickens

August 
 

Re: [Plugin] Simple Loft alpha 0.1b -- UPDATED May-15-09

Postby driven » Wed May 27, 2009 3:19 am

hi Chris,

it's blitzing the mac, was ok for three or four hours, giving some extremely curious versions of what I'm trying to achieve.

basically it's an accurate thread-form (basic ring), something I've never found a SU solution for

on one attempt it did a lovely job set on 2, but the decided to try 6 instead of the 4 bezier splines to add extra detail and improve the stack ability and end finishing.....

so I deleted that one, built a new spline jig and loft started crashing out SU, I checked everything else, and it's fine now loft is removed so I used skin in 6 separate goes to show what I'm trying to do and attach the skp with the spline set, the spline jig, and the skinned version if any one want's to see if it works on there set-up (a mac maybe...)

the over lap gap is very close, so it's best to select splines well clear of them...

UPDATE.. I found I had save the Setting 2 loft in another drawing, but it locks out any new or old drawing I try to open it in, so a screen shot has it buried in a tube...

the reason I'm trying to do this is the follow me tool twists the thread shape even on a single quadrant.

machine threads, springs and candi-stripes are are good test if of accuracy of lathe type tools..

I do like your stuff, keep up the good work.... please

john
0
learn from the mistakes of others, you may not live long enough to make them all yourself...

driven 
PluginStore Author
PluginStore Author
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

PreviousNext


 

Return to Plugins

Who is online

Users browsing this forum: adelkorozia, Dave R and 13 guests

Visit our sponsors: