Complex Polygons

5 views
Skip to first unread message

indy2005

unread,
Aug 18, 2010, 4:49:05 PM8/18/10
to Mekanimo
Hi,

How does mekanimo deal with complex/concave polygons? Does it just
make several compound shapes from concave polygons to simulate the
large complex polygon?

Regards

i

Fahri

unread,
Aug 18, 2010, 5:05:17 PM8/18/10
to Mekanimo
Box2D deals with convex polygons only. In addition to this there are
some other limitations related to the internal angles and vertex
order. Mekanimo tries to convert the user created polygons into
suitable partitions for Box2D. If it cannot achieve this then it
shows an error message.

To see how your polygon is partitioned type

>>> polygon1.showPartitions = True

at the interpreter. Then you can see the partitions. To see the
vertex numbers type

>>> polygon1.showNumbers = True

at the interpreter and click in the canvas to refresh it.

Fahri

indy2005

unread,
Aug 18, 2010, 5:16:46 PM8/18/10
to Mekanimo
Hi,

I mistyped True as true and it deleted the polygon.

Traceback (most recent call last):
File "Code", line 267, in <module>
AttributeError: 'function' object has no attribute 'show'
Traceback (most recent call last):
File "Code", line 267, in <module>
NameError: name 'true' is not defined
Traceback (most recent call last):
File "Code", line 267, in <module>
NameError: name 'true' is not defined
Traceback (most recent call last):
File "Code", line 267, in <module>
NameError: name 'true' is not defined
Traceback (most recent call last):
File "Code", line 267, in <module>
NameError: name 'true' is not defined
Traceback (most recent call last):
File "Code", line 267, in <module>
NameError: name 'true' is not defined

THen when I readded the polygon, It still removed the polygon
completely?

Regards

i

Fahri

unread,
Aug 18, 2010, 5:27:07 PM8/18/10
to Mekanimo
Can you show us exactly what you typed? I cannot replicate this.

indy2005

unread,
Aug 18, 2010, 6:36:52 PM8/18/10
to Mekanimo
I made a complex polygon, polygon1.

Went into the interpreter, typed

polygon1.showPartitions = true

note the lower case

Got this error

Traceback (most recent call last):
File "Code", line 508, in <module>
NameError: name 'true' is not defined


Then lost the polygon

Fahri

unread,
Aug 18, 2010, 6:48:36 PM8/18/10
to Mekanimo
There must be something else going on.

This is what I get

polygon1.showPartitions = true
Traceback (most recent call last):
File "<input>", line 1, in <module>
NameError: name 'true' is not defined

Then I still have the polygon.

indy2005

unread,
Aug 18, 2010, 7:11:47 PM8/18/10
to Mekanimo
dont worry, I will let you know if it happens again...it crashed
shortly afterwards so something wasnt right.
Reply all
Reply to author
Forward
0 new messages