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: 12
Posts: 12   Pages: 2   [ 1 2 | Next Page ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 13109 times and has 11 replies Next Thread
dorin
Advanced Member
Member's Avatar

Romania
Joined: Apr 24, 2014
Post Count: 752
Status: Offline
Reply to this Post  Reply with Quote 
Moulding Boolean Convert plugin (MBC)

Continuing the YAUP series, I tried to create this MBC plugin.
"Hell is paved with good intentions."
"Half of the answer lies in how you phrase the question."
"AI's depend on the NHS library."
"If you have one watch, you know what time it is. If you have more than one, you will never know."


It 's a plugin with three actions under the "Tools" menu:
-Add Moulding;
-Boolean Operation;
-Convert to furniture.

1. Moulding intends to replace and complete the Moulding plugin.
-You can now select multiple pieces of furniture and multiple rooms to mould.
-Moulds are now grouped by room and mould name.
-You have the option to generate matching corners, also grouped.
Some screenshots:
Add some moulding furnitures

Draw some rooms and select alls

The result

2. Boolean operations mean union, intersection, difference, and xor with selected pieces of furniture.
-Intend to be a new feature.
-It's just a start. Use it carefully!
-I've used the help of several AIs for this, and this is the most acceptable result out of about 50 versions.
3. Convert selected objects (furniture, walls, and/or rooms) into furniture.
-This is intended to make conversion easier than the Copy as New Furniture plugin.
-It is based on the Copy as New Furniture plugin, which, for unknown reasons, does not work for me.
-It is limited to furniture, walls, and rooms under the same conditions as the Copy as New Furniture plugin.

Some things works but many others don't.
Example:
-the horizontal and vertical coplanar faces are completely removed.
-operations with some simple objects (cube, sphere) don't work but work with moulding furniture library.
-with some complex furniture run OutOfMemory
Conclusion: There is a lot of work to do.
Here is this alpha1 version.
----------------------------------------
A computer program does what you tell it to do, not what you want it to do. Murphy's Law
When all else fails, read the instructions. Murphy's Law
If you don't like "AS IS", DIY. Dorin's law
[Jan 4, 2026, 7:55:10 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: 752
Status: Offline
Reply to this Post  Reply with Quote 
Re: Moulding Boolean Convert plugin (MBC)

The alpha2 version.
Having tried many different approaches, this is the closest to what I want.
What relatively works:
--Adding molding corners works acceptably.
--The Boolean operations work with many simple objects, except for spheres.
--Conversion into furniture works using a few common tricks.

Here are a few explanations as to why I tried to perform Boolean operations:
- to create unique objects myself
- to automatically make corners for borders and crowns.

Just a few samples:
1. I've want to make a hole for a sink on a countertop.
My first attempt was to subtract the sink from the countertop.
It works somehow, but not as I expected.
[pict1]
[pict2]
It seems that I need an auxiliary object to make the desired hole.
-Add a layer (not at the same elevation).
-Select, copy, and paste the sink onto the new layer. It will be used as a template.
-I increased the scale 10 times to make it easier to work with the walls and rooms.
[pict3]
-Draw some small connected walls and rounded corners at 90 degrees.
[pict4]
-Create a room inside the walls, select it and Tools->Convert to furniture
[pict5]
-Reduce the new object by /10
-Copy and paste the object back onto the first level.
-Make sure the new object and the countertop intersect.
-Select both and Tools->Boolean operation->Difference A-B.
[pict6]
[pict7]
-Acceptable.

2. I wanted to create some useless and difficult objects.
- Using the Basic shape generator plugin, I tried to extract different parallelepipeds.
[pict8]
and
[pict9]
- Now, from the result obtained, I want to extract an inclined and rotated cylinder.
[pict10]
and
[pict11]
Okay! Let's continue. From the last result, let's extract a sphere.
[pict12]
and
[pict13]

Failure!
Probably because it's the 13th picture or the plugin is useless.
Anyway, I know that if it works with spheres, it won't work with other shapes.
So use it with care!
----------------------------------------
A computer program does what you tell it to do, not what you want it to do. Murphy's Law
When all else fails, read the instructions. Murphy's Law
If you don't like "AS IS", DIY. Dorin's law
[Jan 17, 2026, 6:39:18 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: 1646
Status: Offline
Reply to this Post  Reply with Quote 
Re: Moulding Boolean Convert plugin (MBC)

Does the plugin use the obj definition for each object? (i.e. the definition in the .obj file.)
If so then try another sphere, one from my shapes library or one generated in Blender. Also try an Ico sphere from my shapes library, an ico sphere has a different kind of definition.
If that works then export the initial sphere you used and import it again. I suspect that it's definition is straight from Blender.

As it is, great results so far!
----------------------------------------
Dodecagon.nl
1300+ 3D models, manuals, and projects
[Jan 17, 2026, 7:09:45 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: 752
Status: Offline
Reply to this Post  Reply with Quote 
Re: Moulding Boolean Convert plugin (MBC)

The updated alpha2 version.
The previous link is updated too.

I made a few changes and now it seems to be working.
pict14
pict15
pict16
pict17
pict18

@Keet Thanks, you've encouraged me!
The plugin (like SH3D) does not work directly with obj files.
-Exports the furniture as obj+mtl+texture to a temporary zip file;
-Loads it back as BranchGroup;
-Extracts the geometries from it and creates an Object3D (a kind of solid);
-Perform Boolean operations with two Object3D;
-Perform the steps in reverse order until the new furniture is added to home.

The XOR operations still don't work as expected.
Even so, use it with care!
----------------------------------------
A computer program does what you tell it to do, not what you want it to do. Murphy's Law
When all else fails, read the instructions. Murphy's Law
If you don't like "AS IS", DIY. Dorin's law
[Jan 18, 2026, 9:25:50 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: 1646
Status: Offline
Reply to this Post  Reply with Quote 
Re: Moulding Boolean Convert plugin (MBC)

I really like this plugin! With a little imagination and spatial insight you can create many model parts that would otherwise require the use of Blender.
Another step to create sophisticated models in Sweet Home 3D without the need of Blender. Thank you!


A tip that might be helpful with some formulas and/or calculations:
If you have installed Blender, then look at the install directory. Many parts of Blender are Python scrips with formulas and calculations that can be converted to Java. Python scripts are plain text so easy to read and copy.
The latest version has some scripts integrated in the C source but of course you can also download the C source to find a specific formula. What I'm thinking about is smoothing, bending a cylinder, etc.
----------------------------------------
Dodecagon.nl
1300+ 3D models, manuals, and projects
[Jan 18, 2026, 10:38:00 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: 1646
Status: Offline
Reply to this Post  Reply with Quote 
Re: Moulding Boolean Convert plugin (MBC)

Found a bug with the difference calculation: When both objects have a height of 0 it generates an error: Boolean operation resulted in empty geometry

What was expected: the difference from the two flat surfaces.
When one of the two objects has a height >0 it works correctly, but of course I wanted a completely flat surface with a cutout.

Even with the error your plugin has already saved me several hours of work. Now I just have to remove all the faces below the top surface with Blender.
----------------------------------------
Dodecagon.nl
1300+ 3D models, manuals, and projects
[Jan 18, 2026, 3:11:27 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: 752
Status: Offline
Reply to this Post  Reply with Quote 
Re: Moulding Boolean Convert plugin (MBC)

@Keet
0. Thanks again! As a non-programmer, it's an honor.
1. There are still many improvements to be made.
2. I have already installed Blender, but I also have AOI (ArtOfIllusion) .
3. Thank you for the advice! I have some knowledge of C++ (using QT) and Python as I know few things in Basic Spectrum.
4. Your suggestions are good, and I have been considering them for a long time.
4.1. Regarding smoothing, I believe there are some parameters in the obj file. I have seen that AOI imports such things.
4.2. Regarding bending a cylinder, I believe it is easier(for me) to create a bent cylinder directly by extruding (like under AOI).
4.2.1. I think I'll add "Extrude room" as other action of this plugin.
5.
<<I wanted a completely flat surface with a cutout.>>
This plugin works with volumes. First, it checks whether the two volumes overlap. 2*3*0=0
<<Now I just have to remove all the faces below the top surface with Blender.>>
I'm glad you found a workaround.
It is fool of bugs so, keep test it. Eventually test the others actions also.
----------------------------------------
A computer program does what you tell it to do, not what you want it to do. Murphy's Law
When all else fails, read the instructions. Murphy's Law
If you don't like "AS IS", DIY. Dorin's law
[Jan 18, 2026, 7:00:15 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: 752
Status: Offline
Reply to this Post  Reply with Quote 
Re: Moulding Boolean Convert plugin (MBC)

@Keet
Your approach presented here is brilliant!
Basically, you need to make a negative of the hole you need.
Then you subtract it from the main object. Brilliant!
I've already done a few tests, it's not exactly simple but not impossible.
The result is acceptable.
This way, part of the smoothing can be solved (using a cylinder, torus, or some of the modeling library).
A tip: save and reopen the application from time to time. Will free the temporary memory.
This gave me the opportunity to discover a few more tricks.
----------------------------------------
A computer program does what you tell it to do, not what you want it to do. Murphy's Law
When all else fails, read the instructions. Murphy's Law
If you don't like "AS IS", DIY. Dorin's law
[Jan 19, 2026, 12:33:15 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: 1646
Status: Offline
Reply to this Post  Reply with Quote 
Re: Moulding Boolean Convert plugin (MBC)

Thank you!
What I presented is a practical example of what you can do with your new plugin, specifically the Difference option. Another basic use I can see is that it can replace or add to the window method of creating holes in objects. Once users find out how easy it is with this plugin it will soon become the favorite method for creating holes, especially since it is not limited to using a wall.
I think this plugin will become one of the most important plugins for users that create their own 3D models.
----------------------------------------
Dodecagon.nl
1300+ 3D models, manuals, and projects
[Jan 19, 2026, 1:58:09 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
captaincook
Advanced Member
Member's Avatar

France
Joined: Oct 20, 2017
Post Count: 374
Status: Offline
Reply to this Post  Reply with Quote 
Re: Moulding Boolean Convert plugin (MBC)

Bonjour Dorin.

Je suis resté perplexe au début en lisant tout ce que vous avez expliqué concernant votre nouveau plugin (MBC).
Mais après quelques essais, je crois que j'ai commencé à comprendre son fonctionnement et du coup les services qu'il peut rendre.



Bon, je crois que j'ai encore pas mal d'essais à réaliser pour bien le maitriser mais je pense que ça peut être très utile pour certaines créations.

Bravo à vous en tous cas et merci.
----------------------------------------
[Edit 1 times, last edit by captaincook at Jan 19, 2026, 2:15:11 PM]
[Jan 19, 2026, 2:13:07 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Posts: 12   Pages: 2   [ 1 2 | Next Page ]
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

  Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads  
© Copyright 2024 Space Mushrooms - All rights reserved