MoI discussion forum
MoI discussion forum

Full Version: page margins for export

Show messages: All  1-5  6-8

From: pressure (PEER)
20 Feb 2023   [#6] In reply to [#5]
Hi Michael,

It turns out that it would be handy to be able to set page margins to 0 when exporting SVG/PDF/AI. This would make it easy to compose a scene in MoI in page space. It would also be helpful for illustrating a combination of transparent and opaque parts and for making changes to a perspective illustration that's already fairly far along in vector graphics, because then just the changes can be exported from MoI on registration with the original export. In other words, being able to set page margins to 0 will make it easy to composite multiple renderings from MoI by having the renderings be registered to page space.

Say I want show a transparent disk on top of an opaque ring:



I need to render the disk with hidden lines generated, but not generate hidden lines for the opaque ring. And I need an Outline that goes around everything. If I try exporting an SVG of the glass with hidden line generation on and then another of both glass and ring with only visible lines:





And then combine the resulting SVGs I get garbage that needs to be aligned by scaling and moving:



But, if I add a bounding rectangle to the scene that has the same aspect ratio as the target page size less 2*12pt in height and less 2*18pt in width then combining multiple renderings is just copy-paste:



Here's what the bounding rectangle setup looks like in MoI:



margin_demo.3dm attached

So, while I can do this now by using a rectangle with an aspect ratio exactly 24x36 pt smaller than the target illustration size, it's a little awkward to have to do the arithmetic remembering which direction is 24 pt and which is 36, and it's kind of hard to judge a composition relative to a rectangle that's not quite the same size as the finished illustration.

- Peer

Attachments:
margin_demo.3dm

Image Attachments:
both_viewport.png  composite.png  composite_bad.png  glass_viewport.png  margin_copy_paste.gif 


From: Michael Gibson
20 Feb 2023   [#7] In reply to [#6]
Hi Peer, actually the 18pt/12pt margins isn't something that I cooked up myself, it's what Adobe Illustrator uses as default values when reading in an AI file.

Also another kind of tricky thing is that AI format places the 0,0 origin location as being the lower left point inside the margin while PDF and SVG have the origin at the page corner instead.

It's not really documented well how it works in AI format so any work in this area will likely take some reverse engineering detective work to make it work with AI format and it's not likely to happen anytime soon sorry.

- Michael
From: pressure (PEER)
20 Feb 2023   [#8] In reply to [#7]
Thanks for thinking about this Michael. Darn AI.

- Peer

Show messages: All  1-5  6-8