bow-simulation / virtualbow

Software for designing and simulating bows
http://www.virtualbow.org/
GNU General Public License v3.0
23 stars 3 forks source link

Restrictions for layer height distribution #244

Open stfnp opened 2 years ago

stfnp commented 2 years ago

Reason for changes

There are currently no restrictions on the layer height distribution, other than that the height can't be negative. Working on #91 (CAD export) has shown that some rules are needed to make the bow geometry more well-behaved.

The changes listed below are technically breaking changes, since they make bow models invalid that were fine previously. In practive though, only very few models will be affected.

Prevent disjoint layers

Right now, layers can have zero height over any portion(s) of their length in order to model layers that fade in (b), out (c) or both (d). However, it is also possible to create layers that consist of multiple disjoint parts (e). This makes CAD export more complicated, since a single layer can lead to multiple solids that have to be generated.

Rule 1: Only the first and last control points of the layer height are allowed to be zero.

Folie1

Enforce continuity

Layers can currently start and end with a non-zero height anywhere within the limb (a). It's pretty obvious that such a geometry is not well-defined and should be ruled out.

Rule 2: If the first or last control point lies within the limb (i.e. not at 0% or 100% length), the height must be zero at that point.

However, as case (b) shows, even if the layer ends with zero height, it can force adjacent surfaces to have a discontinuous slope, which shows as a sharp edge. So there is one more rule needed,

Rule 3: If the first or last control point lies within the limb (i.e. not at 0% or 100% length), the slope must be zero at that point.

Folie2