- Timestamp:
- 03/25/21 16:21:43 (4 years ago)
- Location:
- cpp/frams
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/_demos/shapeconvert.cpp
r999 r1115 38 38 PreconfiguredGenetics genetics; 39 39 Part::Shape shape = Part::SHAPE_CYLINDER; 40 float thickness = 0. 2;40 float thickness = 0.1; 41 41 42 42 char* gen_arg = 0; -
cpp/frams/model/geometry/modelgeoclass.cpp
r1111 r1115 18 18 "To set geom_density for individual ModelGeometry objects:\n" 19 19 "var mg=ModelGeometry.forModel(GenePools[0][0].getModel()); mg.geom_density=2; GenePools[0][0].data->area=mg.area();\n" }, 20 { "geom_density", 0, 0, "Density", "f 0.01 100.0 1.0", FIELD(density), " Affects the geometry calculation precision" }, //note: we used 'geom_density' instead of 'density' to make the name more unique - because sim_params merges all configuration fields in a single namespace.20 { "geom_density", 0, 0, "Density", "f 0.01 100.0 1.0", FIELD(density), "The number of samples (per unit length in one dimension) that affects the precision of estimation of geometrical properties." }, //note: we used 'geom_density' instead of 'density' to make the name more unique - because sim_params merges all configuration fields in a single namespace. 21 21 { "forModel", 0, PARAM_USERHIDDEN, "", "p oModelGeometry(oModel)", PROCEDURE(p_formodel), "The returned ModelGeometry object can be used to calculate geometric properties (volume, area, sizes) of the associated model. The density is copied from the current global ModelGeometry.geom_density on object creation." }, 22 22 { "volume", 0, PARAM_NOSTATIC | PARAM_USERHIDDEN, "volume", "p f()", PROCEDURE(p_volume), }, 23 23 { "area", 0, PARAM_NOSTATIC | PARAM_USERHIDDEN, "area", "p f()", PROCEDURE(p_area), }, 24 { "voxels", 0, PARAM_NOSTATIC | PARAM_USERHIDDEN, "voxels", "p oVector()", PROCEDURE(p_voxels), },24 { "voxels", 0, PARAM_NOSTATIC | PARAM_USERHIDDEN, "voxels", "p oVector()", PROCEDURE(p_voxels), "Returns a Vector of Pt3D objects from a regular 3D grid (sampled according to ModelGeometry.geom_density) that are inside of the Model body (Parts and Joints)."}, 25 25 { "sizesAndAxes", 0, PARAM_NOSTATIC | PARAM_USERHIDDEN, "sizesAndAxes", "p oVector()", PROCEDURE(p_sizesandaxes), "The returned vector contains XYZ (sizes) and Orient (axes) objects." }, 26 26 { 0, 0, 0, }, … … 80 80 Model *converted = new Model; 81 81 converted->open(); 82 converted->buildUsingSolidShapeTypes(*m, Part::SHAPE_CYLINDER , 0.2);82 converted->buildUsingSolidShapeTypes(*m, Part::SHAPE_CYLINDER); 83 83 converted->close(); 84 84 m = converted; -
cpp/frams/model/model.h
r1002 r1115 389 389 390 390 /// build this model using solid shape types, based on the provided ball-and-stick model. See also shapeconvert.cpp. 391 void buildUsingSolidShapeTypes(const Model &src_ballandstick_shapes, Part::Shape use_shape = Part::SHAPE_CYLINDER, double thickness = 0. 2);391 void buildUsingSolidShapeTypes(const Model &src_ballandstick_shapes, Part::Shape use_shape = Part::SHAPE_CYLINDER, double thickness = 0.1); 392 392 393 393 protected:
Note: See TracChangeset
for help on using the changeset viewer.