[Plugin] Super Drape

Re: [Plugin] Super Drape v1.1 20111005

Postby Dave R » Wed Oct 05, 2011 6:15 pm

Thanks TIG.

So the splats occurred because those two quad faces barely qualified as quads? It sounds like SU let Fredo's skinning tool make quad faces but wouldn't let your tool work. Sounds like a double standard to me. :D

I'll give it a try as soon as I can and let you know how it goes.
0
Etaoin Shrdlu


%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: [Plugin] Super Drape v1.1 20111005

Postby charly2008 » Wed Oct 05, 2011 6:20 pm

As always with new tools, I need to experiment with.
0
He who makes no mistakes, makes nothing
User avatar
charly2008 
 

Re: [Plugin] Super Drape v1.1 20111005

Postby TIG » Wed Oct 05, 2011 7:23 pm

Charly

Glad you're enjoying it :D

One of the issues [but not all] about your original problem was that you applied the material to the draped group and not the faces with in it...
I plan to spot this in the next version and ask what you want to do...
Also your sphere had a convoluted transformation - removed after the explode+regroup... I looking at ways of trapping/sorting this too... :roll:
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Super Drape v1.2 20111006

Postby TIG » Thu Oct 06, 2011 3:37 pm

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

Following Charly's feedback it now spots if you have a material applied to the draped group and that there are some faces inside the group without a material [they will appear to have the group's material, even when they are actually in the default-material] - you can then choose Yes|No to use that group.material for any draped faces that would otherwise have the default-material.
The intersecting is even more robust.
All underlying faces inside the same group should now be unaffected by the draping [i.e. any faces below the draped-on topmost faces].
Draped faces that partially overlap the edges of the draped-on group's faces are now neatly trimmed to them.
Groups with convoluted transformations [rotated in 3d, scaled etc] should no longer cause issues with the draping.

Feedback please...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Super Drape v1.2 20111006

Postby wyatt » Thu Oct 06, 2011 4:52 pm

TIG, this version doesn't work for me. It calculates forever.

Error: #<NoMethodError: undefined method `entities' for nil:NilClass>
C:/PROGRA~2/Google/GOOGLE~1/Plugins/TIG-Superdrape.rb:152:in `drape'
C:/PROGRA~2/Google/GOOGLE~1/Plugins/TIG-Superdrape.rb:114:in `onLButtonDown'
0

wyatt 
 

Re: [Plugin] Super Drape v1.2 20111006

Postby TIG » Thu Oct 06, 2011 6:16 pm

I suspect you have SketchyPhysics or DrivingDimensions [or something similar] installed that cause a problem with copying groups [the use of the standard-method 'group.copy' was added in this version] - I had forgotten that these 'rogue-tools' still need fixing by their authors... :shock: :roll:
I am making some other minor tweaks anyway... so I will try and get rid of the 'group.copy' code to avoid the issue at the same time...
Watch this space... :D
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Super Drape v1.3 20111006

Postby TIG » Thu Oct 06, 2011 6:32 pm

Here's v1.3 viewtopic.php?p=358314#p358314 :enlight:
The new group.copy code introduced in v1.2 is now recast to avoid clashes with rogue-scripts that might mess it up.
Multi-level/overlapping faces in the draped-group are now allowed [previously only one level was draped].
:D

The earlier v1.2 changes were...
Following Charly's feedback it now spots if you have a material applied to the draped group and that there are some faces inside the group without a material [they will appear to have the group's material, even when they are actually in the default-material] - you can then choose Yes|No to use that group.material for any draped faces that would otherwise have the default-material.
The intersecting is even more robust.
All underlying faces inside the same group should now be unaffected by the draping [i.e. any faces below the draped-on topmost faces].
Draped faces that partially overlap the edges of the draped-on group's faces are now neatly trimmed to them.
Groups with convoluted transformations [rotated in 3d, scaled etc] should no longer cause issues with the draping.

Feedback please...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Super Drape v1.3 20111006

Postby wyatt » Thu Oct 06, 2011 7:43 pm

I do have Sketchy Physics, and 1.3 works now. Thank you.
0

wyatt 
 

Re: [Plugin] Super Drape v1.3 20111006

Postby AcesHigh » Fri Oct 07, 2011 4:08 am

Thanks a lot TIG, since it was me who asked for this tool.

You know, there is another use for this tool that I thought just now. Since you now can drape materials onto the mesh, it makes it REALLY EASY to select the faces with the new material! No more pain selecting all the faces that you just draped!
0

AcesHigh 
 

Re: [Plugin] Super Drape v1.3 20111006

Postby pep75 » Fri Oct 07, 2011 2:15 pm

:berserk: :enlight: :thumb: !!!
0
User avatar
pep75 
 

Re: [Plugin] Super Drape v1.3 20111006

Postby AcesHigh » Fri Oct 07, 2011 11:49 pm

TIG, interested in adding functionalities for making a Super Ultra Drape??? :mrgreen: :mrgreen:

basically:

1 - when drapeing, you simply projects the line of a surface over a 3d mesh. The ending result COMPLETELY follows the curvature of the mesh, just adding those lines over the mesh.

2 - when stamping, you add a completely flat shape to a mesh. The mesh adapts to the stamp and becomes flat.


What if you want a compromise? Like for example, to project a road over a mesh? Lets say you have a road, and the road is 20cm below the curbs/sidewalk level.

Why not project that 3d road over the mesh, and the mesh ALREADY has the road areas becoming 20cm lower than the curb/sidewalks areas?

What if you want the road to climb a small hill (that exists on the mesh) but you dont want the road to be as steep as the mesh? You already have the road steepness. Normal drape would be useless. It would just project the road lines over the existing (very steep) mesh. Drape would make the road flat. Ideal solution would be to project the road onto the mesh, but KEEP the road Y axis curvature, making the mesh adapt (like when stamping) to the road.

So, TIG, do you think something like that would be possible? Thanks very much!
0

AcesHigh 
 

Re: [Plugin] Super Drape v1.3 20111006

Postby Bob James » Sat Oct 08, 2011 2:40 am

@AcesHigh

Why not just use InstantRoad.rbs?
0
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.3 20111006

Postby AcesHigh » Sat Oct 08, 2011 2:54 am

1 - instant roads is paid.

2 - these extra functionalities for drape can be used for other things besides roads

3 - in my specific case, Instant Roads is of no use. I must drape a DWG road project over a mesh. Instant Roads is too limited.
0

AcesHigh 
 

Re: [Plugin] Super Drape v1.3 20111006

Postby wyatt » Sat Oct 08, 2011 3:11 am

AcesHigh,
Joint push pull can be used to lower the mesh a given distance to account for curbs.

What if you want the road to climb a small hill (that exists on the mesh) but you dont want the road to be as steep as the mesh? You already have the road steepness.


How do you already have the road steepness? Do you have a road profile or 3D polyline from CAD that you're working from?

I guess I don't understand how you envision this working. How would the plugin know that you want a certain segment of the road to follow the existing grade, and a different segment to be cut into a hill at a flatter grade? What about the road in a fill section? CAD programs solve this by utilizing a combination of horizontal alignment and profile data, typically based on stationing. Do you want to create something similar?

Don't get me wrong, I think what you're asking for is great. I use SU for this type of work too. I'm just trying to figure out what form you see it taking.
0

wyatt 
 

Re: [Plugin] Super Drape v1.3 20111006

Postby AcesHigh » Sat Oct 08, 2011 4:03 am

Wyatt wrote:AcesHigh,
Joint push pull can be used to lower the mesh a given distance to account for curbs.


yes, and I have used it. However, its much harder to select a heavily triangulated area of the mesh to "joint push pull", than it would be to select the same area in a flat drawing, push pull it lower, and drape it, already lowered, into the mesh below.



How do you already have the road steepness?


lets say you already drew it. With polylines.


I guess I don't understand how you envision this working. How would the plugin know that you want a certain segment of the road to follow the existing grade, and a different segment to be cut into a hill at a flatter grade?


no segment will follow the existing grade. Imagine a STAMP but following the different heights of the profile, instead of stamping flat.
0

AcesHigh 
 

Re: [Plugin] Super Drape v1.3 20111006

Postby thomthom » Sat Oct 08, 2011 8:51 am

AcesHigh wrote:1 - instant roads is paid.

And you want TIG to make a version for free..?
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.3 20111006

Postby AcesHigh » Sat Oct 08, 2011 12:57 pm

thomthom wrote:
AcesHigh wrote:1 - instant roads is paid.

And you want TIG to make a version for free..?


I am not asking for a free Instant Roads. Its not even remotely similar, imho. The fact Instant Roads is paid was only 1 reason. The real problem is that its paid and it doesnt even really matches what I need (which is to use a DWG road which cant be copied by Instant Roads).

As far as I understand, Instant Roads kinda works like you having a window and setting the width of the lanes, sidewalks, central garden (when its avenues), etc. Very flexible and very easy for some things. But if you need to make a road a bit different from what the program allows, its already not an useful plugin. And from everything I read, in my case (and probably many others) Instant Roads would not be useful as some better drape plugins.


Besides, it can only be used for... ROADS!

a drape pluging that had these other functions would be used for many other functions, by EVERYONE. Not only for roads, but for anything needing work with meshes...

also, I dont want him to do it. He has no obligation to help me or anyone else (or you for that matter, since you also make some incredibly amazing plugins). I would "like" if he did it. But I am already super happy with what he already did with Super Drape. Its already some amazing improvement over normal drape.


ps: I wouldnt even be benefited from this drape plugin, as for using it to make roads. Yes, I got a work right now where I must make a road, but the deadline certainly expires long before TIG would ever be able to get such advanced drape functionalities ready. And this is the first road work I ever got and probably the last.

thus, an Ultra Drape would probably benefit more other people than myself, unless I get another road work (hardly)... OR, I use it for other functionalities (which I am sure will exist when dealing with meshes, but I cant think right now).

Sorry for the long text TomTom, but I just dont want to be known as a cheapass bastard for not wanting to buy Instant Roads :?

:D
0
Last edited by AcesHigh on Sat Oct 08, 2011 6:26 pm, edited 3 times in total.

AcesHigh 
 

Re: [Plugin] Super Drape v1.3 20111006

Postby EscapeArtist » Sat Oct 08, 2011 2:58 pm

Awesome plugin, I can hardly wait to get home and use it!

Thanks TIG!
0
User avatar
EscapeArtist 
Top SketchUcator
 

Re: [Plugin] Super Drape v1.3 20111006

Postby gilles » Sat Oct 08, 2011 5:42 pm

It does not work fine for me, Mac issue?

ruby console says:"WARNING: make_unique is a deprecated methodof Sketchup:Group"
0
" c'est curieux chez les marins ce besoin de faire des phrases "
User avatar
gilles 
Top SketchUcator
 

Re: [Plugin] Super Drape v1.3 20111006

Postby TIG » Sat Oct 08, 2011 6:00 pm

gilles

The "WARNING: make_unique is a deprecated methodof Sketchup:Group" is the standard 'warning' that Sketchup produces when you copy a group and make it unique - SuperDrape copies the 1st 'drape' group and changes to get the 'projection' onto the 2nd group [this copy is erased on completion] - there should only every be one instance of a group, BUT it is possible to make copies, just like you can with a component [then changing any one changes the others]. Sketchup could ensure this uiqueness happens, but it just doesn't; so then there are two instances of the group; so that the original is unaffected by the impending changes the available group.make_unique method is used - for some daft reason the 'deprecation' warning was never removed by Google. It is needed and should not be 'deprecated' - which means it is no longer needed - BUT it is :roll:
[So don't worry about it!]

Now onto your test SKP. It works fine for me AFTER I sorted out the problem with the 1st group's faces - they all face down and the materials are applied to the backs - therefore the draped result is in the default material as that's what the faces have. The usage notes do say the faces should be 'up'...
I used FixReversedFaceMaterials to flip the from and back materials and reverse the faces - it then works OK...
Capture.PNG
With very small or very large forms there are occasional rare glitches where a small face loses materials - these are easily healed by sampling an adjacent corectly colored facet and painting the missed one...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Super Drape v1.3 20111006

Postby gilles » Sat Oct 08, 2011 6:27 pm

another attempt.
0
" c'est curieux chez les marins ce besoin de faire des phrases "
User avatar
gilles 
Top SketchUcator
 

Re: [Plugin] Super Drape v1.3 20111006

Postby TIG » Sat Oct 08, 2011 6:57 pm

Try it with hidden geometry 'on' and the 1st group as near to the 2nd group as you can - it must be >1mm above it !
I'm thinking about relocating the 1st projected group down to the minimum distance above the 2nd to avoid glitches in the next release***.
What's the total size of the draped face ?
Why make the draped face bigger than the 2nd group ? [it shouldn't matter]
Can you post the new SKP... ***your SKP would help testing...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Super Drape v1.4 20111008

Postby TIG » Sat Oct 08, 2011 7:43 pm

Here's v1.4 viewtopic.php?p=358314#p358314 :enlight:
The 1st picked group is temporarily moved very near to the 2nd to minimize material transfer errors.
The original is now left unaffected when there are group.material and there are default faces within it and the user chooses to use then in the draped faces...
:D

The earler v1.3 made these changes...
The new group.copy code introduced in v1.2 is now recast to avoid clashes with rogue-scripts that might mess it up.
Multi-level/overlapping faces in the draped-group are now allowed [previously only one level was draped].

The earlier v1.2 changes were...
Following Charly's feedback it now spots if you have a material applied to the draped group and that there are some faces inside the group without a material [they will appear to have the group's material, even when they are actually in the default-material] - you can then choose Yes|No to use that group.material for any draped faces that would otherwise have the default-material.
The intersecting is even more robust.
All underlying faces inside the same group should now be unaffected by the draping [i.e. any faces below the draped-on topmost faces].
Draped faces that partially overlap the edges of the draped-on group's faces are now neatly trimmed to them.
Groups with convoluted transformations [rotated in 3d, scaled etc] should no longer cause issues with the draping.

Feedback please...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Super Drape v1.4 20111008

Postby robert111 » Sat Oct 08, 2011 9:09 pm

thanks for this nice plugin
but i need tuto for this plugin plzzzzzz
0

robert111 
 

Re: [Plugin] Super Drape v1.4 20111008

Postby TIG » Sat Oct 08, 2011 9:28 pm

robert111 wrote:thanks for this nice plugin
but i need tuto for this plugin plzzzzzz
Reread the instructions...
It's not much different from the native Sandbox Drape tool... but it replicates the 1st group's materials onto the 2nd group's surfaces... :geek:
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Super Drape v1.4 20111008

Postby jorge2011 » Sat Oct 08, 2011 10:31 pm

hello sir tig. thank you very much for this plugin.
I found a small error. please see the file
0

jorge2011 
 

Re: [Plugin] Super Drape v1.4 20111008

Postby Dave R » Sun Oct 09, 2011 12:42 pm

I broke the newest version. :D

It was interesting to watch it filling in the faces. It looks like it just skipped a few.
0
Etaoin Shrdlu


%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: [Plugin] Super Drape v1.4 20111008

Postby TIG » Sun Oct 09, 2011 1:38 pm

Currently looking at an update...
Watch this space... :roll:
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Super Drape v1.4 20111008

Postby Box » Mon Oct 10, 2011 11:32 am

Just a bit of feedback.
I draped a simple sphere onto a flat surface at different rotations and got some strange results. I scaled up by 10 to see if it was just a small face issue and still odd.
I'm not sure that this is something anyone would do with this plugin, but thought I should show you anyway.

It's strange how sometimes the drape goes all the way through to the bottom surface and other times not, and on the large version it blew out the top surface.
0
User avatar
Box 
 

Re: [Plugin] Super Drape v1.4 20111008

Postby TIG » Mon Oct 10, 2011 11:36 am

Thanks Box... I'm looking at a few bug fixes - which come more from Sketchup's limitations with intersect than my code itself :roll:
Watch this space...
0
TIG
User avatar
TIG 
Global Moderator
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

PreviousNext


 

Return to Plugins

Who is online

Users browsing this forum: LvdM, wilmauro1 and 17 guests

Visit our sponsors: