Convert 3d faces to 3d polylines

 Hi,
I'm new with Bricscad.
I have a terrain model made of 3d faces that I'd like to convert to 3d polylines. Is it possible how ?
Thanks
Xavier

Comments

  •  Or if somebody can convert (or tell me how to do it) the file attached to something that ArchiCAD can read...
    It's only points and 3d Face. Archicad doesn't want to open it...

    Drawing2(3).dwg


  • Hi Xavier,

    If you would like to consider using a third-party tool, our CADPower software for Bricscad does exactly this by way of the CP_3DF2PL command.

    See this URL for more info:

    http://4d-technologies.com/cadpower/manual/conversion_tools.htm#3DF2PL

    All attached data (xdata/object data) are retained and transferred.

    You can do this via a simple Lisp routine as well.

    I will try and post a simplified LISP to do this shortly.

    Regards
    Rakesh Rao
    www.coordsys.com



  • Hi Xavier,

    I quickly processed your drawing and converted the 3dfaces to 3d polyline. See attached DWG. You can try and do the same if you like using an eval version.

    Meanwhile, I will try and cook up a small Lisp for you to do the same.

    Regards
    Rakesh Rao

    Drawing2(3)_processed.dwg

  • Wow, thank you very much Rakesh !
    I also found another solution (not as good). Convert 3d Faces to regions and then explode the regions, but this ends with lines instead of polylines...
    Thanks again
    Xavier

  • Hi Xavier,

    Here is a 'quick and dirty' extract from the 3df2pl command of CADPower. You can use this to do the job just as well, but without the bells and whistles.

    Regards
    http://rakeshrao.typepad.com

    [code]
    ;; | ----------------------------------------------------------------------------
    ;; | C:3df2pl
    ;; | ----------------------------------------------------------------------------
    ;; | Function : Convert 3DFACEs to normal 3d polylines.
    ;; | Author   : (C) Rakesh Rao, Singapore
    ;; | Action   : --
    ;; | Updated  : April 21, 1999
    ;; | ----------------------------------------------------------------------------

    (defun c:3df2pl ( / ss ename entl cnt OS )

    (setvar "CMDECHO" 0)
    (princ "\nConverts 3DFACE to a 3D Polyline with elevations of each 3DFACE vertex.")

    (setq ss (ssget (list (cons 0 "3DFACE"))))

    (if ss
    (progn
        (setq
            OS  (getvar "OSMODE")
            ssl (sslength ss)
            cnt 0
        )
        (setvar "OSMODE" 0)

        (princ "\n")
        (repeat ssl
            (setq
                ename (ssname ss cnt)
                entl  (entget ename)
                cnt   (1+ cnt)
            )

            (command "._3dpoly" (LI_item 10 entl) (LI_item 11 entl) (LI_item 12 entl) (LI_item 13 entl) "_Close")
        )
        (setvar "OSMODE" OS)
    ))
    (prin1)
    )

    ;; | ---------------------------------------------------------------------------
    ;; | LI_item
    ;; | ---------------------------------------------------------------------------
    ;; | Function : Returns the first occurence of a DXF dotted pair from a list
    ;; | Argument : 'n'     - The DXF code to check
    ;; |            'alist' - The List to check
    ;; | Returns  : The value of the DXF dotted pair, if it exists else returns nil
    ;; | Update   : December 26, 1998
    ;; | e-mail   : rakesh.rao@4d-technologies.com
    ;; | Web      : www.4d-technologies.com
    ;; | ---------------------------------------------------------------------------

    (defun LI_item (n alist)
        (cdr (assoc n alist))
    )

    (princ "\nType '3df2pl' to start.")
    (prin1)
    [/code]
This discussion has been closed.