Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Converting a SOLID to Polyfacemesh or 3DSolid


I'm working on the LISP-Part of a DWG-to-own-format-converter. We use a LISP script  on BricsCAD  to read out the geometry information from the DWG files. It worked well with most 2d and 3d drawings, but  now we've encountered a case, where certain walls in a drawing just didn't show up.

They turned out to be solids (like in the attached file strange solid.dwg). Does anyone know a way to convert these into 3d-Solids or Polyface-Meshes? 3DConvert and explode won't work on them.


  • The Solids you are seeing are not 3D solids. These "AcDbSolid" entities have a rather simple geometry (4 polygon points, normal, thickness). Conversion should not be problematic. The thing that may be confusing you is that the wall in the dwg consists of 3 of these entities in a group.
  • Follow-up to Roy's comment :
    set PICKSTYLE=0 to prevent "group selection" when you run entity selection by your code ...
    might help ... many greetings !
  • I've saved the file as DXF and looked through it with notepad ++.
    There are no AcDbSolid-Entities in it, but AcDbTrace. Only their DXF-Group Code 0 says SOLID.
    But from what I see here:
     it doesn't matter much.

    What would these genereally be treated at thickness 0? Rather like a closed polyline or like a filled surface?
    I have to generalize like that, because our script runs "in the dark" on a server.
  • You should not say 'It does not matter' in such cases. "AcDbSolid" is the object name of the entity in question.
    [code](vla-get-objectname (vlax-ename->vla-object (car (entsel))))[/code]
    When working with DXF or entity lists you should indeed look for (0 . "SOLID"). Note that (100 . "AcDbTrace") is also use for (0 . "TRACE") entities. It may be useful to look at "TRACE" entities as well...

    "SOLID" and "TRACE" entities are somewhat obsolete in 2D drafting. They have been superseded by the solid hatch pattern and the polyline with width, respectively.
  •  My usual experssion problem again. ^^'

    What I meant is, that for the external handling, it wouldn't make that much of a difference, if I have a surface of three points and extrusion and a tickness, or a surface of four points and extrusion and a thickness. Not to break with out current interface (an extension would eat too much time on that end), I'll have to make polylines  out of them. I guess I can handle a TRACE and a SOLID with one function. They both consist of four corners.  I can check if the fourth corner is idendical to the third and omit it if that's the case. If the thickness is zero I make it a closed polyline, if it differes from 0, I'll have to make a polyface mesh. But that's Monday-Steven's problem for now. 

    Thanks a lot for the help!

    And yes I did some reserach on Traces and Solids too. That's why we decided not to support them originally. The trouble just is, now we have a customer, who's architect loves to use Traces for whatever reason. He even uses them for window frames with an extrusion of 0,0,-1 and the thickness of the frame.  So now we have to support them in the future.
  • The default for a triangular SOLID may be that the 3rd and 4th point are superimposed, but you should also consider that other points can have the same coordinates.
This discussion has been closed.
Origami is the Japanese word for paper folding. ORI means to fold and KAMI means paper and involves the creation of paper forms usually entirely by folding.

Powered by VanillaForums, Designed by Steam