TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: sln8458 on May 19, 2021, 03:07:33 AM

Title: entmake and 3Dsolids
Post by: sln8458 on May 19, 2021, 03:07:33 AM
Is it possible to create 3DSOLIDS and manipulate them via entmake?

example
If I have a closed polyline can I use the Revolve command to create a Donut solid?

Steve
Title: Re: entmake and 3Dsolids
Post by: David Bethel on May 19, 2021, 04:06:27 PM
In short "No"

A little longer The data is written and stored in binary

A little longer - If you can do this then you need to become a professer at MIT and have lots of letters after the end of your name.

My $0.05   -David
Title: Re: entmake and 3Dsolids
Post by: ElpanovEvgeniy on May 20, 2021, 01:36:20 AM
Working with 3dsolid using functions entmake/entmod/entupd - is possible, but you will have to write a 3d core and a sufficient library of functions yourself.
For example, I wrote a similar functionality, but not for a donut. My program works with any complex solids, but only with flat faces.

This is a very big job ...
Title: Re: entmake and 3Dsolids
Post by: sln8458 on May 20, 2021, 02:52:53 AM
Thank you guys for your replies.

@ElpanovEvgeniy
The donut may have been a bad example in this instance, but the end result is it way beyond my capabilities.

Steve

Title: Re: entmake and 3Dsolids
Post by: David Bethel on May 20, 2021, 07:12:46 AM
This is a very big job ...

I can only imagine !

Just as a  sample,  the data for a single 3DSPHERE 1" Diameter

Code: [Select]
SECTION
  2
ENTITIES
  0
3DSOLID
  5
9A
330
1F
100
AcDbEntity
  8
0
100
AcDbModelerGeometry
 70
     1
  1
mogoo i m o           
  1
ni ^ *+0;:,4 ^ *+0\^ [ nh ^ LR iqoqmqhoml QK mk K7* R>& mo oheokeoo momn
  1
n fqfffffffffffffffj:rooh n:rono
  1
>,27:>;:- {rn rn _nm mogqoqmqhoml |
  1
=0;& {rn rn {rn {m {rn {rn |
  1
3*2/ {rn rn {rn {rn {l {n |
  1
,7:33 {rn rn {rn {rn {rn {k {rn {m |
  1
9><: {rn rn {rn {rn {rn {l {rn {j 90-(>-; ,6183: |
  1
,/7:-:r,*-9><: {rn rn {rn o o o n n o o o o n 90-(>-;@) V V V V |
  0
ENDSEC
  0

Regards  -David
Title: Re: entmake and 3Dsolids
Post by: ElpanovEvgeniy on May 21, 2021, 12:41:32 AM
I can only imagine !

Just as a  sample,  the data for a single 3DSPHERE 1" Diameter


See the topic about reading 3Dsolids:
https://www.theswamp.org/index.php?topic=25855.msg311177#msg311177
Title: Re: entmake and 3Dsolids
Post by: ahsattarian on January 07, 2022, 01:39:37 PM
Working with 3dsolid using functions entmake/entmod/entupd - is possible, but you will have to write a 3d core and a sufficient library of functions yourself.
For example, I wrote a similar functionality, but not for a donut. My program works with any complex solids, but only with flat faces.

This is a very big job ...

Hello Sir,
Would you please offer your LISP  about entmake 3dsolid  ???
I'm in a big need of it  !!
Regards,
Amir
Title: Re: entmake and 3Dsolids
Post by: well20152016 on January 07, 2022, 07:24:09 PM
I can only imagine !

Just as a  sample,  the data for a single 3DSPHERE 1" Diameter


See the topic about reading 3Dsolids:
https://www.theswamp.org/index.php?topic=25855.msg311177#msg311177


(body $-1 -1 $-1 $2 $-1 $-1 #)
   (lump $-1 -1 $-1 $-1 $3 $1 #)
   (shell $-1 -1 $-1 $-1 $-1 $4 $-1 $2 #)
   (face $-1 -1 $-1 $5 $6 $3 $-1 $7 forward single #)
   (face $-1 -1 $-1 $8 $9 $3 $-1 $10 reversed single #)
   (loop $-1 -1 $-1 $-1 $11 $4 #)
   (plane-surface $-1 -1 $-1 10 11 17 0 0 1 1 0 0 forward_v I I I I #)
   (face $-1 -1 $-1 $12 $13 $3 $-1 $14 reversed single #)
   (loop $-1 -1 $-1 $-1 $15 $5 #)
   (plane-surface $-1 -1 $-1 10 11 7 0 0 1 1 0 0 forward_v I I I I #)
   (coedge $-1 -1 $-1 $16 $17 $18 $19 forward $6 $-1 #)
   (face $-1 -1 $-1 $20 $21 $3 $-1 $22 reversed single #)
   (loop $-1 -1 $-1 $-1 $23 $8 #)
   (plane-surface $-1 -1 $-1 10 6 12 0 1 0 0 0 1 forward_v I I I I #)
   (coedge $-1 -1 $-1 $24 $25 $26 $27 forward $9 $-1 #)
   (coedge $-1 -1 $-1 $28 $11 $29 $30 forward $6 $-1 #)
   (coedge $-1 -1 $-1 $11 $28 $31 $32 forward $6 $-1 #)
   (coedge $-1 -1 $-1 $33 $34 $11 $19 reversed $35 $-1 #)
   (edge $-1 -1 $-1 $36 -5 $37 5 $18 $38 forward @7 unknown #)
   (face $-1 -1 $-1 $39 $40 $3 $-1 $41 reversed single #)
   (loop $-1 -1 $-1 $-1 $42 $12 #)
   (plane-surface $-1 -1 $-1 5 11 12 1 0 0 0 0 -1 forward_v I I I I #)
   (coedge $-1 -1 $-1 $43 $31 $44 $45 forward $13 $-1 #)
   (coedge $-1 -1 $-1 $46 $15 $43 $47 forward $9 $-1 #)
   (coedge $-1 -1 $-1 $15 $46 $48 $49 forward $9 $-1 #)
   (coedge $-1 -1 $-1 $34 $33 $15 $27 reversed $35 $-1 #)
   (edge $-1 -1 $-1 $50 -5 $51 5 $26 $52 forward @7 unknown #)
   (coedge $-1 -1 $-1 $17 $16 $53 $54 forward $6 $-1 #)
   (coedge $-1 -1 $-1 $55 $56 $16 $30 reversed $40 $-1 #)
   (edge $-1 -1 $-1 $37 -5 $57 5 $29 $58 forward @7 unknown #)
   (coedge $-1 -1 $-1 $23 $59 $17 $32 reversed $13 $-1 #)
   (edge $-1 -1 $-1 $60 -5 $36 5 $31 $61 forward @7 unknown #)
   (coedge $-1 -1 $-1 $26 $18 $59 $62 forward $35 $-1 #)
   (coedge $-1 -1 $-1 $18 $26 $55 $63 reversed $35 $-1 #)
   (loop $-1 -1 $-1 $-1 $33 $39 #)
   (vertex $-1 -1 $-1 $19 0 $64 #)
   (vertex $-1 -1 $-1 $19 1 $65 #)
   (straight-curve $-1 -1 $-1 15 11 17 0 1 0 I I #)
   (face $-1 -1 $-1 $-1 $35 $3 $-1 $66 reversed single #)
   (loop $-1 -1 $-1 $-1 $55 $20 #)
   (plane-surface $-1 -1 $-1 10 16 12 0 -1 0 0 0 -1 forward_v I I I I #)
   (coedge $-1 -1 $-1 $67 $53 $56 $68 forward $21 $-1 #)
   (coedge $-1 -1 $-1 $59 $23 $24 $47 reversed $13 $-1 #)
   (coedge $-1 -1 $-1 $53 $67 $23 $45 reversed $21 $-1 #)
   (edge $-1 -1 $-1 $60 -5 $69 5 $44 $70 forward @7 unknown #)
   (coedge $-1 -1 $-1 $25 $24 $67 $71 forward $9 $-1 #)
   (edge $-1 -1 $-1 $51 -5 $69 5 $43 $72 forward @7 unknown #)
   (coedge $-1 -1 $-1 $56 $55 $25 $49 reversed $40 $-1 #)
   (edge $-1 -1 $-1 $73 -5 $50 5 $48 $74 forward @7 unknown #)
   (vertex $-1 -1 $-1 $27 0 $75 #)
   (vertex $-1 -1 $-1 $62 1 $76 #)
   (straight-curve $-1 -1 $-1 15 11 7 0 -1 0 I I #)
   (coedge $-1 -1 $-1 $42 $44 $28 $54 reversed $21 $-1 #)
   (edge $-1 -1 $-1 $57 -5 $60 5 $53 $77 forward @7 unknown #)
   (coedge $-1 -1 $-1 $48 $29 $34 $63 forward $40 $-1 #)
   (coedge $-1 -1 $-1 $29 $48 $42 $68 reversed $40 $-1 #)
   (vertex $-1 -1 $-1 $30 1 $78 #)
   (straight-curve $-1 -1 $-1 10 16 17 -1 0 0 I I #)
   (coedge $-1 -1 $-1 $31 $43 $33 $62 reversed $13 $-1 #)
   (vertex $-1 -1 $-1 $54 1 $79 #)
   (straight-curve $-1 -1 $-1 10 6 17 1 0 0 I I #)
   (edge $-1 -1 $-1 $36 -5 $51 5 $33 $80 forward @7 unknown #)
   (edge $-1 -1 $-1 $37 -5 $50 5 $34 $81 forward @7 unknown #)
   (point $-1 -1 $-1 15 6 17 #)
   (point $-1 -1 $-1 15 16 17 #)
   (plane-surface $-1 -1 $-1 15 11 12 -1 0 0 0 0 1 forward_v I I I I #)
   (coedge $-1 -1 $-1 $44 $42 $46 $71 reversed $21 $-1 #)
   (edge $-1 -1 $-1 $57 -5 $73 5 $56 $82 forward @7 unknown #)
   (vertex $-1 -1 $-1 $71 0 $83 #)
   (straight-curve $-1 -1 $-1 5 6 12 0 0 -1 I I #)
   (edge $-1 -1 $-1 $69 -5 $73 5 $67 $84 forward @7 unknown #)
   (straight-curve $-1 -1 $-1 10 6 7 -1 0 0 I I #)
   (vertex $-1 -1 $-1 $49 0 $85 #)
   (straight-curve $-1 -1 $-1 10 16 7 1 0 0 I I #)
   (point $-1 -1 $-1 15 16 7 #)
   (point $-1 -1 $-1 15 6 7 #)
   (straight-curve $-1 -1 $-1 5 11 17 0 -1 0 I I #)
   (point $-1 -1 $-1 5 16 17 #)
   (point $-1 -1 $-1 5 6 17 #)
   (straight-curve $-1 -1 $-1 15 6 12 0 0 -1 I I #)
   (straight-curve $-1 -1 $-1 15 16 12 0 0 -1 I I #)
   (straight-curve $-1 -1 $-1 5 16 12 0 0 -1 I I #)
   (point $-1 -1 $-1 5 6 7 #)
   (straight-curve $-1 -1 $-1 5 11 7 0 1 0 I I #)
   (point $-1 -1 $-1 5 16 7 #)


CONE Class
ellipse Class
curve Class
surface Class
。。。。。。
What does each sentence mean? What does it matter?
Title: Re: entmake and 3Dsolids
Post by: well20152016 on January 07, 2022, 08:47:04 PM
_sphere   

sphere-surface      $-1 -1 $-1      0 0 0     50    1 0 0    0 0 1      forward_v I I I I #
center of a circle  0,0,0
radius  50




700 7 1 0           
16 Autodesk AutoCAD 19 ASM 221.0.0.1871 NT 24 Sat Jan 08 09:49:18 2022
1 9.9999999999999995e-007 1e-010
body $-1 -1 $-1 $1 $-1 $2 #
lump $-1 -1 $-1 $-1 $3 $0 #
transform $-1 -1 1 0 0 0 1 0 0 0 1 0 0 0 1 no_rotate no_reflect no_shear #
shell $-1 -1 $-1 $-1 $-1 $4 $-1 $1 #
face $5 -1 $-1 $-1 $-1 $3 $-1 $6 forward single #
color-adesk-attrib $-1 -1 $-1 $-1 $4 256 #
sphere-surface $-1 -1 $-1   0 0 0    50 1 0 0 0 0 1 forward_v I I I I #
Title: Re: entmake and 3Dsolids
Post by: well20152016 on January 07, 2022, 09:00:30 PM
ellipse-curve $-1 -1 $-1 0 0 0 -1 -0 -0 0 0 -50 1 I I #


coedge $-1 -1 $-1 $21 $29 $26 $40 forward $24 $-1 #

color-adesk-attrib $-1 -1 $-1 $-1 $22 256 #

vertex $-1 -1 $-1 $40 $50 #

color-adesk-attrib $-1 -1 $-1 $-1 $30 256 #

straight-curve $-1 -1 $-1 25 0 0 -1 0 0 I I #

point $-1 -1 $-1 50 0 0 #

Title: Re: entmake and 3Dsolids
Post by: well20152016 on January 07, 2022, 09:24:04 PM
The portion of the ACIS save (.sat) file restore code that processes unknown entities reserves
the following special characters (these are discussed elsewhere in this chapter):
{ An opening (left) curly brace begins a subtype definition.
} A closing (right) curly brace terminates a subtype definition.
$ A dollar sign indicates a pointer definition.
# A pound sign terminates an entity record.
SAT Format D 7.0
@ An at sign starts a string record.
 
Title: Re: entmake and 3Dsolids
Post by: ElpanovEvgeniy on January 10, 2022, 05:59:49 AM
For my programs, I used this manual. This is not exactly the same format as in AutoCAD, but the description of the format helps a lot.
Title: Re: entmake and 3Dsolids
Post by: ribarm on June 27, 2022, 11:42:36 PM
EE, how is going your weekend?