[Plugin] Dxf_In v2.2 20110517 Dxf2Skp
-
@honoluludesktop said:
Alex, good news is "layer0" is "RED_RECTANGLE" so the problem is fixable. Bad news, the missing entities may be "unsupported" by Dxf_In. Sorry, but the math for those entities
may be
(or not) beyond me. I will take a look.Is the attached image the one that you are looking for?[attachment=0:fq5clw9c]<!-- ia0 -->Temp00.png<!-- ia0 -->[/attachment:fq5clw9c]If not tell me what is wrong? The line that intersects the circle is on "layer0". I suspect that is wrong. Can you tell me what layer it's on? Perhaps layer "0".
it is almost good
the line that intersects the circle is on layer named "0" on CAD, but i see that is on "Layer0" of Sketchup. that is bad, because SU should create the later named "0", so the dxf imported should pe placed on totally different layers than that existing ones.also: how could you import the dxf and get the entire rectangle, and almost the Block completely imported??
-
there should be 5 layers:
layer0
0
red rectangle
yellow Block
Blue circle -
In a DWG/DXF import the CAD layer '0' shouldbecomes= SKP layer 'Layer0' [nil]
Other layers should be named to suit... -
here are the layers in SU:
please notice that there is Layer0 and 0
-
here is the layout in DraftSight :
notice that the name "red rectangle" disappears from the layer tab in SU.
i don't know what you did Honoluludesktop, that you got the picture earlier showed.
and by the way, how did you get all the lines importing accurately ? -
Looks like you got another post in while I was writing the other.>_< The accurate image is based another application that I use to check my work. I placed the SU layer window over it in order that you can ID the layers.
-
Yes, in my case, "Red_Rectangle" is missing. While I am moving ahead on this, I would like to get the opinion of those that are more experienced then myself. Bottom line is that the app. should conform to Acad, GCD/4D (the reason I wrote this plugin), and SU specifications.
Btw, Dxf_In currently doesn't do splines, ellipses, or polyface entities. Ellipsis can be added in the future, but polyface entities, and splines are outside of my comprehension of their computer math algorithms.
-
@honoluludesktop said:
Looks like you got another post in while I was writing the other.>_< The accurate image is based another application that I use to check my work. I placed the SU layer window over it in order that you can ID the layers.
but how did you get that accurate importing? i see all the lines in your SU
-
Tig, Do you think it will be a problem if I add layer "0" to the set along with layer0"? If a problem, why? Don't know if I can do it, but was about to try having both.
-
Alex, getting there. The yellow block is erroneously being replicated. Maybe tomorrow.
-
i see in the picture, that the yellow Block is placed 2-times, for some reason
pray it will work tomorrow -
also, it is an advance already, because i see the rectangle fully imported into SU.
-
Alex, This should do for now. The plugin needs to be tested for lines, circles, arcs, faces, 3dfaces, and polylines.dxf_In_v1.28.rbI will have to work on the problem group or component transformations before I add ellipses to the supported entities.
-
i read the above post
i saw "The plugin needs to be tested for lines, circles, arcs, faces, 3dfaces, and polylines." and i created a new file with everything that you said. So, here iti is:test4plugin.dxf
it is a model that has a layer for each element that you have requested.after testing it in SU, this is what it needs to be said:
- everything imported pretty well, but 3Dfaces and Blocks. (blocks i tested with other files, and got the error"bloks not suppoerted)
- other thing; i think it is a bug: everytime i open an multi-layered dxf in SU, the layer "PERGOLAS" is automatically imported, for no reason. here are the previews:
![what's with "PERGOLAS" ?](/uploads/imported_attachments/LpiM_layerstrangeness0.PNG "what's with "PERGOLAS" ?") ![here's on different file. the "PERGOLAS" still appears for some reason](/uploads/imported_attachments/JpAL_layerstrangeness2.PNG "here's on different file. the "PERGOLAS" still appears for some reason")
- the last thing: is that SU's Layer0, when is turned off, everything disappears. It should better dissapear only what's on Layer0. If a create another file with two layers on SU, and put different objects on diffenret layers, when i turn off Layer0, not everything disappears.
-
If you imported a Dxf into a existing file, there may be left over layers. Check by purging the file.
Yes, "nested blocks" are not currently supported, and I am working on the Acad entity "Insert" (which is like a transformed component instances).
What problem did you find with 3DFaces? I just discovered that the surface gets put on the correct layer, but its edges remain on layer0.
SketchUp Layers are not like Acad layers. I believe that it is a mistake to eliminate Layer0. You can control entity visibility with the imported Acad layers, but the consensus here on SketchUcation is that you should always draw on layer0. Perhaps at a later time, I can offer removing Layer0 as a help menu option.
Dxf_In is written (to the best of my in-abilities:-) to conform to Acad's Dxf specifications. Problem is, every other Cad program that writes Dxf, only does so in terms of that application's characteristics, and sometimes fails to translate perfectly. See previous discussion. Because many Dxf files are not from Acad, it's necessary to check the changes to Dxf_In don't compromise the original Acad specification. All that takes time, and I don't always succeed.
-
You have to have layer 'Layer0' in a SKP.
You have to have layer '0' in a DWG/DXF.Whist CAD uses layers to separate geometry a SKP's layers only separate the visibility and geometry connectedness remains.
In CAD, objects on layer '0' inside a Block [aka Component] are treated in a different way to those placed on other layers; those on layer '0' will displayed the properties of the layer used by the Insert [aka Instance] of that Block, rather than those of layer '0' itself.
[This is akin to SUp's use of 'materials' - if a face inside a group/componnet-instance has the 'default material' then when you 'paint' the group/instance those faces display the group/instance's material instead - although in reality they are not changed - faces with other materials are unaffected by the 'painting' of the 'container'...]To properly reflect the CAD data imported into a SKP all geometry should keep its CAD layers, and also all Inserts should keep their CAD layers.
Anything on CAD layer '0' should be given the SKP layer 'Layer0' - or more precisely the 'default-layer', because the default-layer has different names in different locales; to find that simply have some code that does this...
currentlayer=model.active_layer model.active_layer=nil defaultlayername=model.active_layer.name model.active_layer=currentlayer
This leaves the current active-layer unchanged but sets "defaultlayername
" as a reference to the default-layer's name in that SKP's locale... which is 'Layer0' in EN-US but other names in other languages.......... -
the left over is gone , so no more "pergolas"
i see that 3d faces are not being imported at all. As you could see in the picture form my erlier post , there is a layer called BF witch is a 3d model from Blender imported into DraftSight, and finally exported as a 3d-dxf. in SU doesn't come that particular object. It is a truncated piramyd, and not a single line appears in SU, neither Layer0, nor any other layer. The layer (the name of it) appears in the layer's list, but no geometry exists. (as seen in the pictures from previous post)
No, do not eliminate Layer0. I'm not saying this. I only say that when Layer0 is turned off( say i want that for seeing just for seeing what i have imported from dxf file), everything dissapears, so by turning off Layer0, my scene desissapears and so the imported geometry from dxf, even though the the geometry from dxf is actually marked as visible.
It is a very strange behaviour, i don't get why you don't understand it. Look carefully at the 2 pictures comparing the situations, into my previous post. -
TIG, i'm saying isn't it better to have this situation?
@on Layer0, everybody draws their model in SU, say a forrest of cubes.
@now i want to import a dxf, in order to have some drawings that other made, to construct some more geometry into my scene. so it is better to have all the geometry for dxf on other layers that Layer0, to not mess up the entire scene.all i say is this: the imported dxf should be on it's separate layers, and geometry that is already in SU, should remain on it's layers. Not messing around. Everybody with it's place.
i think this is the best way on keeping everything organised.
cheers! -
The entire imported DXF should be inside its own group placed on Layer0 and named after the DXF file name. If you want to the move it onto a new layer 'XXX' it's easy...
All of the imported bits should maintain their 'nesting', and layering and naming - except that CAD layer '0' becomes SKP 'Layer0' [or whatever it's called in your locale]... -
sorry TIG, but i do not agree with you.
to have EVERYTHING on different layers that SU's is better for keeping everything organised. I am sorry you cannot understand that.
Advertisement