Changeset 915


Ignore:
Timestamp:
04/20/20 23:33:31 (4 years ago)
Author:
Maciej Komosinski
Message:

Added fields to characterize hinges in "solid shape"-type Models

Location:
cpp/frams
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/config/f0-SDK.def

    r754 r915  
    4848PROP(dz,1,1024,delta.z,f,-2,2,0,d.z)
    4949PROP(sh,1,0,shape,d,0,1,0,shape)
     50PROP(hx,1,0,hinge position.x,f,,,0,hinge_pos.x)
     51PROP(hy,1,1024,hinge position.y,f,,,0,hinge_pos.y)
     52PROP(hz,1,1024,hinge position.z,f,,,0,hinge_pos.z)
     53PROP(hrx,1,0,hinge rotation.x,f,,,0,hinge_rot.x)
     54PROP(hry,1,1024,hinge rotation.y,f,,,0,hinge_rot.y)
     55PROP(hrz,1,1024,hinge rotation.z,f,,,0,hinge_rot.z)
     56PROP(hxn,1,0,hinge x negative limit,f,-6.2832,0,-1.5708,hinge_limit_x[0])
     57PROP(hxp,1,1024,hinge x positive limit,f,0,6.2832,1.5708,hinge_limit_x[1])
     58PROP(hyn,1,0,hinge y negative limit,f,-6.2832,0,-1.5708,hinge_limit_y[0])
     59PROP(hyp,1,1024,hinge y positive limit,f,0,6.2832,1.5708,hinge_limit_y[1])
    5060XPROP(stif,2,0,stiffness,f,0.0,1.0,1.0,stif)
    5161XPROP(rotstif,2,0,rotation stiffness,f,0.0,1.0,1.0,rotstif)
     
    6676PROP(p2,0,1024,`part2 ref#',d,-1,999999,-1,p2_refno)
    6777PROP(sh,1,0,shape,d,0,1,0,shape)
     78PROP(hx,1,0,hinge position.x,f,,,0,hinge_pos.x)
     79PROP(hy,1,1024,hinge position.y,f,,,0,hinge_pos.y)
     80PROP(hz,1,1024,hinge position.z,f,,,0,hinge_pos.z)
     81PROP(hrx,1,0,hinge rotation.x,f,,,0,hinge_rot.x)
     82PROP(hry,1,1024,hinge rotation.y,f,,,0,hinge_rot.y)
     83PROP(hrz,1,1024,hinge rotation.z,f,,,0,hinge_rot.z)
     84PROP(hxn,1,0,hinge x negative limit,f,-6.2832,0,-1.5708,hinge_limit_x[0])
     85PROP(hxp,1,1024,hinge x positive limit,f,0,6.2832,1.5708,hinge_limit_x[1])
     86PROP(hyn,1,0,hinge y negative limit,f,-6.2832,0,-1.5708,hinge_limit_y[0])
     87PROP(hyp,1,1024,hinge y positive limit,f,0,6.2832,1.5708,hinge_limit_y[1])
    6888XPROP(stif,2,0,stiffness,f,0.0,1.0,1.0,stif)
    6989XPROP(rotstif,2,0,rotation stiffness,f,0.0,1.0,1.0,rotstif)
  • cpp/frams/config/f0.def

    r754 r915  
    1313PROP(y,0,1024,position.y,f,,,,p.y)
    1414PROP(z,0,1024,position.z,f,,,,p.z)
    15 PROP(sh,1,0,shape,d,0,3,0,shape)
    16 PROP(s,1,0,size,f,0.1,10.0,1.0,size)
    17 PROP(sx,1,0,scale.x,f,0.001,1000.0,1.0,scale.x)
    18 PROP(sy,1,0,scale.y,f,0.001,1000.0,1.0,scale.y)
    19 PROP(sz,1,0,scale.z,f,0.001,1000.0,1.0,scale.z)
     15PROP(sh,0,0,shape,d,0,3,0,shape)
     16PROP(s,0,0,size,f,0.1,10.0,1.0,size)
     17PROP(sx,0,0,scale.x,f,0.001,1000.0,1.0,scale.x)
     18PROP(sy,0,0,scale.y,f,0.001,1000.0,1.0,scale.y)
     19PROP(sz,0,0,scale.z,f,0.001,1000.0,1.0,scale.z)
    2020XPROP(h,1,0,hollow,f,0,1,0,hollow)
    2121XPROP(dn,1,0,density,f,0.2,5.0,1.0,density)
     
    4747PROP(dy,1,1024,delta.y,f,-2,2,0,d.y)
    4848PROP(dz,1,1024,delta.z,f,-2,2,0,d.z)
    49 PROP(sh,2,0,shape,d,0,1,0,shape)
     49PROP(sh,1,0,shape,d,0,3,0,shape)
     50PROP(hx,1,0,hinge position.x,f,,,0,hinge_pos.x)
     51PROP(hy,1,1024,hinge position.y,f,,,0,hinge_pos.y)
     52PROP(hz,1,1024,hinge position.z,f,,,0,hinge_pos.z)
     53PROP(hrx,1,0,hinge rotation.x,f,,,0,hinge_rot.x)
     54PROP(hry,1,1024,hinge rotation.y,f,,,0,hinge_rot.y)
     55PROP(hrz,1,1024,hinge rotation.z,f,,,0,hinge_rot.z)
     56PROP(hxn,1,0,hinge x negative limit,f,-6.2832,0,-1.5708,hinge_limit_x[0])
     57PROP(hxp,1,1024,hinge x positive limit,f,0,6.2832,1.5708,hinge_limit_x[1])
     58PROP(hyn,1,0,hinge y negative limit,f,-6.2832,0,-1.5708,hinge_limit_y[0])
     59PROP(hyp,1,1024,hinge y positive limit,f,0,6.2832,1.5708,hinge_limit_y[1])
    5060XPROP(stif,2,0,stiffness,f,0.0,1.0,1.0,stif)
    5161XPROP(rotstif,2,0,rotation stiffness,f,0.0,1.0,1.0,rotstif)
     
    6575PROP(p1,0,1024,`part1 ref#',d,-1,999999,-1,p1_refno)
    6676PROP(p2,0,1024,`part2 ref#',d,-1,999999,-1,p2_refno)
    67 PROP(sh,2,0,shape,d,0,1,0,shape)
     77PROP(sh,1,0,shape,d,0,3,0,shape)
     78PROP(hx,1,0,hinge position.x,f,,,0,hinge_pos.x)
     79PROP(hy,1,1024,hinge position.y,f,,,0,hinge_pos.y)
     80PROP(hz,1,1024,hinge position.z,f,,,0,hinge_pos.z)
     81PROP(hrx,1,0,hinge rotation.x,f,,,0,hinge_rot.x)
     82PROP(hry,1,1024,hinge rotation.y,f,,,0,hinge_rot.y)
     83PROP(hrz,1,1024,hinge rotation.z,f,,,0,hinge_rot.z)
     84PROP(hxn,1,0,hinge x negative limit,f,-6.2832,0,-1.5708,hinge_limit_x[0])
     85PROP(hxp,1,1024,hinge x positive limit,f,0,6.2832,1.5708,hinge_limit_x[1])
     86PROP(hyn,1,0,hinge y negative limit,f,-6.2832,0,-1.5708,hinge_limit_y[0])
     87PROP(hyp,1,1024,hinge y positive limit,f,0,6.2832,1.5708,hinge_limit_y[1])
    6888XPROP(stif,2,0,stiffness,f,0.0,1.0,1.0,stif)
    6989XPROP(rotstif,2,0,rotation stiffness,f,0.0,1.0,1.0,rotstif)
  • cpp/frams/model/defassign-f0-SDK.h

    r732 r915  
    11// This file is a part of Framsticks SDK.  http://www.framsticks.com/
    2 // Copyright (C) 1999-2018  Maciej Komosinski and Szymon Ulatowski.
     2// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
    33// See LICENSE.txt for details.
    44
     
    6666d.z=0;
    6767shape=0;
     68hinge_pos.x=0;
     69hinge_pos.y=0;
     70hinge_pos.z=0;
     71hinge_rot.x=0;
     72hinge_rot.y=0;
     73hinge_rot.z=0;
     74hinge_limit_x[0]=-1.5708;
     75hinge_limit_x[1]=1.5708;
     76hinge_limit_y[0]=-1.5708;
     77hinge_limit_y[1]=1.5708;
    6878stif=1.0;
    6979rotstif=1.0;
  • cpp/frams/model/f0-SDK-classes.h

    r754 r915  
    7171ParamEntry f0_joint_paramtab[]=
    7272{
    73  {"Connections",4,17,"j" },
     73 {"Connections",4,27,"j" },
    7474 {"Geometry",},
    7575 {"Other properties",},
     
    8484 {"dz",1,1024,"delta.z","f -2 2 0",FIELD(d.z),},
    8585 {"sh",1,0,"shape","d 0 1 0",FIELD(shape),},
     86 {"hx",1,0,"hinge position.x","f",FIELD(hinge_pos.x),},
     87 {"hy",1,1024,"hinge position.y","f",FIELD(hinge_pos.y),},
     88 {"hz",1,1024,"hinge position.z","f",FIELD(hinge_pos.z),},
     89 {"hrx",1,0,"hinge rotation.x","f",FIELD(hinge_rot.x),},
     90 {"hry",1,1024,"hinge rotation.y","f",FIELD(hinge_rot.y),},
     91 {"hrz",1,1024,"hinge rotation.z","f",FIELD(hinge_rot.z),},
     92 {"hxn",1,0,"hinge x negative limit","f -6.2832 0 -1.5708",FIELD(hinge_limit_x[0]),},
     93 {"hxp",1,1024,"hinge x positive limit","f 0 6.2832 1.5708",FIELD(hinge_limit_x[1]),},
     94 {"hyn",1,0,"hinge y negative limit","f -6.2832 0 -1.5708",FIELD(hinge_limit_y[0]),},
     95 {"hyp",1,1024,"hinge y positive limit","f 0 6.2832 1.5708",FIELD(hinge_limit_y[1]),},
    8696 {"stif",2,0,"stiffness","f 0.0 1.0 1.0",FIELD(stif),},
    8797 {"rotstif",2,0,"rotation stiffness","f 0.0 1.0 1.0",FIELD(rotstif),},
     
    110120ParamEntry f0_nodeltajoint_paramtab[]=
    111121{
    112  {"Connections",4,11,"j" },
     122 {"Connections",4,21,"j" },
    113123 {"Geometry",},
    114124 {"Other properties",},
     
    117127 {"p2",0,1024,"part2 ref#","d -1 999999 -1",FIELD(p2_refno),},
    118128 {"sh",1,0,"shape","d 0 1 0",FIELD(shape),},
     129 {"hx",1,0,"hinge position.x","f",FIELD(hinge_pos.x),},
     130 {"hy",1,1024,"hinge position.y","f",FIELD(hinge_pos.y),},
     131 {"hz",1,1024,"hinge position.z","f",FIELD(hinge_pos.z),},
     132 {"hrx",1,0,"hinge rotation.x","f",FIELD(hinge_rot.x),},
     133 {"hry",1,1024,"hinge rotation.y","f",FIELD(hinge_rot.y),},
     134 {"hrz",1,1024,"hinge rotation.z","f",FIELD(hinge_rot.z),},
     135 {"hxn",1,0,"hinge x negative limit","f -6.2832 0 -1.5708",FIELD(hinge_limit_x[0]),},
     136 {"hxp",1,1024,"hinge x positive limit","f 0 6.2832 1.5708",FIELD(hinge_limit_x[1]),},
     137 {"hyn",1,0,"hinge y negative limit","f -6.2832 0 -1.5708",FIELD(hinge_limit_y[0]),},
     138 {"hyp",1,1024,"hinge y positive limit","f 0 6.2832 1.5708",FIELD(hinge_limit_y[1]),},
    119139 {"stif",2,0,"stiffness","f 0.0 1.0 1.0",FIELD(stif),},
    120140 {"rotstif",2,0,"rotation stiffness","f 0.0 1.0 1.0",FIELD(rotstif),},
  • cpp/frams/model/model.cpp

    r900 r915  
    5050        geno = mod.geno;
    5151        f0genoknown = 0;
     52        shape = mod.shape;
    5253        startenergy = mod.startenergy;
    5354        modelfromgenotype = mod.modelfromgenotype;
  • cpp/frams/model/modelparts.cpp

    r899 r915  
    642642        d = src.d;
    643643        shape = src.shape;
     644        hinge_pos = src.hinge_pos;
     645        hinge_rot = src.hinge_rot;
    644646        stamina = src.stamina;
    645647        stif = src.stif; rotstif = src.rotstif;
  • cpp/frams/model/modelparts.h

    r899 r915  
    124124        class Pt3D d;           ///< position delta between parts
    125125        class Pt3D rot; ///< orientation delta between parts expressed as 3 angles
    126         enum Shape { SHAPE_BALL_AND_STICK = 0, SHAPE_FIXED = 1 };
    127         paInt shape;///< ball-and-stick=old Framsticks compatible, creates a physical rod between parts (cylinder or cuboid), do not mix with shape>0,  fixed=merge parts into one physical entity
     126        enum Shape { SHAPE_BALL_AND_STICK = 0, ///<  old Framsticks compatible, creates a physical rod between parts (cylinder or cuboid), do not mix with part.shape>0
     127                     SHAPE_FIXED = 1, ///< merge parts into one physical entity
     128                     SHAPE_HINGE_X = 2, ///< hinge connection, revolving around X axis defined by hinge_pos and hinge_rot
     129                     SHAPE_HINGE_XY = 3 }; ///< double hinge connection, revolving around X and Y axes defined by hinge_pos and hinge_rot
     130        paInt shape;///< values of type Shape (paInt for integration with Param)
     131        class Pt3D hinge_pos; ///< hinge position (relative to part1) for HINGE_X and HINGE_XY
     132        class Pt3D hinge_rot; ///< hinge orientation (relative to part1) for HINGE_X and HINGE_XY
     133        double hinge_limit_x[2], hinge_limit_y[2]; ///< hinge movement range - i.e., extreme allowed values of a state. A state can be an angle or other physical property. limit[0] <= 0 <= limit[1]. Relative Part position and orientation as set in the Model define the initial state 0.
    128134
    129135        Joint();
Note: See TracChangeset for help on using the changeset viewer.