[Plugin] Super Drape

[Plugin] Super Drape

Postby TIG » Tue Oct 04, 2011 9:56 pm

SuperDrapeExample.PNG
Copyright 2011-2014, TIG (c)
Permission to use, copy, modify, and distribute this software for any
purpose, and currently without fee, is hereby granted, provided that
this text and the above copyright (c) notice appear in all copies.
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.
###
Name: TIG-Superdrape.rb
###
When initially installed this tool is an 'inactive' Extension;
you must 'activate' it the once by checking:
Preferences > Extensions > Super Drape
[Note: it can be 'deactivated' later by unchecking its Extension and
then restarting Sketchup]
###
Usage:
Menu > 'Tools' > 'Super Drape'
OR
Menu > View > Toolbar > 'Super Drape' [initially deactivated]
###
This tool drapes one group onto another group - much like the
Sandbox Drape tool [BUT much more consistently] AND it also copies
materials from with the 1st group to the 2nd group.
Activate the tool.
You are prompted to select the group to drape, and then the 2nd group to
drape onto.
It is one step undoable.
###
Tips:
The draped group must be above the 2nd group, but placing it very far above
it might result in some inaccuracies.
The two groups should consist of one set of faces, oriented 'up'.
The lowest face is the draped group will supply the materials if there are
'layers' of faces that overlap.
The highest face will receive the drape if there are 'layers' of faces that
overlap; to be on the safe side it's recommended you use single 'layers'
of non-overlapping faces in the groups.
Any face < ~1mm will probably be ignored when materials are assigned.
Faces may be angled from the horizontal in both groups - inside a group
or even a group itself.
Any textured materials in the draped group will have their UVs correctly
transposed in the materials used in the 2nd group, but they might be
foreshortened unexpectedly if a draped group face slopes significantly
more than the equivalent face in the 2nd group.
Any processed groups with more than one instance will be made unique first.
###
Donations: PayPal.com to info @ revitrev.org
###
Version:
1.0 20111004 First issue.
1.1 20111005 Face 'pairing' more robust. Only uppermost face gets draped.
1.2 20111006 Trapped 'group.material'. Robust Intersecting/overlap-trimming.
1.3 20111006 Group.copy now recast to avoid rogue scripts messing it up.
Multi-level faces in the draped group are now allowed.
1.4 20111008 1st group temporarily moved nearer to 2nd to minimize errors.
Original is unaffected by group.material >> default faces.
1.5 20111010 Adjusted to minimize missed facets etc.
1.6 20111021 Intersecting of meshes improved etc.
1.7 20111028 More robust intersecting method.
1.8 20111028 Typo in code fixed!
1.9 20111028 Already erased edge error trapped.
2.0 20111103 More robust intersecting methods accelerated.
3.0 20111204 Made into an Extension with own loader etc.
3.1 20111204 Glitch with toolbar button/icons resolved.
3.2 20140405 Relaunched for v2014.
###
Get the latest version fro the SketchUcation PluginStore...

Download

3
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Super Drape v1.0 20111004

Postby thomthom » Tue Oct 04, 2011 10:00 pm

Excellent TIG! :thumb: :thumb:
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] Super Drape v1.0 20111004

Postby Rich O Brien » Tue Oct 04, 2011 10:22 pm

Top tool :thumb:

Thanks TIG
0
There's a frontroom and a backroom....reverse faces
User avatar
Rich O Brien 
Administrator
 

Re: [Plugin] Super Drape v1.0 20111004

Postby thomthom » Tue Oct 04, 2011 10:31 pm

nahnahnahnahnahnaaah - SuperDraaaaape!
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] Super Drape v1.0 20111004

Postby Dave R » Tue Oct 04, 2011 10:37 pm

Bug splats for me. I tried it with the surface from that 231 model I posted yesterday and a simple circle drawn above it. I'll post a model as soon as I can.
0
%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: [Plugin] Super Drape v1.0 20111004

Postby wyatt » Tue Oct 04, 2011 10:38 pm

This is how the Sandbox tool should have worked from the very beginning. Awesome work! :thumb:

The Tigtools folder in the zip file is empty. Is it supposed to contain the toolbar icons, or do they still need to be designed?
0

wyatt 
 

Re: [Plugin] Super Drape v1.0 20111004

Postby ken » Tue Oct 04, 2011 10:54 pm

Whoa! Am I the only one without a icon image.

Ken
0
Fight like your the third monkey on Noah's Ark gangway.
User avatar
ken 
Premium Member
Premium Member
 

Re: [Plugin] Super Drape v1.0 20111004

Postby Rich O Brien » Tue Oct 04, 2011 10:55 pm

Nope
0
There's a frontroom and a backroom....reverse faces
User avatar
Rich O Brien 
Administrator
 

Re: [Plugin] Super Drape v1.0 20111004

Postby TIG » Tue Oct 04, 2011 11:11 pm

I'm having a bad day - that bottle of Chianti has a lot to answer for :o
I have updated the missing PNG files so if the 20 or so of you would like to reinstall from the updated zip file it should work... :oops:
viewtopic.php?p=358314#p358314
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Super Drape v1.0 20111004

Postby TIG » Tue Oct 04, 2011 11:13 pm

Dave R wrote:Bug splats for me. I tried it with the surface from that 231 model I posted yesterday and a simple circle drawn above it. I'll post a model as soon as I can.
What size is it? - it might be a scaling problem?? :?
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Super Drape v1.0 20111004

Postby Dave R » Tue Oct 04, 2011 11:50 pm

I don't think it should be a scaling issue. I've recreated it and post it here. I only tried to drape the circle onto the surface below.
0
%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: [Plugin] Super Drape v1.0 20111004

Postby TIG » Wed Oct 05, 2011 12:08 am

Dave R wrote:I don't think it should be a scaling issue. I've recreated it and post it here. I only tried to drape the circle onto the surface below.
I too get the Bugsplat - weird - there seems nothing untoward at all - I'm investigating...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Super Drape v1.0 20111004

Postby Dave R » Wed Oct 05, 2011 12:15 am

Thank you.
0
%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: [Plugin] Super Drape v1.0 20111004

Postby TIG » Wed Oct 05, 2011 12:24 am

Something weird about your mesh - how was it made ?
There are two missing diagonals to the side - when I added those it seemed better ?
I also used cut/paste_in_place on the mesh, which seemed to jolt it into submission.
It then SuperDraped OK but the material cloning was poor so I scaled up x10 with no improvement in the materials.
The 231 SuperDrapes readily onto a flat surface so I still have some investigating to uncover the issues...
I trialed it during today with various forms of draper/drapee groups without incident or loss of materials - thrust you to break it [thanks ;) ]
Capture.PNG
:?
1
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Super Drape v1.0 20111004

Postby Dave R » Wed Oct 05, 2011 12:34 am

Curious. I drew the curves by putting arcs on the sides of a large box. Then I used Fredo's "Skinning of Shapes" tool to create the skin. I saw there were a few diagonals that weren't drawn in but I figured since the surface skinned over alright, they weren't needed.

Fix it and I'll break it again. :D
0
%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: [Plugin] Super Drape v1.0 20111004

Postby utiler » Wed Oct 05, 2011 12:49 am

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

Re: [Plugin] Super Drape v1.0 20111004

Postby baz » Wed Oct 05, 2011 4:06 am

Brilliant, thanks Tig.
0
I am both an early bird and a night owl, I am some form of permanently energized dragon.
User avatar
baz 
 

Re: [Plugin] Super Drape v1.0 20111004

Postby Bob James » Wed Oct 05, 2011 6:54 am

Thanks, TIG: Works great. On an object the text or texture is copied on the top and on the bottom (almost)!
1
i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60
User avatar
Bob James 
Premium Member
Premium Member
 

Re: [Plugin] Super Drape v1.0 20111004

Postby TIG » Wed Oct 05, 2011 9:25 am

I'm looking at trapping faces that are looking away from the draped group...
Meanwhile some careful erasing should fix it ?
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Super Drape v1.0 20111004

Postby srx » Wed Oct 05, 2011 10:49 am

Thanks TIG.
0
www.saurus.rs
User avatar
srx 
 

Re: [Plugin] Super Drape v1.0 20111004

Postby blajnov » Wed Oct 05, 2011 11:27 am

Thanks TIG.
In kirill2008, there is a similar plug-in on your, "Lss_Tool_Bar"
0

blajnov 
 

Re: [Plugin] Super Drape v1.0 20111004

Postby Ben Ritter » Wed Oct 05, 2011 11:38 am

TIG, thank you very much.
0

Ben Ritter 
 

Re: [Plugin] Super Drape v1.0 20111004

Postby seven.sides » Wed Oct 05, 2011 11:58 am

Thanks TIG, this will be very usefull.
0

seven.sides 
 

Re: [Plugin] Super Drape v1.1 20111005

Postby TIG » Wed Oct 05, 2011 1:25 pm

Here's v1.1 viewtopic.php?p=358314#p358314 :enlight:

Face 'pairing' of materials between the groups is now more robust, consistent and very unlikely to fail.
Only topmost faces now usually gets draped onto - if you have overlapping faces in the groups the drape should not now 'punch through' onto lower faces, unless the faces are with ~5mm of each other vertically - still it's best to have single-skin meshes to super-drape...

The splat/error reported by Dave_R is now avoided by recoding... BUT it doesn't fix his mesh itself, which had two quad-faces that appeared coplanar but caused splats because when the mesh was intersecting with other entities they made the result unstable - after erasing those two faces they would no reface with 'find_faces', but adding a diagonal fixes the issue as they two triangles are just on the cusp of the difference between a viable quad and two triangular faces that are not coplanar. I await for Dave to re-break this version :?
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Super Drape v1.1 20111005

Postby charly2008 » Wed Oct 05, 2011 2:35 pm

Hi TIG,

I've tried it with no success. I do not know if that's my fault. See Picture below.

Charly
1
He who makes no mistakes, makes nothing
User avatar
charly2008 
 

Re: [Plugin] Super Drape v1.1 20111005

Postby TIG » Wed Oct 05, 2011 2:52 pm

Charly :roll:

I can't get any error messages, BUT I don't get a good result either!
BUT if I explode each group in turn and immediately regroup the highlighted entities... and then use SuperDrape with them it works just fine :?
I suspect that there's some duplicate/tiny faces or similar 'errors' is the group[s] that cause issues - but the explode+regroup fixes them...
I'll see what I can come up with - in the meanwhile use the explode+regroup trick and it seems fine again...
Capture.PNG
1
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Super Drape v1.1 20111005

Postby charly2008 » Wed Oct 05, 2011 3:24 pm

Thanks for the tip. Your plugin has a great potential as always.
0
He who makes no mistakes, makes nothing
User avatar
charly2008 
 

Re: [Plugin] Super Drape v1.1 20111005

Postby MALAISE » Wed Oct 05, 2011 4:48 pm

Simply, thanks :D

MALAISE
0
La Connaissance n'a de valeur que partagée
User avatar
MALAISE 
 

Re: [Plugin] Super Drape v1.1 20111005

Postby wolfy » Wed Oct 05, 2011 5:34 pm

VERY COOL! Thanks TIG this will come in extremely handy. :enlight:
0

wolfy 
 

Re: [Plugin] Super Drape v1.1 20111005

Postby numbthumb » Wed Oct 05, 2011 5:49 pm

Where would we be without all this stuff... thanks!
0
Comfortably numb...
User avatar
numbthumb 
Top SketchUcator
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

Next


 

Return to Plugins

Who is online

Users browsing this forum: selimbilir and 4 guests

Visit our sponsors: