Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 5
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 5272 times and has 4 replies Next Thread
pencilart
Advanced Member
Member's Avatar


Joined: Oct 2, 2007
Post Count: 188
Status: Offline
Reply to this Post  Reply with Quote 
confused SVG cutout tutorial for Library Editor?

I need a tutorial to learn how to cut out a shape for a staircase (for my grand staircase) when using the Library Editor. How does one determine the coordinates? Is there some sort of program that the .obj can be opened with so that the coordinates can be figured out?
[Dec 23, 2011, 9:16:24 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9420
Status: Offline
Reply to this Post  Reply with Quote 
Re: SVG cutout tutorial for Library Editor?

You have to describe with SVG path syntax a closed shape that is within a 1 unit wide square.
To find the good shape for the spiral staircase in the default catalog, I added this staircase to the plan, resized it to 1meter wide and 1meter deep and placed it on the grid in a way it touches a meter grid line (of course you'll have to chose metric system in the preferences).
Then I measured the points of the cut out shape and described it with SVG path syntax (the syntax isn't very easy to understand but the previous link gives many examples to guide you).
Describing the shape of a pie is quite tedious and finding the right values of the shape of the spiral staircase took me several minutes:
M0,0.35 h0.47 l0.375,-0.35 l0.088,0.118 A0.5,0.5 0 1,1 0,0.35 z

But describing a polygonal shape should be much easier. For example, the following expression describes a L shape:
M0,0 h0.5 v0.5 h0.5 v0.5 h-1 z

Don't forget to close the shape with a final z and pay attention to the difference between upper case letter (followed by absolute coordinate values) and lower case letter (followed by coordinate values relative to the previous move) syntax.
Hope you can handle it.

Merry Christmas smile
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
[Dec 24, 2011, 1:37:58 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
pencilart
Advanced Member
Member's Avatar


Joined: Oct 2, 2007
Post Count: 188
Status: Offline
Reply to this Post  Reply with Quote 
Re: SVG cutout tutorial for Library Editor?

I found a way to convert my .obj grandstaircase into .svg by using Inkscape. (found this in the Inkscape forums):
take a look at the extension 'Render > 3D Polyhedrons' which can import (and draw as SVG paths) 3d objects from a Wavefront .obj 3D file stored in a local folder [1], with various settings (for appearance, lighting, rotation, etc.)
I found too, that I can open this file in a text editor and found all kinds of coordinates (as told in this tutorial: http://www.stoimen.com/blog/2011/02/11/from-s...dinates-a-complete-guide/ ).

I'm wondering if I can copy and paste one of those, but which one(s) are the right ones?

I guess I'll try it out the way you said when I get time. I was just hoping that there would be a quicker way to do it.

If you have Inkscape and want to see what I've done so far, I can email the Inkscape file(s) to you.
----------------------------------------
[Edit 1 times, last edit by pencilart at Dec 24, 2011, 4:49:10 PM]
[Dec 24, 2011, 4:48:50 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9420
Status: Offline
Reply to this Post  Reply with Quote 
Re: SVG cutout tutorial for Library Editor?

I don't think Inkscape will help you that much, and yes, it's not that easy to do. That's why I put this advanced feature only in the Furniture Library Editor at this time.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
[Dec 24, 2011, 5:04:09 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
pencilart
Advanced Member
Member's Avatar


Joined: Oct 2, 2007
Post Count: 188
Status: Offline
Reply to this Post  Reply with Quote 
Re: SVG cutout tutorial for Library Editor?

ok, how did you measure the points of the cut out shape when all you see is a rectangular representation of the object?

This little section is from the file that I made in Inkscape:

<path
id="path17222"
d="m -276.002,80.133 7.638,6.829 51.287,0 z"
style="fill:#cd0000;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linejoin:round;stroke-opacity:1"
inkscape:label="Face:1857"
inkscape:connector-curvature="0" />


I noticed the d="m -276.002,80.133 7.638,6.829 51.287,0 z" parts.
----------------------------------------
Attachment grandstaircasedrawing.svg (346427 bytes) (Download count: 4907) (The staircase svg just for the fun of it...)
grandstaircasedrawing.svg
[Dec 24, 2011, 6:52:29 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

  Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads  
© Copyright 2024 Space Mushrooms - All rights reserved