How is the 3d wall object (baserail specifically) constructed?

This topic has been viewed 6540 times and has 2 replies
Thread status: Active
Questions about extending features and developing plug-ins [img]http://www.sweethome3d.com/images/flags/en_small.gif[/img]
Post Reply New Topic
Bubblobill
Posts: 77
Joined: Sun May 21, 2017 2:09 pm
Country: Australia

How is the 3d wall object (baserail specifically) constructed?

Post by Bubblobill »

I am exploring possible enhancements to the wall object, specifically the addition of a profile path to the baseboard with the intention of duplicating its functionality as a cornice.

Straight walls are no problem as we are just bulding boxes and the functionality of a cornice isn't really required as I can just add them as furniture and stretch to fit.

Curved walls are where the fun is.

As baseboards start out life as a box I can see two ways that they would be constructed; 1) Calculate the curve and extrude vertically, or 2) Take the vertical profile and extrude along the curve.

1 would not adapt easily to a variable profile but 2 would be doable.

I'm trying to make sense of the wall3D class and from having a look it seems that the three visible points of a baseboard are propagated along the curve. This implies that it might be possible to increase the number of visible points to produce a profile that is not square.

Am I reading it right?

Jay
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: How is the 3d wall object (baserail specifically) constructed?

Post by Puybaret »

If you look at Wall3D class, you'll see that the method createWallGeometries is used to create the main parts of a wall and also to create baseboards as if they were some small walls. Maybe you could inspire yourself of the same system for a cornice, except that you will have to manage a profile in createVerticalPartGeometry method instead of a simple vertical plan which makes it more difficult.
Round walls are actually a serial of small vertical parts and you should create a getWallCornicePoints that will return the global shape of the cornice along the wall like getWallBaseboardPoints does.
Emmanuel Puybaret, Sweet Home 3D creator
Bubblobill
Posts: 77
Joined: Sun May 21, 2017 2:09 pm
Country: Australia

Re: How is the 3d wall object (baserail specifically) constructed?

Post by Bubblobill »

Thanks. Shall see how I go.
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 1 guest