Generate roof plugin

This topic has been viewed 2463707 times and has 338 replies
Thread status: Active
Questions about extending features and developing plug-ins [img]http://www.sweethome3d.com/images/flags/en_small.gif[/img]
User avatar
dorin
Posts: 824
Joined: Thu Apr 24, 2014 9:14 am
Country: Vatra Dornei, Suceava, Romania

Re: Generate roof plugin

Post by dorin »

Thanks to all.
I forgot to mention that:
The plugin have now the feature to reuse the last saved roof.
Condition: to be the same roof projection(s) without modifications.
Then, when OK, you will be asked to replace or not the existing roof.

@hansmex
I've chose you for this because 10~12 years ago you made a good tutorial about plugins usage.
Many years was a little bible for me.
Wile I've remove help button I intend to add an specific entry under the Help menu (like for wiring and 3D dimensions).
In this case will be good to have some gif.
Thanks for availability!
A computer program does what you tell it to do, not what you want it to do. Murphy's Law
When all else fails, read the instructions. Murphy's Law
If you don't like "AS IS", DIY. Dorin's law
ndorigatti
Posts: 66
Joined: Fri May 12, 2017 9:54 am
Country: Italia

Re: Generate roof plugin

Post by ndorigatti »

this project is making me hungry of development... I managed to buy a new PC at home, so when I'll have it setup I'll try to download the code and check if I can understand.
You'll tell me if my help is fine or not, but at least I'll try to understand the code!
Great work to all!
User avatar
Gildaniel
Posts: 135
Joined: Fri Aug 11, 2017 10:57 am
Country: Russia

Re: Generate roof plugin

Post by Gildaniel »

Dorin, no words to express my delight, so nice and usefull tool you made.
You are just damn genius!
User avatar
Daniels118
Posts: 503
Joined: Wed Nov 17, 2021 9:04 pm
Country: Italy

Re: Generate roof plugin

Post by Daniels118 »

@crackwood01
We are far from having a "black and white" view from the side, however you can now have a textured side view where you can draw dimension lines. To do this, you can exploit the new feature of the Pan 3D view plugin which enables the parallel projection in 3D view (CTRL+J) and allows to align the camera to the selected object (CTRL+K).
You can then add vertical dimension lines using the 3D dimension lines plugin with the help of a "tracing paper" (i.e. a transparent object where you can draw the dimension lines.)
You can download a tracing paper model of 10x5 meters from here.

Here an example result:
Image
crackwood01
Posts: 68
Joined: Wed Oct 14, 2020 12:05 am
Country: Canada

Re: Generate roof plugin

Post by crackwood01 »

Is there a way to have a console or something while using SH3D

since i've downloaded the latest beta version of the roof generator.

The plugin is no longer working .. when i hit Tools>Generate roof nothing happen anymore
User avatar
Daniels118
Posts: 503
Joined: Wed Nov 17, 2021 9:04 pm
Country: Italy

Re: Generate roof plugin

Post by Daniels118 »

You may use this method. From my experience it works only for error messages, not normal output (any try to redirect the stdout failed). It should be enough for most cases, however if it shouldn't be so, you may try this method.
crackwood01
Posts: 68
Joined: Wed Oct 14, 2020 12:05 am
Country: Canada

Re: Generate roof plugin

Post by crackwood01 »

Thank you,

this is the log.txt content after trying to run he roof generator plugin

Code: Select all

DynamicPluginLoader: plugin.classpath property not set
DynamicPluginLoader: plugin.classpath property not set
DynamicPluginLoader: plugin.classpath property not set
DynamicPluginLoader: plugin.classpath property not set
DynamicPluginLoader: plugin.classpath property not set
Object3DBranchFactory replaced with ExtensibleObject3DFactory
DimensionLineEx3DFactory added successfully
Top camera polyline listener removed!
Wiring3DFactory added successfully
Checking for updates...
Sending usage information...
Top camera polyline listener removed!
View3DEnhancer installed successfully!
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: (minimum <= value <= maximum) is false
	at java.desktop/javax.swing.SpinnerNumberModel.<init>(SpinnerNumberModel.java:139)
	at com.eteks.sweethome3d.swing.NullableSpinner$NullableSpinnerNumberModel.<init>(Unknown Source)
	at com.eteks.sweethome3d.swing.NullableSpinner$NullableSpinnerLengthModel.<init>(Unknown Source)
	at generateroof.GenerateRoofPlugin.createComponents(GenerateRoofPlugin.java:1148)
	at generateroof.GenerateRoofPlugin.generateNewRoof(GenerateRoofPlugin.java:439)
	at generateroof.GenerateRoofPlugin.generateRoof(GenerateRoofPlugin.java:278)
	at generateroof.GenerateRoofAction.execute(GenerateRoofAction.java:31)
	at it.ld.sh3d.devtoolkit.DynamicAction.execute(DynamicAction.java:62)
	at com.eteks.sweethome3d.swing.HomePane$ActionAdapter.actionPerformed(Unknown Source)
	at com.eteks.sweethome3d.swing.ResourceAction$AbstractDecoratedAction.actionPerformed(Unknown Source)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
	at java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:369)
	at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1020)
	at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.menuDragMouseReleased(BasicMenuItemUI.java:1132)
	at java.desktop/javax.swing.JMenuItem.fireMenuDragMouseReleased(JMenuItem.java:575)
	at java.desktop/javax.swing.JMenuItem.processMenuDragMouseEvent(JMenuItem.java:472)
	at java.desktop/javax.swing.JMenuItem.processMouseEvent(JMenuItem.java:417)
	at java.desktop/javax.swing.MenuSelectionManager.processMouseEvent(MenuSelectionManager.java:342)
	at java.desktop/javax.swing.plaf.basic.BasicPopupMenuUI$MouseGrabber.eventDispatched(BasicPopupMenuUI.java:903)
	at java.desktop/java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Toolkit.java:2194)
	at java.desktop/java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2086)
	at java.desktop/java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2085)
	at java.desktop/java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:2085)
	at java.desktop/java.awt.Toolkit.notifyAWTEventListeners(Toolkit.java:2042)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4917)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Thanks for your time
User avatar
dorin
Posts: 824
Joined: Thu Apr 24, 2014 9:14 am
Country: Vatra Dornei, Suceava, Romania

Re: Generate roof plugin

Post by dorin »

@crackwood01
Finlay I've found one of the combination of setting to reproduce this error.
Now I'll try to fix it!
It's something with unit measurement (Inch, foot etc).
Thanks to report it.
A computer program does what you tell it to do, not what you want it to do. Murphy's Law
When all else fails, read the instructions. Murphy's Law
If you don't like "AS IS", DIY. Dorin's law
User avatar
Daniels118
Posts: 503
Joined: Wed Nov 17, 2021 9:04 pm
Country: Italy

Re: Generate roof plugin

Post by Daniels118 »

@crackwood01
This is a bug of version 4.0.beta2, it only happens if you are using the imperial system.
You may switch to the metric system or downgrade to the latest stable version.

@Dorin
The thickness is initialized to 10 cm, but when imperial system is used the minimum value is set to 1 foot = 30 cm, which is greater than the value, causing the exception. Maybe the minimum should be 1/4 foot (3 inches).

EDIT: we wrote at the same time!
crackwood01
Posts: 68
Joined: Wed Oct 14, 2020 12:05 am
Country: Canada

Re: Generate roof plugin

Post by crackwood01 »

Thank you to both of you
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 1 guest