SketchUcation Plugin Store

 

 

Re: [Plugin] Flatten to Plane v1.2 20101023

Re: [Plugin] Flatten to Plane v1.2 20101023

Postby Wildchild » Sat Apr 16, 2011 9:01 am

Hi, I was trying to find a good and painless way to export from skp to autocad to add 2D details, maintaining groups/components and layers while exporting and I came across this usefull plugin. The problem is that it works only with edges ignoring the faces and this makes it unusable in the 3D-->2D workflow because it projects even the edges behind faces as shown in the images.

1.jpg


2.jpg


TIG do you think there's any workaround for this? I'd be thankful for the rest of my life :knockout:
Please, register (free) to access all the attachments on the forums.
Eternity is very long, especially towards the end. Woody Allen
Wildchild
 
Posts: 21
Joined: Sun Feb 01, 2009 10:10 am

Re: [Plugin] Flatten to Plane v1.2 20101023

Postby TIG » Sat Apr 16, 2011 4:43 pm

It's function is to project edges...
Find my CADup script beta, that makes projections with hidden lines etc... it's a w.i.p...
TIG
User avatar
TIG
Global Moderator
 
Posts: 13997
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Flatten to Plane v1.2 20101023

Postby Wildchild » Sun Apr 17, 2011 5:05 pm

Alright, thanks TIG I'll try it out! By the way in the meantime I came up with, I believe, the perfect way to export 3D into 2D CAD drawings maintaining geometry separated into layers without flattening or anything (that's why I was trying to use this plug before) just by using colors. In case someone is interested I can make a tutorial off of it.
Eternity is very long, especially towards the end. Woody Allen
Wildchild
 
Posts: 21
Joined: Sun Feb 01, 2009 10:10 am

Re: [Plugin] Flatten to Plane v1.2 20101023

Postby dbalex » Sun Apr 17, 2011 6:41 pm

@Wildchild: I'm really interested in your technique as I'm always going from sketchup to 2d cad and it's a real pain.. It would be great if you could make a very short tuto on that as I don't really understand what you mean by colors? Thanks!
dbalex
 
Posts: 64
Joined: Fri Dec 04, 2009 2:15 am

Re: [Plugin] Flatten to Plane v1.2 20101023

Postby Wildchild » Mon Apr 18, 2011 10:18 pm

<iframe title="YouTube video player" width="1280" height="750" src="http://www.youtube.com/embed/0Qd4z5t0Ns8?rel=0&amp;hd=1" frameborder="0" allowfullscreen></iframe>

@TIG: You wrote on the CADUP description that sketchup can't handle big models like entire buildings with furniture, therefore I don't think is going to be of any use in my case. In any case I'll keep an eye on it for when you'll be done developing it.

thanks!
Eternity is very long, especially towards the end. Woody Allen
Wildchild
 
Posts: 21
Joined: Sun Feb 01, 2009 10:10 am

Re: [Plugin] Flatten to Plane v1.2 20101023

Postby dbalex » Mon Apr 18, 2011 10:38 pm

thanks! you will save me a lot of time next time!
dbalex
 
Posts: 64
Joined: Fri Dec 04, 2009 2:15 am

Re: [Plugin] Flatten to Plane v1.2 20101023

Postby JPMays » Tue Oct 25, 2011 2:44 pm

TIG, I seem to be having a problem with your script. I have installed it and WorkPlane, but when I select edges and faces and run Plugins>Flatten to Plane nothing happens whatsoever. I have reinstalled both plugins, with the same result.

I am importing a plan, but the lines somehow are not intersecting the plane. I tried selecting and Intersecting with Context, to no avail. I was hoping flattening them to a plane would eliminate the possibility of the lines not being co-planar, but I can't get Flatten to Plane to work. Thoughts?

Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
JPMays
 
Posts: 34
Joined: Thu Jan 14, 2010 8:55 pm
Name: JPMays

Re: [Plugin] Flatten to Plane v1.2 20101023

Postby TIG » Tue Oct 25, 2011 3:34 pm

CAD drawings are notorious for having tiny gaps in lines so faces won't form.
Have you tried Thomthom's Plan tools or one of the other tools written to cope with such imports?
Projecting the edges to a plane might work, much as draping them onto a big rectangle will make them coplanar... BUT if they don't form closed loops then whatever you do it won't make them 'face'... unless you 'heal' the gaps etc with specialized a script...
TIG
User avatar
TIG
Global Moderator
 
Posts: 13997
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Flatten to Plane v1.2 20101023

Postby JPMays » Tue Oct 25, 2011 8:18 pm

Thanks for the suggestions. I checked it with Thom's EdgeTools, and everything is connected. They just won't intersect with the face. When you say projecting them to a plane, it was my understanding that that's what your plugin does. I did figure out that the reason FtP would not work is that I was trying to do it within a group. Once I exploded it, it flattened fine, but still did not intersect (I ended up with what I started with). I also tied the Sandbox>drape, but it doesn't recognize that plane as a mesh. I then drew a rectangle, deleted the face, then made a Sandbox from the remaining edges. That allowed me to drape my plan over it, but still it would not created the individual spaces of the rooms! What else can I try?
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
JPMays
 
Posts: 34
Joined: Thu Jan 14, 2010 8:55 pm
Name: JPMays

Re: [Plugin] Flatten to Plane v1.2 20101023

Postby TIG » Tue Oct 25, 2011 8:33 pm

Post what you have in the SKP and we can mess on with it... ;)
TIG
User avatar
TIG
Global Moderator
 
Posts: 13997
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Flatten to Plane v1.2 20101023

Postby JPMays » Tue Oct 25, 2011 9:24 pm

Ok, it actually seems to be a problem that I have a lot. When I bring in a large CAD file, for example one that has a long road or sidewalk, which should be a continuous face, SketchUP doesn't recognize it, even when I run Make Faces 1.4. I have to "remind" SU that there should be a face there, by gradually connecting it.



In this example, all I have to do is connect these two points, and then a face is created. Then I can delete the line I just drew, but the face remains. In general, the Make Faces tool works really well, just not on large or complex shapes. Anybody know of another tool that might work better than doing it manually?
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
JPMays
 
Posts: 34
Joined: Thu Jan 14, 2010 8:55 pm
Name: JPMays

Re: [Plugin] Flatten to Plane v1.2 20101023

Postby TIG » Tue Oct 25, 2011 10:05 pm

Have you tried my AddFaces ? [see Plugins Index]
Why not post a problem SKP and let us see what we can do ...
TIG
User avatar
TIG
Global Moderator
 
Posts: 13997
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Flatten to Plane v1.2 20101023

Postby JPMays » Tue Oct 25, 2011 10:59 pm

Ok, will do in the morning. I'll also look up Add Faces and try that. It's quittin' time for now. Thanks.
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
JPMays
 
Posts: 34
Joined: Thu Jan 14, 2010 8:55 pm
Name: JPMays

Re: [Plugin] Flatten to Plane v1.2 20101023

Postby JPMays » Wed Oct 26, 2011 2:56 pm

Ok, I tried Add Faces, which didn't work any better the first time, then locked up SU the second time. The only solution I've found so far is to manually do it, as shown in my earlier post. Feel free to mess around with the file though.
Please, register (free) to access all the attachments on the forums.
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
JPMays
 
Posts: 34
Joined: Thu Jan 14, 2010 8:55 pm
Name: JPMays

Re: [Plugin] Flatten to Plane v1.2 20101023

Postby TIG » Wed Oct 26, 2011 3:39 pm

Your CAD drawing has lots of edges that will never be able to 'face' - like nibs to closet alcoves etc.
The door swings are often many small segments and there's a limit to how many segments can be coerced into taking a face in one step - so the rooms won't face individually.
It's relatively quick to draw a few rectangles over the hotel[?] rooms/alcoves and force faces to form, and then erase any unwanted edges - the Style you have set helps as the end points are clearly marked...
Because most internal walls are single lines anyway, aren't you going to over draw with a centered wall anyway? Which rather removes the issue of adding faces to the imported CAD-layout as it's somewhat useless anyway - even it it did take faces to even single 'room' ??
TIG
User avatar
TIG
Global Moderator
 
Posts: 13997
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Flatten to Plane v1.2 20101023

Postby JPMays » Wed Oct 26, 2011 3:51 pm

Well, the intent is actually to just use this a s a diagram, with no walls. I will need to color the rooms separately, so it is necessary to have faces for each room.
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
JPMays
 
Posts: 34
Joined: Thu Jan 14, 2010 8:55 pm
Name: JPMays

Re: [Plugin] Flatten to Plane v1.2 20101023

Postby TIG » Wed Oct 26, 2011 4:54 pm

It'll take 5 minutes to overdraw rectangles on the rooms to force separate faces.
Then tidy up unwanted edges etc - presumably you'll want a line across doorways anyway ? which you don't have had the CAD line drawing accepted perfect faces anyway - the corridor color would spill into the room/entrance-area !
TIG
User avatar
TIG
Global Moderator
 
Posts: 13997
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Flatten to Plane v1.2 20101023

Postby topdraft » Sat May 19, 2012 12:15 pm

Hi TIG
First time here. Have installed plugin "flatten" & "workplane" read all the posts above and still I am not able to get this to work. Must be missing something. SU pro8 - model component. I open the component create the work plane centered on the component select the work plane (unlocked)and the blocks within the component and start flatten from the plugin menu and..... nothing happens?
Best Topdraft
topdraft
 
Posts: 1
Joined: Sat May 19, 2012 10:13 am
Name: tony topham

Re: [Plugin] Flatten to Plane v1.2 20101023

Postby TIG » Sun May 20, 2012 10:20 am

topdraft wrote:Hi TIG
First time here. Have installed plugin "flatten" & "workplane" read all the posts above and still I am not able to get this to work. Must be missing something. SU pro8 - model component. I open the component create the work plane centered on the component select the work plane (unlocked)and the blocks within the component and start flatten from the plugin menu and..... nothing happens?
Best Topdraft
The one selected Workplane simply defines an 'infinite' plane in 3d onto which the vertices of the selected edges [or edges inside selected groups/components] will be projected as a 'flattened' version, when you run the tool.
These edges must be 'visible' [i.e. not hidden/smoothed or assigned an 'off' layer].
The Workplane can remain locked in place, if desired.
When you use the tool do so with the Ruby Console open and see if there are any error messages.
Are you sure nothing was made? If the plane is flat and passing through the bottom of vertical faces then the 'flattened' edge group will be entirely coincident with the other geometry and so you might not see it immediately. Use the Outliner to see if the new group exists...
If you are definitely getting nothing made or have inexplicable errors then can you wither post the SKP or a screenshot so that we might better understand what it is you are attempting.
TIG
User avatar
TIG
Global Moderator
 
Posts: 13997
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Flatten to Plane v1.2 20101023

Postby rossthompson » Fri Jun 01, 2012 10:04 am

Hi,

It looks like I am coming to the thread a little late.... I was just wandering weather it would be easy to change the script slightly so it deleted the originally selected entities and didn't create a group for the flattened entities. So bascially the selection just gets replaced with a flattened version.

This would be beneficial as I use the tool a lot for cleaning up imported geometry where the faces aren't quite coplanar - hence the original entities are of little use.

Ive had a look through the script and the code is a bit above my head.

Ross
rossthompson
 
Posts: 27
Joined: Tue Jan 27, 2009 12:26 pm
Location: Oxford
Name: Ross Thompson
Operating system: Windows
SketchUp version: 7
License type: Free/Make
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Flatten to Plane v1.2 20101023

Postby TIG » Fri Jun 01, 2012 12:05 pm

Ross

Make a backup copy of the .rb script for reuse when you screw-up, or decide the original is better...
Edit the .rb script with a plain-text editor [like Notepad.exe or Notepad++.exe - but never a wordprocessor] and find the lines [~ #104-107]
###
@ss.clear
@ss.add(@group)
###

change them to read
###
ents.erase_entities(@ss.to_a)
@group.explode
###

This will erase the original selection and then explode the grouped new lines...
TIG
User avatar
TIG
Global Moderator
 
Posts: 13997
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Flatten to Plane v1.2 20101023

Postby rossthompson » Wed Jun 06, 2012 8:34 am

Hi TIG,

That worked a treat. Thank you - this is going to save me a lot of time!

Ross
rossthompson
 
Posts: 27
Joined: Tue Jan 27, 2009 12:26 pm
Location: Oxford
Name: Ross Thompson
Operating system: Windows
SketchUp version: 7
License type: Free/Make
SketchUp use: architecture
Level of SketchUp: Advanced

Re: Re: [Plugin] Flatten to Plane v1.2 20101023

Postby Pg09 » Thu Jan 17, 2013 2:03 pm

Thank you very, very much! :)
Pg09
 
Posts: 90
Joined: Sun Jun 01, 2008 4:10 pm
Location: now in Budapest

Re: Re: [Plugin] Flatten to Plane v1.2 20101023

Postby mqt101 » Fri May 17, 2013 10:20 am

Heloo, I can't seem to download this on my mac. Could someone help me please?
mqt101
 
Posts: 1
Joined: Fri May 17, 2013 9:33 am
Name: Mai
Operating system: Mac
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Beginner

Re: Re: [Plugin] Flatten to Plane v1.2 20101023

Postby TIG » Fri May 17, 2013 11:59 am

mqt101 wrote:Heloo, I can't seem to download this on my mac. Could someone help me please?
Explain your problem better, and we might help sort something...
Can't you see the download link?
Can't you download the file?
Can't you install it?
Can't you find the tool when it is installed?
Can't you use the tool when you find it?
etc
etc...
TIG
User avatar
TIG
Global Moderator
 
Posts: 13997
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago

Artisan Organic Toolset - a set of powerful organic modeling tools.

Premium Members get 20% discount!

Ad Machine
Robot
 
Posts: 2012

Previous

Return to Plugins

Who is online

Users browsing this forum: agmavil, Bing [Bot], blajnov, Don-Quixote, dublineel, maikomi, muze, seanibeans, sicksickisck and 15 guests