{"id":11461,"date":"2025-11-05T16:28:15","date_gmt":"2025-11-05T16:28:15","guid":{"rendered":"https:\/\/www.sweethome3d.com\/%e6%8f%92%e4%bb%b6%e5%bc%80%e5%8f%91%e8%80%85%e6%8c%87%e5%8d%97\/"},"modified":"2025-12-19T10:19:31","modified_gmt":"2025-12-19T10:19:31","slug":"%e6%8f%92%e4%bb%b6%e5%bc%80%e5%8f%91%e8%80%85%e6%8c%87%e5%8d%97","status":"publish","type":"page","link":"https:\/\/www.sweethome3d.com\/zh-hans\/%e6%8f%92%e4%bb%b6%e5%bc%80%e5%8f%91%e8%80%85%e6%8c%87%e5%8d%97\/","title":{"rendered":"\u63d2\u4ef6\u5f00\u53d1\u8005\u6307\u5357"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u7b80\u4ecb<\/h2>\n\n<p>\u4ece 1.5 \u7248\u672c\u5f00\u59cb\uff0c\u53ef\u4ee5\u901a\u8fc7\u5c06\u63d2\u4ef6\u6587\u4ef6\u653e\u7f6e\u5728<a href=\"#deployingPlugin\">\u63d2\u4ef6\u6587\u4ef6\u5939<\/a>\u4e2d\uff0c\u5411 <a href=\"\/\">Sweet Home 3D<\/a> \u6dfb\u52a0\u65b0\u529f\u80fd\u3002\u8fd9\u5141\u8bb8 Java \u7a0b\u5e8f\u5458\u4e3a <a href=\"https:\/\/www.sweethome3d.com\/zh-hans\/\">Sweet Home 3D<\/a> \u5f00\u53d1\u548c\u5206\u53d1\u65b0\u529f\u80fd\uff0c\u800c\u65e0\u9700\u4fee\u6539\u5f53\u524d\u7248\u672c\u7684\u6e90\u6587\u4ef6\uff08\u8fd9\u6709\u5229\u4e8e\u5411\u4e0a\u517c\u5bb9\u6027\uff09\uff0c\u4e5f\u65e0\u9700\u4ea4\u4ed8\u7a0b\u5e8f\u7684\u5b8c\u6574\u7248\u672c\uff08\u8fd9\u6709\u5229\u4e8e\u51cf\u5c0f\u4ea4\u4ed8\u5927\u5c0f\uff09\u3002<br\/>\u672c\u6587\u6863\u4ecb\u7ecd\u4e86\u521b\u5efa\u63d2\u4ef6\u6240\u9700\u7684<a href=\"#installingTools\" data-type=\"internal\" data-id=\"#installingTools\">\u5de5\u5177<\/a>\uff0c\u7136\u540e\u5c55\u793a\u4e86\u5982\u4f55<a href=\"#programmingPlugin\">\u7f16\u7a0b\u4e00\u4e2a\u63d2\u4ef6<\/a>\uff0c\u8be5\u63d2\u4ef6\u8ba1\u7b97\u6dfb\u52a0\u5230\u623f\u5c4b\u4e2d\u7684\u53ef\u79fb\u52a8\u5bb6\u5177\u7684\u6700\u5927\u4f53\u79ef\uff0c\u6700\u540e\u63d0\u4f9b\u4e86\u4e00\u4e9b<a href=\"#goingFurther\">\u9644\u52a0\u4fe1\u606f<\/a>\uff0c\u4ee5\u5e2e\u52a9\u60a8\u8fdb\u4e00\u6b65\u4e86\u89e3\u3002 <\/p>\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n<h2 class=\"wp-block-heading\" id=\"installingTools\">\u5b89\u88c5\u5f00\u53d1\u5de5\u5177<\/h2>\n\n<p>\u5982\u679c Sweet Home 3D \u9762\u5411\u7684\u662f\u666e\u901a\u7528\u6237\uff0c\u90a3\u4e48\u5f00\u53d1\u63d2\u4ef6\u9700\u8981\u7279\u6b8a\u7684\u6280\u80fd\uff0c\u5e76\u4e14\u5728\u7ee7\u7eed\u4e4b\u524d\uff0c\u60a8\u5e94\u8be5\u77e5\u9053\u5982\u4f55\u4f7f\u7528 IDE<a href=\"https:\/\/ant.apache.org\/\" target=\"_blank\" rel=\"noopener\"><\/a> \u4ee5 <a href=\"https:\/\/java.sun.com\" target=\"_blank\" rel=\"noopener\">Java<\/a> \u7f16\u7a0b\u3002\u672c\u6307\u5357\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528 <a href=\"https:\/\/www.eclipse.org\/\" target=\"_blank\" rel=\"noopener\">Eclipse<\/a> \u6784\u5efa\u63d2\u4ef6\uff0c\u4f46\u60a8\u53ef\u4ee5\u4f7f\u7528\u60a8\u9009\u62e9\u7684 IDE\uff0c\u6216\u8005\u6839\u672c\u4e0d\u4f7f\u7528 IDE\u3002 <\/p>\n\n<h3 class=\"wp-block-heading\">\u4e0b\u8f7d\u5e76\u5b89\u88c5 Eclipse<\/h3>\n\n<p>\u9996\u5148\u4ece <a href=\"https:\/\/www.eclipse.org\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.eclipse.org\/<\/a> \u4e0b\u8f7d Eclipse\u3002\u540d\u4e3a <em>Eclipse IDE for Java Developers<\/em> \u7684\u7248\u672c\u8db3\u4ee5\u5f00\u53d1\u63d2\u4ef6\uff0c\u4f46\u60a8\u53ef\u4ee5\u4e0b\u8f7d\u4efb\u4f55\u7528\u4e8e Java \u5f00\u53d1\u7684\u7248\u672c\u3002 <br\/>\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u5b89\u88c5 Eclipse \u975e\u5e38\u7b80\u5355\uff1a\u53ea\u9700\u89e3\u538b\u7f29\u60a8\u5c06\u83b7\u5f97\u7684\u5b58\u6863\u6587\u4ef6\uff0c\u6253\u5f00 eclipse \u6587\u4ef6\u5939\uff0c\u7136\u540e\u6839\u636e\u60a8\u7684\u7cfb\u7edf\uff0c\u8fd0\u884c\u540d\u4e3a\u7684\u6587\u4ef6 <code>eclipse.exe<\/code> \uff08\u5728 Windows \u4e0b\uff09\uff0c <code>eclipse.app<\/code> \uff08\u5728 Mac OS X \u4e0b\uff09\u6216 <code>eclipse<\/code> \uff08\u5728 Linux \u4e0b\uff09\u3002<br\/>\u9996\u6b21\u8fd0\u884c\u65f6\uff0cEclipse \u5c06\u8981\u6c42\u60a8\u9009\u62e9\u4e00\u4e2a<em>\u5de5\u4f5c\u533a<\/em>\u6587\u4ef6\u5939\uff0c\u63d2\u4ef6\u9879\u76ee\u5c06\u5b58\u50a8\u5728\u8be5\u6587\u4ef6\u5939\u4e2d\u3002<br\/>\u5b8c\u6210\u540e\uff0c\u4ece\u83dc\u5355\u4e2d\u9009\u62e9 <em>\u6587\u4ef6 &gt; \u65b0\u5efa &gt; \u9879\u76ee<\/em> \u4ee5\u521b\u5efa\u4e00\u4e2a\u65b0\u9879\u76ee\uff0c\u5728\u5c06\u663e\u793a\u7684 <em>\u65b0\u5efa\u9879\u76ee<\/em> \u5411\u5bfc\u4e2d\u9009\u62e9 <em>Java &gt; Java \u9879\u76ee<\/em>\uff0c\u8f93\u5165 VolumePlugin \u4f5c\u4e3a\u9879\u76ee\u540d\u79f0\uff0c\u7136\u540e\u5355\u51fb <em>\u5b8c\u6210<\/em> \u6309\u94ae\u3002\u6700\u540e\uff0c\u5173\u95ed <em>\u6b22\u8fce<\/em> \u9009\u9879\u5361\u4ee5\u53d1\u73b0\u60a8\u7684\u5de5\u4f5c\u533a\uff0c\u5982\u56fe 1 \u6240\u793a\u3002 <\/p>\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" width=\"388\" height=\"315\" data-src=\"https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/eclipse.png\" alt=\"\" class=\"wp-image-5845 lazyload\" data-srcset=\"https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/eclipse.png 388w, https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/eclipse-300x244.png 300w, https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/eclipse-111x90.png 111w\" data-sizes=\"(max-width: 388px) 100vw, 388px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 388px; --smush-placeholder-aspect-ratio: 388\/315;\" \/><figcaption class=\"wp-element-caption\">\u56fe 1. Eclipse \u5de5\u4f5c\u533a <\/figcaption><\/figure>\n<\/div>\n\n<h3 class=\"wp-block-heading\">\u4e0b\u8f7d\u5e76\u5b89\u88c5 Sweet Home 3D \u5e93<\/h3>\n\n<p>\u63d2\u4ef6\u7684\u5f00\u53d1\u57fa\u4e8e Sweet Home 3D \u7684\u4e00\u4e9b\u7c7b\uff0cEclipse \u5fc5\u987b\u77e5\u9053\u8fd9\u4e9b\u7c7b\u624d\u80fd\u6784\u5efa\u60a8\u7684\u9879\u76ee\u3002\u5c06 Sweet Home 3D \u7c7b\u6dfb\u52a0\u5230 Eclipse \u7684\u6700\u7b80\u5355\u65b9\u6cd5\u662f\u4e0b\u8f7d Sweet Home 3D \u7684 JAR \u53ef\u6267\u884c\u7248\u672c\uff0c\u8be5\u7248\u672c\u53ef\u5728 <a href=\"https:\/\/sourceforge.net\/projects\/sweethome3d\/files\/SweetHome3D\/SweetHome3D-7.5\/SweetHome3D-7.5.jar\/download\" target=\"_blank\" rel=\"noopener\">https:\/\/sourceforge.net\/projects\/sweethome3d\/files\/SweetHome3D\/SweetHome3D-7.5\/SweetHome3D-7.5.jar\/download<\/a> \u83b7\u5f97\u3002\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u5c06\u6587\u4ef6 SweetHome3D-7.5.jar \u62d6\u653e\u5230 Eclipse \u7684 <em>Package Explorer<\/em> \u89c6\u56fe\u4e2d\u7684 <em>VolumePlugin<\/em> \u9879\u76ee\u56fe\u6807\u4e0a\uff0c\u7136\u540e\u5728 SweetHome3D-7.5.jar \u6587\u4ef6\u7684\u4e0a\u4e0b\u6587\u83dc\u5355\u4e2d\u9009\u62e9\u9879\u76ee <em>Build Path &gt; Add to Build Path<\/em>\uff0c\u5982\u56fe 2 \u6240\u793a\u3002  <\/p>\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" width=\"452\" height=\"157\" data-src=\"https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/addToBuildPath.png\" alt=\"\" class=\"wp-image-5846 lazyload\" data-srcset=\"https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/addToBuildPath.png 452w, https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/addToBuildPath-300x104.png 300w, https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/addToBuildPath-259x90.png 259w\" data-sizes=\"(max-width: 452px) 100vw, 452px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 452px; --smush-placeholder-aspect-ratio: 452\/157;\" \/><figcaption class=\"wp-element-caption\">\u56fe 2. \u5c06 SweetHome3D-7.5.jar<br\/>\u6dfb\u52a0\u5230\u6784\u5efa\u8def\u5f84 <\/figcaption><\/figure>\n<\/div>\n\n<h2 class=\"wp-block-heading programmingPlugin\">\u7f16\u7a0b\u4e00\u4e2a\u63d2\u4ef6<\/h2>\n\n<p>\u73b0\u5728\u60a8\u5df2\u7ecf\u5b89\u88c5\u4e86\u6240\u9700\u7684\u5de5\u5177\uff0c\u8ba9\u6211\u4eec\u770b\u770b\u5982\u4f55\u4e3a Sweet Home 3D \u7f16\u7a0b\u60a8\u7684\u7b2c\u4e00\u4e2a\u63d2\u4ef6\u3002<\/p>\n\n<h3 class=\"wp-block-heading\">\u521b\u5efa\u63d2\u4ef6\u7c7b<\/h3>\n\n<p>\u9996\u5148\uff0c\u901a\u8fc7\u5728 Eclipse \u4e2d\u9009\u62e9 <em>\u6587\u4ef6 &gt; \u65b0\u5efa &gt; \u7c7b<\/em> \u83dc\u5355\u9879\uff0c\u521b\u5efa\u4e00\u4e2a com.eteks.sweethome3d.plugin.Plugin \u7684\u65b0\u5b50\u7c7b\u3002<\/p>\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" width=\"418\" height=\"509\" data-src=\"https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/newJavaClass.png\" alt=\"\" class=\"wp-image-5847 lazyload\" data-srcset=\"https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/newJavaClass.png 418w, https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/newJavaClass-246x300.png 246w, https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/newJavaClass-74x90.png 74w\" data-sizes=\"(max-width: 418px) 100vw, 418px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 418px; --smush-placeholder-aspect-ratio: 418\/509;\" \/><figcaption class=\"wp-element-caption\">\u56fe 3. \u521b\u5efa\u4e00\u4e2a\u65b0\u7c7b <\/figcaption><\/figure>\n<\/div>\n\n<p>\u5728 <em>\u65b0\u5efa Java \u7c7b<\/em> \u5bf9\u8bdd\u6846\u4e2d\uff0c\u8f93\u5165 VolumePlugin \u4f5c\u4e3a\u7c7b\u540d\uff0c\u8f93\u5165\u4e00\u4e2a\u5305\uff08\u8fd9\u91cc\u9009\u62e9\u7684\u5305\u662f com.eteks.test\uff09\uff0c\u7136\u540e\u9009\u62e9 com.eteks.sweethome3d.plugin.Plugin \u4f5c\u4e3a VolumePlugin \u7684\u8d85\u7c7b\u3002\u5b8c\u6210\u540e\uff0c\u5355\u51fb <em>\u5b8c\u6210<\/em>\u3002Eclipse \u5c06\u521b\u5efa\u65b0\u7c7b\u7684\u6587\u4ef6\uff0c\u5176\u5185\u5bb9\u5982\u4e0b\uff1a  <\/p>\n\n<pre class=\"wp-block-preformatted\">package com.eteks.test;<br\/>import com.eteks.sweethome3d.plugin.Plugin;<br\/>import com.eteks.sweethome3d.plugin.PluginAction;<br\/>public class <strong>VolumePlugin<\/strong> extends <strong>Plugin<\/strong> {<br\/> @Override<br\/> public PluginAction[] <strong>getActions<\/strong>() {<br\/> \/\/ TODO Auto-generated method stub<br\/> return null;<br\/> }<br\/>}<\/pre>\n\n<p>\u6b63\u5982\u60a8\u53ef\u4ee5\u4ece TODO \u6ce8\u91ca\u4e2d\u731c\u5230\u7684\u90a3\u6837\uff0c\u60a8\u73b0\u5728\u5fc5\u987b\u66f4\u6539 getActions \u65b9\u6cd5\u7684\u5b9e\u73b0\uff0c\u4ee5\u8fd4\u56de\u4e00\u4e2a\u80fd\u591f\u8ba1\u7b97\u53ef\u79fb\u52a8\u5bb6\u5177\u4f53\u79ef\u7684\u63d2\u4ef6\u64cd\u4f5c\u3002\u5c06 return null; \u66ff\u6362\u4e3a\u4ee5\u4e0b\u8bed\u53e5\uff1a <\/p>\n\n<pre class=\"wp-block-preformatted\">  return new <strong>PluginAction<\/strong> [] {new <strong>VolumeAction<\/strong>()};  <\/pre>\n\n<p>\u7136\u540e\u4ece Eclipse \u83dc\u5355\u4e2d\u9009\u62e9 <em>Edition &gt; Quick Fix<\/em> \u4ee5\u521b\u5efa\u7f3a\u5c11\u7684\u7c7b VolumeAction\uff0c\u5982\u56fe 4 \u6240\u793a\u3002<\/p>\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" width=\"615\" height=\"117\" data-src=\"https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/quickFix.png\" alt=\"\" class=\"wp-image-5848 lazyload\" data-srcset=\"https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/quickFix.png 615w, https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/quickFix-300x57.png 300w, https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/quickFix-473x90.png 473w\" data-sizes=\"(max-width: 615px) 100vw, 615px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 615px; --smush-placeholder-aspect-ratio: 615\/117;\" \/><figcaption class=\"wp-element-caption\">\u56fe 4. \u4f7f\u7528\u5feb\u901f\u4fee\u590d\u751f\u6210\u7f3a\u5c11\u7684\u7c7b <\/figcaption><\/figure>\n<\/div>\n\n<p>\u5728\u51fa\u73b0\u7684 <em>\u65b0\u5efa Java \u7c7b<\/em> \u5bf9\u8bdd\u6846\u4e2d\uff0c\u9009\u4e2d <em>Enclosing type<\/em> \u590d\u9009\u6846\u4ee5\u521b\u5efa VolumePlugin \u7684\u5185\u90e8\u7c7b\uff0c\u7136\u540e\u5355\u51fb <em>\u5b8c\u6210<\/em>\u3002\u8fd9\u5c06\u521b\u5efa\u4ece com.eteks.sweethome3d.plugin.PluginAction \u7c7b\u7ee7\u627f\u7684 VolumeAction \u7c7b\uff0c\u5e76\u5305\u542b\u4e00\u4e2a\u7a7a\u7684 execute \u65b9\u6cd5\uff1a <\/p>\n\n<pre class=\"wp-block-preformatted\">  public class <strong>VolumeAction<\/strong> extends <strong>PluginAction<\/strong> {<br\/> @Override<br\/> public void <strong>execute<\/strong>() {<br\/> \/\/ TODO Auto-generated method stub<br\/> }<br\/>}<\/pre>\n\n<p>\u6b64\u65b9\u6cd5\u662f Sweet Home 3D \u5728\u7528\u6237\u542f\u52a8\u63d2\u4ef6\u64cd\u4f5c\u65f6\u5c06\u8c03\u7528\u7684\u65b9\u6cd5\uff1b\u56e0\u6b64\uff0c\u60a8\u5fc5\u987b\u5728\u6b64\u5904\u5b9e\u73b0\u5982\u4f55\u8ba1\u7b97\u5bb6\u5177\u7684\u4f53\u79ef\u5e76\u663e\u793a\u5b83\uff1a<\/p>\n\n<pre class=\"wp-block-preformatted\">  public class <strong>VolumeAction<\/strong> extends <strong>PluginAction<\/strong> {  <br\/>  @Override<br\/>  public void <strong>execute<\/strong>() { <br\/>  float volumeInCm3 = 0;<br\/> \/\/ Compute the sum of the volume of the bounding box of <br\/> \/\/ each movable piece of furniture in home<br\/> for (PieceOfFurniture piece : <strong>getHome<\/strong>(). <strong>getFurniture<\/strong>()) {<br\/> if (piece. <strong>isMovable<\/strong>()) {<br\/> volumeInCm3 += piece. <strong>getWidth<\/strong>() <br\/> * piece. <strong>getDepth<\/strong>() <br\/> * piece. <strong>getHeight<\/strong>();<br\/>  }<br\/> }<br\/>            <br\/> \/\/ Display the result in a message box (\u00b3 is for 3 in supercript)<br\/> String message = String. <strong>format<\/strong>(<br\/> \"The maximum volume of the movable furniture in home is %.2f m\u00b3.\", <br\/> volumeInCm3 \/ 1000000);<br\/> JOptionPane. <strong>showMessageDialog<\/strong>(null, message);<br\/>  }<br\/>  }<\/pre>\n\n<p>\u73b0\u5728\u60a8\u5df2\u7ecf\u6307\u5b9a\u4e86\u60a8\u5e0c\u671b\u63d2\u4ef6\u6267\u884c\u7684\u64cd\u4f5c\uff0c\u60a8\u5fc5\u987b\u63cf\u8ff0\u7528\u6237\u5c06\u5982\u4f55\u542f\u52a8\u6b64\u65b0\u64cd\u4f5c\u3002\u60a8\u53ef\u4ee5\u9009\u62e9\u5411\u83dc\u5355\u6dfb\u52a0\u65b0\u7684 <strong>\u83dc\u5355\u9879<\/strong>\uff0c\u548c\/\u6216\u5411\u5de5\u5177\u680f\u6dfb\u52a0\u65b0\u7684 <strong>\u6309\u94ae<\/strong>\u3002\u6b64\u9009\u62e9\u662f\u901a\u8fc7\u5728\u5176\u521b\u5efa\u65f6\u8bbe\u7f6e\u63d2\u4ef6\u64cd\u4f5c\u7684\u9002\u5f53\u5c5e\u6027\u6765\u5b8c\u6210\u7684\u3002\u4f8b\u5982\uff0c\u5982\u679c\u60a8\u5e0c\u671b\u7528\u6237\u4f7f\u7528 <em>\u5de5\u5177<\/em> \u83dc\u5355\u4e2d\u627e\u5230\u7684\u83dc\u5355\u9879 <em>\u8ba1\u7b97\u4f53\u79ef<\/em> \u542f\u52a8\u4f53\u79ef\u64cd\u4f5c\uff0c\u60a8\u5c06\u5411 VolumnAction \u7c7b\u6dfb\u52a0\u4ee5\u4e0b\u6784\u9020\u51fd\u6570\uff1a   <\/p>\n\n<pre class=\"wp-block-preformatted\">  public <strong>VolumeAction<\/strong>() {<br\/>           <strong>putPropertyValue<\/strong>(Property.NAME, \"Compute volume\");<br\/>           <strong>putPropertyValue<\/strong>(Property.MENU, \"Tools\");<br\/> \/\/ Enables the action by default<br\/>           <strong>setEnabled<\/strong>(true);<br\/> }<\/pre>\n\n<p><a href=\"\/examples\/VolumePlugin\/VolumePlugin.java\">VolumePlugin<\/a> \u63d2\u4ef6\u7c7b\u73b0\u5728\u5df2\u7f16\u7a0b\u5b8c\u6210\uff0c\u5e76\u4e14\u51e0\u4e4e\u53ef\u4ee5\u4f5c\u4e3a Sweet Home 3D \u4e2d\u7684\u63d2\u4ef6\u5de5\u4f5c\u3002\u6700\u540e\u8981\u505a\u7684\u4e24\u4ef6\u4e8b\u662f\uff1a <\/p>\n\n<ul class=\"wp-block-list pl-14\">\n<li>\u521b\u5efa\u4e00\u4e2a <tt>ApplicationPlugin.properties<\/tt> \u63cf\u8ff0\u6587\u4ef6\uff0c<\/li>\n\n\n\n<li>\u5c06\u6587\u4ef6\u653e\u5728\u4e00\u4e2a JAR \u6587\u4ef6\u4e2d\u3002<br\/><\/li>\n<\/ul>\n\n<h3 class=\"wp-block-heading\" id=\"creating-the-plugin-description-file\">\u521b\u5efa\u63d2\u4ef6\u63cf\u8ff0\u6587\u4ef6<\/h3>\n\n<p>\u4e00\u4e2a <tt>ApplicationPlugin.properties<\/tt> \u6587\u4ef6\n \u63cf\u8ff0\u4e86\u63d2\u4ef6\u540d\u79f0\u3001\u5176\u7c7b\u3001\u652f\u6301\u5b83\u7684 Sweet Home 3D \u548c Java \u6700\u4f4e\u7248\u672c\n \u4ee5\u53ca\u6cd5\u5f8b\u5185\u5bb9\u3002\u4ece<i>\u6587\u4ef6 &gt; \u65b0\u5efa &gt; \u6587\u4ef6<\/i> \u4e2d\u9009\u62e9\n Eclipse \u83dc\u5355\uff0c\u8f93\u5165\u6587\u4ef6\u540d <tt>ApplicationPlugin.properties<\/tt>\uff0c\u7136\u540e\u5355\u51fb <i>\u5b8c\u6210<\/i>\uff0c\u5982\u56fe\u6240\u793a\n \u5728\u56fe 5 \u4e2d\u3002 <\/p>\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img decoding=\"async\" width=\"264\" height=\"384\" data-src=\"https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/newFile.png\" alt=\"\" class=\"wp-image-5849 lazyload\" style=\"--smush-placeholder-width: 264px; --smush-placeholder-aspect-ratio: 264\/384;width:264px;height:auto\" data-srcset=\"https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/newFile.png 264w, https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/newFile-206x300.png 206w, https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/newFile-62x90.png 62w\" data-sizes=\"(max-width: 264px) 100vw, 264px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" \/><figcaption class=\"wp-element-caption\">\u56fe 5. \u521b\u5efa\u4e00\u4e2a\u65b0\u6587\u4ef6 <\/figcaption><\/figure>\n<\/div>\n\n<p>\u7136\u540e\u5728\u65b0\u6587\u4ef6\u4e2d\u8f93\u5165<a href=\"\/examples\/VolumePlugin\/ApplicationPlugin.properties\">\u4ee5\u4e0b\u63cf\u8ff0<\/a>\u5e76\u4fdd\u5b58\u5b83\uff1a<\/p>\n\n<pre class=\"wp-block-preformatted\"><strong>name<\/strong>=\u53ef\u79fb\u52a8\u5bb6\u5177\u4f53\u79ef<br\/><strong>class<\/strong>=com.eteks.test.VolumePlugin<br\/><strong>description<\/strong>=\u8ba1\u7b97\u623f\u5c4b\u4e2d\u53ef\u79fb\u52a8\u5bb6\u5177\u7684\u4f53\u79ef<br\/><strong>version<\/strong>=1.0<br\/><strong>license<\/strong>=GNU GPL<br\/><strong>provider<\/strong>=(C) Copyrights 2024 Space Mushrooms<br\/><strong>applicationMinimumVersion<\/strong>=1.5<br\/><strong>javaMinimumVersion<\/strong>=1.5<\/pre>\n\n<h3 class=\"wp-block-heading\" id=\"creatingPluginJAR\">\u521b\u5efa\u63d2\u4ef6 JAR<\/h3>\n\n<p>\u63d2\u4ef6 JAR \u5305\u542b\u4ece <tt>VolumePlugin.java<\/tt> \u6587\u4ef6\n \u7684\u7f16\u8bd1\u521b\u5efa\u7684 <tt>class<\/tt> \u6587\u4ef6\uff0c\u4ee5\u53ca <tt>ApplicationPlugin.properties<\/tt> \u6587\u4ef6\u3002\u7531\u4e8e Eclipse \u4f1a\u5728\u60a8\u4fdd\u5b58 Java \u6587\u4ef6\u540e\u7acb\u5373\u5bf9\u5176\u8fdb\u884c\u7f16\u8bd1\uff0c\u56e0\u6b64\u60a8\n\u53ea\u9700\u4ece\u83dc\u5355\u4e2d\u9009\u62e9 <i>\u6587\u4ef6 &gt; \u5bfc\u51fa&#8230;<\/i>\uff0c\u7136\u540e\u5728\u5c06\u663e\u793a\u7684 <i>\u5bfc\u51fa<\/i> \u5bf9\u8bdd\u6846\n \u4e2d\u9009\u62e9 <i>Java &gt; JAR \u6587\u4ef6<\/i>\u3002\u5728\u51fa\u73b0\u7684 <i>Jar \u5bfc\u51fa<\/i> \u5411\u5bfc\u4e2d\uff0c\u5982\u56fe 6 \u6240\u793a\uff0c\u9009\u4e2d\u9879\u76ee\u590d\u9009\u6846\n \u5e76\u8f93\u5165\u653e\u7f6e\u5728 Sweet Home 3D \u63d2\u4ef6\u6587\u4ef6\u5939\u4e2d\u7684 JAR \u6587\u4ef6\u7684\u8def\u5f84\u3002\u6b64\u9002\u5f53\u7684\u6587\u4ef6\u5939\u53d6\u51b3\u4e8e\n \u60a8\u7684\u7cfb\u7edf\uff0c\u5982\u4e0b\u6240\u793a\uff1a   <\/p>\n\n<ul class=\"wp-block-list pl-14\">\n<li> \u5728 Windows Vista \/ 7 \/ 8 \/ 10 \/ 11 \u4e0b\uff0c\u6b64\u6587\u4ef6\u5939\u662f <tt>C:\\Users\\<i>user<\/i>\\AppData\\Roaming\\eTeks\\Sweet\n Home 3D\\plugins<\/tt>\uff0c<\/li>\n\n\n\n<li> \u5728 Windows XP \u548c\u4ee5\u524d\u7248\u672c\u7684 Windows \u4e0b\uff0c\u6b64\u6587\u4ef6\u5939\u662f <tt>C:\\Documents and Settings\\<i>user<\/i>\\Application Data\\eTeks\\Sweet\n Home 3D\\plugins<\/tt>\uff0c<\/li>\n\n\n\n<li> \u5728 macOS \u4e0b\uff0c\u5b83\u662f\u60a8\u7684\n \u7528\u6237\u6587\u4ef6\u5939\u7684\u5b50\u6587\u4ef6\u5939 <tt>Library\/Application Support\/eTeks\/Sweet Home 3D\/<\/tt><tt>plugins<\/tt>\uff0c<\/li>\n\n\n\n<li> \u5728 Linux \u548c\u5176\u4ed6 Unix \u4e0b\uff0c\u5b83\u662f\u60a8\u7684\u7528\u6237\u6587\u4ef6\u5939\u7684\u5b50\u6587\u4ef6\u5939 <tt>.eteks\/sweethome3d\/<\/tt><tt>plugins<\/tt>\u3002<\/li>\n<\/ul>\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" width=\"499\" height=\"440\" data-src=\"https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/jarExport.png\" alt=\"\" class=\"wp-image-5850 lazyload\" data-srcset=\"https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/jarExport.png 499w, https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/jarExport-300x265.png 300w, https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/jarExport-102x90.png 102w\" data-sizes=\"(max-width: 499px) 100vw, 499px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 499px; --smush-placeholder-aspect-ratio: 499\/440;\" \/><figcaption class=\"wp-element-caption\">\u56fe 6. \u5bfc\u51fa\u5230 JAR \u6587\u4ef6 <\/figcaption><\/figure>\n<\/div>\n\n<h3 class=\"wp-block-heading\" id=\"testing-the-plugin\">\u6d4b\u8bd5\u63d2\u4ef6<\/h3>\n\n<p>\u60a8\u5f00\u53d1\u7684 <a href=\"\/examples\/VolumePlugin\/VolumePlugin.jar\">\u63d2\u4ef6<\/a> \u5c06\u5728 Sweet Home 3D \u4e2d\u8fd0\u884c\uff0c\u65e0\u8bba\u662f\u4f7f\u7528 <a href=\"\/storage\/SweetHome3D.jnlp\">Java Web Start<\/a> \u7248\u672c\u3001<a href=\"https:\/\/downloads.sourceforge.net\/sweethome3d\/\" target=\"_blank\" rel=\"noopener\">\u5b89\u88c5\u7a0b\u5e8f<\/a> \u7248\u672c\u8fd8\u662f\u60a8\u4e4b\u524d\u4e0b\u8f7d\u7684 <a href=\"https:\/\/sourceforge.net\/projects\/sweethome3d\/files\/SweetHome3D\/SweetHome3D-7.5\/SweetHome3D-7.5.jar\/download\" target=\"_blank\" rel=\"noopener\">SweetHome3D-7.5.jar<\/a>\u3002\u7531\u4e8e\u6700\u65b0\u7248\u672c\u662f\u4e00\u4e2a\u53ef\u6267\u884c JAR\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u53cc\u51fb\u5b83\u6216\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u8fd0\u884c\u5b83\uff1a <\/p>\n\n<p>\u60a8\u5f00\u53d1\u7684 <a href=\"\/examples\/VolumePlugin\/VolumePlugin.jar\">\u63d2\u4ef6<\/a> \u5c06\u5728 Sweet Home 3D \u4e2d\u8fd0\u884c\uff0c\u65e0\u8bba\u662f\u4f7f\u7528 <a href=\"\/storage\/SweetHome3D.jnlp\">Java Web Start<\/a> \u7248\u672c\u3001<a href=\"https:\/\/downloads.sourceforge.net\/sweethome3d\/\" target=\"_blank\" rel=\"noopener\">\u5b89\u88c5\u7a0b\u5e8f<\/a> \u7248\u672c\u8fd8\u662f\u60a8\u4e4b\u524d\u4e0b\u8f7d\u7684 <a href=\"https:\/\/sourceforge.net\/projects\/sweethome3d\/files\/SweetHome3D\/SweetHome3D-7.5\/SweetHome3D-7.5.jar\/download\" target=\"_blank\" rel=\"noopener\">SweetHome3D-7.5.jar<\/a>\u3002\u7531\u4e8e\u6700\u65b0\u7248\u672c\u662f\u4e00\u4e2a\u53ef\u6267\u884c JAR\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u53cc\u51fb\u5b83\u6216\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u8fd0\u884c\u5b83\uff1a <\/p>\n\n<pre class=\"wp-block-preformatted\">java -jar \/<em>path<\/em>\/<em>to<\/em>\/SweetHome3D-7.5.jar<\/pre>\n\n<p>\u53ea\u8981\u60a8\u6b63\u5728\u6d4b\u8bd5\uff0c\u60a8\u53ef\u80fd\u66f4\u559c\u6b22\u4f7f\u7528\u6b64\u547d\u4ee4\u8fd0\u884c Sweet Home 3D\uff0c\u4ee5\u4fbf\u80fd\u591f\u5728\u63a7\u5236\u53f0\u4e2d\u8bfb\u53d6\u63d2\u4ef6\u6267\u884c\u671f\u95f4\u629b\u51fa\u7684\u5f02\u5e38\u7684\u5806\u6808\u8ddf\u8e2a\u3002<\/p>\n\n<p>\u542f\u52a8 Sweet Home 3D \u540e\uff0c\u60a8\u5c06\u770b\u5230\u65b0\u83dc\u5355\u53ca\u5176\u9879\u76ee\u51fa\u73b0\uff0c\u5982\u56fe 7 \u6240\u793a\uff1a<\/p>\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" width=\"447\" height=\"53\" data-src=\"https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/pluginMenu.png\" alt=\"\" class=\"wp-image-5851 lazyload\" data-srcset=\"https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/pluginMenu.png 447w, https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/pluginMenu-300x36.png 300w\" data-sizes=\"(max-width: 447px) 100vw, 447px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 447px; --smush-placeholder-aspect-ratio: 447\/53;\" \/><figcaption class=\"wp-element-caption\">\u56fe 7. \u63d2\u4ef6\u83dc\u5355 <\/figcaption><\/figure>\n<\/div>\n\n<p>\u5982\u679c\u60a8\u4e3a\u5728 <a href=\"https:\/\/www.sweethome3d.com\/zh-hans\/sweet-home-3d-%e7%94%a8%e6%88%b7%e6%8c%87%e5%8d%97\/\" data-type=\"page\" data-id=\"424\">\u7528\u6237\u6307\u5357<\/a> \u4e2d\u521b\u5efa\u7684 <a href=\"\/examples\/userGuideExample.sh3d\">\u5bb6\u5ead\u793a\u4f8b<\/a> \u9009\u62e9\u65b0\u83dc\u5355\u9879\uff0c\u60a8\u5c06\u83b7\u5f97\u4ee5\u4e0b\u7ed3\u679c\uff1a<\/p>\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" width=\"448\" height=\"137\" data-src=\"https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/pluginInAction.png\" alt=\"\" class=\"wp-image-5853 lazyload\" data-srcset=\"https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/pluginInAction.png 448w, https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/pluginInAction-300x92.png 300w, https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/pluginInAction-294x90.png 294w\" data-sizes=\"(max-width: 448px) 100vw, 448px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 448px; --smush-placeholder-aspect-ratio: 448\/137;\" \/><figcaption class=\"wp-element-caption\">\u56fe 8. \u8fd0\u884c\u4e2d\u7684\u63d2\u4ef6 <\/figcaption><\/figure>\n<\/div>\n\n<h3 class=\"wp-block-heading\">\u8c03\u8bd5\u63d2\u4ef6<\/h3>\n\n<p>\u5982\u679c\u60a8\u9700\u8981\u4ece Eclipse \u8c03\u8bd5\u60a8\u7684\u63d2\u4ef6\uff0c\u8bf7\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u521b\u5efa\u8c03\u8bd5\u914d\u7f6e\uff1a<\/p>\n\n<ul class=\"wp-block-list pl-14\">\n<li>\u4ece\u83dc\u5355\u4e2d\u9009\u62e9 <i>Run &gt; Debug Configurations&#8230;<\/i>\uff0c\u5728 \n          <i>Debug configurations<\/i> \u5bf9\u8bdd\u6846\u7684\u53ef\u7528\u914d\u7f6e\u5217\u8868\u4e2d\u9009\u62e9 <i>Java Application<\/i> \u9879\u76ee\uff0c\u5355\u51fb\u5de6\u4e0a\u89d2\u7684 <i>New <\/i> \u6309\u94ae\uff0c\u7136\u540e\u8f93\u5165\u914d\u7f6e\u7684\u540d\u79f0\u3002<\/li>\n\n\n\n<li>\u5355\u51fb <i>Main class<\/i> \u6587\u672c\u5b57\u6bb5\u53f3\u4fa7\u7684 <i>Search&#8230;<\/i> \u6309\u94ae\uff0c\u7136\u540e\u53cc\u51fb\u5efa\u8bae\u7684\u7c7b\u4e2d\u7684 <i>SweetHome3DBootstrap<\/i> \u7c7b <br\/>\u3002<\/li>\n<\/ul>\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" width=\"629\" height=\"390\" data-src=\"https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/debugConfiguration.png\" alt=\"\" class=\"wp-image-5854 lazyload\" data-srcset=\"https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/debugConfiguration.png 629w, https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/debugConfiguration-300x186.png 300w, https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/debugConfiguration-145x90.png 145w\" data-sizes=\"(max-width: 629px) 100vw, 629px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 629px; --smush-placeholder-aspect-ratio: 629\/390;\" \/><figcaption class=\"wp-element-caption\"><em>\u56fe 9. \u521b\u5efa\u8c03\u8bd5\u914d\u7f6e <\/em><\/figcaption><\/figure>\n<\/div>\n\n<ul class=\"wp-block-list pl-14\">\n<li>\u5355\u51fb <em>Classpath<\/em> \u9009\u9879\u5361\uff0c\u5728 <em>Classpath<\/em> \u5217\u8868\u4e2d\u7684 <em>User Entries<\/em> \u9879\u76ee\u7684 <em>VolumePlugin (default classpath)<\/em> \u5b50\u9879\u76ee\uff0c\u7136\u540e\u5355\u51fb <em>Remove<\/em> \u6309\u94ae\u3002<\/li>\n\n\n\n<li>\u5355\u51fb <em>Classpath<\/em> \u5217\u8868\u4e2d\u7684<em> User Entries<\/em> \u9879\u76ee\uff0c\u5355\u51fb <em>Add JARs&#8230;<\/em> \u6309\u94ae\uff0c\u9009\u62e9 SweetHome3D-7.5.jar \u9879\u76ee\u5e76\u786e\u8ba4\u60a8\u7684\u9009\u62e9\u3002<\/li>\n<\/ul>\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" width=\"618\" height=\"482\" data-src=\"https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/classpathConfiguration.png\" alt=\"\" class=\"wp-image-5855 lazyload\" data-srcset=\"https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/classpathConfiguration.png 618w, https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/classpathConfiguration-300x234.png 300w, https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/classpathConfiguration-115x90.png 115w\" data-sizes=\"(max-width: 618px) 100vw, 618px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 618px; --smush-placeholder-aspect-ratio: 618\/482;\" \/><figcaption class=\"wp-element-caption\">\u56fe 10. \u8bbe\u7f6e\u8c03\u8bd5\u914d\u7f6e\u7684\u7c7b\u8def\u5f84 <\/figcaption><\/figure>\n<\/div>\n\n<ul class=\"wp-block-list pl-14\">\n<li>\u9009\u62e9 <em>Source<\/em> \u9009\u9879\u5361\uff0c\u5355\u51fb <em>Add\u2026<\/em> \u6309\u94ae\uff0c\u5728 <em>Add Source<\/em> \u5bf9\u8bdd\u6846\u4e2d\u53cc\u51fb <em>Java Project<\/em> \u9879\u76ee\uff0c\u5728 <em>Project Selection<\/em> \u5f39\u51fa\u7a97\u53e3\u4e2d\u9009\u62e9 <em>VolumePlugin<\/em> \u9879\u76ee\uff0c\u7136\u540e\u786e\u8ba4\u60a8\u7684\u9009\u62e9\u3002<\/li>\n<\/ul>\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" width=\"773\" height=\"549\" data-src=\"https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/sourcepathConfiguration.png\" alt=\"\" class=\"wp-image-5856 lazyload\" data-srcset=\"https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/sourcepathConfiguration.png 773w, https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/sourcepathConfiguration-300x213.png 300w, https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/sourcepathConfiguration-127x90.png 127w, https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/sourcepathConfiguration-768x545.png 768w\" data-sizes=\"(max-width: 773px) 100vw, 773px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 773px; --smush-placeholder-aspect-ratio: 773\/549;\" \/><figcaption class=\"wp-element-caption\"><em><em><em>\u56fe 11. \u8bbe\u7f6e\u8c03\u8bd5\u914d\u7f6e\u7684\u6e90\u8def\u5f84 <\/em><\/em><\/em><\/figcaption><\/figure>\n<\/div>\n\n<ul class=\"wp-block-list pl-14\">\n<li>\u6700\u540e\uff0c\u5355\u51fb <i>Debug<\/i> \u6309\u94ae\u4ee5\u5728\u8c03\u8bd5\u6a21\u5f0f\u4e0b\u542f\u52a8 Sweet Home 3D\u3002\u7a0b\u5e8f\u8fd0\u884c\u540e\uff0c\u6253\u5f00 <tt>VolumePlugin.java<\/tt> \u6587\u4ef6\uff0c\n \u5728 <i>execute<\/i> \u65b9\u6cd5\u4e2d\u8bbe\u7f6e\u4e00\u4e2a\u65ad\u70b9\uff0c\u7136\u540e\u4ece Sweet Home 3D \u83dc\u5355\u4e2d\u9009\u62e9 <i>Tools &gt; Compute volume<\/i>\u3002Eclipse \u5c06\u5728\u9009\u5b9a\u7684 \n \u65ad\u70b9\u5904\u505c\u6b62\uff0c\u8ba9\u60a8\u9010\u6b65\u6267\u884c\u7a0b\u5e8f\u5e76\u68c0\u67e5\u53d8\u91cf\u503c\u3002  <\/li>\n<\/ul>\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" width=\"601\" height=\"398\" data-src=\"https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/eclipseDebug.png\" alt=\"\" class=\"wp-image-5857 lazyload\" data-srcset=\"https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/eclipseDebug.png 601w, https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/eclipseDebug-300x199.png 300w, https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/eclipseDebug-136x90.png 136w\" data-sizes=\"(max-width: 601px) 100vw, 601px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 601px; --smush-placeholder-aspect-ratio: 601\/398;\" \/><figcaption class=\"wp-element-caption\">\u56fe 12. Eclipse \u8c03\u8bd5\u900f\u89c6\u56fe <\/figcaption><\/figure>\n<\/div>\n\n<div class=\"wp-block-group is-nowrap is-layout-flex wp-container-core-group-is-layout-64989fb1 wp-block-group-is-layout-flex\">\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" data-src=\"https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/09\/warning-1.gif\" alt=\"\" class=\"wp-image-4679 lazyload\" style=\"--smush-placeholder-width: 21px; --smush-placeholder-aspect-ratio: 21\/21;width:21px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" \/><\/figure>\n\n\n\n<p>\u6bcf\u6b21\u4fee\u6539\u63d2\u4ef6\u7684\u6e90\u4ee3\u7801\u65f6\uff0c\u8bf7\u4e0d\u8981\u5fd8\u8bb0\u5728\u542f\u52a8\u60a8\u521b\u5efa\u7684\u8c03\u8bd5\u914d\u7f6e\u4e4b\u524d<a href=\"#creatingPluginJAR\">\u751f\u6210\u63d2\u4ef6 JAR<\/a>\u3002\u4e3a\u4e86\u52a0\u5feb eclipse \u4e2d\u7684 JAR \u5bfc\u51fa\u8fc7\u7a0b\uff0c\u8bf7\u8f6c\u5230 JAR \u5bfc\u51fa\u5411\u5bfc\u7684\u7b2c\u4e8c\u6b65\uff0c\u7136\u540e\u9009\u62e9\u9009\u9879 <em>Save the description of this JAR in the workspace<\/em>\u3002\u8fd9\u5c06\u5728\u9879\u76ee\u4e2d\u6dfb\u52a0\u4e00\u4e2a\u65b0\u9879\u76ee\uff0c\u5176\u4e2d\u5305\u542b\u4e0a\u4e0b\u6587 <em>Create JAR<\/em> \u83dc\u5355\u9879\u3002  <\/p>\n<\/div>\n\n<h3 class=\"wp-block-heading\" id=\"deployingPlugin\">\u90e8\u7f72\u63d2\u4ef6<\/h3>\n\n<p>\u51c6\u5907\u5c31\u7eea\u540e\uff0c\u53ea\u9700\u5c06\u5176\u590d\u5236\u5230\u5176\u4ed6 Sweet Home 3D \u7528\u6237\u7684 <a href=\"#creatingPluginJAR\">\u63d2\u4ef6\u6587\u4ef6\u5939<\/a> \u4e2d\uff0c\u5373\u53ef\u5c06\u60a8\u7684\u63d2\u4ef6\u90e8\u7f72\u5230\u4ed6\u4eec\u7684\u8ba1\u7b97\u673a\u4e0a\u3002\u4ece 1.6 \u7248\u672c\u5f00\u59cb\uff0c\u5982\u679c\u63d2\u4ef6\u6587\u4ef6\u7684\u6269\u5c55\u540d\u4e3a SH3P\uff08\u53ea\u9700\u5c06\u6587\u4ef6\u6269\u5c55\u540d\u4ece .zip \u66f4\u6539\u4e3a .sh3p\uff09\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u53cc\u51fb\u5b83\u5c06\u5176\u5b89\u88c5\u5230 Sweet Home 3D \u7684\u63d2\u4ef6\u6587\u4ef6\u5939\u4e2d\u3002\u5982\u679c\u53cc\u51fb .sh3p \u6587\u4ef6\u6ca1\u6709\u542f\u52a8 Sweet Home 3D\uff08\u5728 Linux \u4e0b\u6700\u6709\u53ef\u80fd\uff09\uff0c\u60a8\u8fd8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5728 <em>Terminal<\/em> \u7a97\u53e3\u4e2d\u5b89\u88c5\u63d2\u4ef6\uff08\u5176\u4e2d <code>SweetHome3D<\/code> \u662f Sweet Home 3D \u5b89\u88c5\u7a0b\u5e8f\u63d0\u4f9b\u7684\u53ef\u6267\u884c\u6587\u4ef6\u7684\u540d\u79f0\uff09\uff1a<\/p>\n\n<pre class=\"wp-block-preformatted\"><em>\/path\/to\/<\/em>SweetHome3D <em>\/path\/to\/<\/em>plugin.sh3p<\/pre>\n\n<p>\u8981\u505c\u6b62\u4f7f\u7528\u63d2\u4ef6\uff0c\u8bf7\u4ece\u63d2\u4ef6\u6587\u4ef6\u5939\u4e2d\u5220\u9664\u5176\u6587\u4ef6\u5e76\u91cd\u65b0\u542f\u52a8 Sweet Home 3D\u3002<\/p>\n\n<div class=\"wp-block-group is-nowrap is-layout-flex wp-container-core-group-is-layout-64989fb1 wp-block-group-is-layout-flex\">\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" data-src=\"https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/09\/warning-1.gif\" alt=\"\" class=\"wp-image-4679 lazyload\" style=\"--smush-placeholder-width: 21px; --smush-placeholder-aspect-ratio: 21\/21;width:21px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" \/><\/figure>\n\n\n\n<p>\u5982\u679c\u60a8\u5e0c\u671b\u60a8\u7684\u63d2\u4ef6\u80fd\u591f\u4e0e\u6b64\u7f51\u7ad9\u4e0a\u63d0\u4f9b\u7684\u6240\u6709 <a href=\"https:\/\/www.sweethome3d.com\/zh-hans\/%e4%b8%8b%e8%bd%bd\/\">Sweet Home 3D \u5b89\u88c5\u7a0b\u5e8f<\/a> \u4e00\u8d77\u8fd0\u884c\uff0c\u8bf7\u6ce8\u610f\u4f7f\u5176\u4e0e Java 5 \u517c\u5bb9\uff0c\u65b9\u6cd5\u662f\u5728 <em>Java Compiler<\/em> \u90e8\u5206\u7684 <em>Compiler compliance level<\/em> \u5b57\u6bb5\u4e2d\u9009\u62e9 <code>1.5<\/code>\uff0c\u8be5\u5bf9\u8bdd\u6846\u7531 Eclipse \u7684 <em>Project &gt; Properties<\/em> \u83dc\u5355\u9879\u663e\u793a\u3002<br\/>\u5982\u679c\u60a8\u4f7f\u7528\u7684 Java \u7f16\u8bd1\u5668\u7248\u672c\u4e0d\u518d\u63d0\u4f9b Java 1.5 \u517c\u5bb9\u6027\uff0c\u8bf7\u5c1d\u8bd5\u81f3\u5c11\u4ee5 Sweet Home 3D \u6700\u65b0\u7248\u672c\u4e2d\u4ecd\u4f7f\u7528\u7684 Java 1.8 \u4e3a\u76ee\u6807\uff0c\u5e76\u5728\u63d2\u4ef6\u7684 <code>ApplicationPlugin.properties<\/code> \u6587\u4ef6\u4e2d\u76f8\u5e94\u5730\u8bbe\u7f6e <code>javaMinimumVersion<\/code>\u3002<\/p>\n<\/div>\n\n<h2 class=\"wp-block-heading\" id=\"goingFurther\">\u66f4\u8fdb\u4e00\u6b65<\/h2>\n\n<p>\u7b2c\u4e00\u4e2a\u63d2\u4ef6\u7684\u7f16\u7a0b\u5411\u60a8\u5c55\u793a\u4e86\u5168\u5c40\u60c5\u51b5\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u9644\u52a0\u4fe1\u606f\uff0c\u53ef\u5e2e\u52a9\u60a8\u8fdb\u4e00\u6b65\u4e86\u89e3\u3002 <\/p>\n\n<h3 class=\"wp-block-heading\">Sweet Home 3D API &#8211; Javadoc<\/h3>\n\n<p>\u5f00\u53d1\u65b0\u63d2\u4ef6\u6700\u6709\u7528\u7684\u6587\u6863\u662f\u4f7f\u7528 javadoc \u5de5\u5177\u751f\u6210\u7684 <a href=\"\/javadoc\/index.html\">Sweet Home 3D API<\/a>\uff08\u5e94\u7528\u7a0b\u5e8f\u7f16\u7a0b\u63a5\u53e3\uff09\u3002<br\/>\u5982\u679c\u60a8\u5e0c\u671b\u60a8\u7684\u63d2\u4ef6\u4e0e Sweet Home 3D \u7684\u672a\u6765\u7248\u672c\u5411\u4e0a\u517c\u5bb9\uff0c\u8bf7\u4ec5\u5728\u60a8\u7684\u63d2\u4ef6\u4e2d\u4f7f\u7528 <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/plugin\/package-summary.html\">com.eteks.sweethome3d.plugin<\/a>\u3001<a href=\"\/javadoc\/com\/eteks\/sweethome3d\/model\/package-summary.html\">com.eteks.sweethome3d.model<\/a>\u3001<a href=\"\/javadoc\/com\/eteks\/sweethome3d\/tools\/package-summary.html\">com.eteks.sweethome3d.tools<\/a> \u548c <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/viewcontroller\/package-summary.html\">com.eteks.sweethome3d.viewcontroller<\/a> \u5305\u7684\u7c7b\u3002\u8fd9\u8db3\u4ee5\u7f16\u7a0b\u4efb\u4f55\u5904\u7406 Sweet Home 3D \u4e2d\u53ef\u7528\u7684\u5bb6\u5ead\u6570\u636e\u7684\u63d2\u4ef6\u3002<br\/>Javadoc \u4e2d\u5305\u542b\u4e0e\u7a0b\u5e8f\u5176\u4ed6\u5c42\u5339\u914d\u7684\u5305\uff0c\u4ec5\u4f9b\u53c2\u8003\u3002\u4e0d\u8981\u4f9d\u8d56\u5b83\u4eec\u7684 API\uff0c\u56e0\u4e3a\u5b83\u5c06\u6765\u53ef\u80fd\u4f1a\u66f4\u6539\uff0c\u5e76\u4e14\u4e0d\u4fdd\u8bc1\u5411\u4e0a\u517c\u5bb9\u6027\uff08\u65e0\u8bba\u5982\u4f55\uff0c\u60a8\u90fd\u4e0d\u4f1a\u5728\u4e0a\u8ff0\u5305\u4e2d\u770b\u5230\u5bf9 <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/swing\/package-summary.html\">com.eteks.sweethome3d.swing<\/a>\u3001<a href=\"\/javadoc\/com\/eteks\/sweethome3d\/j3d\/package-summary.html\">com.eteks.sweethome3d.j3d<\/a>\u3001<a href=\"\/javadoc\/com\/eteks\/sweethome3d\/io\/package-summary.html\">com.eteks.sweethome3d.io<\/a> \u6216 <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/package-summary.html\">com.eteks.sweethome3d<\/a> \u5305\u7684\u7c7b\u7684\u5f15\u7528\uff09\u3002  <\/p>\n\n<h3 class=\"wp-block-heading\">\u6a21\u578b\u7c7b\u67b6\u6784<\/h3>\n\n<p>Sweet Home 3D \u57fa\u4e8e MVC\uff08\u6a21\u578b\u89c6\u56fe\u63a7\u5236\u5668\uff09\u67b6\u6784\uff0c\u56e0\u6b64\u4e86\u89e3\u5176\u6a21\u578b\u5c42\u7684\u7ec4\u7ec7\u65b9\u5f0f\u81f3\u5173\u91cd\u8981\u3002\u56fe 13\uff08\u4e5f\u53ef\u5728 <a href=\"https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/modelClassesDiagram.png\">PDF \u683c\u5f0f<\/a> \u4e2d\u83b7\u5f97\uff09\u5c55\u793a\u4e86\u4e0e\u6b64\u6a21\u578b\u5c42\u5339\u914d\u7684 <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/model\/package-summary.html\">com.eteks.sweethome3d.model<\/a> \u5305\u7684 1.5 \u7248\u672c\u4e2d\u51e0\u4e4e\u6240\u6709\u53ef\u7528\u7684\u7c7b\u548c\u63a5\u53e3\u3002 <\/p>\n\n<p>[uml_diagram slug=&#8221;model-classes-diagram&#8221; map_name=&#8221;model-classes-diagram&#8221; caption=&#8221;Figure 13. UML diagram of com.eteks.sweethome3d.model package&#8221; caption_small=&#8221;(click on a class to view its javadoc)&#8221;]<\/p>\n\n<p>\u6a21\u578b\u5c42\u4e2d\u7684\u4e2d\u5fc3\u7c7b\u662f <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/model\/HomeApplication.html\">HomeApplication<\/a> \u7c7b (10)\uff0c\u5b83\u662f <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/SweetHome3D.html\">SweetHome3D<\/a> \u5e94\u7528\u7a0b\u5e8f\u4e3b\u7c7b\u7684\u62bd\u8c61\u8d85\u7c7b\u3002\u6b64\u7c7b\u7684\u5b9e\u4f8b\u5141\u8bb8\u8bbf\u95ee\u5f53\u524d\u7f16\u8f91\u7684 <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/model\/Home.html\">Home<\/a> \u5b9e\u4f8b (7)\uff0c\u4ee5\u53ca\u5b58\u50a8\u6b63\u5728\u4f7f\u7528\u7684 <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/model\/LengthUnit.html\">\u957f\u5ea6\u5355\u4f4d<\/a> (12)\u3001<a href=\"\/javadoc\/com\/eteks\/sweethome3d\/model\/FurnitureCatalog.html\">\u5bb6\u5177\u76ee\u5f55<\/a> (14) \u548c\u7528\u6237\u4ece\u4e2d\u9009\u62e9 <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/model\/CatalogPieceOfFurniture.html\">\u5bb6\u5177<\/a> (17) \u548c <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/model\/CatalogTexture.html\">\u7eb9\u7406<\/a> (18) \u7684 <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/model\/TexturesCatalog.html\">\u7eb9\u7406\u76ee\u5f55<\/a> (15) \u7684 <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/model\/UserPreferences.html\">UserPreferences<\/a> \u5bf9\u8c61 (11)\u3002<br\/><a href=\"\/javadoc\/com\/eteks\/sweethome3d\/model\/Home.html\">Home<\/a> \u5b9e\u4f8b (7) \u5b58\u50a8\u7528\u6237\u5728\u5bb6\u5ead\u8ba1\u5212\u4e2d\u521b\u5efa\u7684\u6240\u6709\u5bf9\u8c61\uff1a <\/p>\n\n<ul class=\"wp-block-list pl-14\">\n<li>\u5b9e\u73b0\u63a5\u53e3 <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/model\/PieceOfFurniture.html\">PieceOfFurniture<\/a> (16) \u7684 <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/model\/HomePieceOfFurniture.html\">HomePieceOfFurniture<\/a> \u5bf9\u8c61 (13) \u7684\u5217\u8868\uff0c<\/li>\n\n\n\n<li><a href=\"\/javadoc\/com\/eteks\/sweethome3d\/model\/Wall.html\">Wall<\/a> \u5bf9\u8c61 (9) \u7684\u96c6\u5408\uff0c<\/li>\n\n\n\n<li><a href=\"\/javadoc\/com\/eteks\/sweethome3d\/model\/Wall.html\">Room<\/a> \u5bf9\u8c61 (5) \u7684\u5217\u8868\uff0c<\/li>\n\n\n\n<li><a href=\"\/javadoc\/com\/eteks\/sweethome3d\/model\/DimensionLine.html\">DimensionLine<\/a> \u5bf9\u8c61 (2) \u7684\u96c6\u5408\uff0c<\/li>\n\n\n\n<li><a href=\"\/javadoc\/com\/eteks\/sweethome3d\/model\/Label.html\">Label<\/a> \u5bf9\u8c61 (3) \u7684\u96c6\u5408\u3002<\/li>\n<\/ul>\n\n<p>\u8fd9\u4e9b\u5bf9\u8c61\u5b9e\u73b0\u4e86 <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/model\/Selectable.html\">Selectable<\/a> \u63a5\u53e3 (1) \u4ee5\u53ca <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/model\/ObserverCamera.html\">ObserverCamera<\/a> \u5bf9\u8c61 (4)\uff0c\u8be5\u5bf9\u8c61\u5b58\u50a8\u76f8\u673a\u5728 <em>Virtual visitor<\/em> \u6a21\u5f0f\u4e0b\u7684\u4f4d\u7f6e\u3002\u6a21\u578b\u5bf9\u8c61\u7ba1\u7406\u7684\u4efb\u4f55\u5916\u90e8\u4fe1\u606f\uff0c\u4f8b\u5982 <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/model\/PieceOfFurniture.html\">\u5bb6\u5177<\/a> (16) \u7684\u56fe\u6807\u548c 3D \u6a21\u578b\uff0c\u6216 <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/model\/TextureImage.html\">\u7eb9\u7406<\/a> (20) \u7684\u56fe\u50cf\uff0c\u90fd\u53ef\u4ee5\u901a\u8fc7 <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/model\/Content.html\">Content<\/a> \u63a5\u53e3 (19) \u8bbf\u95ee\uff0c\u8be5\u63a5\u53e3\u7531 <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/tools\/URLContent.html\">URLContent<\/a> \u7c7b\u548c <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/tools\/package-summary.html\">com.eteks.sweethome3d.tools<\/a> \u5305\u7684\u5176\u4ed6\u7c7b\u5b9e\u73b0\u3002 <\/p>\n\n<p>\u6b64 UML \u56fe\u5e94\u5e2e\u52a9\u60a8\u4e86\u89e3 Sweet Home 3D \u6a21\u578b\u4e2d\u53ef\u7528\u7684\u7c7b\u4ee5\u53ca\u5982\u4f55\u8bbf\u95ee\u5b83\u4eec\uff0c\u4f46\u60a8\u53ef\u80fd\u4f1a\u6ce8\u610f\u5230\u5176\u4e2d\u6ca1\u6709\u5f15\u7528\u6784\u9020\u51fd\u6570\u548c mutator\uff08\u6216\u8005\u5982\u679c\u60a8\u613f\u610f\uff0c\u53ef\u4ee5\u4f7f\u7528 setter\uff09\u3002\u8fd9\u53ea\u662f\u56e0\u4e3a\u7a7a\u95f4\u4e0d\u8db3\uff0c\u4f46\u60a8\u53ef\u4ee5\u5728\u63d2\u4ef6\u7c7b\u4e2d\u6beb\u65e0\u95ee\u9898\u5730\u4f7f\u7528\u5b83\u4eec\u3002\u53e6\u8bf7\u6ce8\u610f\uff0c\u5bf9\u6a21\u578b\u73b0\u6709\u5bf9\u8c61\u7684\u4efb\u4f55\u4fee\u6539\u90fd\u5c06\u901a\u8fc7 <a href=\"https:\/\/java.sun.com\/j2se\/1.5.0\/docs\/api\/java\/beans\/PropertyChangeEvent.html\" target=\"_blank\" rel=\"noopener\">PropertyChangeEvent<\/a>\u3001<a href=\"\/javadoc\/com\/eteks\/sweethome3d\/model\/CollectionEvent.html\">CollectionEvent<\/a>s (8) \u6216 <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/model\/SelectionEvent.html\">SelectionEvent<\/a>s (6) \u901a\u77e5\u7ed9\u663e\u793a\u7684\u7ec4\u4ef6\uff0c\u4ece\u800c\u5141\u8bb8\u6240\u6709\u66f4\u6539\u7acb\u5373\u53cd\u6620\u5728\u5c4f\u5e55\u4e0a\u3002  <\/p>\n\n<div class=\"wp-block-group warning-banner is-nowrap is-layout-flex wp-container-core-group-is-layout-9123dee2 wp-block-group-is-layout-flex\">\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" width=\"190\" height=\"190\" data-src=\"https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/11\/Frame-281.png\" alt=\"\" class=\"wp-image-786 lazyload\" style=\"--smush-placeholder-width: 190px; --smush-placeholder-aspect-ratio: 190\/190;width:130px\" data-srcset=\"https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/11\/Frame-281.png 190w, https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/11\/Frame-281-90x90.png 90w\" data-sizes=\"(max-width: 190px) 100vw, 190px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" \/><\/figure>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer !h-auto wp-container-content-16d1eb73\"><\/div>\n\n\n\n<p>\u51fa\u4e8e\u6027\u80fd\u539f\u56e0\uff0cSweet Home 3D \u6a21\u578b<strong>\u4e0d\u662f<\/strong>\u7ebf\u7a0b\u5b89\u5168\u7684\u3002\u5bf9\u5c5e\u4e8e\u6a21\u578b\u7684\u5bf9\u8c61\u7684<strong>\u4fee\u6539<\/strong>\u5e94\u5728\u4e8b\u4ef6\u5206\u6d3e\u7ebf\u7a0b\u4e2d\u5b8c\u6210\u3002 <\/p>\n<\/div>\n\n<h3 class=\"wp-block-heading\">\u63d2\u4ef6\u7c7b\u67b6\u6784<\/h3>\n\n<p>\u63d2\u4ef6\u7c7b\u7684\u67b6\u6784\u6bd4\u6a21\u578b\u5c42\u7684\u67b6\u6784\u66f4\u5bb9\u6613\u7406\u89e3\u3002<a href=\"\/javadoc\/com\/eteks\/sweethome3d\/plugin\/package-summary.html\">com.eteks.sweethome3d.plugin<\/a> \u5305\u4ec5\u5305\u542b\u4e09\u4e2a\u7c7b\uff0c\u5176\u4e2d\u60a8\u5e94\u8be5\u4ec5\u4f7f\u7528 <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/plugin\/Plugin.html\">Plugin<\/a> \u548c <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/plugin\/PluginAction.html\">PluginAction<\/a> \u7c7b\uff0c\u5982\u56fe 14 \u6240\u793a\uff08\u4e5f\u53ef\u5728 <a href=\"https:\/\/www.sweethome3d.com\/wp-content\/uploads\/2025\/12\/pluginClassesDiagram.png\">PDF \u683c\u5f0f<\/a> \u4e2d\u83b7\u5f97\uff09\u3002 <\/p>\n\n<p>[uml_diagram slug=&#8221;plugin-classes-diagram&#8221; map_name=&#8221;plugin-classes-diagram&#8221; caption=&#8221;Figure 14. UML diagram of com.eteks.sweethome3d.plugin package&#8221; caption_small=&#8221;(click on a class to view its javadoc)&#8221;]<\/p>\n\n<p>\u5728\u5e94\u7528\u7a0b\u5e8f\u542f\u52a8\u65f6\u521b\u5efa\u4e00\u4e2a <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/plugin\/PluginManager.html\">PluginManager<\/a> \u5b9e\u4f8b (1)\uff0c\u5e76\u641c\u7d22\u5b89\u88c5\u5728\u7528\u6237 <a href=\"#creating-the-plugin-jar\">\u63d2\u4ef6\u6587\u4ef6\u5939<\/a> \u4e2d\u7684\u63d2\u4ef6\u3002\u6bcf\u6b21\u7f16\u8f91\u65b0\u5bb6\u5ead\u65f6\uff0c\u6b64\u7ba1\u7406\u5668\u90fd\u4f1a\u4e3a\u542f\u52a8\u65f6\u627e\u5230\u7684\u6bcf\u4e2a\u63d2\u4ef6\u5b9e\u4f8b\u5316\u548c\u914d\u7f6e\u4e00\u4e2a <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/plugin\/Plugin.html\">Plugin<\/a> \u5bf9\u8c61 (3)\u3002\u7136\u540e\uff0c\u5b83\u8c03\u7528 <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/plugin\/Plugin.html#getActions()\">getActions<\/a> \u65b9\u6cd5\u6765\u68c0\u7d22\u6240\u6709\u5c06\u4f5c\u4e3a\u83dc\u5355\u9879\u548c\/\u6216\u5de5\u5177\u680f\u6309\u94ae\u6dfb\u52a0\u5230\u5bb6\u5ead\u7a97\u53e3\u4e2d\u7684 <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/plugin\/PluginAction.html\">\u64cd\u4f5c<\/a> (4)\u3002\u6bcf\u4e2a\u64cd\u4f5c\u90fd\u662f <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/plugin\/PluginAction.html\">PluginAction<\/a> \u7684\u4e00\u4e2a\u5b9e\u4f8b\uff0c\u5b83\u770b\u8d77\u6765\u50cf <a href=\"https:\/\/java.sun.com\/j2se\/1.5.0\/docs\/api\/javax\/swing\/Action.html\" target=\"_blank\" rel=\"noopener\">Action<\/a> \u7c7b\uff0c\u5177\u6709\u5176 <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/plugin\/PluginAction.html#execute()\">execute<\/a> \u65b9\u6cd5\u53ca\u5176\u53ef\u4fee\u6539\u7684 <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/plugin\/PluginAction.Property.html\">\u5c5e\u6027<\/a> (2)\u3002   <\/p>\n\n<p>\u8bf7\u6ce8\u610f\uff0c<a href=\"\/javadoc\/com\/eteks\/sweethome3d\/plugin\/Plugin.html\">Plugin<\/a> \u7c7b\u5141\u8bb8\u60a8\u901a\u8fc7\u5176 <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/plugin\/Plugin.html#getUndoableEditSupport()\">getUndoableEditSupport<\/a> \u65b9\u6cd5\u8bbf\u95ee <a href=\"https:\/\/java.sun.com\/j2se\/1.5.0\/docs\/api\/javax\/swing\/undo\/UndoableEditSupport.html\" target=\"_blank\" rel=\"noopener\">UndoableEditSupport<\/a> \u5b9e\u4f8b\u3002\u53ea\u8981\u60a8\u5728 <a href=\"\/javadoc\/com\/eteks\/sweethome3d\/plugin\/PluginAction.html\">PluginAction<\/a> \u5b9e\u4f8b\u7684 execute \u65b9\u6cd5\u4e2d\u4fee\u6539\u5bb6\u5ead\u6216\u5176\u5bf9\u8c61\uff08\u5bb6\u5177\u3001\u5899\u58c1&#8230;\uff09\uff0c\u60a8\u8fd8\u5e94\u8be5\u5c06 <a href=\"https:\/\/java.sun.com\/j2se\/1.5.0\/docs\/api\/javax\/swing\/undo\/UndoableEdit.html\" target=\"_blank\" rel=\"noopener\">UndoableEdit<\/a> \u5bf9\u8c61\u53d1\u5e03\u5230 getUndoableEditSupport \u65b9\u6cd5\u8fd4\u56de\u7684\u53ef\u64a4\u6d88\u7f16\u8f91\u652f\u6301\uff0c\u5426\u5219\u7528\u6237\u5c06\u65e0\u6cd5\u6b63\u786e\u64a4\u6d88\/\u91cd\u505a\u60a8\u6240\u505a\u7684\u66f4\u6539\u3002 <\/p>\n\n<h3 class=\"wp-block-heading\">\u672c\u5730\u5316<\/h3>\n\n<p>\u5982\u679c\u60a8\u8ba1\u5212\u4e3a Sweet Home 3D \u7528\u6237\u793e\u533a\u5f00\u53d1\u63d2\u4ef6\uff0c\u8bf7\u5c1d\u8bd5\u672c\u5730\u5316\u5b83\u5728\u64cd\u4f5c\u540d\u79f0\u548c\u83dc\u5355\u6216\u60a8\u5c06\u521b\u5efa\u7684\u5bf9\u8bdd\u6846\u4e2d\u663e\u793a\u7684\u5b57\u7b26\u4e32\uff08\u6216\u8005\u81f3\u5c11\u51c6\u5907\u597d\u5b83\u7684\u672c\u5730\u5316\uff09\u3002<a href=\"\/javadoc\/com\/eteks\/sweethome3d\/plugin\/PluginAction.html#PluginAction(java.lang.String,%20java.lang.String,%20java.lang.ClassLoader)\">PluginAction \u7684\u4e24\u4e2a\u6784\u9020\u51fd\u6570<\/a> \u5c06\u5e2e\u52a9\u60a8\u4f7f\u7528 .properties \u6587\u4ef6\u7ec4\u7ec7\u64cd\u4f5c\u5c5e\u6027\u7684\u7ffb\u8bd1\uff0c\u5982\u679c\u60a8\u9700\u8981\u5728\u63d2\u4ef6\u4e2d\u7ffb\u8bd1\u5176\u4ed6\u5b57\u7b26\u4e32\uff08\u4f8b\u5982 <a href=\"#testing-the-plugin\">\u6d4b\u8bd5\u63d2\u4ef6<\/a> \u663e\u793a\u7684\u5bf9\u8bdd\u6846\u4e2d\u7684\u5b57\u7b26\u4e32\uff09\uff0c\u8bf7\u4f7f\u7528 <a href=\"https:\/\/java.sun.com\/j2se\/1.5.0\/docs\/api\/java\/util\/ResourceBundle.html\" target=\"_blank\" rel=\"noopener\">ResourceBundle<\/a> Java \u7c7b\u91cd\u7528\u8fd9\u4e9b .properties \u6587\u4ef6\u3002<br\/>\u5982\u679c\u60a8\u5e0c\u671b\u9650\u5236\u5c5e\u6027\u6587\u4ef6\u7684\u6570\u91cf\uff0c\u60a8\u751a\u81f3\u53ef\u4ee5\u5c06\u64cd\u4f5c\u5c5e\u6027\u548c\u5176\u4ed6\u5b57\u7b26\u4e32\u7684\u503c\u5199\u5165\u63d2\u4ef6\u7684 ApplicationPlugin.properties <a href=\"#creating-the-plugin-description-file\">\u63cf\u8ff0\u6587\u4ef6<\/a> \u4e2d\u3002 <\/p>\n\n<p>\u5982\u679c\u60a8\u60f3\u8981\u4e00\u4e2a\u4f7f\u7528\u6b64\u67b6\u6784\u7684\u793a\u4f8b\uff0c\u8bf7\u4e0b\u8f7d <em>Export to SH3F<\/em> \u63d2\u4ef6\uff0c\u8be5\u63d2\u4ef6\u53ef\u5728 <a href=\"\/storage\/plugins\/ExportToSH3F-1.0.sh3p\">https:\/\/www.sweethome3d.com\/plugins\/ExportToSH3F-1.0.sh3p<\/a> \u83b7\u5f97\uff0c\u5e76\u89e3\u538b\u7f29\u5b83\uff08\u6b64\u63d2\u4ef6\u6587\u4ef6\u8fd8\u5305\u542b\u63d2\u4ef6\u7684\u6e90\u4ee3\u7801\uff09\u3002<br\/>\u5982 <a href=\"https:\/\/sourceforge.net\/forum\/message.php?msg_id=5837358\" target=\"_blank\" rel=\"noopener\">Help forum<\/a> \u4e2d\u6240\u8ff0\uff0c\u6b64\u63d2\u4ef6\u521b\u5efa\u4e00\u4e2a SH3F \u6587\u4ef6\uff0c\u5176\u4e2d\u5305\u542b\u60a8\u5bfc\u5165\u5230 Sweet Home 3D \u5bb6\u5177\u76ee\u5f55\u4e2d\u7684\u6240\u6709\u5bb6\u5177\u3002<\/p>\n\n<h3 class=\"wp-block-heading\">\u8d21\u732e\u63d2\u4ef6<\/h3>\n\n<p>\u60a8\u53ef\u4ee5\u5c06\u60a8\u7f16\u7a0b\u7684\u63d2\u4ef6\u53d1\u5e03\u5230 <a href=\"https:\/\/sourceforge.net\/p\/sweethome3d\/plug-ins\/\" target=\"_blank\" rel=\"noopener\">Plug-ins Contributions<\/a> \u8ddf\u8e2a\u7cfb\u7edf\u4e2d\uff0c\u4ee5\u4fbf\u4e0e Sweet Home 3D \u7528\u6237\u793e\u533a\u5171\u4eab\u5b83\u4eec\u3002<br\/>\u501f\u52a9\u63d2\u4ef6\uff0c\u53ef\u4ee5\u5411 Sweet Home 3D \u6dfb\u52a0\u8bb8\u591a\u529f\u80fd\uff0c\u4ece\u5bfc\u5165\u5668\u5230\u5bfc\u51fa\u5668\uff0c\u8fd8\u53ef\u4ee5\u6dfb\u52a0\u80fd\u591f\u4fee\u6539\u5bb6\u5ead\u6570\u636e\u7684\u63d2\u4ef6\uff0c\u4f8b\u5982 Michel Mbem \u5f00\u53d1\u7684 <a href=\"https:\/\/sourceforge.net\/p\/sweethome3d\/plug-ins\/1\/\" target=\"_blank\" rel=\"noopener\">Home Rotator Plug-in<\/a> \u4ee5\u53ca Hans Dirkse \u7f16\u5199\u7684 <a href=\"\/storage\/pluginsUserGuide.pdf\">Tutorial for Plug-ins and Extensions<\/a> (PDF) \u548c <a href=\"https:\/\/www.sweethome3d.com\/plugins\/\" data-type=\"page\" data-id=\"437\">Plug-ins and tools<\/a> \u9875\u9762\u4e2d\u5217\u51fa\u7684\u5176\u4ed6\u63d2\u4ef6\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7b80\u4ecb \u4ece 1.5 \u7248\u672c\u5f00\u59cb\uff0c\u53ef\u4ee5\u901a\u8fc7\u5c06\u63d2\u4ef6\u6587\u4ef6\u653e\u7f6e\u5728\u63d2\u4ef6\u6587\u4ef6\u5939\u4e2d\uff0c\u5411 Sweet Home 3D \u6dfb\u52a0\u65b0\u529f\u80fd\u3002<a href=\"https:\/\/www.sweethome3d.com\/zh-hans\/%e6%8f%92%e4%bb%b6%e5%bc%80%e5%8f%91%e8%80%85%e6%8c%87%e5%8d%97\/\">Continue reading <span class=\"sr-only\">&#8220;\u63d2\u4ef6\u5f00\u53d1\u8005\u6307\u5357&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":11449,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"page-resources.php","meta":{"inline_featured_image":false,"footnotes":""},"class_list":["post-11461","page","type-page","status-publish","has-post-thumbnail","hentry"],"_links":{"self":[{"href":"https:\/\/www.sweethome3d.com\/zh-hans\/wp-json\/wp\/v2\/pages\/11461","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sweethome3d.com\/zh-hans\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.sweethome3d.com\/zh-hans\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.sweethome3d.com\/zh-hans\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sweethome3d.com\/zh-hans\/wp-json\/wp\/v2\/comments?post=11461"}],"version-history":[{"count":2,"href":"https:\/\/www.sweethome3d.com\/zh-hans\/wp-json\/wp\/v2\/pages\/11461\/revisions"}],"predecessor-version":[{"id":12434,"href":"https:\/\/www.sweethome3d.com\/zh-hans\/wp-json\/wp\/v2\/pages\/11461\/revisions\/12434"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sweethome3d.com\/zh-hans\/wp-json\/wp\/v2\/media\/11449"}],"wp:attachment":[{"href":"https:\/\/www.sweethome3d.com\/zh-hans\/wp-json\/wp\/v2\/media?parent=11461"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}