Opened 6 years ago

Closed 2 years ago

#44 closed defect (fixed)

ModelGeometry: for cuboids, sampling points should be located on edges

Reported by: Maciej Komosinski Owned by:
Priority: major Milestone:
Component: Framsticks core Version:
Keywords: Cc:


Improperly placed sampling points (missing one "row" along edges? needs verification) may be the reason for inaccurate estimation of cuboid sizes. Test with:

frams "var m=Model.newFromString(\"//0\np:sh=2\n\"); var mg=ModelGeometry.forModel(m); mg.geom_density=2; Simulator.print(mg.sizesAndAxes());" -q

Instead of nice round numbers, we get


Change History (2)

comment:1 Changed 6 years ago by Maciej Komosinski

Summary: ModelGeometry: for cuboids, sampling point should be located on edgesModelGeometry: for cuboids, sampling points should be located on edges

comment:2 Changed 2 years ago by Maciej Komosinski

Resolution: fixed
Status: newclosed

The result is correct, sizexyz should not be 2.0 in this case as one might expect. For example, the first value ("length") is the longest diagonal in the cube with edge length of 2, so sqrt(12)=3.464101615137754587. The other values ("width" and "depth") are also analogously correct.

Note: See TracTickets for help on using tickets.