sketchucation logo sketchucation
    • Login
    βŒ› Sale Ending | 30% Off Profile Builder 4 ends 30th September

    [Plugin] Dxf_In v2.2 20110517 Dxf2Skp

    Scheduled Pinned Locked Moved Plugins
    200 Posts 41 Posters 270.2k Views 41 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • honoluludesktopH Offline
      honoluludesktop
      last edited by

      The basic arcs, have been corrected, but the Dxf contains entities currently unsupported by "Dxf Import". Until these are added, along with support for "nested block(s)", only the most basic geometry, will be imported. If necessary, the unsupported entities can be exploded into supported entities prior to being imported into SU.

      I have been unable to test "basic block(s)" except in the simplest cases. If I can get a Dxf with "BLOCK" and their related "INSERT" entities (not INSERT(s) inside a BLOCK) to test, I will then be able to check them. I need someone to post a Dxf with a pair of BLOCK(s) made in Acad as illustrated below.2 groups, a cube and a cylinder.

      1 Reply Last reply Reply Quote 0
      • BepB Offline
        Bep
        last edited by

        Hi Honoluludektop,

        I'm sorry that i cant help you with a real acad dxf ,but would'nt a dxf created with the free doublecad http://www.doublecad.com/LinkClick.aspx?link=http%3a%2f%2factivate.imsisoft.com%2fdoublecad.aspx%3fproductpage%3dDoubleCAD_XT_v2&tabid=1128&mid=3384
        do the same.

        Thanks for your effort ,and i wish you succes πŸ‘ ,

        Bep

        "History is written by the winners"

        1 Reply Last reply Reply Quote 0
        • honoluludesktopH Offline
          honoluludesktop
          last edited by

          I am not fluent in that app, and failed to take a component into it as a block, and back as a group/component with the original entities preserved. But if you build the model in DoubleCad, and save as a Dxf, I can give it a try. By inspecting the DXF, it is possible to see if the entities are preserved. Thanks.

          1 Reply Last reply Reply Quote 0
          • S Offline
            SurfingAlien
            last edited by

            thank you very much!
            I will try it asap and let you know if it works fine with my CAD programs (I'm still with SU 7.1 BTW)

            cheers,
            Alessandro

            1 Reply Last reply Reply Quote 0
            • honoluludesktopH Offline
              honoluludesktop
              last edited by

              Beta release v0.50 includes LWPolylines, group names, and some fixes. The following image is the bathtub dxf previously provided.
              temp13.jpg

              1 Reply Last reply Reply Quote 0
              • honoluludesktopH Offline
                honoluludesktop
                last edited by

                Alpha v 0.45 includes support for Blocks2Groups. Charley, while still missing lwpolylines and ellipse, arcs are resolved, and blocks accomodated in the current release, (I hope:-). Bep, translators are not equal. One app. may elect to export circles as connected edges, in other situations, SU may have, or not have a high level entity that a Cad app supports, so....Sigh!!!!, several situations need to be tested for.

                Missing lwpolyline and ellipse
                Acad has more entities then I thought possible. In the process of supporting blocks, I discovered polyface meshes. The following is one of 6 variations in this category. In this release blocks2groups is addressed. I would still like to get a Acad created Dxf of a cube, and drum represented as faces.

                The polyline is a polyface mesh.
                Highlighted groups
                Anyway, if "NO" to convert polyline to faces is selected, the above is created. It is a way of representing a 3d object with polylines, taking the least amount of space in Dxf.

                In most cases, selecting OK, to a error message, allows you to proceed. In some cases, this is taking too much time, and needs to be accommodated

                1 Reply Last reply Reply Quote 0
                • honoluludesktopH Offline
                  honoluludesktop
                  last edited by

                  Except for polyface mesh, Dxf_in v1.0 imports the basic geometric entities recognized by SU.

                  Dxf polyline mesh import.

                  1 Reply Last reply Reply Quote 0
                  • DavidBoulderD Offline
                    DavidBoulder
                    last edited by

                    Looks great! I ran it through a test with some DXF's created by EnergyPlus (as part of an energy simulation run).

                    What I noticed is that using your plugin the DXF came in 12x smaller. In the Pro I have units set to feet vs. inches, which works with these DXF's. Easy enough for the user to fix but could be nice option to add down the road. One other thing I noticed is that on your DXF import a few faces were reversed from how there were with the pro importer. The pro importer was not set to "orient faces consistently" but maybe it was doing it anyway, and the source file really does have some reversed faces.

                    Other features that would be nice, but aren't critical, are to support the layer and color applied to a face.

                    DXF_In 1.1 and pro side by side.

                    --

                    David Goldwasser
                    OpenStudio Developer
                    National Renewable Energy Laboratory

                    1 Reply Last reply Reply Quote 0
                    • honoluludesktopH Offline
                      honoluludesktop
                      last edited by

                      David, Thanks. Can you provide a sample dxf (smaller the easier for me) with layer and texture? Perhaps I should provide a options menu.

                      1 Reply Last reply Reply Quote 0
                      • DavidBoulderD Offline
                        DavidBoulder
                        last edited by

                        @honoluludesktop said:

                        David, Thanks. Can you provide a sample dxf (smaller the easier for me) with layer and texture? Perhaps I should provide a options menu.

                        Sure, here is a 50k file from the example above. Now this was made from EnergyPlus, so it may not be the best test case since it wasn't generated by AutoCad. I'm not sure if a similar file from Autocad would like the same or not.

                        This file has layers and color (not image textures)

                        (hmm, can I not upload DXF file?)

                        --

                        David Goldwasser
                        OpenStudio Developer
                        National Renewable Energy Laboratory

                        1 Reply Last reply Reply Quote 0
                        • J Offline
                          Jim
                          last edited by

                          you can download lot's of dxf files from here (my google site.) The .zip contains an un-attributed compilation of shared .dxf files designed as 2D cnc routing patterns. (17MB)

                          I'm wondering, do you know how to handle the bulge data when it appears in the lwpolylines? It's something I'd like to add to my importer, too.

                          Hi

                          1 Reply Last reply Reply Quote 0
                          • GaieusG Offline
                            Gaieus
                            last edited by

                            I made dxf (and dwg) an attachable file extension

                            Gai...

                            1 Reply Last reply Reply Quote 0
                            • honoluludesktopH Offline
                              honoluludesktop
                              last edited by

                              Jim, Thanks, I will take a look at your files. Is lwpolyline something that is required by a lot of modern applications? I found the following, but bulge remains unimplemented with my importer:

                              "The bulge is the tangent of 1/4 of the included angle for the arc between the selected vertex and the next vertex in the polyline's vertex list. A negative bulge value indicates that the arc goes clockwise from the selected vertex to the next vertex. A bulge of 0 indicates a straight segment, and a bulge of 1 is a semicircle."

                              DXF is on the other side of the moon when compared with SUs faces, and edges. I initially made Dxf_In work for my own Cad application, then added features as others have requested. Initially, by self imposed discipline, all of my cad models were built with 3d faces, and blocks. My Cad2Dxf2Su requirements were simple. But times change, and while my code is fairly well organized to implement new entities, it needs work on the overall DXF structure. Something I ignored since I was only interested in geometry.

                              Gai, Great. Perhaps, like a lot of others, I only learned how to "send to zip" once I needed to do it.

                              1 Reply Last reply Reply Quote 0
                              • honoluludesktopH Offline
                                honoluludesktop
                                last edited by

                                Just change the file.extension name to .txt, or right click, sent to .zip first. Thanks

                                Addenda: See post by Gai below.

                                1 Reply Last reply Reply Quote 0
                                • DavidBoulderD Offline
                                  DavidBoulder
                                  last edited by

                                  Here is the attachment. Thanks for the tips. I left the file at work, so couldn't send last night. Sounds like we can do dxf's now.


                                  GeometryTest.dxf

                                  --

                                  David Goldwasser
                                  OpenStudio Developer
                                  National Renewable Energy Laboratory

                                  1 Reply Last reply Reply Quote 0
                                  • J Offline
                                    Jim
                                    last edited by

                                    Looking at the Blender dxf importer (written in Python) and found these dxf test files in the Downloads section:

                                    301 Moved Permanently

                                    favicon

                                    (wiki.blender.org)

                                    Hi

                                    1 Reply Last reply Reply Quote 0
                                    • honoluludesktopH Offline
                                      honoluludesktop
                                      last edited by

                                      V1.2 provides the option to select input units, and location (thanks to_tt). Not being familiar with metric conversion, I did not check their accuracy.
                                      Model built converting feet to inchesBtw: In regards to lwpolylines, when I wrote this translator, I found that the dxf example I used contained occasional differences in the actual number of vertices's, and the number provided by the dxf. So, I ended up writing a procedure that did not depend on the stated number. I am not sure if this is a misunderstanding on my part or a bug in the program that created the dxf.

                                      1 Reply Last reply Reply Quote 0
                                      • honoluludesktopH Offline
                                        honoluludesktop
                                        last edited by

                                        Sigh...As soon as you think you got it, there is something to change, hence v1.1. Functionally no different, but with better error messages. Unless I find a bug, or figure how to add a polyface mesh, this should be it:-) Attached are some test with old.dxf models.
                                        A first draft Cad.Dxf model brought into SU for visualization.
                                        Another first draft Cad.Dxf detail originally imported for study.
                                        The model's groups are based on common materials, textures, or colors. This makes it is easy to update the SU model's textures of any Cad based revision. The groups/blocks are sent both ways so that the production drawings are easily revised based on changes to the model.

                                        1 Reply Last reply Reply Quote 0
                                        • J Offline
                                          Jim
                                          last edited by

                                          @honoluludesktop said:

                                          Btw: In regards to lwpolylines, when I wrote this translator, I found that the dxf example I used contained occasional differences in the actual number of vertices's, and the number provided by the dxf. So, I ended up writing a procedure that did not depend on the stated number. I am not sure if this is a misunderstanding on my part or a bug in the program that created the dxf.

                                          I can't find the reference now, but I understood it to say something similar to "polylines that can be converted to lwpolylines, are converted into lwpolylines in order to save space."

                                          I have a routine to handle the bulge data for regular polylines, but the lwpolylines are different enough that I haven't been able to decipher them consistently.

                                          I found a dwg/dxf converter for Windows that may be of interest. It converts between dwg and dxf, but also from dxf to dxf and you can choose several versions of the file format. So maybe it will be useful for converting tricky dxf files into older formats which your importer is more tolerant of.

                                          The converter is here, under the name ODA Teigha File Converter.

                                          Link Preview Image
                                          Demo | Open Design Alliance

                                          favicon

                                          (www.opendesign.com)

                                          Hi

                                          1 Reply Last reply Reply Quote 0
                                          • honoluludesktopH Offline
                                            honoluludesktop
                                            last edited by

                                            Jim, I am using Dxf Reference, ACAD 2010 and am not able to identify bulge data within dxf polyline.
                                            Temp89.jpg
                                            The group code for bulge in lwpolyline "42", is absent in the 2010 reference for polyline unless it is part of "70" and some other group code. I don't look forward to figuring out how to including it in Dxf_In.

                                            Incidentally, Dxf_In doesn't check for version number, and will attempt to process any File.Dxf, even one that is manually, incorrectly edited, and rejected by Import SU Pro. It has succeed for the implemented entities, except when the group code is written out of order. I noticed that import SU Pro V7 refused to translate a 2010 Dxf file.

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 9
                                            • 10
                                            • 1 / 10
                                            • First post
                                              Last post
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement