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: 8
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 777 times and has 7 replies Next Thread
Keet
Advanced Member
Member's Avatar

Netherlands
Joined: Apr 8, 2022
Post Count: 789
Status: Offline
Reply to this Post  Reply with Quote 
Read back generated shape

The roof generator reads back the numbers from a generated roof if it is selected when you start the generator. I really would like the shape generator to do the same. Just keeping the last used numbers is useless for this since they are lost when you create another shape or restart Sweethome3D.

I find myself keeping dozens of screenshots of generated shape coordinates just so I can can reproduce them at a later time. Since I often create complex shapes this is becoming very tedious and error prone.
[Jun 28, 2023, 10:17:17 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
dorin
Advanced Member
Member's Avatar

Romania
Joined: Apr 24, 2014
Post Count: 555
Status: Offline
Reply to this Post  Reply with Quote 
Re: Read back generated shape

Step-by-step you will end-up on linux (FREE) principle:
if (DontLikeAsIs) {
then (DoItYourSelf){
if (youLikeWhatYouveDone){
then (shareIt);
else (keepIt);
}else{
wait || waitMore || waitEvenMore ;
}

I've done the same in similar situations.
Except the case when you want to keep forever your 70+ wishes.
The roof generator reads back the numbers from a generated roof

Yes, but it previously write it as custom properties.
You will have to do the same with the Shape Generator.
Emmanuel will not be upset if you improve it with their permission. (I've done it in the past).
If you need help, I'm here!
----------------------------------------
A computer program does what you tell it to do, not what you want it to do. Murphy's Law (Greer's Third Law)
When all else fails, read the instructions.Murphy's Law
[Jul 2, 2023, 11:28:39 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: 789
Status: Offline
Reply to this Post  Reply with Quote 
Re: Read back generated shape

I have no problem writing the code myself although I'm not familiar with Java. I am a C# developer (with a little PHP,Html/Css/JavaScript on the side) and from what I understand the differences with Java shouldn't give many problems. My current problem is I don't have a development environment for Java. I'm in the process of installing a new machine on which the full JetBrains development suite will be installed, which includes the environment for Java. It will be a few weeks before I can start with that because I'm way too busy.
Expect it to be several months before the first custom code will appear. Many of my wishes on the list I will be programming myself because I don't expect them to be introduced anytime soon if ever. Emmanuel can integrate them if he wishes after the code has proven itself.
The Shape Generator is probably one of the first because it should be relatively easy but I will try to extend it to allow more points. The biggest one is probably an extension of the UI where I want 2 extra panes on the right side like the panes on the left but with lists of the walls and rooms. Of course with full select and modify options tongue

Thank you for your offer to help. When I start I will probably need it.
[Jul 2, 2023, 1:53:00 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
dorin
Advanced Member
Member's Avatar

Romania
Joined: Apr 24, 2014
Post Count: 555
Status: Offline
Reply to this Post  Reply with Quote 
Re: Read back generated shape

1. Download and install Eclipse. I use $HOME/opt. For start it is enough the IDE.
1.1 I use the same folder for AOI and others + jre8 (for SH3D plugins compatibility).
2. Set an Eclipse workspace (I have ~8).
3. Follow Emmanuel's instructions to setup the workspace for sh3d plugins.
4. Start with a sample (VolumePlugin), make it work and then adapted it for others plugins.
When you decide to do this just ask for help (even in private to don't pollute the forum).
For me wasn't an easy task but now... it is equal difficult as at the begining.
----------------------------------------
A computer program does what you tell it to do, not what you want it to do. Murphy's Law (Greer's Third Law)
When all else fails, read the instructions.Murphy's Law
[Jul 2, 2023, 2:24:00 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
dorin
Advanced Member
Member's Avatar

Romania
Joined: Apr 24, 2014
Post Count: 555
Status: Offline
Reply to this Post  Reply with Quote 
Re: Read back generated shape

Of course with full select and modify options

I want to add my wish to yours.
What if to combine ShapeGenerator with www.sweethome3d.com/plugins/BasicShapeGenerator-1.0.sh3p?
For this You (we) need a custom preview model with options to select vertices, edges or faces (like AOI) and to individually setting options AND to export as object (furniture) with custom properties.
You like it?
----------------------------------------
A computer program does what you tell it to do, not what you want it to do. Murphy's Law (Greer's Third Law)
When all else fails, read the instructions.Murphy's Law
[Jul 2, 2023, 2:58:55 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: 9181
Status: Offline
Reply to this Post  Reply with Quote 
Re: Read back generated shape

Storing the coordinates of the generated shape isn’t complicated, using additional properties in the generated piece of furniture. Then, I could decide to modify the selected 3D shape instead of generating a new one at next call to the Tools > Generate 3D shape menu item.
But I feel you want more than this and actually look for a way to keep the list of recently generated shapes. Then, each generated shape should be named and rather be stored as preferences, but there’s no method in UserPreferences class to store additional properties at the moment.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Jul 3, 2023, 5:10:48 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: 789
Status: Offline
Reply to this Post  Reply with Quote 
Re: Read back generated shape

The most logical and generic solution is to check if a (generated) shape is selected, if so read the coordinates from the object and set these in the composition dialog. This is what I meant when I said that is what the Roof Generator does: if you have the roof selected and you start the generator it displays that roof in the dialog window. The roof generator handles many more points than the box of the shape generator so a shape generator handling more than the eight box points should be possible.

What I imagined is something like this:
・ If no shape is selected start with the box.
・ If a shape is selected read the coordinates into the dialog input fields.
・ High-light a point when one of it's input fields XYZ has focus.
・ Right click on a vertice allows to add a point which adds a row of XYZ input fields. (If the number of points exceeds 50(?) change the rows of input fields to a single row for the selected point)
・ Right click on a point to allow deletion of a point which removes it's row of XYZ input fields.
・ Display a list of the faces with a material name you can change.
・ No need for a list of previously generated shapes. You can archive shapes in a Shapes.sh3d file or have an option to import from a file browser.
・ Allow renaming the material name for a face. This should allow multiple faces to have the same name.
・ Resizable dialog window, the current window is way too small.
・ Bonus: possibility to drag a point close to where you want it, then fine-tune with the coordinate fields.

This could replace the current shape editor or become a separate tool like the Furniture Library Editor. It would in many cases eliminate the need to use programs like Blender.

I haven't looked into it, but how difficult is it to import a (non-shape) furniture object to display for editing? With and add/delete point option this would be the ultimate editor and would be a great tool to create custom furniture(-parts) in Sweethome3D or more importantly: to use any existing object as a base to create a new object. I wouldn't mind if it was limited to a max number of points but a click on a point could jump to the row of input fields for that point so a long list shouldn't be a problem.

[Jul 3, 2023, 6:36:44 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: 789
Status: Offline
Reply to this Post  Reply with Quote 
Re: Read back generated shape

Just by looking at the contents of a Shape object file you can easily see the coordinates you need to recreate the Shape object.

The v lines represent the wanted coordinates. The order of the coordinates is X, Z, Y (X, Z, Y , not X, Y, Z.)
There are only 8 v lines in a Shape object file so you just have to remember that v lines 7 and 8 are in reversed order. (1,2,3,4,5,6,8,7)

The bottom group has the points 1 to 4 in that order. (i.e. the four v lines),
the back group has the points 5 and 6,
the left group has point 8,
and the right group has point 7.

With this you have all 8 points you can enter in the Generate Shape tool to recreate the shape.
Don't forget it's X,Z,Y, not X,Y,Z smile
[Jul 10, 2023, 7:14:01 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
[ 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