Opened 6 years ago

Closed 2 years ago

#46 closed defect (fixed)

ModelGeometry: add support for shape=0 (cylinder)

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


As the first step while shape=0 is not yet supported, the source should print an error message and return 0 (or treat cylinder as a cuboid) instead of crashing as it currently does.

Test with:

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

Change History (3)

comment:1 Changed 6 years ago by Maciej Komosinski

In 262:

Geometry evaluation no longer crashes for models that contain only unsupported cylinder shapes [refs #46]

comment:2 Changed 4 years ago by Maciej Komosinski

In 546:

Renamed: Model::buildUsingNewShapes -> Model::buildUsingSolidShapeTypes()
Added class SolidsShapeTypeModel? (for making ball-and-stick Models look like solids-type Models)
ModelGeometryInfo? functions: findSizesAndAxesOfModel(), volume() and area() now accept ball-and-stick Models (using SolidsShapeTypeModel? class)
[refs #46] and possibly closes this issue (needs verification)

comment:3 Changed 2 years ago by Maciej Komosinski

Resolution: fixed
Status: newclosed

Fixed by r546.

Note: See TracTickets for help on using tickets.