{"id":5825,"date":"2015-02-06T09:00:49","date_gmt":"2015-02-06T14:00:49","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/?p=5825"},"modified":"2015-02-05T18:23:52","modified_gmt":"2015-02-05T23:23:52","slug":"cad-apps","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2015\/02\/06\/cad-apps\/","title":{"rendered":"CAD APPS"},"content":{"rendered":"<div xmlns:mwsh=\"https:\/\/www.mathworks.com\/namespace\/mcode\/v1\/syntaxhighlight.dtd\" class=\"content\">\r\n   <introduction>\r\n      <p><a href=\"https:\/\/www.mathworks.com\/matlabcentral\/answers\/contributors\/3208495\">Sean<\/a>'s pick this week is <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/47648-cad-apps\">CAD APPS<\/a> by <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/870611\">Larry Silverberg<\/a>.\r\n      <\/p>\r\n   <\/introduction>\r\n\r\n   <p>For this week's pick I'm going to combine my grad school life in structural engineering with the two recent major snow storms\r\n      we've had in New England over the last few weeks.  My house has seen about 42 inches of snow.  So let's make a quick model\r\n      of the snow load on my back deck.\r\n   <\/p>\r\n   <p>I'm going to model this as a Frame.  Although it's not an ideal frame by any means, the snow load is distributed on it and\r\n      not just applied at the ends.\r\n   <\/p>\r\n   <p>Larry's app allows me to draw the deck interactively (in meters, feet would be nice!)<\/p>\r\n   <p>First I needed to adjust the axes limits:<\/p>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/Sean\/maincadapps\/axeslim.PNG\"> <\/p>\r\n   <p>Next I need to draw the structure.  There needs to be a node everywhere I apply a load because there doesn't seem to be a\r\n      distributed load option. The deck is about 12ft wide with a 3ft cantilever resting about 8ft off the ground.\r\n   <\/p>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/Sean\/maincadapps\/drawstructure.PNG\"> <\/p>\r\n   <p>Then the hard part, figuring out what the load is in terms of Newtons per meter of deck.  Being lazy, I only shoveled the\r\n      outer half of the deck where it was easy to throw the snow off.\r\n   <\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">psf = 10; <span style=\"color: #228B22\">% Assume 10 pounds\/square foot (lbf\/ft^2)<\/span>\r\nwidth = 2; <span style=\"color: #228B22\">% 24 inches on center joists = 2ft (ft)<\/span>\r\nftPerMeter = 3.28; <span style=\"color: #228B22\">% Feet per meter (ft\/m)<\/span>\r\nnewtonsPerPound = 0.2248; <span style=\"color: #228B22\">% (N\/m)<\/span>\r\nweightPerMeter = width.*psf.*3.28.*newtonsPerPound; <span style=\"color: #228B22\">% ft*lbf\/ft^2*ft\/m*N\/lbf = N\/m<\/span>\r\ndisp(weightPerMeter)<\/pre><pre style=\"font-style:oblique\">   14.7469\r\n<\/pre><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/Sean\/maincadapps\/loadapplied.PNG\"> <\/p>\r\n   <p>And now we simulate and look at the results!<\/p>\r\n   <div>\r\n      <ul>\r\n         <li>Max Shear:<\/li>\r\n      <\/ul>\r\n   <\/div>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/Sean\/maincadapps\/shear.PNG\"> <\/p>\r\n   <div>\r\n      <ul>\r\n         <li>Max Bending Moment:<\/li>\r\n      <\/ul>\r\n   <\/div>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/Sean\/maincadapps\/moment.PNG\"> <\/p>\r\n   <p>My wood structural design books are somewhere in my attic at home so I have no idea what percentage of capacity the current\r\n      snow load is using. But with another 6:10in of snow coming Monday, I probably oughtta clear off the rest of it.  Sigh.\r\n   <\/p>\r\n   <h3>Comments<a name=\"3\"><\/a><\/h3>\r\n   <p>Give it a try and let us know what you think <a href=\"https:\/\/blogs.mathworks.com\/pick\/?p=5825#respond\">here<\/a> or leave a <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/47648-cad-apps#comments\">comment<\/a> for Larry.\r\n   <\/p><script language=\"JavaScript\">\r\n<!--\r\n\r\n    function grabCode_c0976f409a934b969c7d1e8dda8ac969() {\r\n        \/\/ Remember the title so we can use it in the new page\r\n        title = document.title;\r\n\r\n        \/\/ Break up these strings so that their presence\r\n        \/\/ in the Javascript doesn't mess up the search for\r\n        \/\/ the MATLAB code.\r\n        t1='c0976f409a934b969c7d1e8dda8ac969 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' c0976f409a934b969c7d1e8dda8ac969';\r\n    \r\n        b=document.getElementsByTagName('body')[0];\r\n        i1=b.innerHTML.indexOf(t1)+t1.length;\r\n        i2=b.innerHTML.indexOf(t2);\r\n \r\n        code_string = b.innerHTML.substring(i1, i2);\r\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\r\n\r\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \r\n        \/\/ in the XML parser.\r\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\r\n        \/\/ doesn't go ahead and substitute the less-than character. \r\n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\r\n\r\n        author = 'Sean de Wolski';\r\n        copyright = 'Copyright 2015 The MathWorks, Inc.';\r\n\r\n        w = window.open();\r\n        d = w.document;\r\n        d.write('<pre>\\n');\r\n        d.write(code_string);\r\n\r\n        \/\/ Add author and copyright lines at the bottom if specified.\r\n        if ((author.length > 0) || (copyright.length > 0)) {\r\n            d.writeln('');\r\n            d.writeln('%%');\r\n            if (author.length > 0) {\r\n                d.writeln('% _' + author + '_');\r\n            }\r\n            if (copyright.length > 0) {\r\n                d.writeln('% _' + copyright + '_');\r\n            }\r\n        }\r\n\r\n        d.write('<\/pre>\\n');\r\n      \r\n      d.title = title + ' (MATLAB code)';\r\n      d.close();\r\n      }   \r\n      \r\n-->\r\n<\/script><p style=\"text-align: right; font-size: xx-small; font-weight:lighter;   font-style: italic; color: gray\"><br><a href=\"javascript:grabCode_c0976f409a934b969c7d1e8dda8ac969()\"><span style=\"font-size: x-small;        font-style: italic;\">Get \r\n            the MATLAB code \r\n            <noscript>(requires JavaScript)<\/noscript><\/span><\/a><br><br>\r\n      Published with MATLAB&reg; R2015a<br><\/p>\r\n<\/div>\r\n<!--\r\nc0976f409a934b969c7d1e8dda8ac969 ##### SOURCE BEGIN #####\r\n%% CAD APPS\r\n%\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/answers\/contributors\/3208495 Sean>'s pick this week is\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/47648-cad-apps CAD APPS> by\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/870611 Larry Silverberg>.\r\n% \r\n\r\n%% \r\n% For this week's pick I'm going to combine my grad school life in\r\n% structural engineering with the two recent major snow storms we've had in\r\n% New England over the last few weeks.  My house has seen about 42 inches\r\n% of snow.  So let's make a quick model of the snow load on my back deck.\r\n%\r\n% I'm going to model this as a Frame.  Although it's not an ideal frame by\r\n% any means, the snow load is distributed on it and not just applied at the\r\n% ends.\r\n%\r\n% Larry's app allows me to draw the deck interactively (in meters, feet\r\n% would be nice!)\r\n%\r\n% First I needed to adjust the axes limits:\r\n%\r\n% <<axeslim.PNG>>\r\n%\r\n% Next I need to draw the structure.  There needs to be a node everywhere I\r\n% apply a load because there doesn't seem to be a distributed load option.\r\n% The deck is about 12ft wide with a 3ft cantilever resting about 8ft off\r\n% the ground.\r\n%\r\n% <<drawstructure.PNG>>\r\n%\r\n% Then the hard part, figuring out what the load is in terms of Newtons per\r\n% meter of deck.  Being lazy, I only shoveled the outer half of the deck\r\n% where it was easy to throw the snow off.\r\n\r\npsf = 10; % Assume 10 pounds\/square foot (lbf\/ft^2)\r\nwidth = 2; % 24 inches on center joists = 2ft (ft)\r\nftPerMeter = 3.28; % Feet per meter (ft\/m)\r\nnewtonsPerPound = 0.2248; % (N\/m)\r\nweightPerMeter = width.*psf.*3.28.*newtonsPerPound; % ft*lbf\/ft^2*ft\/m*N\/lbf = N\/m\r\ndisp(weightPerMeter)\r\n\r\n%%\r\n%\r\n% <<loadapplied.PNG>>\r\n%\r\n% And now we simulate and look at the results!\r\n%\r\n% \r\n%\r\n% * Max Shear:\r\n%\r\n% <<shear.PNG>>\r\n%\r\n% * Max Bending Moment: \r\n%\r\n% <<moment.PNG>>\r\n%\r\n% My wood structural design books are somewhere in my attic at home so I\r\n% have no idea what percentage of capacity the current snow load is using.\r\n% But with another 6:10in of snow coming Monday, I probably oughtta clear\r\n% off the rest of it.  Sigh.\r\n%\r\n\r\n\r\n%% Comments\r\n% \r\n% Give it a try and let us know what you think\r\n% <https:\/\/blogs.mathworks.com\/pick\/?p=5825#respond here> or leave a\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/47648-cad-apps#comments\r\n% comment> for Larry.\r\n%\r\n \r\n\r\n##### SOURCE END ##### c0976f409a934b969c7d1e8dda8ac969\r\n-->","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img decoding=\"async\"  class=\"img-responsive\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/Sean\/maincadapps\/axeslim.PNG\" onError=\"this.style.display ='none';\" \/><\/div><p>\r\n   \r\n      Sean's pick this week is CAD APPS by Larry Silverberg.\r\n      \r\n   \r\n\r\n   For this week's pick I'm going to combine my grad school life in structural engineering with the two recent... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2015\/02\/06\/cad-apps\/\">read more >><\/a><\/p>","protected":false},"author":87,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[25,16],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/5825"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/users\/87"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=5825"}],"version-history":[{"count":3,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/5825\/revisions"}],"predecessor-version":[{"id":5828,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/5825\/revisions\/5828"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=5825"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=5825"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=5825"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}