Print at Dec 16, 2025, 12:43:58 PM
Posted by hfrmobile at May 27, 2014, 6:03:09 AM
Pan tool in 3D and 2D view?
Can't find a "pan tool" (similar to Google SketchUp for example) for moving the model in 3D/2D view. This would be specially useful when having a model which is long but not very width.

e.g.
+------------------+
| |
| |
+------------------+


--hfrmobile

Posted by Puybaret at May 27, 2014, 6:07:32 PM
Re: Pan tool in 3D and 2D view?
In the plan, the pan tool can be activated with the Plan > Pan menu item or temporarily with the space bar.
In the 3D view, you will be able to move sideways in the coming version 4.4 when you're in Virtual visit mode (see here).
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator

Posted by hfrmobile at May 29, 2014, 8:29:19 AM
Re: Pan tool in 3D and 2D view?
Thank you for your answer!

In the plan, the pan tool can be activated with the Plan > Pan menu item or temporarily with the space bar.

Well, in 2D view its the same when using the scroll-bars, right? But the trick using the space bar is useful, thanks!


In the 3D view, you will be able to move sideways in the coming version 4.4 when you're in Virtual visit mode.

Well, this is, more or less, already the case when moving the figurine.

A pan in 3D view (aerial view) would be useful since at the moment it is not possible to zoom in to the bathroom for example:



Posted by Puybaret at May 29, 2014, 9:30:36 AM
Re: Pan tool in 3D and 2D view?
In Aerial view panning doesn't make sense, because you can only turn around the center. Note that if you want to change the center of rotation, you can read the FAQ Is it possible to manually set the rotation center of the 3D view in Aerial view mode?
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator

Posted by hfrmobile at Jul 19, 2014, 10:59:56 PM
Re: Pan tool in 3D and 2D view?
The option "Aerial view centered on selection option" does the trick, thank you!

Maybe a bug: Go to point of view (of a stored point of view) does not change to the correct level (if the model contains more than one level).

To put this in other words: Storing a point of view in Level 3, then I change to Level 1 and select the point of view in level 3. But the level 1 remains ...

Posted by Daniels118 at Nov 17, 2021, 9:09:54 PM
Re: Pan tool in 3D and 2D view?
You can use this plugin:
https://sourceforge.net/p/sweethome3d/plug-ins/39/

Disclaimer: I'm the developer of the plugin.

Posted by sjb007 at Nov 19, 2021, 12:29:52 AM
Re: Pan tool in 3D and 2D view?
THIS IS AWESOME!!!!!

Thank-you, thank-you, thank-you.

Just one small niggle: If I pan, then orbit, the new point of rotation sticks and it works as hoped. If I pan, then zoom (mouse scroll wheel), the view jumps back to the previous point of rotation, whether that is the center of everything, or the center of the current selection.

Posted by Daniels118 at Nov 20, 2021, 10:09:07 AM
Re: Pan tool in 3D and 2D view?
I really appreciate your enthusiasm :D

I tried to reproduce the problem but without success, however I have found the behaviour you described happening when the selection changes, so I have updated the plugin to correctly handle this case in 2 different ways, based on the the option "view centered on selection". Try the new version, if you still experience the same problem you may record a small video to let me understand the exact steps to reproduce.

Thank you and best regards

Posted by sjb007 at Nov 20, 2021, 2:43:51 PM
Re: Pan tool in 3D and 2D view?
See https://youtu.be/nq00He4oz_4

I did notice that navigation keypresses in the 3D view also "reset" the panning. It may be that the mouse scroll wheel up/down action are treated more like keypresses than mouse button actions.

Posted by Daniels118 at Nov 21, 2021, 7:47:43 PM
Re: Pan tool in 3D and 2D view?
Thank you for the video, it is very well done :)

However this behaviour doesn't happen for me using the scroll wheel, it only happens using key navigation (WASD). I think it could be due to a different underlaying software (i.e. operating system, java version, etc...).

If it isn't too much effort for you, please report the following:
- Operating system;
- Type of SH3D installation (installer/java web start/ runnable jar);
- SH3D version;
- Java version (only needed if you aren't using the installer version).

Little anticipation
I'm currently working on a new feature to automatically hide any wall between the camera and the center of rotation, I think to release it as an optional feature.

Posted by sjb007 at Nov 21, 2021, 11:15:59 PM
Re: Pan tool in 3D and 2D view?
OS: Windows 10 (legit, up-to-date)
Type: Windows .exe installer
SH3D version: 6.6a
Java: 1.8.0_202 (I think this is the included one)

I'm using a wireless Logitech MX Master 2S mouse, but without any specific Logitech software.

Your feature sounds interesting. I did something very similar in Blender using shaders to make walls invisible to the camera depending on the direction the camera was looking at them from. Allowed me to do 3D isometric renders of a room while keeping the lighting correct.

Posted by hansmex at Nov 22, 2021, 8:37:26 AM
Re: Pan tool in 3D and 2D view?
Works OK, very nice.
Thank you!
----------------------------------------
Hans

new website - under constuction
hansdirkse.info

Posted by Daniels118 at Nov 27, 2021, 11:41:42 PM
Re: Pan tool in 3D and 2D view?
@sjb007 unfortunately I cannot reproduce the problem so I am unable to find a fix (tried even on Linux, without success sad )

In the meanwhile I have released the version 1.3 which adds the following capabilities:
- hides obstacles which obstructs the view, either automatically or using a polyline as threshold;
- pan vertically when the camera points towards the horizon.

Here is a video of the new features in action:
https://youtu.be/wYDrdH8brsw

@hashmex Thank you!

Posted by sjb007 at Nov 28, 2021, 12:02:33 AM
Re: Pan tool in 3D and 2D view?
@Daniels118 Damn, that is a pity.

Your new version however causes SH3D to fail to start for me. I just get the splash panel, and it never opens the main window. Only way to get rid of it is to go into task manager and kill the underlying java process. I've switched between 1.2 and 1.3 repeatedly, and tried cleaning out all other plugins in case there was conflict, but 1.3 still didn't work. (I also checked if removing other plugins fixed the zoom issue, and that didn't help there either.)

Posted by Daniels118 at Nov 28, 2021, 12:30:26 AM
Re: Pan tool in 3D and 2D view?
I'm really sorry for this, maybe you could try to retrieve the console output as described here: http://www.sweethome3d.com/support/forum/view...3213182D743FE532FBDD71C13

Posted by sjb007 at Nov 28, 2021, 12:59:25 AM
Re: Pan tool in 3D and 2D view?
Don't worry. I'm in Ops, so I'm used to finding errors, and helping devs fix them :-)

The log output is short and sweet:
Java 3D: implicit antialiasing enabled
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at it.ld.sh3dplugins.pan3dview.Pan3dView.initialize(Pan3dView.java:57)
at it.ld.sh3dplugins.pan3dview.Pan3dView.getActions(Pan3dView.java:80)
at com.eteks.sweethome3d.swing.HomePane.createPluginActions(Unknown Source)
at com.eteks.sweethome3d.swing.HomePane.<init>(Unknown Source)
at com.eteks.sweethome3d.swing.SwingViewFactory.createHomeView(Unknown Source)
at com.eteks.sweethome3d.viewcontroller.HomeController.getView(Unknown Source)
at com.eteks.sweethome3d.HomeFramePane.<init>(Unknown Source)
at com.eteks.sweethome3d.HomeFrameController.getView(Unknown Source)
at com.eteks.sweethome3d.HomeFrameController.displayView(Unknown Source)
at com.eteks.sweethome3d.SweetHome3D$4.collectionChanged(Unknown Source)
at com.eteks.sweethome3d.model.CollectionChangeSupport.fireCollectionChanged(Unknown Source)
at com.eteks.sweethome3d.model.HomeApplication.addHome(Unknown Source)
at com.eteks.sweethome3d.SweetHome3D.showDefaultHomeFrame(Unknown Source)
at com.eteks.sweethome3d.SweetHome3D.start(Unknown Source)
at com.eteks.sweethome3d.SweetHome3D$5.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)


Posted by Daniels118 at Nov 28, 2021, 11:51:49 AM
Re: Pan tool in 3D and 2D view?
This sounds very odd, at first I thinked about a failure with the reflection code, but if there are no previous exceptions it is more likely this is due to a race condition. Maybe your pc is much faster than mine and this causes the plugin gets initialized before the UI is ready, so the plugin gets a null reference instead of the component it is looking for. This could also be the reason why the scroll didn't work for you in the previous releases (in fact the line of code throwing the exception is responsible to retrive the 3D view to bind the mouse wheel event custom handler), but the application freezes just with the last release because I've rearranged the code.
I have built a new release which should handle this case, you can download it here:
https://daniels118.altervista.org/temp/Pan3dView-1.3.1.sh3p
Please let me know if this solves the problem so I will post it on the contribution page.

Thank you

Posted by sjb007 at Nov 28, 2021, 6:19:51 PM
Re: Pan tool in 3D and 2D view?
OK. So... That version fixes the startup, and my original zoom snap issue. applause

This following feedback on the hiding stuff is kinda long, but please take it as constructive, and absolutely supportive. This is excellent stuff.

The hiding feature does something kinda weird for me. My furniture hides and appears constantly as I rotate. It looks like anything closer than the point of rotation. I thought this was supposed to only affect walls, but I guess it makes sense for objects too. But then walls hide differently. They hide if they are in the direct line between camera and point of rotation. This is different to how objects work, so it feels odd. I have a straight wall composed of segments. If you pan sideways, only the segments directly between the point of rotation and the camera hide. Maybe walls should behave like the objects? If any end of a wall segment is closer than the point of rotation, hide it?

If a single object is the selection, it is visible. If a grouped object or an extended selection of objects are selected, then elements within those groupings can disappear too. In this case I would suggest all selected objects, or sub objects of a selected grouped object are always visible.

The last oddity... Yeah, I know I'm a PITA. I've gotten used to selecting a room floor and rotating around it. If I do this, much of the furniture disappears in that room. Rather than using the object/floor/wall center point, find the closest point of that selection, and anything forward of that point gets hidden. Anything behind that point is visible. This might not work well because of complex room shapes, so is just brainstorming.

With the polyline you're getting really close to having a useful sectioning tool. The only improvements I could suggest there are the ability to set the camera in standard orthoganol positions, and the ability to remove the perspective from 3D view. Do you also get the following? When selecting a polyline not displayed in the 3D view, the view centers nowhere near the polyline, possibly the 0,0 origin. It centers properly is the polyline is displayed in the 3d view. This has always been the case in SH3D, and nothing to do with your plugin.

I can post another video if you want a better visualisation.

Posted by sjb007 at Nov 28, 2021, 6:39:59 PM
Re: Pan tool in 3D and 2D view?
As a follow up. The algorithm seems to be determining "closer" based on the camera plane. So as my viewpoint goes higher, objects high on a wall disappear. They are behind the point of rotation in the plan (X,Y) but forward of the point of rotation in the cameras plane (X,Y,Z). So I maybe misunderstood how the hide/show was working. Maybe only X,Y should be considered?

Posted by Daniels118 at Nov 28, 2021, 11:29:45 PM
Re: Pan tool in 3D and 2D view?
OK. So... That version fixes the startup, and my original zoom snap issue.

I'm really happy to hear this biggrin

About the hiding feature, consider it more as a proof of concept, I'm already thinking of improvements, and any critic/suggestions are appreciated.

At first I thinked hiding the walls was enough, but then I've found that tall furnitures obstruct the view as much as the walls, so I decided to handle both.

Since the purpose of this feature is to hide any object that obstructs what the user is really interested in, the critical question is: how to determine what the user wishes to see?
I think the answer is very subjective, any assumption could be right for one user and wrong for another, this is why I implemented the option to clearly define what to hide using a poly.
Of course drawing the poly requires some effort, so it's up to the user to decide if it is worth, or settle for the default behaviour (which I'm going to improve anyway smile).

You're right about the fact that walls and furnitures are handled differently. I won't report the details since it would be a very long list, which is going to change anyway. If you wish to know how it works you may look at the source code which is included in the plugin (you can explore its content using any zip file viewer). I will keep in mint all of your suggestion for the improvements.

About the "ability to remove the perspective from 3D view": this will be part of another tool I'm thinking of, but for the moment I haven't the time to work on this. If you need such a feature take a look at the "SideView" plugin on the official plugins page (of course it lacks the sectioning tool, but for most cases is enough).

About the camera moving away when selecting the polyline, I faced the same issue. I think I could easly fix it, but it would be better if it gets fixed in the main program issuing a bug report.

I'll keep you updated.

Posted by sjb007 at Nov 29, 2021, 5:08:31 PM
Re: Pan tool in 3D and 2D view?
One small request. Could we preserve the setting for the hiding feature across sessions? I'd prefer it to be off on startup while it is still at the proof of concept stage, but at the moment it is default on whenever starting SH3D.

Posted by Daniels118 at Nov 29, 2021, 10:36:29 PM
Re: Pan tool in 3D and 2D view?
I've changed the default to "disabled", you can download the latest version from the sourceforge page :)

Posted by Daniels118 at Dec 6, 2021, 9:58:25 PM
Re: Pan tool in 3D and 2D view?
I've published the new version, here are the improvements:
- almost fixed the polyline selection bug (now only happens while creating the polyline);
- selected objects are never hidden;
- the hiding behaviour is much better.

Hiding criteria
Hiding is now performed based only on the X-Y plan. Hiding using a polyline works as before, the only difference is that now the wall detection is made on the whole length, giving much consistent results even with long walls. Automatic hiding works as follow:
- if the camera rotation centre is within a room, a hiding threshold is built by shrinking the room shape. This produces very good results, which are affected mostly only by the camera orientation.
- If the rotation centre isn't within a room, the hiding threshold is a straight line parallel to the screen and passing through the rotation centre. This gives good results when rooms aren't defined yet.

Posted by sjb007 at Dec 7, 2021, 12:58:53 AM
Re: Pan tool in 3D and 2D view?
[Chef's kiss] Bellissimo!

Posted by sjb007 at Dec 9, 2021, 1:44:36 AM
Re: Pan tool in 3D and 2D view?
Hmmm... Did you mean to disable the return to center when clearing any selections in 1.4? I kinda preferred the previous (1.3.3) behaviour, but I'm not wedded to it.

Posted by Daniels118 at Dec 9, 2021, 10:24:09 PM
Re: Pan tool in 3D and 2D view?
No, I didn't mean to change the return to center behaviour, this occurred by mistake while optimizing the code. I'll fix it in the next release which will bring a new feature too.

Posted by Daniels118 at Dec 9, 2021, 11:49:30 PM
Re: Pan tool in 3D and 2D view?
New version released!

Here are the changes made:
- Fixed camera return to center bug introduced in the previous version
- Added keyboard shortcut to expand 2D/3D views

Posted by sjb007 at Dec 10, 2021, 12:04:35 AM
Re: Pan tool in 3D and 2D view?
For those wondering... Ctrl-SPACE :-)

Posted by SeppoV12 at Dec 11, 2021, 3:33:22 PM
Re: Pan tool in 3D and 2D view?
@Daniels118
Thanks for great pan tool! I feel it very handy, especially when jumping constantly between SketchUp and SH3D.
With version 1.3.x my models easily escaped to infinity when using zoom. Version 1.5 has not this problem.
Hide obstacles help to create unique views not otherwise (at least easily) possible.

Posted by sjb007 at Dec 13, 2021, 10:08:21 PM
Re: Pan tool in 3D and 2D view?
@Daniels118 Just a side note, you should probably create a new top-level post in the "New versions" forum. That appears to be where all the other plugins are posted, and updated. nThis wonderful little addition would get more exposure there I think.

Posted by Daniels118 at Dec 18, 2021, 4:11:30 PM
Re: Pan tool in 3D and 2D view?
@sjb007
I'm currently working on another plugin to draw 3D wirings (electric cables, tubes, etc.). To allow placement of wires on the floor as well on the walls, drawing will occurr directly on the 3D view. This may require some adjustment to the pan plugin, so there is a chance I will build a new version before giving it such exposure.

@SeppoV12 Thank you!

Posted by sjb007 at Jan 13, 2022, 3:24:35 PM
Re: Pan tool in 3D and 2D view?
@Daniels118 Hi, me again. I think I found a nasty side effect of the Pan3DView plugin. When I do a "Virtual visit" and walk around after a while the Left-click-drag action to change the direction the visitor is looking will break. It is not immediate, but after a while the visitor viewpoint starts to spin in a wild and uncontrollable fashion with the left-click-drag. I can reproduce even with an empty world space. If I remove the Pan3dView plugin I cannot cause this behaviour to occur.

Posted by Daniels118 at Jan 13, 2022, 4:50:24 PM
Re: Pan tool in 3D and 2D view?
Hi sjb007,
I've tried to reproduce the issue but without success (again). For how long you have to walk around before the problem occurrs? Can you grab the console output as done before?

Posted by sjb007 at Jan 17, 2022, 1:53:26 AM
Re: Pan tool in 3D and 2D view?
There's something really odd going on. If I try to redirect the console I get a hard lock of the application instead of the madly spinning POV. I also have an empty log file. I tried redirecting just the error console, and both standard out and error. Didn't matter. Same hard lock and empty log. Only way to quit out is to End Task in Task Manager.
I've repeated several times and it is totally consistent for me. With redirects I get hard locks. Without redirect I get spinning POV.
My laptop has selective Intel/nVidia for applications. I get the same behaviour running on both, so it isn't some gfx driver issue I think.
I can trigger both issues in ~10-15s, maybe even less. I just hold left mouse button and move the mouse in a continuous small circle. The issues are triggered in more usual usage too, but this is the "quick" method.

Posted by Daniels118 at Jan 18, 2022, 12:32:00 AM
Re: Pan tool in 3D and 2D view?
I had no luck trying to reproduce the problem :(
First, check if you are using the latest version of the plugin (1.7).
If you can, please upload a video of the steps to do to reproduce.

Posted by sjb007 at Jan 18, 2022, 1:59:45 AM
Re: Pan tool in 3D and 2D view?
1.7 version of the plugin, and the latest SH3D of 6.6a. Java 1.8.0_202 - 32bit. Java 3D 1.5.2 - NATIVE_OGL.

I also just tested (it just occurred to me) to remove all other plugins. I can still trigger it.

Video: https://youtu.be/y1E6tPabecQ

Note I used the right-click menu to switch to the virtual visit when you see the blue sky appear, but OBS didn't capture the menu.

Posted by Daniels118 at Jan 18, 2022, 7:37:03 PM
Re: Pan tool in 3D and 2D view?
Funny video title smile
I really don't understand what is going on thinking You could try to install this plugin that automatically redirects the console output to a file. Do not remove the underscore from the filename, as this will ensure the plugin is loaded before the others (they are loaded in alphabetical order).
The output will be stored within the application folder (the one that contains the plugins folder). Hope this will produce an helpful log.

Posted by sjb007 at Jan 19, 2022, 1:53:21 AM
Re: Pan tool in 3D and 2D view?
https://drive.google.com/file/d/1Mbm6_EiulL8G...RDS61QX0/view?usp=sharing

Well, that looks like a fine pickle.

Posted by sjb007 at Jan 19, 2022, 2:09:41 AM
Re: Pan tool in 3D and 2D view?
Huh. I looked at the code, and deactivating the SH3D preference of "Aerial view centered on selection" stops the issue occurring. Turning it back on, I can quickly cause the issue again. I'm a bit puzzled why aerial view code is being called when I'm in virtual visitor mode. It is a band aid though. Turning the setting off simply skips the threading code in View3DEnhancerImpl.java:363-370 that causes the issue. Maybe too many threads are being launched and are not cleaned up?

Posted by Daniels118 at Jan 19, 2022, 1:28:26 PM
Re: Pan tool in 3D and 2D view?
Yippee! This explains everything. It's likely you have a very fast PC, probabily with an UHD screen or the cursor speed set very high. This cause mouseDragged events at high frequency, leading to 2 problems with the code you seen in View3DEnhancerImpl.java:363-370:
- concurrency with the delayed code execution (the first IllegalAccessException);
- generation of too many concurrent threads (OutOfMemoryError).

You're right about the fact this branch of code is useless when the camera is in visitor mode, however this problem could potentially occurr even in aerial view mode.
So, beside excluding the code execution in visitor mode, I'll try to implement that function in a different way which won't involve starting new threads.

Please let me thank you for your valuable help in disclosing bugs and help me solve them praying

Posted by sjb007 at Jan 19, 2022, 4:15:31 PM
Re: Pan tool in 3D and 2D view?
It's a Dell XPS 15 with an i7-7700HQ @ 2.8Ghz with 4C/8T, and it has an UHD screen, but I use it with two dedicated non-UHD monitors. I wouldn't know if that still compares as "very fast", or if the mouse events are particularly high frequency, but in settings the cursor speed is maxed.

I don't think I've ever had weird behaviour in the Aerial view.

I'm delighted to be of help.

Posted by Daniels118 at Jan 20, 2022, 2:33:58 PM
Re: Pan tool in 3D and 2D view?
I wouldn't know if that still compares as "very fast"
Well, it is surely much faster than my 5 years old i5 :)

I have done the following changes to fix the bug:
  • The failing code has been conditioned to be executed only when in aerial view mode;
  • The critical code has been synchronized;
  • The delayed code has been serialized to avoid thread saturation.
You can download it from here: Pan3dView-1.8.sh3p

Please let me know if this fixes the problem, so I'll publish it on the contributions page.

Daniele

Posted by sjb007 at Jan 20, 2022, 5:41:10 PM
Re: Pan tool in 3D and 2D view?
FIXED! You da man! cool

Posted by sjb007 at Jan 23, 2022, 4:01:25 AM
Re: Pan tool in 3D and 2D view?
Another day, another report smile

So I can trigger this in two ways, but sometimes the middle click pan just stops working.
1) The reliable way is to open SH3D, place a cube and test. Pan works. Then display the 3D view in a separate window. Pan no longer works.
2) The unreliable way is to just use SH3D for a while. Even without separating the window, something occasionally causes the pan feature to stop working.

I check the redirected log, and there are no exceptions or errors in the few lines in there.

Posted by sjb007 at Jan 23, 2022, 4:04:19 AM
Re: Pan tool in 3D and 2D view?
I should clarify, the application returns to zooming on middle-click drag. It is like in certain situations the application re-asserts the normal mouse handling from before your plugin inserted itself.

Posted by Daniels118 at Jan 23, 2022, 6:29:25 AM
Re: Pan tool in 3D and 2D view?
Hi Stephen,
I was aware of this bug when detaching the 3D view, I admit I have spent few time to see what causes the issue, however fixing it is on the roadmap.
The bug never happened to me in the second way, maybe fixing the code for the first case could be enough to handle the second too, if not I'll have to investigate more.
I'll keep you updated.
Daniele

Posted by Daniels118 at Jan 24, 2022, 5:08:34 PM
Re: Pan tool in 3D and 2D view?
Hi Stephen,
I've implemented a workaround for the problem occurring when detaching the 3D view, it works well and I'm now making extensive tests, you can download it in preview from here: Pan3dView-1.9.sh3p

If you are interested in, you may take a look at these 2 plugins too:

Posted by sjb007 at Jan 24, 2022, 10:14:44 PM
Re: Pan tool in 3D and 2D view?
Confirm the detached window works. I'll keep an eye for it failing in normal use, and let you know if I hit it again.

I already had the Wiring plugin, but haven't done much of anything with it so far.

Just tried the 3D dimensioning, and I'll report in the main thread for that one.

Posted by Puybaret at Jan 25, 2022, 9:45:33 AM
Re: Pan tool in 3D and 2D view?
As a macOS user, I don't have any middle button on my mouse but still tried this plug-in because it's required for the other nice plug-ins you developed. Unfortunately, swiping the mouse (= rolling the mouse wheel) provokes too fast back and forth moves without backward limits, when the Pan3dView plug-in is installed.
I would be nice if you could fix that, and possibly propose an alternate way for a middle click.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator

Posted by Daniels118 at Jan 25, 2022, 11:34:31 AM
Re: Pan tool in 3D and 2D view?
@Puybaret
Thank you Emmanuel for you feedback :) I didn't know macOS' mice lack the middle button. I apologize for this, I'll try to implement an alternative method of enabling panning (I'm thinking of holding a key such as ALT while dragging).

Adding a limit for the backward movement shouldn't be a problem. Moreover I also didn't implement the speed switch with the SHIFT key, but I can add it too.

Please note that I've substantially changed the way the scroll wheel moves the camera from linear to an exponential fashon, this way it acts much as a "zoom" than as navigation, which I find more confortable. However I understand some users could like the default behaviour, so I'm thinking about introducing a dialog to customize these settings.

Best regards,
Daniele

Posted by Puybaret at Jan 25, 2022, 1:17:57 PM
Re: Pan tool in 3D and 2D view?
I sent you a video to show you how super fast zoom is working with Apple's mouse.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator

Posted by Daniels118 at Jan 25, 2022, 7:04:42 PM
Re: Pan tool in 3D and 2D view?
Hi Emmanuel,
thank you for the video, it helped me understand what was going on. I've releasead a new version of the plugin which should fix the bug. unfortunately I cannot test it by myself on a macOS, I hope it works. If you still experience problems you have 2 options:
  • help me debug the code;
  • turn off the exponential wheel using the new settings panel available under 3D view -> Pan 3D view settings menu.
I've also added an alternate way to pan for macOS, see below.

Summary of the changes:
  • Added ALT+left mouse button as an alternative to middle mouse button for panning (for macOS users)
  • Added the SHIFT key support to increase the speed of the scroll wheel in the 3D view
  • Improved exponential mouse wheel
  • Implemented a limit for the max distance when moving backward with the scroll wheel
  • Fixed the behavior in virtual visitor mode when custom mouse handlers wish to prevent camera rotation (1)
  • Added a preferences panel to:
    • enable/disable exponential mouse wheel
    • enable/disable select transparent walls with mouse
1) this change fixes the annoying bug occurring when moving points in virtual visitor mode for Wirings and 3D dimension lines plugins.

Download from here: Pan3dView-2.0.sh3p

Posted by Puybaret at Jan 27, 2022, 8:27:55 AM
Re: Pan tool in 3D and 2D view?
I confirm it works correctly now with Apple's mouse. Thanks smile
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator

Posted by titust11 at Jan 31, 2022, 6:15:27 PM
Re: Pan tool in 3D and 2D view?
Yes it does make sense, because for some reason the center that are supposed to be rotating around, is not in the center of the screen. I my case this rotation center too much on the right side of the screen

Posted by Daniels118 at Feb 1, 2022, 1:34:22 AM
Re: Pan tool in 3D and 2D view?
New version released!

This version brings new features and will be required for the next release of Wirings and 3D dimension lines plugins.

Summary of changes:
  • Fixed a bug reintroduced in the previous release (originally fixed in 1.8)
  • Fixed the polyline editing bug occurring after switching from virtual visitor to aerial view
  • Implemented the edit selection with double click in the 3D view
  • Implemented the delete selection with DEL key in 3D view
  • Replaced the MouseHandler class with MouseAdapter class in the public API
Download Pan3dView-3.0.sh3p

Posted by Daniels118 at Apr 4, 2022, 1:13:55 PM
Re: Pan tool in 3D and 2D view?
New version released!

The version 3.1 allows to toggle object selection in 3D view using SHIFT key + left mouse button, so multiple objects can be selected directly from the 3D view.
This enhancement will help a lot with the automatic wiring feature that will be added to the Wirings plugin very soon.

Download from SourceForge or using the Plugin manager.

Posted by Daniels118 at May 5, 2022, 7:01:11 PM
Re: Pan tool in 3D and 2D view?
New version released
Version 3.2.1 (formerly 3.2b) adds the capability to modify openings and mannequin pose directly in the 3D view!

See it in action!

Notice: this is intended only for space analysis. The changes are temporary, they will be lost if you modify the furniture and when reopening the file.

Download from SourceForge

Posted by Soulbrother at May 10, 2022, 9:29:22 AM
Re: Pan tool in 3D and 2D view?
PLEASE help.
I cannot work properly with that, so I need to deinstall, but HOW TO??

Windows 10 - SH3D 6.6a
Already tried a new installation of sh3d, but it is still the same behaviour, I cannot navigate in the 3D window as before (before installation of that "tool")

Posted by Daniels118 at May 10, 2022, 3:15:53 PM
Re: Pan tool in 3D and 2D view?
I'm really sorry to hear that.

To unistall a plugin close SweetHome3D, go to "C:\Users\your_user_name\eTeks\Sweet Home 3D\plugins" and delete the plugin file.

If you wish to make it work maybe you could describe which behaviour you experience that prevent you from work.

Posted by Soulbrother at May 10, 2022, 6:51:44 PM
Re: Pan tool in 3D and 2D view?
Oh, thanks a lot for your fast answer!

The behaviour is button. but using your tool drives me crazy, because if I click the right mouse button and push the mouse, it fine and I can use it - same as before.
But everytime when I click the left mousebutton and push the mouse only 0,5mm on my table, the 3D view is completely turned over and I need to use one of my saved camera-positions to be able to come back to the same view-point...

For me it would be fine, if left and right buttons could be changed ( but only for this pan-tool, not generally in windows)

But I guess it´s on me, because no other has written such a "problem" ;-)

Posted by Daniels118 at May 11, 2022, 7:59:51 AM
Re: Pan tool in 3D and 2D view?
I'm not sure what causes the problem, I have even tried to swap left and right mouse buttons in Windows settings, but it stil works as expected for me.
Anyway I have modified the code to handle both buttons, please try the attached version and let me know.

Pan3dView-3.2.2.sh3p

Posted by Daniels118 at Jul 8, 2022, 11:30:30 AM
Re: Pan tool in 3D and 2D view?
Version 3.3 released!
Changelog:
  • Added SPACE+left mouse button for panning as in plan view
  • Added Czech translation
  • Minor bug fix
Download from sourceforge or using the Plugin Manager.

Known bugs:
The "hide obstacles" feature is broken in Sweet Home 3D 7 beta. I'll try to fix it once SH3D 7 gets out the beta stage.

Posted by Puybaret at Jul 9, 2022, 6:46:32 PM
Re: Pan tool in 3D and 2D view?
Is there something I should have not changed in the program? Maybe it can be updated easily to avoid you to change your plug-in and manage different versions of Sweet Home 3D…
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator

Posted by Daniels118 at Jul 12, 2022, 8:55:25 AM
Re: Pan tool in 3D and 2D view?
The problem is caused by the addition of the modelFlags parameter to the HomePieceOfFurniture3D.setVisible method, since it's a private method I did expect my code would have break soon or later. Handling both versions should be quite easy anyway.

Posted by Puybaret at Jul 12, 2022, 11:36:24 AM
Re: Pan tool in 3D and 2D view?
I could overload setVisible to keep the old signature too, but as it's a private method, the old version of the method will lead to warnings in Eclipse because it will be unused.
Thanks for accepting to fix it on your side smile
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator

Posted by Daniels118 at Jul 13, 2022, 8:40:31 AM
Re: Pan tool in 3D and 2D view?
Version 3.4
Changelog:
  • Fixed "hide obstacle" feature not working in SH3D 7
Download from sourceforge or using the Plugin Manager.

Posted by Daniels118 at Sep 14, 2022, 4:27:03 PM
Re: Pan tool in 3D and 2D view?
Version 3.5
  • Fixed the camera jumping bug
  • Fixed Dutch translation
Download the new version from SourceForge or using the Plugin Manager.

Posted by Daniels118 at Nov 25, 2022, 7:39:59 PM
Re: Pan tool in 3D and 2D view?
Version 3.6
  • Added the ability to change the 2D/3D panes layout
    Use View 3D -> Pan 3D view settings and check Use widescreen layout.


Don't forget that you can always use CTRL+SPACE to cycle the layout between full plan, full 3D and split.

Download from Sourceforge or using the Plugin Manager.

Posted by hansmex at Nov 25, 2022, 8:14:20 PM
Re: Pan tool in 3D and 2D view?
Nice, nice, nice!!!
----------------------------------------
Hans

new website - under constuction
hansdirkse.info

Posted by Daniels118 at Dec 19, 2022, 10:17:13 PM
Re: Pan tool in 3D and 2D view?
Version 3.7
New features:
  • Added the ability to change the 3D view to parallel projection using CTRL+J (this also enable outlines to improve the aspect)
  • Added the ability to align the camera to the selected furniture or wall using CTRL+K (can be pressed multiple times to align to different sides)

View full size

These new features together with the 3D dimension lines plugin will enable SweetHome3D to produce pseudo-technical drawings in the 3rd dimension. I will publish a video tutorial in the next weeks.

You can download the new version from SourceForge or using the Plugin Manager.

Posted by sjb007 at Dec 19, 2022, 10:44:46 PM
applause   Re: Pan tool in 3D and 2D view?
Good Lord! That is awesome stuff (yet again!)

Two small things:
The black lines are there to "outline" things? Unfortunately the full geometry being outlined makes it a bit ugly.The lines should only be drawn on a) where two faces angle is greater than "x" or b) a material change (maybe?)

Second, the horizon in black behind the building is ugly, and doesn't move with the bottom of the drawing. It might be nicer to just hide it altogether in the parallel projection. In fact, in parallel mode, just make the entire background transparent or flat white.

Posted by sjb007 at Dec 19, 2022, 10:53:59 PM
Re: Pan tool in 3D and 2D view?
Oh, you might want to mention:

a) The navigation is a little odd. You use Shift-middle mouse scroll to "zoom in/out" in virtual visitor mode. This doesn't work in aerial mode, and I haven't figured out how to pull back in that case.

b) You can get orthographic sections inside buildings by using the virtual visitor and setting the body and head angles to multiples of 90 degrees.

Posted by sjb007 at Dec 19, 2022, 10:59:17 PM
Re: Pan tool in 3D and 2D view?
Dammit! *Ctrl* not *Shift*, and it works in both virtual visitor and aerial.

Posted by sjb007 at Dec 20, 2022, 1:54:58 AM
Re: Pan tool in 3D and 2D view?
Me again! wink

Another oddity I found playing with this is getting pictures out of SH3D. The parallel projection does not get used in the "Create photo" dialog. It defaults back to a perspective view, so getting a nice big high res image of a plan, elevation or section is not really possible.

Another thing (I'm such a horrible person) is that the lines are rendered in the two lower quality modes, but they are too thin causing them to become broken into dots and dashes if that makes sense. So it'd be nice to be able to configure that thickness.

Lines are not shown in either Yafaray or Sunflow renderers. Not sure that these are really a valid combo... i.e. rendered with overlaid outline.

Posted by Daniels118 at Dec 20, 2022, 11:40:40 AM
Re: Pan tool in 3D and 2D view?
Hi Stephen,
you're right, the new features aren't complete, I decided to release this version early because I'm working on another project and it would have taken too long before finishing. It seemed to me enough powerful to be released as is, but it will be improved in the future.
The black lines are there to "outline" things?
Yes, the black lines are needed to help the user distinguish the objects, especially walls. For example if you look at the last picture I've posted you will see that the house is L shaped, but when viewed from the side ("front" and "left") in parallel projection the walls that are parallel are exactly of the same color, and there is no mean to distinguish them, apart from the black edges.
Unfortunately the full geometry being outlined makes it a bit ugly.The lines should only be drawn on a) where two faces angle is greater than "x" or b) a material change (maybe?)
I agree with you, but I think it would be too complicated to implement this in a plugin. I will think about it, but I don't know if and when it would happens.
the horizon in black behind the building is ugly
I agree again. This happens because the ground has no thickness and becomes invisible when viewed from the side, the black is just the default background normally hidden by the ground. I have to find a workaround.
just make the entire background transparent or flat white
That's my intent! :)

About navigation
You're right again, I forgot to talk about it. Of course in parallel projection the size of the objects shown doesn't depend by the distance from the observer. To workaround this, I have introduced a new parameter named "parallelScale", but let's call it "zoom" for simplicity. However the camera position isn't meaningless, because it still affects which object are shown (objects behind the camera are hidden). So there was the need to control both the camera position and the zoom, hence the introduction of a new key modifier for the mouse scroll wheel: the CTRL key. If you hold CTRL, then the wheel will control the zoom, otherwise it will move the camera back and forth as always.
Another oddity I found playing with this is getting pictures out of SH3D. The parallel projection does not get used in the "Create photo" dialog. It defaults back to a perspective view, so getting a nice big high res image of a plan, elevation or section is not really possible.
I know, unfortunately it would be too complicated to hack the photo creation tool from the plugin. Maybe in the future.
the lines are rendered in the two lower quality modes, but they are too thin causing them to become broken into dots and dashes if that makes sense. So it'd be nice to be able to configure that thickness.
Oh, I didn't check this. I don't know if it could be useful without the parallel projection, but I will check if it is feasible.
Lines are not shown in either Yafaray or Sunflow renderers
I really fear the outline cannot be implemented using photorealistic renderers, it wouldn't be, how to say... realistic :)

Many thanks for your feedback and stay tuned for updates!

Posted by Daniels118 at Dec 22, 2022, 5:13:02 PM
Re: Pan tool in 3D and 2D view?
Version 3.7.2
  • Fixed the black background when in parallel projection
  • Added the ability to change the outline thickness
Download from SourceForge or using the Plugin Manager.

Posted by sjb007 at Dec 23, 2022, 12:17:43 AM
Re: Pan tool in 3D and 2D view?
Some of my usual quick fire feedback.

1. When in Virtual visit mode and I use the visitor widgets in the plan to change the view (elevation, body/head angle) the black background returns. It's not too bad, as I just hit Ctrl-J twice to go out of parallel mode and back in and this fixes the rendering.

2. There is still a light grey block even when I set my floor and sky to pure white. If I understand what is happening, this is the camera front clipping plane cutting through the ground plane. I looked at the 3.7>3.7.2 code changes, but alas, I couldn't figure out if this was a colour you somehow chose to replace the black in your black background fix, or maybe some default UI/system background colour. Any chance to be able to set this as a preference? That way, we could get an all white background.

Otherwise... dancing The lines look way better now they can be thickened, although it would be nice to have the option to turn them off completely.

Other crazy suggestions if you somehow figure a way to limit lines to edges where the angle of faces > x: A mode where all materials are replaced by plain white, for that outline sketch look. An architect I used produced some isometric sections in black line art. As I just thought about this, the silhouette would need to be forcibly outlined or it might go back to losing curved objects in the background again. I guess the rule would be if one face is toward the camera, and one faces away, then always draw the edge.

Oh, and maybe it is time to reconsider the name of this plugin - it has become so much more than just panning. wink

Posted by Daniels118 at Dec 23, 2022, 10:31:04 AM
Re: Pan tool in 3D and 2D view?
When in Virtual visit mode and I use the visitor widgets in the plan to change the view (elevation, body/head angle) the black background returns
Acknowledged, but this cannot be solved at moment.

There is still a light grey block even when I set my floor and sky to pure white. If I understand what is happening, this is the camera front clipping plane cutting through the ground plane. I looked at the 3.7>3.7.2 code changes, but alas, I couldn't figure out if this was a colour you somehow chose to replace the black in your black background fix, or maybe some default UI/system background colour. Any chance to be able to set this as a preference? That way, we could get an all white background.
I'll do a digression about how SH3D draws the background.
First, keep in mind that the ground is actually a plane, it isn't a volume filled with soil and rocks, it is just a thin layer.
Also consider that you can add a new level with a negative elevation (for example if you want to add the basement, a garage, or a cellar to the house).
When the camera is below the ground level there is no ground which could hide the background sky. To avoid to see the sky under your feet, the background is actually divided in 2 half spheres: the one above is painted with the sky color/texture, the one below is painted with a gray gradient (darker in the lowest point and lighter at the horizon).
For some reason I don't know (maybe performance, maybe to avoid artifacts at the horizon), Emmanuel decided that the bottom half sphere is painted only when the camera is below the ground level. When the camera is above the ground level the bottom half sphere isn't draw at all, leaving the background black. Under normal conditions this isn't a problem because the black part of the background gets hidden by the ground.

If you look at the ground plane from above (or below) you can see it, and since it is extremely large, it will hide everything on the other side. If you look at it from the side it will appear as a very thin line, and it won't hide anything.
When you are in parallel projection and the camera view direction is parallel to the ground, it is as if you look at it from the side regardless of the camera elevation, and it won't hide anything anyway, allowing to see the black background under the sky.
What my plugin does, is to force the visibility of the bottom half sphere even when the camera is above the ground. The visibility is updated every time the camera elevation changes, so I have to overwrite it every time.

The 3D view is based on Java3D, which has a very weird system of "capabilities", i.e. for every object, material, etc. you have to say if and what you want to change after the model "gets live". While the top half sphere has been set capable to change in color and texture, the one below isn't so. So I have no way to change it's color, nor to replace it with a new one. The only capability set on the below sphere is to change its visibility, and this is what I'm currently doing. I will ask Emmanuel if he can change this behaviour in a future release.

The lines look way better now they can be thickened, although it would be nice to have the option to turn them off completely.
This is feasible and I could add this option in the next release.

Other crazy suggestions if you somehow figure a way to limit lines to edges where the angle of faces > x: A mode where all materials are replaced by plain white, for that outline sketch look.
In theory it would be very easy, since there is a common way in computer graphics to achieve this effect, however it requires to use a custom shader. It is very easy if you write a program from scratch, but in this case we have to modify the behaviour of an existing program. I will give a look on what can be done as is.

maybe it is time to reconsider the name of this plugin
This is something I was thinking from long time, but there are several reasons to don't change the name. It would be nicer if the main features would be integrated in SH3D so that this plugin could be dismissed.
Beside the features presented to the users, this plugin provides an API for 3rd party plugins (currently only my other plugins use this API). This API allows to:
- create toolbar checkbutton groups, i.e. groups of ON/OFF buttons in which only one button can be ON at a time;
- attach multiple mouse handlers to the Plan view and 3D view;
- other minor features.

Posted by sjb007 at Dec 23, 2022, 1:52:55 PM
Re: Pan tool in 3D and 2D view?
If I had a say in it (but I don't) I think you have more than demonstrated the abilities to get commit rights to the main app.

Maybe Emmanuel is reluctant to give access, or maybe it would require copyright assignment to eTeks for dual licensing (i.e. GPL/proprietry). I think your plugins are really adding value, and I imagine even more so if you were not contricted by the limitations of using plugins.

I don't know if I previously asked this, but are you a professional Java developer, or is this just a hobby for you? Either way, really great contributions.

Posted by sjb007 at Dec 23, 2022, 1:53:51 PM
Re: Pan tool in 3D and 2D view?
"contricted" (wut?!?) should be "constrained"

Posted by Daniels118 at Dec 23, 2022, 5:59:31 PM
Re: Pan tool in 3D and 2D view?
I've read something about the copyright problems for the various stores (Apple, Microsoft). Anyway, I would be available to ceed the copyright to Emmanuel for the required portions of code.

If by "professional" you mean a regularly employed person in Java development, then no, I'm not. However programming for me has been and is still a kind of tool for many purposes. Just to give you an example, few years ago, a friend of mine brought me at the shooting range, and I got the idea to program a "virtual spotter" (for those who don't know, the spotter is the member of the sniper team who helps the sniper to observe the target), so I've put in a bag some java, opengl, math and an android phone, shaked well, and finally I got out an app which uses the phone camera to automatically detect the target and is able to "see" the holes made while shooting, and tells to the user (yes, it speaks) where the hole is in respect to the center of the target (which direction, how far).
This is just one out of thousands. Is this enough to make a professional? I don't know. But either way, many thanks smile

Posted by Daniels118 at Dec 23, 2022, 6:26:04 PM
Re: Pan tool in 3D and 2D view?
For those who are interested in these enhancements, you can upvote these 2 tickets on SourceForge:
Ticket #1142 Object3DBranchFactory enhancements - To let Wirings and 3D dimension lines to work even in the photo creation tool.
Ticket #1143 Customizable bottom background color - To have a full white background in parallel projection mode.

Posted by sjb007 at Dec 23, 2022, 6:39:50 PM
Re: Pan tool in 3D and 2D view?
If that worked, then you are pro enough for me!

I'm not a java coder, but I've worked with them for a long time. I'm more systems level. Installation, configuration, maintenance, support, problem analysis. I regularly have to read through java code to figure out what the pro coder did wrong that caused the 3 screen stack trace. wink

When I need to do something clever myself I will pull out the trusty Python (I just realised how rude that sounds cool) and knock together scripts of varying complexity. Quick and dirty for the one-offs, more time, effort and rigour if it will continue to be used in some automated fashion.

I'll take enthusiam, talent and results over a fancy certificate any day of the week.

Posted by Keet at Dec 24, 2022, 12:05:55 PM
Re: Pan tool in 3D and 2D view?
I think I found a bug in 3.7.2.
I often open more than one plan to copy specific furniture settings. After installing 3.7.2 that no longer workes. I can open a second plan but it doesn't show the window. After closing the initial plan the process for the second plan is still running in the background without a window showing. I have to kill that process before I can start Sweethome3D again. Regressing to 3.6 solves that problem.
----------------------------------------
Dodecagon.nl
1300+ 3D models, manuals, and projects

Posted by Mike53 at Dec 24, 2022, 1:52:45 PM
Re: Pan tool in 3D and 2D view?
Sadly i have exactly the same issue, sh3d reports the project open but windows shows no sign of it at all.

Posted by sjb007 at Dec 24, 2022, 2:24:42 PM
Re: Pan tool in 3D and 2D view?
I also get no new window trying to open a second plan. For me, exiting the original window terminates SH3D completely, and I can then open a new instance without having to kill an existing process. This behaviour is in Windows 10.

I captured some stack trace from the logging plugin:
DimensionLineEx3DFactory added successfully
Exception in thread "AWT-EventQueue-0" javax.media.j3d.CapabilityNotSetException: LineAttributes: no capability to set line width
at javax.media.j3d.LineAttributes.setLineWidth(LineAttributes.java:239)
at it.ld.sh3dplugins.pan3dview.View3DEnhancerImpl$14.<init>(View3DEnhancerImpl.java:156)
at it.ld.sh3dplugins.pan3dview.View3DEnhancerImpl.<init>(View3DEnhancerImpl.java:154)
at it.ld.sh3dplugins.pan3dview.Pan3dViewImpl.init(Pan3dViewImpl.java:134)
at it.ld.sh3d.devtoolkit.DynamicPluginLoader.init(DynamicPluginLoader.java:218)
at com.eteks.sweethome3d.plugin.PluginManager.getPlugins(Unknown Source)
at com.eteks.sweethome3d.plugin.HomePluginController.getPlugins(Unknown Source)
at com.eteks.sweethome3d.swing.HomePane.<init>(Unknown Source)

Maybe that helps?

Posted by Daniels118 at Dec 24, 2022, 9:09:44 PM
Re: Pan tool in 3D and 2D view?
Version 3.7.3
- Fixed a bug introduced in the previous version that prevented the opening of 2 instances at the same time.

Thank you all for reporting. Have a happy Christmas!

Posted by Gildaniel at Dec 26, 2022, 7:02:29 AM
Re: Pan tool in 3D and 2D view?
Daniels118, very nice tool, thank you!

My humble wishes:
- it would cose to find all the control keys for the plugin in one space, for example in Pan 3D view settings/about

- as for my needs in the context of 3d implementation, I need some way to put horizontal and vertical dimensions visible in 3D, to screenshot the task for electricians, tilers, to graphically specify openings (size and placing) for projecters, etc.

Like here (now to do this I am to export the frame to Sketchup)




Posted by Daniels118 at Dec 26, 2022, 10:52:52 PM
Re: Pan tool in 3D and 2D view?
@Gildaniel
I'm thinking of a entry in the help menu. About the projection mode, I think it could be useful to have an on/off button on the toolbar too.
They will come in the next release.

About vertical dimension lines, this is already possible as you may have seen in my last post on the Roof plugin thread. I have to find the time to make a video tutorial. For the moment, you may follow these steps:
  • Install Pan3D view and 3D dimension lines plugins.
  • Set the camera to aerial view.
  • Download the tracing paper model, and import it in the plan.
  • you will trace the dimension lines on this sheet, so you have to put it in front of what you want to measure. You may enlarge or shrink it if required.
  • select the sheet, press TAB to focus the 3D view, then press CTRL+J and CTRL+K to align the camera to the sheet.
  • Use CTRL+mouse wheel to zoom, and middle mouse button to pan the 3D view. If you accidentally rotate the camera, just repeat the previous step to get the camera aligned again.
  • use the 3D dimension lines plugin to draw vertical lines on the sheet (you can learn how to use it from the help menu).
For the moment 3D dimension lines are only visible in the 3D view, not using the photo creation tool, so the only way to export them as a picture is to grab a screenshot of the 3D view. If you wish to overcome this limitation, please upvote the ticket #1142.

Posted by Gildaniel at Dec 27, 2022, 1:10:04 PM
Re: Pan tool in 3D and 2D view?
@Daniels118,

Unfortunately, I didn't manage to put the dimension lines according to the instructions in the help.
Sometimes nothing happens when clicking on an object, sometimes it shows 0.00

I think, video tutorial is good idea for this whole mechanism to demonstrate



Posted by Daniels118 at Dec 27, 2022, 9:20:24 PM
Re: Pan tool in 3D and 2D view?
Version 3.7.4
  • Added the ability to set in which projection mode the outline should be displayed
  • Added a toolbar button to switch the projection mode
  • Added a toolbar button to align the camera to the selection
  • Hiding obstacles works for the outline too
  • Added help
Download from SourceForge or using the Plugin Manager.

Posted by Daniels118 at Dec 28, 2022, 5:02:30 PM
Re: Pan tool in 3D and 2D view?
@Gildaniel
I don't face the same issue, however please update the 3D dimension lines plugin to the version 3.2, it has important bug fixes and enhancements.
I have created a basic video tutorial, a more advanced one will come in the next days, you will find the link on the 3D dimension lines thread. Please use the dedicated thread for furhter support.

Best regards

Posted by Daniels118 at Aug 25, 2023, 4:37:42 PM
Re: Pan tool in 3D and 2D view?
Version 4.0 beta
This version is compatible with SweetHome3D 7.2. It hasn't been tested with previous versions (anyway I don't see any reason to make it compatible with previous versions).

New features and fixes:
- You can change the way objects move when dragging in 3D view (from menu 3D view->Pan 3D View settings)
- You can edit the selection in 3D view using CTRL+E (other than double click)
- Reduced plugin size

Download from SourceForge.

Posted by hansmex at Aug 29, 2023, 2:01:35 PM
Re: Pan tool in 3D and 2D view?
And it works!!
Thank you very much.

Hans
----------------------------------------
Hans

new website - under constuction
hansdirkse.info

Posted by Daniels118 at Sep 3, 2023, 11:28:46 AM
Re: Pan tool in 3D and 2D view?
Version 4.0 beta 2
New features:
- Implemented "smart" drag mode. See in in action on YouTube!

Fixes:
- Improved "better" drag mode in 3D view
- Improved pan functionality
- Implemented better support for centering the camera on 3D polylines

Download from SourceForge or using the Plugin Manager.

Posted by Daniels118 at Sep 21, 2023, 4:46:21 PM
Re: Pan tool in 3D and 2D view?
Version 4.0 beta 3
- Compatible with SH3D 7.2 beta 9
- Support object rotation in 3D view

Note: doesn't work with previous versions of SweetHome3D.

Download from SourceForge or using the Plugin Manager

Posted by Daniels118 at Sep 23, 2023, 12:43:02 PM
Re: Pan tool in 3D and 2D view?
Version 4.0
- Compatible with SweetHome3D 7.2

Download from SourceForge or using the Plugin Manager.

Posted by Keet at Sep 24, 2023, 2:04:49 PM
Re: Pan tool in 3D and 2D view?
Bug?
Changing the Outline setting also changes the obj export.

Example:
A wall with a box covering each end. Both boxes have the exact same color. The wall has the same color for both sides and the top.

Default Outline setting (None): Export results in one color for the wall and one set of colors (top, left, ect.) for the boxes.

Now set the Outline to perspective and export again. All materials are created for each part having individually named materials. So two sets of top, left, etc. for the boxes and two colors for the wall.

ETA: it seems that select in 3Dview no longer works.
New preference setting in 7.2. Now switched on.
----------------------------------------
Dodecagon.nl
1300+ 3D models, manuals, and projects

Posted by NIMAN at Nov 29, 2023, 1:18:20 PM
Re: Pan tool in 3D and 2D view?
Apologies if this is a silly question or answered elsewhere.

Have just begun to look at this amazing plugin applause (in conjunction with an orthographic Wiki page) and wondering if i'm getting the hang of it correctly.

To that end, I wonder if it possible to say whether the virtual visit 3d view (having switched to parallel projection) really is an (axonometric) Isometric projection?

Link to that is here: https://i.postimg.cc/VNjM0NxP/axonometric-Isometric-projection-is-it.png

If it is, is it possible to set the camera head angle to further places of decimal (e.g. 35.264)?

For info:
Plugin manager reports the Pan in 3D view as 4.0
Sweet Home 3D version 7.2

Posted by Daniels118 at Nov 29, 2023, 4:40:25 PM
Re: Pan tool in 3D and 2D view?
Hi NIMAN,
the parallel projection mode is a real orthographic projection, so it can be used to get an isometric projection by choosing the proper view angles.
Entering more decimals digits works, they are rounded just for display purposes, so you can get exact angles.

Tip: you can place a cube somewhere, rotated with the angles required to get an isometric view; then, while having the cube selected, press CTRL+K to quickly align the camera to the cube, this way you can always return to the isometric view without opening the virtual visitor edit window, and it also works in aerial view mode.
Drag the cube to the point where you want to center the view and press CTRL+K again to align the camera to that point. You may also save the camera position to quickly return to specific positions.

Daniele

Posted by NIMAN at Nov 29, 2023, 9:13:51 PM
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.

Posted by sjb007 at Dec 8, 2023, 5:36:28 PM
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]


Posted by Puybaret at Dec 8, 2023, 6:57:30 PM
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 creator

Posted by Daniels118 at Dec 9, 2023, 3:35:11 PM
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.

Posted by Keet at Feb 17, 2024, 9:04:23 AM
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.
----------------------------------------
Dodecagon.nl
1300+ 3D models, manuals, and projects

Posted by Keet at Feb 18, 2024, 9:36:16 AM
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.
----------------------------------------
Dodecagon.nl
1300+ 3D models, manuals, and projects

Posted by Keet at Feb 19, 2024, 4:59:24 PM
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.
----------------------------------------
Dodecagon.nl
1300+ 3D models, manuals, and projects

Posted by Daniels118 at Feb 22, 2024, 6:45:08 AM
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.

Posted by Keet at Feb 22, 2024, 7:24:21 AM
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.
----------------------------------------
Dodecagon.nl
1300+ 3D models, manuals, and projects

Posted by Keet at Feb 24, 2024, 9:53:08 AM
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.
----------------------------------------
Dodecagon.nl
1300+ 3D models, manuals, and projects

Posted by Daniels118 at Feb 24, 2024, 12:22:56 PM
Re: Bug in Pan3Dview plugin with chained deformation
The code used by the plugin actually comes from the edit deformation dialog (it's almost a copy-paste), so I can't just look at SH3D code to see how to do it. The problem should be in the way various components interact each other, but understanding it is time consuming because SH3D is heavily based on interfaces, so I have to search implementations by hand. I will try to find it out, but this isn't on top of my roadmap.

About the problem of rotation, I remember I've read that the rotation axe is computed based on the highest dimension of the hinge node, so maybe you have to resize it properly.

Posted by Keet at Feb 24, 2024, 1:10:18 PM
Re: Bug in Pan3Dview plugin with chained deformation
Yes, the rotation axe is computed on the highest dimension but in other words that means it looks for the longest distance between two points to use as the direction.
For hinges the position is also important since the rotation should use it as the center point for rotating. Rails don't have that problem, they can be far away from the parts that use the rail and the rail just prescribes the path for sliding. A ball has a similar situation as the hinge but the only important data point is the center for rotating around the point.

The main point is that when a hinge rotates it changes the direction for other hinges connected to it. Besides that, my test with the Scopia turn window proved that a start position of the furniture in a diagonal position is already enough to cause the deformation to go wrong. That one I can't explain because it shouldn't be a problem with just a single hinge.

The Sweet Home 3D dialog doesn't have this problem because it simply takes the object and displays it in the preview in it's default (horizontal) position. Your deformation in the 3Dview is much more difficult because you have to determine the changed angles of the hinges. On the other hand, in that dialog the code must recalculate for chained deformations using the hinge one up in the chain as the start point.

When you get to looking into this, try and log the original hinge directions and the directions as calculated from the 3Dview. Maybe that helps in finding the place to recalculate. It's a difficult problem which might have either a very difficult solution or an amazingly simple one.

As I said, no hurry to fix this. There are more important things that come first.
----------------------------------------
Dodecagon.nl
1300+ 3D models, manuals, and projects