[Plugin] Extrude Edges by Rails

[Plugin] Extrude Edges by Rails

Postby TIG » Mon Nov 16, 2009 10:18 pm

The tool has been optimized and improved to use a 'melding-profile' at the end if desired...
It has various glitches fixed and a new combined Toolbar...

    Copyright 2009/2011 (c), TIG
    All Rights Reserved.
    THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
    WARRANTIES,INCLUDING,WITHOUT LIMITATION,THE IMPLIED WARRANTIES OF
    MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
    ###
    extrudeEdgesByRails.rb
    ###
    Extrudes an 'initial-profile' curve along one or two other 'rail'
    curves to form a faced-mesh group, a final 'melding-profile' curve
    option can control the mesh's final form.
    ###
    Usage:
    Make 2, 3 or 4 'curves' (Arcs/Beziers/PolyLines/Welded-Edges etc).
    These will represent the 'Initial-Profile', the first 'Rail',
    the second 'Rail' and the 'Melding-Profile' - these last two
    curves are optional - see below...
    The 'Initial-Profile' should share a common end vertex with each of
    the 'Rails': but if it doesn't it will be scaled to fit between
    these Rails and that might then have unexpected results...
    If you pick Rail-1 and then click on it again it will be used as
    Rail-2***, as if it were at the other end of the Initial-Profile.
    Then you are asked for the 'Melding-Profile': you can pick on
    the 'Initial-Profile' again to form a simpler mesh from just
    that one Curve, with it being proportionally scaled and rotated
    at each of the Rails' nodes - this method gives you little
    control over the rotation of the Final Profile as this is
    calculated to rules automatically derived from the Rails'
    relative node positions etc: however, if you pick on a
    different Curve [note that it can't be one of the Rails] that
    will then be used for the Final Profile at the Rails' end nodes;
    so using a 'Melding-Profile' like this means that all of the
    intermediate Profiles will have a proportional 'melding'
    between the 'Initial-Profile' and the [Final] 'Melding-Profile'
    along the Rails' intermediate nodes: with this method you can
    determine the 'morphing' of the Profiles along the Rails from
    an initial form to a final one, or alternatively you can use
    the same shaped 'profiles' for both, but with different
    rotations/scaling, so that you can then effectively 'lathe' a
    profile along non-circular rails and be sure that the initial
    and end profiles will be formed and located as you want them...

    Looped curves for the profile or the rails are allowed,
    but they can give unexpected results... also don't try a
    melding-profile with looped rails unless you want the unexpected!

    Run the Tool from Plugins > 'Extrude Edges by Rails'.
    or click on Toolbar 'Extrude Edges by Rails'.
    Activate this Toolbar from View > Toolbars if not loaded.
    Follow the prompts on the VCB.
    Pick the Curves in the order instructed...
    First pick the 'Initial-Profile', then pick the other two 'Rails'.
    You aren't allowed to pick the same Curve twice in this set of 3
    unless Rail-1 is also to be used as Rail-2***.
    Fourthly you pick a 'Melding-Profile', or you can pick the
    'Initial-Profile' again for a simpler mesh form without a fixed
    final-profile form etc.
    After selecting these curves it auto-runs the mesh-maker...
    A grouped triangulated mesh is made based on these curves...
    Then there are dialogs asking for Yes/No replies...
    If you want to 'reverse' rail-1's direction.
    [usful if the mesh is 'twisted', when the rails go in
    opposite directions...]
    Note that this dialog is omitted if Rail-1==Rail-2.
    If you want to 'reverse' the faces in the mesh.
    If you want to 'Quad' faces [i.e. smooth just the diagonals]
    If you want to erase any 'coplanar edges' in the mesh.
    If you want to 'intersect' the mesh with itself.
    If you want to 'smooth' the edges in the mesh.
    If you want to delete the original curves.
    You can Undo these steps individually immediately afterwards...

    NOTE:
    Multi-segmented curves increase processing time exponentially...
    ... the mesh WILL eventually be made, but the screen might
    'white out' and it might appear to stop for several minutes...
    but it is working...
    Rails/Profiles with the same number of segments/edges or with
    them as simple 'multiples' will produce the fewest facets.
    It is sensible to 'match' the segments in profiles/rails,
    otherwise a mesh can become VERY faceted or possibly uneven -
    and also it might take ages to make.
    For example, for two rails their segments for each part of a
    profile are dictated by the most segmented rail's total number:
    10 + 10 segments=10 x 2 = 20 facets
    10 + 9 segments=10 x 2 = 20 facets
    10 + 5 segments=10 x 2 = 20 facets
    10 + 2 segments=10 x 2 = 20 facets
    10 + 1 segments=10 x 2 = 20 facets
    The lesser segmented rail will always have some of its segments
    re-divided to match the more segmented rail's total number. This
    division is spaced evenly for rails that are segmented as
    multiples, but this can only approximate to 'even' otherwise...
    The same applies to the profile/melding-profile's segmentation.

    For a rail/profile that is to be 'linear' draw an Edge & Divide
    it as needed equivalent to the number of 'facets' required or to
    match its opposite rail/profile, then 'Weld' the pieces together
    into one 'straight' curve.
    If you want a single Edge as a rail/profile then make a
    single segment Polyline with BZ Tools, or make a Curve out of
    two edges [with Weld etc] and split the Curve with another
    perpendicular Edge and Erase this and the unwanted Edge in the
    Curve - then you have a Curve with a single Edge - alternatively
    Divide the Edge into two and get a seam in the mesh - you can
    always use a 'Erase-Coplanar-Edges' tool to minimize the
    divisions later or you can always add back any lost triangulation
    by using the 'Triangulate Quad Faces' tool...
    Occasionally Curves made from welded/re-welded/re-re-welded[!]/etc
    have vertices in an order that can be unexpectedly convoluted
    and create weird results - if you remake the Curve from scratch
    it should be OK. Sometimes cutting and pasting-in-place or
    grouping and exploding a problem curve can also fix it for use...
    If you want a simple circular 'Lathed' shape use 'extrudeEdgesByLathe'
    - it will give different results from 'byRails' mesh.

    Donations:
    Are welcome [by PayPal], please use 'TIGdonations.htm' in the
    ../Plugins/TIGtools/ folder.
    OR

    Version:
    1.0 20091116 First release.
    1.1 20091120 Glitch fixed with [most] ordered points.
    Can now double-click on one rail = so used as both.
    Debabelizer added, with ExtrudeEdgesbyRails.lingvo
    in TIGtools folder.
    1.2 20091210 Rotation of Profiles adjusted to Rail 2 Vertices.
    2.0 20091229 Fourth 'Melding-Profile' Curve option added.
    Segmentation algorithm improved to optimize facets
    and minimize the 'spitting' of rails/profiles.
    2.1 20100107 General speed improvements and tidying up.
    Toolbar added and Tooltip Text added to command.
    Outliner clash minimized with start+commit changes.
    Undo's step back through Smoothing, Reversing etc.
    Rare incomplete coplanar edge deletion fixed.
    Faces orientation fixed if has a flat face at zero.
    2.2 20100114 Toolbar now 'Extrusion Tools', with related Tools.
    Connected rails one-profile mesh twist glitches fixed.
    Erase coplanar edges - tolerance adjusted.
    Lingvo files updated for Toolbar text.
    French lingvo file updated [thanks to 'Pilou']
    Spanish lingvo file updated [thanks mainly to 'Defisto']
    Chinese lingvo file added [thanks to 'Arc'].
    2.3 20100121 Typo preventing Plugin Menu item working corrected.
    2.4 20100123 Minor glitch in picking order of curves resolved.
    FR lingvo file updated by Pilou.
    2.5 20100124 Menu typo glitch fixed.
    2.6 20100206 Resume VCB msg fixed.
    2.7 20100216 All extrusion-tools now in one in Plugins sub-menu.
    2.8 20100218 Rare glitch with helical rails fixed.
    2.9 20100220 Color coding of picked curves added.
    Profile=Cyan
    Rail1=Magenta
    Rail2=DarkVioletRed
    MeldingProfile=DarkCyan
    3.0 20100222 Tooltips etc now deBabelized properly.
    3.1 20100312 Erasure of original curves glitch fixed.
    3.2 20100330 Rare glitch with make_mesh/make_shell fixed.
    3.3 20111003 Quad Faces option added [smoothed diagonals].
    3.4 20111004 Quad Faces adjusted to hide diagonals too.
    3.5 20111023 Smooth now ignores edges with only one face.
    3.6 20111113 Quad Faces option adjusted to Thomthom's latest specs.

NOTE: from 20100212 the latest versions of these files is in the zipped set downloaded from here http://forums.sketchucation.com/viewtop ... 63#p217663
7
Last edited by TIG on Thu Feb 18, 2010 1:42 pm, edited 10 times in total.
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Extrude Edges by Rails

Postby Chris Fullmer » Mon Nov 16, 2009 10:33 pm

Awesome TIG, I'm excited to play with this one!

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] Extrude Edges by Rails

Postby TIG » Mon Nov 16, 2009 10:45 pm

It does resolve the issue of unequal segments in the rails (== the profiles used in 'Loft'), however, then you do need to set the 'profile' curve (which is the unchangeable 'bezier-path' pre-set in 'loft'!)...
AND if the rail segments are not equal or at least simple multiples the facets made might multiply unreasonably !!!

Feedback please... it's still a little buggy...
0
Last edited by TIG on Mon Nov 16, 2009 11:05 pm, edited 3 times in total.
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Extrude Edges by Rails

Postby Click Draw » Mon Nov 16, 2009 11:02 pm

Hi TIG,

I have one complaint. You released this on a day where I have to work!!! I wanna play..... :-). OK, I did just try it 8-). Good stuff!

Thanks very much,

Jeff
0
Have I mentioned how much of a laugh I get out of some of the Signatures on here!

Click Draw 
 

Re: [Plugin] Extrude Edges by Rails

Postby jeff hammond » Mon Nov 16, 2009 11:08 pm

wow :shock: looks awesome!
after a quick test, it appears to work very well.. i'll have more time to check it out tonight.
1
dotdotdot
User avatar
jeff hammond 
Global Moderator
 

Re: [Plugin] Extrude Edges by Rails

Postby Click Draw » Mon Nov 16, 2009 11:19 pm

Yup...same here. Not sure what's on my mind right now ;). Ahhh, who needs to work!
0
Have I mentioned how much of a laugh I get out of some of the Signatures on here!

Click Draw 
 

Re: [Plugin] Extrude Edges by Rails

Postby TIG » Mon Nov 16, 2009 11:36 pm

I hadn't foreseen the potential for softcore pornography ! :roflmao:
1
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Extrude Edges by Rails

Postby pilou » Mon Nov 16, 2009 11:39 pm

Some nurbs tools arrive in Su! :enlight: :fro:
Bravo! :thumb:
0
Frenchy Pilou
Is beautiful that please without concept!
My Little site :)
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] Extrude Edges by Rails

Postby Click Draw » Mon Nov 16, 2009 11:42 pm

Yes....this script will be a very good ASSet to my collection! :D
0
Have I mentioned how much of a laugh I get out of some of the Signatures on here!

Click Draw 
 

Re: [Plugin] Extrude Edges by Rails

Postby mitcorb » Mon Nov 16, 2009 11:47 pm

Congratulations, TIG!!!
I am anxious to try this out!!!
I can only imagine the level of difficulty you may have encountered.
0
I take the slow, deliberate approach in my aimless wandering.
User avatar
mitcorb 
Top SketchUcator
 

Re: [Plugin] Extrude Edges by Rails

Postby utiler » Mon Nov 16, 2009 11:56 pm

Awesome TIG!!!!!! :berserk:
0
purpose/expression/purpose/....
User avatar
utiler 
Top SketchUcator
 

Re: [Plugin] Extrude Edges by Rails

Postby pilou » Tue Nov 17, 2009 12:20 am

Seems that works like a charm :D
edges2rails.jpg


Crashed if Rail1 is clicked first :o
0
Last edited by pilou on Tue Nov 17, 2009 12:27 am, edited 1 time in total.
Frenchy Pilou
Is beautiful that please without concept!
My Little site :)
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] Extrude Edges by Rails

Postby TIG » Tue Nov 17, 2009 12:25 am

Pilou wrote:Seems that works like a charm :D
...
Crashed if Rail1 is clicked first :o

I think that's because the profile (now rail1) would need to be infinitely small where the two rails (profile+rail2) meet... I think it's trying to make tiny faces in the 'corner'... I know of this glitch and I am looking at ways of trapping it - it's not 'foolproof' yet ! ;)

Meanwhile use logically... :|
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Extrude Edges by Rails

Postby pav_3j » Tue Nov 17, 2009 12:29 am

really beautiful, thank you so much.

i used it with the BZ toolbar, and you can set the segment amout for the line at the start which is a real time saver!

Untitled3.jpg


thank you again

pav
0
Just won the 'Who is Least Competitive Championships' where trying to win will make you lose. Trying to lose makes you win which makes you lose. Not trying at all makes you lose which makes you win which makes you lose.

pav_3j 
 

Re: [Plugin] Extrude Edges by Rails

Postby pilou » Tue Nov 17, 2009 12:32 am

Next will be Coon'Surface? :enlight:
(just add the oposite profile as Rail 3 :D
0
Frenchy Pilou
Is beautiful that please without concept!
My Little site :)
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] Extrude Edges by Rails

Postby TIG » Tue Nov 17, 2009 12:42 am

Pilou wrote:Next will be Coon'Surface? :enlight:
(just add the oposite profile as Rail 3 :D

Pilou ! :x
One step at a ;) time...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Extrude Edges by Rails

Postby Ecuadorian » Tue Nov 17, 2009 1:26 am

Pilou, you want SketchUp to become MoI. Each one has its own. :D
0

Ecuadorian 
 

Re: [Plugin] Extrude Edges by Rails

Postby pilou » Tue Nov 17, 2009 1:43 am

Now there are distant cousins :D

If you take the previus 3 curves without connection between them you will obtain these flying fishes :D
(click image if scrollbar)

exo.png
0
Frenchy Pilou
Is beautiful that please without concept!
My Little site :)
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] Extrude Edges by Rails

Postby tomot » Tue Nov 17, 2009 3:11 am

Looks like it has a lot of potential, :bounce: I have not had time to try it yet.
I was wondering if you had included, "Triangulate" or "Quad" face options?

cheers!
0

tomot 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Extrude Edges by Rails

Postby notareal » Tue Nov 17, 2009 8:11 am

:sketchstatic:
0
Welcome to try Thea Render, Thea support | kerkythea.net -team member

notareal 
Thea Render Support
Thea Render Support
 

Re: [Plugin] Extrude Edges by Rails

Postby kostas_designer » Tue Nov 17, 2009 8:46 am

A force of SU nature!!
Really cool!
Great job, Tig! :thumb:

Here is some first trying:
0

kostas_designer 
 

Re: [Plugin] Extrude Edges by Rails

Postby pilou » Tue Nov 17, 2009 12:11 pm

Humhum ;)
Seems we must have possibility to reverse rails before apply the plug! :o
falsebug.png
0
Last edited by pilou on Tue Nov 17, 2009 12:25 pm, edited 1 time in total.
Frenchy Pilou
Is beautiful that please without concept!
My Little site :)
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] Extrude Edges by Rails

Postby TIG » Tue Nov 17, 2009 12:17 pm

Pilou wrote:Humhum ;)
Seems we must have possibility to reverse rails before apply the plug! :o
falsebug.png

I am looking how to fix this within the script - to fix it manually for now use scale -1 on the profile about the profile's centre...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Extrude Edges by Rails

Postby pilou » Tue Nov 17, 2009 12:38 pm

The curious thing is that the Rail2 is a "straight line"
So must be divided , then welded
But result seems no reproductible and gives some nusty result :o
bug.png


PS A multi-profils along Rail1 rail2 will be sweet too :enlight:
0
Frenchy Pilou
Is beautiful that please without concept!
My Little site :)
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] Extrude Edges by Rails

Postby mitcorb » Tue Nov 17, 2009 1:17 pm

Pilou:
I had similar results with the construction points on several attempts. Once, with rails made by Freehand tool and once with profile and rails made by Welded segments for profile and rails and once by smoothing out the profile with added arcs and Welding.
Since TIG said the script was mostly stable, I figured that there would be some of this to happen.
0
I take the slow, deliberate approach in my aimless wandering.
User avatar
mitcorb 
Top SketchUcator
 

Re: [Plugin] Extrude Edges by Rails

Postby TIG » Tue Nov 17, 2009 1:30 pm

mitcorb wrote:Pilou:
I had similar results with the construction points on several attempts. Once, with rails made by Freehand tool and once with profile and rails made by Welded segments for profile and rails and once by smoothing out the profile with added arcs and Welding.
Since TIG said the script was mostly stable, I figured that there would be some of this to happen.

Can you all give as much info about the failures as possible [PM me small skps if appropriate] Ruby Console messages etc - I want to debug this glitch :roll:
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Extrude Edges by Rails

Postby TIG » Tue Nov 17, 2009 2:17 pm

Here's an example SKP - updated for v1.1...
ExtrudeEdgesByRailsExamples.skp
0
Last edited by TIG on Wed Nov 25, 2009 1:27 am, edited 1 time in total.
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Extrude Edges by Rails

Postby mitcorb » Tue Nov 17, 2009 4:33 pm

TIG:
Thanks for the Example skp.
I will try to provide you with examples as time permits. And I have been observing the Ruby console.
My last experiment was with Polyline Divider as the profile and rails from Fredo's Bezier collection. I got the mesh ok, but of course, the math complexity reversed and crisscrossed the beginning and ending copies of the profile causing an oblate spheroid bulge(same shape as an American football) and wings like Pilou's harlequin flying fish. However, there was no comment in the console.
Unfortunately the file is saved on my home machine. I will have to send it later.
0
I take the slow, deliberate approach in my aimless wandering.
User avatar
mitcorb 
Top SketchUcator
 

Re: [Plugin] Extrude Edges by Rails

Postby jeff hammond » Tue Nov 17, 2009 5:49 pm

hey TIG
here's a problem i've run into sometimes in an instance where it seems it should work. i'm only getting partial results in this case.
any ideas?
0
dotdotdot
User avatar
jeff hammond 
Global Moderator
 

Re: [Plugin] Extrude Edges by Rails

Postby jeff hammond » Tue Nov 17, 2009 6:16 pm

using that same file, here's another weird thing i can't figure out. (a video's probably easiest for me because i don't have to type as much :D)

(at first, it shows the problem i was previously talking about)
after that, i copy/move the profile and each rail the same amount along the red axis.. then end up with entirely different results.
?

0
Last edited by jeff hammond on Tue Nov 17, 2009 6:26 pm, edited 1 time in total.
dotdotdot
User avatar
jeff hammond 
Global Moderator
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

Next


 

Return to Plugins

Who is online

Users browsing this forum: 123nhu, BurakB, magizx, Maxwell21, Mike2107, studiogl and 9 guests