Jump to content

How to convert 3D faces or mesh to line?


filsoof13

Recommended Posts

Hi.

I have a complicated 3d mesh and i want to use some edges in another software. The software accepts lines and i want to convert mesh to simple lines. I can make 3d polyline from the mesh but i can't convert it to line.

Does anyone know how we can convert mesh to line or 3d face to line or 3d polyline to line?

Link to comment
Share on other sites

  • Replies 20
  • Created
  • Last Reply

Top Posters In This Topic

  • filsoof13

    9

  • ReMark

    8

  • Tyke

    2

  • David Bethel

    1

If i explode 1 3dpolyline it creates 2 lines and my model will have 1 extra point. I need a method which creates 1 line from 1 3dpolyline.

Link to comment
Share on other sites

Then maybe what you need is a lisp program that will draw over your exploded line, consisting of 3 points, with a line containing only 2 points.

Link to comment
Share on other sites

If a 3D polyline has 4 segments (ie 5 vertices) when it is exploded you would have 4 separate lines each with 2 endpoints (ie 8 points).

 

If you explode your mesh you will get 3D faces. If you explode all your 3D faces vou will end up with triangles made up of separate lines, but with lots of duplicates because two adjacent faces will each producw a line on their common edge. You could use OVERKILL to get rid of the duplicates.

Link to comment
Share on other sites

I use AutoCad 2012 and it does not explode 3d faces. Should i use another command instead of "explode" to explode them?

 

I've done it in the past in 2012. Select the normal Explode tool or issue the command and select your mesh.

Link to comment
Share on other sites

I've done it in the past in 2012. Select the normal Explode tool or issue the command and select your mesh.

 

I exploded mesh to 3dface but 3dfases can't be exploded!

Link to comment
Share on other sites

In my quick test the Region command did work on a 3DFace.

 

Here is another option. Try the FLATTEN command.

 

Forum member rkmcswain suggests this: WMFOUT and WMFIN also will work.

 

Convert a 3DFace to a 3d or 2D polyline using sample code found here...http://adndevblog.typepad.com/autocad/2013/01/convert-3dface-to-polyline.html

Link to comment
Share on other sites

It says:

 

Command: REGIOn

Select objects: 1 found

Select objects:

1 closed, degenerate or unsupported object rejected.

0 loops extracted.

0 Regions created.

 

I'm not an expert and I don't know what it means.

About the 3d face I have chosen above it says:

 

3D FACE Layer: "2D property 1"

Space: Model space

Handle = d9f4

first point, X= -1.6021 Y= 1.6040 Z= 0.7000

second point, X= -1.6021 Y= 1.6870 Z= 0.6850

third point, X= -1.5631 Y= 1.6890 Z= 0.6810

fourth point, X= -1.5641 Y= 1.6060 Z= 0.6960

 

I've seen these commands before. I think these 3 commands will produce lines with z=0 elevation. Am I wrong?

I need lines in their correct position.

Link to comment
Share on other sites

I need lines in their correct position. Then I guess FLATTEN won't be of any use.

 

Did you try rkmcswain's suggestion?

 

Maybe the task could be accomplished in another program. Perhaps Inventor or Inventor Fusion?

Link to comment
Share on other sites

For anyone interested I found a lisp routine that purports to convert 3DFaces to lines over at the CADforum. It is called 3DF2L.lsp and can be found here...http://www.cadforum.cz/cadforum_en/download.asp?cat=33

 

Link to comment
Share on other sites

This will convert 3DFACEs to 3DPOLYLINES ;

 

 

[b][color=BLACK]([/color][/b]defun c:fa23dpl [b][color=FUCHSIA]([/color][/b]/ ss i en ed[b][color=FUCHSIA])[/color][/b]
 [b][color=FUCHSIA]([/color][/b]and [b][color=NAVY]([/color][/b]setq ss [b][color=MAROON]([/color][/b]ssget [b][color=GREEN]([/color][/b]list [b][color=BLUE]([/color][/b]cons 0 [color=#2f4f4f]"3DFACE"[/color][b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b]
      [b][color=NAVY]([/color][/b]setq i 0[b][color=NAVY])[/color][/b]
      [b][color=NAVY]([/color][/b]while [b][color=MAROON]([/color][/b]setq en [b][color=GREEN]([/color][/b]ssname ss i[b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b]
             [b][color=MAROON]([/color][/b]setq ed [b][color=GREEN]([/color][/b]entget en[b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b]
             [b][color=MAROON]([/color][/b]entmake [b][color=GREEN]([/color][/b]list [b][color=BLUE]([/color][/b]cons 0 [color=#2f4f4f]"POLYLINE"[/color][b][color=BLUE])[/color][/b]
                            [b][color=BLUE]([/color][/b]assoc 8 ed[b][color=BLUE])[/color][/b]
                            [b][color=BLUE]([/color][/b]cons 66 1[b][color=BLUE])[/color][/b]
                            [b][color=BLUE]([/color][/b]list 10 0 0 0[b][color=BLUE])[/color][/b]
                            [b][color=BLUE]([/color][/b]cons 70 9[b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b]
             [b][color=MAROON]([/color][/b]foreach p '[b][color=GREEN]([/color][/b]10 11 12 13[b][color=GREEN])[/color][/b]
                [b][color=GREEN]([/color][/b]entmake [b][color=BLUE]([/color][/b]list [b][color=RED]([/color][/b]cons 0 [color=#2f4f4f]"VERTEX"[/color][b][color=RED])[/color][/b]
                               [b][color=RED]([/color][/b]assoc 8 ed[b][color=RED])[/color][/b]
                               [b][color=RED]([/color][/b]cons 10 [b][color=PURPLE]([/color][/b]cdr [b][color=TEAL]([/color][/b]assoc p ed[b][color=TEAL])[/color][/b][b][color=PURPLE])[/color][/b][b][color=RED])[/color][/b]
                               [b][color=RED]([/color][/b]cons 70 32[b][color=RED])[/color][/b][b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b]
             [b][color=MAROON]([/color][/b]entmake [b][color=GREEN]([/color][/b]list [b][color=BLUE]([/color][/b]cons 0 [color=#2f4f4f]"SEQEND"[/color][b][color=BLUE])[/color][/b][b][color=BLUE]([/color][/b]assoc 8 ed[b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b]
             [b][color=MAROON]([/color][/b]entdel en[b][color=MAROON])[/color][/b]
             [b][color=MAROON]([/color][/b]setq i [b][color=GREEN]([/color][/b]1+ i[b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b]
 [b][color=FUCHSIA]([/color][/b]redraw[b][color=FUCHSIA])[/color][/b]
 [b][color=FUCHSIA]([/color][/b]prin1[b][color=FUCHSIA])[/color][/b][b][color=BLACK])[/color][/b]

 

 

-David

Link to comment
Share on other sites

For anyone interested I found a lisp routine that purports to convert 3DFaces to lines over at the CADforum. It is called 3DF2L.lsp and can be found here...http://www.cadforum.cz/cadforum_en/download.asp?cat=33

 

 

Hi.

Thank you ReMark! I was busy yesterday and I could find time to check forum now and I am surprised! Thank you very much! It works and helps me so much.

:D

I can say just thank you again.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...