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

Romania
Joined: Apr 24, 2014
Post Count: 548
Status: Offline
Reply to this Post  Reply with Quote 
Multiple paste & Distribute on high (on z axes)

Until we have a stairs generator for me are more useful this two additional tools:
1. Multiple paste... or Paste special...
-Select an object or more
variant a
-Edit->Multiple paste...
-An popup dialog "How many copy?"
-Insert an number (>0)->"OK"
or
variant b
-Edit->Paste special...
-An popup dialog with few entries
--"How many copy?"
--"Distance on x, y, z"
-Insert the desire numbers (>0)(for axes in cm)->"OK"
result an numbers of objects inserted in the plan.
In this way I don't need to ctrl+v for 50 or 374 times to insert the same object (steps for staircase or chairs on a theater)

2. Distribute on high (on z axes)
-Select and modify the elevation of an object to maximum need
-Select the (previously created) objects (>=3)
-Right click->Align and distribute...->Distribute on high
With this two new option is more easy to create staircases but not only.
----------------------------------------
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
[Jan 7, 2019, 8:26:13 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: 548
Status: Offline
Reply to this Post  Reply with Quote 
Re: Multiple paste & Distribute on high (on z axes)

Message in a Bottle -The Police - 1979
As I say "If You don't like it AS IS than DIY".
I've start to write an plug-in for this but I encounter a problem:
Look at the screenshot:


The items are added in 3D and in Furniture list but only the last are draw in 2D.
If I save the file and reopen the items are there but is not what I want or expect.
Here is the code responsible for this:

UndoableEditSupport undoSupport = plugin.getUndoableEditSupport();
undoSupport.beginUpdate();
// HomeView view = plugin.getHomeController().getView();
float dx = 0;
float dy = 0;
int step = (int) stepsField.getValue();
float Xo = (float) xField.getValue();
float Yo = (float) yField.getValue();
for (int p = 1; p <= step; p++) {
dx += Xo;
dy += Yo;
// Attempt add/move items
plugin.getHomeController().getPlanController().addItems(items);
plugin.getHomeController().getPlanController().moveItems(items, dx, dy);
// Attempt to use drop or paste
// plugin.getHomeController().drop(items, null, dx, dy);
// plugin.getHomeController().paste(items);
}
undoSupport.postEdit(new AbstractUndoableEdit() {

I mess something but I don't know what.
I've catch my ears and maybe someone read this and drop me an lifeline sad
----------------------------------------
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
[Apr 29, 2019, 9:52:56 AM] 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: 9141
Status: Offline
Reply to this Post  Reply with Quote 
Re: Multiple paste & Distribute on high (on z axes)

Each item added to home must be unique, and you have to duplicate the items you want to add, for example using their clone method. To ensure that future redos work correctly, they should be cloned only once, and not in the redo method.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Apr 29, 2019, 12:17:35 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: 548
Status: Offline
Reply to this Post  Reply with Quote 
Re: Multiple paste & Distribute on high (on z axes)

Thank You, Emmanuel!
You find my bottle very quickly. hugs
I remove (comment) my undo method => same result.
I change clipboard whit selected => same result.
I'll try to change the principle from "for" to "wile" or other kind of.
Maybe I'll find a way to convince SH3D to take care to all items I insert.
Nothing is impossible but not all are easy.
The computer MUST do what I need. raised eyebrow
----------------------------------------
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
[Apr 29, 2019, 1:40:54 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: 548
Status: Offline
Reply to this Post  Reply with Quote 
Re: Multiple paste & Distribute on high (on z axes)

I finally convince SH3D to accept my opinion.
The Paste special...(multiple Ctrl.+v) are working somehow.
Now I tray the distribute elevation.
Off course Murphy' Law are present:
solving a bug I generate other 3 and discover another 5.
Well, I don't have time to be bored.
----------------------------------------
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
[May 16, 2019, 9:16:15 AM] 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