Subversion Repositories gelsvn

Rev

Rev 647 | Rev 656 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 647 Rev 650
Line 138... Line 138...
138
                return;
138
                return;
139
            }
139
            }
140
            me->align(src,dest);
140
            me->align(src,dest);
141
        }
141
        }
142
        
142
        
143
        //    void console_polarize(MeshEditor* me, const std::vector<std::string> & args)
-
 
144
        //    {
-
 
145
        //        if(wantshelp(args)) {
-
 
146
        //            me->printf("usage: polarize");
-
 
147
        //            return;
-
 
148
        //        }
-
 
149
        //        int divisions = 50;
-
 
150
        //
-
 
151
        //        if(args.size() > 0){
-
 
152
        //            istringstream a0(args[0]);
-
 
153
        //            a0 >> divisions;
-
 
154
        //        }
-
 
155
        //
-
 
156
        //        double t=1;
-
 
157
        //
-
 
158
        //        if(args.size() > 1){
-
 
159
        //            istringstream a0(args[1]);
-
 
160
        //            a0 >> t;
-
 
161
        //        }
-
 
162
        //
-
 
163
        //        me->save_active_mesh();
-
 
164
        //
-
 
165
        //        double vmin, vmax;
-
 
166
        //        VertexAttributeVector<double> fun;
-
 
167
        //        VertexAttributeVector<Vec2d> par;
-
 
168
        //        make_adf_fun(me->active_mesh(), t, fun, vmin, vmax);
-
 
169
        //        //    polarize_mesh_new(me->active_mesh(), fun, vmin, vmax, divisions, par);
-
 
170
        //        polarize_mesh(me->active_mesh(), fun, vmin, vmax, divisions, par);
-
 
171
        //    }
-
 
172
        
-
 
173
        //    void console_simplify_polar(MeshEditor* me, const std::vector<std::string> & args)
-
 
174
        //    {
-
 
175
        //        if(wantshelp(args)) {
-
 
176
        //            me->printf("usage: simplify.polar <frac>");
-
 
177
        //            return;
-
 
178
        //        }
-
 
179
        //        double frac = 0.9;
-
 
180
        //        if(args.size() > 0){
-
 
181
        //            istringstream a0(args[0]);
-
 
182
        //            a0 >> frac;
-
 
183
        //        }
-
 
184
        //
-
 
185
        //        int iter=1;
-
 
186
        //        if(args.size() > 1){
-
 
187
        //            istringstream a0(args[1]);
-
 
188
        //            a0 >> iter;
-
 
189
        //        }
-
 
190
        //
-
 
191
        //
-
 
192
        //        me->save_active_mesh();
-
 
193
        //
-
 
194
        //        simplify_polar_mesh(me->active_mesh(), frac, iter);
-
 
195
        //    }
-
 
196
        
-
 
197
        //    void console_polar_segment(MeshEditor* me, const std::vector<std::string> & args)
-
 
198
        //    {
-
 
199
        //        if(wantshelp(args)) {
-
 
200
        //            me->printf("usage: polar.segment");
-
 
201
        //            return;
-
 
202
        //        }
-
 
203
        //        int segments = 1;
-
 
204
        //        if(args.size() > 0){
-
 
205
        //            istringstream a0(args[0]);
-
 
206
        //            a0 >> segments;
-
 
207
        //        }
-
 
208
        //        polar_segment(me->active_mesh(), segments);
-
 
209
        //    }
-
 
210
        
-
 
211
        //    void console_polar_skeleton(MeshEditor* me, const std::vector<std::string> & args)
-
 
212
        //    {
-
 
213
        //        if(wantshelp(args)) {
-
 
214
        //            me->printf("usage: polar.skeleton <frac>");
-
 
215
        //            return;
-
 
216
        //        }
-
 
217
        //        double frac = 0.9;
-
 
218
        //        if(args.size() > 0){
-
 
219
        //            istringstream a0(args[0]);
-
 
220
        //            a0 >> frac;
-
 
221
        //        }
-
 
222
        //        me->save_active_mesh();
-
 
223
        //        skeleton_retract(me->active_mesh(), frac);
-
 
224
        //    }
-
 
225
        
-
 
226
        //    void console_polar_subdivide(MeshEditor* me, const std::vector<std::string> & args)
-
 
227
        //    {
-
 
228
        //        if(wantshelp(args)) {
-
 
229
        //            me->printf("usage: polar.subdivide <iter>");
-
 
230
        //            return;
-
 
231
        //        }
-
 
232
        //        int iter=1;
-
 
233
        //        if(args.size() > 0){
-
 
234
        //            istringstream a0(args[0]);
-
 
235
        //            a0 >> iter;
-
 
236
        //        }
-
 
237
        //        me->save_active_mesh();
-
 
238
        //        polar_subdivide (me->active_mesh(), iter);
-
 
239
        //    }
-
 
240
        
143
        
241
        
144
        
242
        
145
        
243
        void console_ridge_lines(MeshEditor* me, const std::vector<std::string> & args)
146
        void console_ridge_lines(MeshEditor* me, const std::vector<std::string> & args)
244
        {
147
        {
Line 1252... Line 1155...
1252
        }
1155
        }
1253
        
1156
        
1254
        
1157
        
1255
    }
1158
    }
1256
    
1159
    
1257
    VisObj& MeshEditor::active_visobj() {
-
 
1258
        return vo[active];
-
 
1259
    }
-
 
1260
    
-
 
1261
    Manifold& MeshEditor::active_mesh() {
-
 
1262
        return active_visobj().mesh();
-
 
1263
    }
-
 
1264
 
-
 
1265
    GLViewController& MeshEditor::active_view_control() {
-
 
1266
        return active_visobj().view_control();
-
 
1267
    }
-
 
1268
    
1160
    
1269
    void MeshEditor::register_console_function(const std::string& name,
1161
    void MeshEditor::register_console_function(const std::string& name,
1270
                                               const std::function<void(MeshEditor*, const std::vector<std::string>&)>& con_fun,
1162
                                               const std::function<void(MeshEditor*, const std::vector<std::string>&)>& con_fun,
1271
                                               const std::string& help_txt)
1163
                                               const std::string& help_txt)
1272
    {
1164
    {