Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Polyface mesh to solid

17 REPLIES 17
Reply
Message 1 of 18
jyan2000
1569 Views, 17 Replies

Polyface mesh to solid

Is there any lisp can convert 3d Face, Polyface mesh to Solid?
I'm trying m2s.lsp but it's not working.

Regards.
Victor
17 REPLIES 17
Message 2 of 18
Anonymous
in reply to: jyan2000

yes sir, i have a function to do that but it has limitations.

Primarily, all the facets must be defined according to the right-hand
rule -- the points around each face must be defined in a counterclockwise
direction from the perspective of the normal vector pointing to the exterior
of the solid.

when i get time, i'll fix it up and publish it but i don't mind sharing it
if you need help.


wrote in message news:5762888@discussion.autodesk.com...
Is there any lisp can convert 3d Face, Polyface mesh to Solid?
I'm trying m2s.lsp but it's not working.

Regards.
Victor
Message 3 of 18
jyan2000
in reply to: jyan2000

Thanx a lot
Message 4 of 18
Anonymous
in reply to: jyan2000

load these two

the new command you'll use is
M-S

but it will only work if your faces are defined using the right-hand-rule
Message 5 of 18
jyan2000
in reply to: jyan2000

Thanx for the lisp's Mataeux. But somehow i couldn't make it work. It's still 3d face. no changes eventhough i tried right-hand-rule. Maybe i'm doing wrong.
Regards
Victor
Message 6 of 18
stevor
in reply to: jyan2000

Does that mean each face is formed with counterclockwise verticies as seen from the outside of the intended s3dolid?
S
Message 7 of 18
Anonymous
in reply to: jyan2000

that's correct..... i need to add code that will check the direction of the
normal and adjust automatically but i haven't gotten around to it.... the
additional code will see how many faces the normal vector intersects, if
it's an even number then the normal does point out, otherwise the direction
would be reversed.


wrote in message news:5766479@discussion.autodesk.com...
Does that mean each face is formed with counterclockwise verticies as seen
from the outside of the intended s3dolid?
Message 8 of 18
Anonymous
in reply to: jyan2000

show me your DWG and i'll explain...

wrote in message news:5766429@discussion.autodesk.com...
Thanx for the lisp's Mataeux. But somehow i couldn't make it work. It's
still 3d face. no changes eventhough i tried right-hand-rule. Maybe i'm
doing wrong.
Regards
Victor
Message 9 of 18
jyan2000
in reply to: jyan2000

drawing attached in the first post.Take a look.
Regards
Z.
Message 10 of 18
Anonymous
in reply to: jyan2000

OH i see
but it is incompatible version for me to open it
dumb it down to 2002
i'll read up on the dxf format for later versions but i think my functions
will work with the latest autocad



wrote in message news:5767635@discussion.autodesk.com...
drawing attached in the first post.Take a look.
Regards
Z.
Message 11 of 18
stevor
in reply to: jyan2000

1. For simple shapes, without overlapping convolutions, comparison of normals to a central ref point may suffice; which I may try.

2. For a 2k format, maybe this will do, attached.
S
Message 12 of 18
Anonymous
in reply to: jyan2000

i exploded your window frame then reversed each 3Dface by swapping any two
of their verteces -- that is why the edges appear incorrectly

then i joined the 3Dfaces back into a mesh

then i used the M-S command to create the solid

every edge shows up in the solid without regard to edge visibility setting.
i need to add functions to unite coplanar facets and for that matter allow
facets with any number of points. you could define your frame with 4-point
faces to eliminate the diagonal edges altogether.

the yellow window pane must not be included as a part of the solid because
it does not form a shell.





wrote in message news:5768804@discussion.autodesk.com...
1. For simple shapes, without overlapping convolutions, comparison of
normals to a central ref point may suffice; which I may try.

2. For a 2k format, maybe this will do, attached.
Message 13 of 18
Anonymous
in reply to: jyan2000

Victor -

I chased this grail for years, but it exceeded my abilities and
patience. Then I discovered the AECMassElementConvert command in AutoCAD
Architecture (part of recent versions of ADT, too, I'm sure). Eureka!
You can then convert the resulting mass element into a solid (as I have
done in the attached drawing).

It will also convert a bunch of adjoining 3dfaces to a mass element, if
there aren't too many holes. Pretty amazing.

-Bill Gilliss

(I wrote M2S.lsp a few years back, but it only works with polyline
meshes, by extruding each down the z-axis -- not at all what you want to
happen with your window frame.)




jyan2000 wrote:
> Is there any lisp can convert 3d Face, Polyface mesh to Solid?
> I'm trying m2s.lsp but it's not working.
>
> Regards.
> Victor
>
Message 14 of 18
Anonymous
in reply to: jyan2000

Hate that.
Message 15 of 18
Anonymous
in reply to: jyan2000

Too much coffee. Here's the file with a 3Dsolid, not a mass element.

Bill Gilliss wrote:
> Hate that.
>
Message 16 of 18
jyan2000
in reply to: jyan2000

Thanx for the replays to all . I'm searching for the best solution about this so far it seems only F2S.lsp is the best. But still have to key 3 times to get solid. if i have 1000 windows it's just killing. anybody can modify F2S.lsp by 1 single command to get solid?

Regards
Victor Message was edited by: jyan2000
Message 17 of 18
Anonymous
in reply to: jyan2000

Victor -

The problem with polyface meshes is that their individual faces are not
even required to touch -- they can all be floating free in space
somewhere. Even if they are touching perfectly at vertices, it is a huge
job to keep track of which direction each face needs to be extruded, and
how far to extrude until each face hits other faces on the other side of
the object - maybe 10,000 lines of code instead the 1 you are hoping
for. I've tried and tried, but the math and the data structure were way
too much.

F2S projects all the faces in the same direction and to the same
"bottom" plane -- very easy by comparison.

One single command? Upgrade to Autodesk Architecture or one of the other
verticals that has the tools you need. (Or TurboC*D.)

-Bill
===========

jyan2000 wrote:
> Thanx for the replays to all . I'm searching for the best solution about this so far it seems only F2S.lsp is the best. But still have to key 3 times to get solid. if i have 1000 windows it's just killing. anybody can modify F2S.lsp by 1 single command to get solid?
>
> Regards
> Victor
>
> Message was edited by: jyan2000
>
Message 18 of 18
stefisko.com
in reply to: jyan2000

There is a way to convert a polyface mesh drawing entity into a 3d solid directly in AutoCAD environment. To convert a polyface mesh into a 3d solid please follow the step by step procedure below.

1. Use our STL4CAD AutoCAD application to export the source polyface mesh object to a STL file. The free evaluation version of stl export application is available from this site.
2. Use our STL2CAD AutoCAD application to create 3d solid in AutoCAD drawing from STL file. The free evaluation version of stl import application is available from this site.

If STL file format processing is not the case you can also use our mesh to solid conversion tool for AutoCAD that will convert any 3d object into a 3d solid drawing entity.

--
STEFISKO.com - "Fill the gap in your AutoCAD"
http://www.stefisko.com

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost