@devitg wrote:
Please download the LSP . I forgot a defun and the LAY-COLL
IN your DWG the regions were in the wrong elevation.
And when I tried out your latest LISP I got an error: ; error: no function definition: ACTV
@Kent1Cooper wrote:
But I find that the boxy Solids Explode into Regions that all seem to be triangles, and the Solids' faces are made of multiple triangles, not rectangles:

@Kent1Cooper - yeah, this particular model was originally a [very triangulated] mesh - this is how I received it. In real life, things like this can happen - you receive models that aren't exactly how you wish they were.
I thought this could be easily repaired in 3dsMax and then exporting back to DWG. It wasn't really that easy, but doable.
The "good" thing from real life examples (with problems) is that we're forced to investigate other methods. For example the script from CodeDing that worked perfectly nice with clean solids didn't work at all with this triangulated mesh.
@doaiena wrote:
@Haider_of_Sweden wrote:
please keep in mind that the polylines need to be in their correct elevation in 3D. SOLPROF is a 2D tool for layouts.
Are you sure?
If this is the expected result, i might be on to something.
😲 Incredible! I didn't investigate the error message that said "You must be in a Layout to use SOLPROF." more clearly because I assumed it would be a 2d-tool. One might wonder why you have to go to Layout to make it work...
Thank you @doaiena
Here are the steps again
- Enter a layout-view
- Be in TOP-view
- SOLPROF
- select objects
- Display hidden profile lines on separate layer? NO (choose YES if the model is complex. You might get more more lines. But then, you might also need to do fixes by hand)
- Project profile lines onto a plane: NO (if YES; then you get a 2D projection which we do not want in this case)
- Delete tangential edges? YES (tangential edges are the side edges and we don't need them either)
- We now have a block of all lines. This block needs to be exploded and the lines need to be joined together.
If you need the volumes bottom-footprint as well, follow the above steps but be on the BOTTOM-view.
This is one of the best solutions since its fast and doesn't require much and it worked with messy "triangulated solids" (mesh that were converted to solids).
Downsides
- If two identical volumes are next to each other, you will end up having overlapping lines where they touch each other side by side. When selecting all lines to join them, the footprint can end up wrong.
- if we have two volumes with different heights next to eachother, SOLPROF will catch the upper edge and might miss the lower edge if you selected both of them at the same time during the operation. We will need to select them individually and run SOLRPOF individually.
Solution with LISP
I would be thankful if someone is willing to take a look at this. LISP can solve this by running SOLPROF individually on each of the selected solids, something like this:
- go to top view (alternatively layout and then top-view)
- run this operation on the solids individuall: SOLPROF NO NO YES
- rename layers PH-XXX > TOP-footprint-hidden & PV-XXX > TOP-footprint
- go to bottom view (alternatively layout and then bottom-view)
- same as above
- rename layers to BOTTOM-footprint-hidden & BOTTOM-footprint