Error 339, Resulting shape is too complex

Started by Jennifer, October 24, 2014, 02:40:16 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Jennifer

I am trying to create a shape that is a rectangle with rounded corners with lots of holes cut into it. The rectangle is 14 x 12 and the holes (circles) are in a 26 x 23 grid, so 138 holes in all. When I select the rectangle and the grid of holes and click on the Subtract operation, I get a progress popup that counts up to almost 600, then the error message saying that the shape is too complex.

Is there some way I can make this work? I could reduce the number of holes, but I'd rather not.

Why is it counting up to 600. There are only 139 shapes, 138 circles and one rectangle?

Correction: 26x23 = 598 (not 138). Not sure what I was thinking.  :o
Using Visio 2019, part of Office 365 on Windows 10

Jennifer

I upgraded to Visio 2010 in the hope that it would work better -- apparently not. I get the same Error 339. I tried doing it row by row. I wold select the rectangle and then one or two rows of circles and then click Subtract. This worked until I had completed 7 rows, then I got the Error 339.

Is there no way to create a shape with a lot of little holes in it?
Using Visio 2019, part of Office 365 on Windows 10

wapperdude

Hi Jennifer...

Looks like you found a limitation in Visio.  I was able to confirm the error.  The work around would be to fragment your large rectangle into 3 smaller rectangles.  Each smaller rectangle would have 1/3 of the total circles.  Then do your combine operation on each rectangle and it's pack of circles.  No, you cannot use the union operation to combine the rectangles. 

Visio doesn't actually create a rectangle with holes.  It creates a complex shape of multiple geometry sections:  the rectangle plus  holes then does, essentially, a logical subtract of the fill patterns.

Wapperdude
Visio 2019 Pro

Jennifer

Quote from: wapperdude on October 24, 2014, 06:31:10 PM
Hi Jennifer...

Looks like you found a limitation in Visio.  I was able to confirm the error. 
Rats

Quote
The work around would be to fragment your large rectangle into 3 smaller rectangles.  Each smaller rectangle would have 1/3 of the total circles.  Then do your combine operation on each rectangle and it's pack of circles.  No, you cannot use the union operation to combine the rectangles. 
This is a real pain. The rectangle has rounded corners. So this means that I will have to create two half rounded rectangles for the top and bottom. (sigh)

Quote
Visio doesn't actually create a rectangle with holes.  It creates a complex shape of multiple geometry sections:  the rectangle plus  holes then does, essentially, a logical subtract of the fill patterns.

Wapperdude
OK, but if Visio can create the same final shape as a result of the complicated procedure above, it seems like it ought to be able do it directly. (grumble, grumble)
Using Visio 2019, part of Office 365 on Windows 10

JuneTheSecond

How would you like to add many Geometry Sections to one shape sheet with VBA program?
But I am sorry I don't remember how much geometry sections can be added to one shape sheet.
Best Regards,

Junichi Yoda
http://june.minibird.jp/

Jennifer

Quote from: JuneTheSecond on October 25, 2014, 10:24:16 AM
How would you like to add many Geometry Sections to one shape sheet with VBA program?
But I am sorry I don't remember how much geometry sections can be added to one shape sheet.
Sure, anything that works. But why would it be possible to add more shapes using VBA than using the Subtract operation?
Using Visio 2019, part of Office 365 on Windows 10

JuneTheSecond

#6
I am imaging a shape that has many holes.
Am I miss understanding?
Anyway the operation like Subtract, Join or Compose makes one shape from many shapes you select.
Best Regards,

Junichi Yoda
http://june.minibird.jp/

Jennifer

Yes. I've attached the Visio (2010) document with the shape I am trying to create.
Using Visio 2019, part of Office 365 on Windows 10

Paul Herber

There are (as far as I can tell) built-in limits with geometry sections.
First the technical side: geometry sections are stored internally with indices visSectionFirstComponent to visSectionLastComponent. These take the values 0x0A and 0xEF (or in decimal, 10 and 239.

So it looks like there can be only 230 geometry sections within one shape. It could be this limit that is being reached with the subtract operation.
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

Jennifer

Quote from: Paul Herber on October 25, 2014, 12:01:36 PM
There are (as far as I can tell) built-in limits with geometry sections.
First the technical side: geometry sections are stored internally with indices visSectionFirstComponent to visSectionLastComponent. These take the values 0x0A and 0xEF (or in decimal, 10 and 239.

So it looks like there can be only 230 geometry sections within one shape. It could be this limit that is being reached with the subtract operation.
The "230" fits the data. I have 23 rows of circles with 26 circles in each row. I was able to subtract 8 rows (208 circles) plus 21 circles from row 9. And 208+21 = 229, so with the large rectangle, that's 230 shapes.

It seems to me that there ought to be a way to create a shape with a large number of holes. But I'm finished with this project and probably won't run into this problem again.

Thanks for the help.
Using Visio 2019, part of Office 365 on Windows 10

JuneTheSecond

Visio Guy has written important note on Facebook in September 22.
"Pushing the ShapeSheet to its limits: 15,000 Geometry rows!"
at https://www.facebook.com/visguyfb

Here is still possibility.

Figure and drawaing below have only 4 holes,
but it may be possible to add  15000/5 = 3000 holes.
This drawing has only 2 Geometry sections, one for large rectangle,  one for holes.
Best Regards,

Junichi Yoda
http://june.minibird.jp/

Jennifer

Quote from: JuneTheSecond on October 26, 2014, 12:52:41 AM
Figure and drawaing below have only 4 holes,
but it may be possible to add  15000/5 = 3000 holes.
This drawing has only 2 Geometry sections, one for large rectangle,  one for holes.
OK, but how was it done? I downloaded the file, but I don't understand the shapesheet stuff.

I tried making a Union of the holes before doing the Subtract, but I got the same error 339.
Using Visio 2019, part of Office 365 on Windows 10

JuneTheSecond

#12
Here is a video how I was making holes on a shape.
http://youtu.be/UhItBlBC_LI

I was editing shape sheet directly.

Further working is very hard.
Any programing may be necessary.
Best Regards,

Junichi Yoda
http://june.minibird.jp/

Jennifer

Quote from: JuneTheSecond on October 26, 2014, 03:30:23 AM
Here is a video how I was making holes on a shape.
http://youtu.be/UhItBlBC_LI

I was editing shape sheet directly.

Further working is very hard.
Any programing may be necessary.
That is very cool. That's way too advanced for me. I don't think I am anywhere nearly smart enough to learn to do that. My hat's off to you.

Thanks for the effort.
Using Visio 2019, part of Office 365 on Windows 10

Yacine

#14
@Junichi, pretty clever. Chapeau!

Next step could be to write a new fragment routine.
Something like:

       
  • chose the primary shape
  • then select all the shapes that need to be deducted from the base
from here there are 2 possibilities

       
  • 1) fragment the base with shapes from the selection one by one, then merge the geometry sections
  • 2) copy the geometry section of the shapes of the selection into the base shape.
Yacine