TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: codrutbenedic81 on March 02, 2023, 06:42:17 AM
-
Hello!
Have you a lisp for making topology in AutoCAD?
Thank you!
-
this has a Delaunay routine exposed to lisp, see reply 10
https://www.theswamp.org/index.php?topic=58049.0
I'm sure there's other goodies if you search around
-
Hello!
Have you a lisp for making topology in AutoCAD?
Thank you!
i'm afraid you will have to switch to Map 3d to work with topologies
-
Create an MPOLYGON object in AUTOCAD and use it for topological analysis
-
Is MPOLYGON a CUSTOM ENTITY ?
have you also thought about "exporting" from ARX environment
functions to create custom entities ?
(in addition to MPOLYGON)
-
Is MPOLYGON a CUSTOM ENTITY ?
have you also thought about "exporting" from ARX environment
functions to create custom entities ?
(in addition to MPOLYGON)
its in autocad, but sometimes the dbx has to be loaded separately
the class is AcDbMPolygon
arx docs
Handles one or more closed polygons as a unit. Contains an AcDbHatch member for rendering and other tasks, via AcDbMpolygon::hatch( ).
-
therefore it is a native Autocad entity...
I didn't know it existed!
-
It has a method isPointInsideMPolygon that’s useful for finding of a point is in a polyline, otherwise I think it’s not used often
example https://www.theswamp.org/index.php?topic=58308.msg616936#msg616936
-
Is MPOLYGON a CUSTOM ENTITY ?
have you also thought about "exporting" from ARX environment
functions to create custom entities ?
(in addition to MPOLYGON)
Not a custom entity
The underlying core supports it,
It's just that AUTUCAD didn't make it for end users.
ARX supports creating it
Through XDRX-API, LISP can operate it
Query method:
Command: (xdrx-mpolygon-make (entlast))
<Entity name: 2378c48c0a0>
Command: (xdrx-getpropertyvalue (entlast))
Class AcDbMPolygon:
├─Area (None or Int)
├─Detach
├─DetachLoopAt (Point or Int)
├─Elevation
├─ExtractLoopAt (Point or Int)
├─IsBalanced
├─OffsetVector
├─PatternDefinitionAt
├─Perimeter
├─Length
├─Normal
├─NumPatternDefinitions
├─IncludesTouchingLoops
├─IsPointInsideMPolygon
├─IsPointOnLoopBoundary
├─SelfCrosses
├─PatternAngle
├─patternColor
├─PatternScale
├─PatternDouble
├─PatternSpace
├─PatternName
├─PatternType
├─Perimeter
Loops Class:
├─ChildLoops(ParentLoop Inx [T])
├─ClosestLoopTo / LoopIndexTo (Int or Point)
├─HasChildLoop([T])
├─GetLoopAt / LoopAT(Int or Point)
├─GetLoops/ALLLoops (None or T)
├─GetLoopsAt(Int .... Int)
├─LoopAtGsMarker
├─LoopDirection
├─MPolygonLoopAt (Int or Point)
├─MPolygonLoops (None or T)
├─NumLoops
├─OverLapLoops([T])
├─ParentLoop
├─RootLoop / RootLoopAt(Int or Point)
├─RootLoopIndexAt / RootLoopIndex(Int or Point)
├─RootLoops
Class AcDbEntity:
├─9PT
├─BoundingBox
├─Color (None or T[real color])
├─ColorIndex(None or T)
├─Centroid
├─ECS
├─Elevation
├─Ename
├─GeomExtents
├─ GripPoints
├─IsMemoryEntity
├─Layer(None or T or NIL)
├─Layout
├─Linetype(None or T or NIL)
├─LinetypeScale
├─LineWeight
├─OrthoProject(Plane T)
├─Project(Plane Normal T)
├─PersistentReactor
├─Plane
├─PlotStyleName
├─StretchPoint
├─Transparency
├─Visibility
├─XDir
Class AcDbObject:
├─ClassName
├─OriginalDatabase
├─Database
├─ExtensionDictionary
├─FieldDictionary
├─IsA
├─IsAProxy
├─IsErased
├─IsReallyClosing
├─Handle
├─HasFields
├─HasPersistentReactor
├─MyParent
├─ObjectID
├─Owner
├─xData
Editing method:
Command: (xdrx-setpropertyvalue (entlast))
Class AcDbMPolygon:
├─BalanceTree (None)
├─BalanceDisplay (None)
├─Elevation (Double)
├─Gradient (Int STR)
├─GradientAngle (Double)
├─GradientShift (Int)
├─Normal (Vector)
├─LoopDirection (Int Int)
├─Pattern (Int Str)
├─PatternAngle (double)
├─PatternColor (POINT or Int)
├─PatternDouble (T or NIL)
├─PatternScale (Double or Int)
├─PatternSpace (Double or Int)
├─AppendLoop ((Ename or GeEnt or DBEnt or (Points and Doubles) or T))
├─AppendMPolygonLoop (Points and Doubles or T)
├─AppendLoopFromBoundary (Enames [T])
├─InsertMPolygonLoopAt (INT Enames Doubles [T])
├─RemoveHatch (None)
├─removeMPolygonLoopAt (Int)
├─evaluateHatch (None or T)
Class AcDbEntity:
├─Color(Int)
├─Elevation(Int or Real)
├─Layer(STR)
├─Linetype(STR)
├─LinetypeScale(Real or Int)
├─LineWeight(INT)
├─PlotStyleName(STR)
├─OrthoProject(Plane T)
├─Project(Plane Normal T)
├─TransformBy
├─Transparency(0-100)
├─Visibility(T or Nil)
├─Z->0(None Or T)
Class AcDbObject:
├─CopyFrom (Ename)
├─RemovePersistentReactor (ENAME)
├─CreateExtensionDictionary (None)
├─releaseExtensionDictionary (None)
├─SetXdata (STR val1...valn)
├─xDataTransformBy (matrix)
-
Hi,
We can create MPolygons with AutoLISP entmake function, see this example (https://www.theswamp.org/index.php?topic=29131.msg346914#msg346914).