Script to convert Sketchup into Autocad?
-
I understand that sketchup converts all curved to straight lines. I'm thinking more in terms of how every straight line segment is divided into individual pieces at each intersection with another line. For example: a window that has muntins (say 2 wide x 3 high). The conversion turns the vertical muntin into 3 pieces, and each horizontal into 2 pieces. Plus, the window surround is then also divided into individual segments. It's very time-consuming trying to join these pieces back together. And if I choose to leave all the pieces separated, it makes for a messy acad drawing.
-
If you export a SKP as a 3D DWG then the Circle/Arc etc are retained.
It's only with the limited 2D export that everything gets 'line-ized'...
A SKP always has 'split' edges at intersections within the same context.
Exactly what do you seek to do ? -
The OP doesn't mention Circles or Arcs - it's about how SketchUp breaks edges automatically. There isn't any way we could modify the Pro exporter to "heal" edges for exporting. Perhaps one of the free exporters could be modified to analyse edges and then export broken, but otherwise co-linear, edges as a single acad line.
-
I use Thom Thom's cleanup plugin before export ,and after a import http://forums.sketchucation.com/viewtopic.php?f=323&t=22920
Bep
-
Thanks Bep. I'm looking forward to trying it out. Why do you also use it after you export to Autocad?
-
@svasilion said:
Thanks Bep. I'm looking forward to trying it out. Why do you also use it after you export to Autocad?
Please reread it, and think... Like many of us, he uses it before he exports his SKP model to a CAD format file; he also uses it after he imports a CAD format file into his SKP model... -
No, but I sure would like such a script.
What the OP is talking about - imagine a 12 line grid in AutoCAD (12 lines vertical crossing 12 lines horizontal). In AutoCAD that's 24 lines. If you export it into Sketchup every line that crosses a line becomes a separate segment (12 X 12 + 12 X 12)= 288 lines.
Or imagine you draw a wall with doors and door casings in AutoCAD - the floor line is one line segment. But when you open the drawing in SketchUp the floor line becomes many, many separate lines for every point that a vertical meets a horizontal.
I go back and forth between SU and AC all the time and use the Join command but it's a bit of a pain. I've asked about a script that would automatically join all contiguous lines into one line segment on the AutoCAD forums and I was told that a macro could be easily done but I never followed up on it.
-
Perhaps use MPEDIT if you have the older AutoCAD free Express Tool installed.
In newer AutoCAD you can type PE for polyline edit then M to SELECT multiple lines, once you have selected all the lines press ENTER then you will get a set of options in the command-line, press J for the JOIN command.
There are several AutoCAD resources/tools like:
http://www.dailyautocad.com/2008/04/hip-tip-converting-lines-and-arcs-to_22.html
http://www.dailyautocad.com/2009/04/joining-broken-objects-with-join.html
http://www.cadtutor.net/tutorials/autocad/joining-lines-polylines-and-arcs/
http://www.black-cad.homepage.t-online.de/pediten.htm
http://www.jtbworld.com/lisp/pljoinfuzz.htm
http://www.cadtutor.net/forum/showthread.php?32216-LISP-to-join-many-lines-to-a-single-3D-Pline -
@TIG:
Thanks for that list. The first ones, by Orhan Toker, appear to be a real wealth of knowledge on things beyond the issue at hand. Thank you, again. -
AutoCad has the Overkill command that can be used to process imports from SU. It automatically converts colinear line segments into single lines, and erases overlapping objects. It generally does an OK job.
Anssi
-
Is that really what the command is called? I would have never associated the words "Autocad" and "Overkill"
-
Yes. "Overkill" it is. The command started as a part of the unsupported Express Tools (I am not quite sure whether it is still in those or if it was "promoted" into a "regular" command already). AutoCad is similar to SU in that some of its functionality comes from commands that are actually plugins.
Anssi
Advertisement