Download

Online

Gallery

Blog

  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: 112
Posts: 112   Pages: 12   [ Previous Page | 3 4 5 6 7 8 9 10 11 12 | Next Page ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 102865 times and has 111 replies Next Thread
NIMAN
Member



United Kingdom
Joined: Nov 23, 2023
Post Count: 28
Status: Offline
Reply to this Post  Reply with Quote 
Re: Pan tool in 3D and 2D view?

That's great news Daniele (I thought it would be though).

Thanks for your Tip too - i'll try it out soon.

Have to say again - brilliant work here. I see your Moniker/Name at several other points in the plugin manager too so looking forward to bumping into more of that as time passes (not to mention the manager itself).

Excellent stuff.
[Nov 29, 2023, 9:13:51 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
sjb007
Advanced Member




Joined: May 18, 2021
Post Count: 219
Status: Offline
Reply to this Post  Reply with Quote 
Re: Pan tool in 3D and 2D view?

Hi Daniels118,

I'm having a minor issue with the Pan3D plugin where I cannot open the Pan 3D View Settings dialog. It simply fails to do anything. I still have your autologger installed, and it prints a nice big exception in there which I will post below.

System deets:
Ubuntu 22.04, On Intel CPU/iGPU
SweetHome3D 7.2 and Pan 3D 4.0

I tried moving pan3dview.xml to another filename, and I still get the same exception.

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
SPI for freehep PNGEncoder installed!
DynamicPluginLoader: plugin.classpath property not set
Object3DBranchFactory replaced with ExtensibleObject3DFactory
DimensionLineEx3DFactory added successfully
Line width changed successfully
Wiring3DFactory added successfully
View3DEnhancer installed successfully!
Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: java.lang.Float cannot be cast to java.lang.Double
at java.lang.Double.compareTo(Double.java:49)
at javax.swing.SpinnerNumberModel.incrValue(SpinnerNumberModel.java:349)
at javax.swing.SpinnerNumberModel.getPreviousValue(SpinnerNumberModel.java:388)
at javax.swing.plaf.basic.BasicSpinnerUI.updateEnabledState(BasicSpinnerUI.java:501)
at javax.swing.plaf.basic.BasicSpinnerUI.updateEnabledState(BasicSpinnerUI.java:481)
at javax.swing.plaf.basic.BasicSpinnerUI.access$200(BasicSpinnerUI.java:50)
at javax.swing.plaf.basic.BasicSpinnerUI$Handler.stateChanged(BasicSpinnerUI.java:1057)
at javax.swing.JSpinner.fireStateChanged(JSpinner.java:458)
at javax.swing.JSpinner$ModelListener.stateChanged(JSpinner.java:386)
at javax.swing.AbstractSpinnerModel.fireStateChanged(AbstractSpinnerModel.java:119)
at javax.swing.SpinnerNumberModel.setValue(SpinnerNumberModel.java:447)
at javax.swing.JSpinner.setValue(JSpinner.java:354)
at it.ld.sh3dplugins.pan3dview.ui.SettingsTab.createComponents(SettingsTab.java:176)
at it.ld.sh3dplugins.pan3dview.ui.SettingsTab.<init>(SettingsTab.java:83)
at it.ld.sh3dplugins.pan3dview.SettingsController.getView(SettingsController.java:53)
at it.ld.sh3dplugins.pan3dview.ui.Pan3dViewPanel.initComponents(Pan3dViewPanel.java:66)
at it.ld.sh3dplugins.pan3dview.ui.Pan3dViewPanel.<init>(Pan3dViewPanel.java:60)
at it.ld.sh3dplugins.pan3dview.SettingsAction.execute(SettingsAction.java:50)
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 javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:842)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:886)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
at java.awt.Component.processMouseEvent(Component.java:6539)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6304)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
X11Util.Display: Shutdown (JVM shutdown: true, open (no close attempt): 2/2, reusable (open, marked uncloseable): 0, pending (open in creation order): 2)
X11Util: Open X11 Display Connections: 2
X11Util: Open[0]: NamedX11Display[:1, 0x7f749c02ad20, refCount 1, unCloseable false]
X11Util: Open[1]: NamedX11Display[:1, 0x7f74e0001de0, refCount 1, unCloseable false]

[Dec 8, 2023, 5:36:28 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: 9182
Status: Offline
Reply to this Post  Reply with Quote 
Re: Pan tool in 3D and 2D view?

Daniels118, this is a tricky one which already happened to me.
It's because you mixed the types of values in SpinnerNumberModel instance: you gave double values at its instantiation and then set the spinner value with a value of float type. Casting the set value to double or creating a Double instance should fix it.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Dec 8, 2023, 6:57:30 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Daniels118
Advanced Member
Member's Avatar

Italy
Joined: Nov 17, 2021
Post Count: 407
Status: Offline
Reply to this Post  Reply with Quote 
Re: Pan tool in 3D and 2D view?

Thank you both for log and solution. What is weird is that I can't reproduce the problem, but I guess this could be due to a different JRE (perhaps mine can handle both Float and Double. Anyway, I have just casted the value to double, so now it should work for everyone. Released version 4.1, download available on sourceforge or through the plugin manager.
[Dec 9, 2023, 3:35:11 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Keet
Advanced Member
Member's Avatar

Netherlands
Joined: Apr 8, 2022
Post Count: 790
Status: Offline
Reply to this Post  Reply with Quote 
Re: Pan tool in 3D and 2D view?

Found a little bug(?) with the (experimental) deformation in 3Dview.

I have a door with a shutter on the outside. The shutter can be made invisible to see the door without the shutter.
In the 3Dview the shutter (of course) blocks the deformation because the mouse-click hits the shutter and not the door. But that block remains when the shutter is made invisible. From the inside I can open the door but from the outside it seems that the invisible shutter keeps blocking the door from opening. Not a big problem IF you know it AND have access to the non-blocked side in the 3Dview.

I seems that "invisible" is actually 100% transparent in the 3Dview which would explain that the shutter is still in front of the door catching the mouse-click, even if you can't see it. If that is the way it works this might be a Sweet Home 3D bug that is not specific to the Pan 3D plugin.
[Feb 17, 2024, 9:04:23 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Keet
Advanced Member
Member's Avatar

Netherlands
Joined: Apr 8, 2022
Post Count: 790
Status: Offline
Reply to this Post  Reply with Quote 
Re: Pan tool in 3D and 2D view?

Just found out that the 'bug' I mentioned is the same when you use the deformation dialog in Sweet Home 3D.
I don't use that dialog very much because it's much easier to check if the deformations work as intended in the 3Dview.
Conclusion: it's definitely NOT a Pan3Dview problem but simply the way Sweet Home 3D works. It's not convenient but in an awkward way logical.
[Feb 18, 2024, 9:36:16 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Keet
Advanced Member
Member's Avatar

Netherlands
Joined: Apr 8, 2022
Post Count: 790
Status: Offline
Reply to this Post  Reply with Quote 
Bug in Pan3Dview plugin with chained deformation

Found a bug in the experimental deformation in 3dview in Pan3DView.
This is with a chained deformation.

Door on hinge1.
A handle on the door that turns on hinge2.
hinge2 and the handle turn on hinge1.

In the 3Dview opening the door works as expected: the door opens and the handle goes along. No problem.
In the start position the handle also turns as expected. No problem.

But now you turn the door halfway open and then turn the handle: it seems the handle uses hinge2 in the original start position, i.e. the handle now turns diagonally. Hinge2 was moved along with the door and the handle and that position should be used for turning the handle.

An example file to reproduce the problem: https://dodecagon.nl/upload/tmp/DeformationBugPan3Dview.zip
(Red is hinge1 on the side of the door, yellow is hinge2.)

In the Sweet Home 3D Modify openings dialog this problem does NOT occur and works as expected. This dialog can't be rezized and you can't zoom in very far so for most furniture I create it's useless. You can hardly see a toilet lock on a toiletdoor so you can't see it turning in this dialog.
That's why I heavily depend on the deformations in the 3Dview.
[Feb 19, 2024, 4:59: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 
Daniels118
Advanced Member
Member's Avatar

Italy
Joined: Nov 17, 2021
Post Count: 407
Status: Offline
Reply to this Post  Reply with Quote 
Re: Bug in Pan3Dview plugin with chained deformation

Hi Keet, thank you for having reported the bug and for the test file. Sadly I haven't found a solution yet. I guess that I have to find a way to consolidate the deformation when the user releases the mouse, so that the hinges are updated. Any hint is welcome.
[Feb 22, 2024, 6:45:08 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Keet
Advanced Member
Member's Avatar

Netherlands
Joined: Apr 8, 2022
Post Count: 790
Status: Offline
Reply to this Post  Reply with Quote 
Re: Bug in Pan3Dview plugin with chained deformation

I haven't got a development environment yet for Java so it's very hard to look at code.
My first step would be to compare the plugin code to the code behind the Sweet Home 3D modify openings dialog. There the deformations work as they should.
Thinking from the top of my head I suspect the calculations for the deformations follow the chain af deformations, probably in an array loop where the start position and direction is recalculated for every step. It's possible that you only use the initial position and direction and don't follow the chain to get a new start position from the previous deformation in the chain.
Usually a direction is a set of X,Y,Z coordinates like they are used for textures but I don't know if that's the same for the deformations.
[Feb 22, 2024, 7:24:21 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Keet
Advanced Member
Member's Avatar

Netherlands
Joined: Apr 8, 2022
Post Count: 790
Status: Offline
Reply to this Post  Reply with Quote 
Re: Bug in Pan3Dview plugin with chained deformation

This is related to the last bug I reported and possibly determines the cause of the wrong deformation:

I have a garage door that opens on a hinge some distance from the door to simulate rotating from bottom to top like a real garage door. Again the deformation in the Sweet Home 3D dialog is correct.
Placed in a horizontal drawn wall the deformation in the 3Dview is correct but when I have a diagonally drawn wall the same garage door incorrectly deforms diagonally.
The initial diagonal position is apparently the cause and the same as what happend with the wrong deformation in the previouly reported bug.

I tried the same with the Scopia turn window. The result is the same (even without a wall): horizontal placed deforms correct, rotated diagonal deforms diagonally. SO it's definitely not caused by the door object itself.

I investigated further with the test example I previously provided.
I rotated the test object diagonally and expected the deformation of the door (hinge_1) to go wrong. Surprisingly that still went correct, even when I rotated the object diagonally or on its side! The second deformation remained wrong. So I added a third hinge to the test object, opening on hinge_2. The result was that that both hinge_2 and hinge_3 went wrong but hinge_1 remained correct.
Hinge_3 did deform correct when hinge_2 was not deformed but that might have been because both hinge 1 and 2 are vertical hinges.

I hope this helps to determine the problem. No hurry to fix it. I can see that a deformation works for a new object and that's the most important for now.
[Feb 24, 2024, 9:53:08 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Posts: 112   Pages: 12   [ Previous Page | 3 4 5 6 7 8 9 10 11 12 | Next Page ]
[ 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 2006-2024 eTeks - All rights reserved