Trim does not work with Circles/Ellipses

Started by vojo, January 04, 2011, 02:13:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

vojo

Anybody know why Trim does not work with circles or ellipsis (ie does not break up into 2 or more line/arc segments)?

it would even be ok if Trim turned a 2D circle shape in 1D circle shape

Trim seems to work with other shapes

wapperdude

#1
Hi Vojo --

Seems to be working.  I'm using V2007, Windows7.

Wapperdude
Visio 2019 Pro

vojo

#2
so to clarify

I am working on some macros that extrude any line into a manifold.   It works fine for all shapes except circle or ellipse.
(in essence, take a shape, copy it, colocate it with align, trim...this gives a series lines....can extrude each line into a manifold....hence isometric view of shape)

The problem is that trim does not return a series of lines or arcs (see below) for circles or ellipses....so cant easily extrude them
(it does not even return as 1D shape....so cant even play an exception case game with circles/ellipses)

So in essence, I can extrude  any combination of shapes as long as no closed circles or ellipses (shape can be closed)
(I have another macro that extrudes by slice....but it gets real cumbersome to manage any complex shape since line slices over lap....so not planning on using that alot).

obviously, could work around this by making a circle, cutting it in half, copy, flop....do the trim thing....remove center lines....but that seems tedious for this exception case
(lots of manual work.....automation would need to know its a circle/ellipse and do all the steps....just seems like alot)

I am on visio 2003  with XP.

wapperdude

#3
Hi Vojo --

Not sure what you are trying to accomplish with the "co-alignment".  In the case of the rectangles, and I suspect any shape that has defined vertices, you'll get line segments.  Problem with circles, ellipses, there are no defined vertices, so the "trim" doesn't know what to do.

If you take the "rounded" rectangle, modify it look like a circle, then duplicate and co-align, trim, ==> 4 quarter circle arcs.  You can take a circle, run a line across it, then trim with the result of either 2 or 3 circular segments.  But, I'm pretty sure you already know this, and, it's not what you're after???

BTW, that's a nice looking 3D shape.
Visio 2019 Pro

Visio Guy

#4
Looks like a Visio ellipse doesn't have any vertices. Try drawing a circle using the pencil tool and creating two arcs that close.

Also, the automation model has the points method which lets you get line-segment approximations of any shape's outline (just the math, you'd have to rebuild a shape using, say DrawPolyline). Might be an avenue to try.

Two other slightly related items, for those interested:

3D Extruded Map of USA
Draw Tangent Lines in Visio! (video)
Skewing Around With Visio & SVG
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

vojo

wrapper dude:    Basically trying to make a general tool to change any 2D shape into a 3D shape  (2D with depth).   
                       Obviously could do a given shape manually....but that is long and tedious
                       Will look at the suggestions

visio guy:  downloaded SVG and countries....neither really worked....could move / stretch what is there but could not pull say PA up
               could not find any VBA associated with them (other than the "read the image" process)

I am on 2003 (yep I know...probably need to get 2010...but corporate does not want to encourage any MS tools....so push back...working through that).

vojo

Got a fix
   - make a square
   - set rounding to be guard(width*0.5)
   - Rotate it to angle of depth

good to go....effectively a circle no matter how big  (can add to a stencil / props to set angle intended)

operations work....gives 4 arcs

folds into the algorithm I have nicely....extrudes out nicely

thx to all