Skip to content

Commit

Permalink
Added material to th wrong branch
Browse files Browse the repository at this point in the history
  • Loading branch information
hiemstar committed Feb 15, 2019
1 parent 9cfd389 commit fac69f2
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 524 deletions.
16 changes: 4 additions & 12 deletions src/matlab/LRNURBSSurface.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@
% contourf - Plot a contour mesh of a given scalar field
% plot - Plot the mesh structure
% print - Prints raw c++ lr data structure
<<<<<<< HEAD
% tikz - Output vector graphics tikz figure
=======
>>>>>>> parent of 7f55efc... Added functionality to output lrspline to a vector graphics tikz figure.
% save - Saves the backend c++ lr data to file
% load - Loads the backend c++ lr data from file

Expand Down Expand Up @@ -115,19 +118,8 @@ function delete(this)
newHandle = lrsplinesurface_interface('copy', this.objectHandle);
copyObject = LRNURBSSurface();
copyObject.setHandle(newHandle)
end

function tikz(this, filename)
% export_to_tikz saves the LR-spline object to to a tex-tikz file
%
% parameters:
% filename - the name of the file
if ~strcmp(class(filename), 'char')
throw(MException('LRSplineSurface:export_to_tikz', 'Error: Invalid file name'));
end
lrsplinesurface_tikz(this, filename);
end

function save(this, filename)
% SAVE Dumps the backend c++ representation of this LR-spline object to file
% LRNURBSSurface.save(filename)
Expand Down
14 changes: 3 additions & 11 deletions src/matlab/LRSplineSurface.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@
% contourf - Plot a contour mesh of a given scalar field
% plot - Plot the mesh structure
% print - Prints raw c++ lr data structure
<<<<<<< HEAD
% tikz - Output vector graphics tikz figure
=======
>>>>>>> parent of 7f55efc... Added functionality to output lrspline to a vector graphics tikz figure.
% save - Saves the backend c++ lr data to file
% load - Load the backend c++ lr data from file
% loadG2 - Load the backend c++ lr data from file
Expand Down Expand Up @@ -123,17 +126,6 @@ function delete(this)
newHandle = lrsplinesurface_interface('copy', this.objectHandle);
copyObject = LRSplineSurface();
copyObject.setHandle(newHandle);
end

function tikz(this, filename)
% export_to_tikz saves the LR-spline object to to a tex-tikz file
%
% parameters:
% filename - the name of the file
if ~strcmp(class(filename), 'char')
throw(MException('LRSplineSurface:export_to_tikz', 'Error: Invalid file name'));
end
lrsplinesurface_tikz(this, filename);
end

function save(this, filename)
Expand Down
38 changes: 13 additions & 25 deletions src/matlab/lrgui.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,35 @@
% Create and then hide the GUI as it is being constructed.
f = figure('Visible','off','Position',[360,500,450,325]);

% Construct the components.
% Construct the components.
hnew = uicontrol('Style','pushbutton','String','New',...
'Position',[315,250,70,20],...
'Position',[315,240,70,25],...
'Callback',@newbutton_Callback);
hrefine = uicontrol('Style','pushbutton',...
'String','Refine',...
'Position',[315,220,70,20],...
'Callback',@refinebutton_Callback);
hraise = uicontrol('Style','pushbutton',...
'String','Raise Order',...
'Position',[315,190,70,20],...
'Callback',@raisebutton_Callback);
'Position',[315,200,70,25],...
'Callback',@refinebutton_Callback);
hload = uicontrol('Style','pushbutton','String','Load',...
'Position',[315,160,70,20],...
'Position',[315,160,70,25],...
'Callback',@loadbutton_Callback);
hsave = uicontrol('Style','pushbutton','String','Save',...
'Position',[315,130,70,20],...
'Position',[315,120,70,25],...
'Callback',@savebutton_Callback);
htikz = uicontrol('Style','pushbutton','String','Tikz',...
'Position',[315,100,70,20],...
'Callback',@tikzbutton_Callback);
htext = uicontrol('Style','text','String','Refinement strategy',...
'Position',[300,40,80,35]);
'Position',[300,60,80,35]);
hpopup = uicontrol('Style','popupmenu',...
'String',{'Elements','Functions'},...
'Position',[300,30,100,25],...
'Callback',@popup_menu_Callback);
<<<<<<< HEAD
ha = axes('Units','Pixels','Position',[50,60,200,185]);
align([hnew,hrefine,hraise,hload,hsave,htikz,htext,hpopup],'Center','None');

=======
ha = axes('Units','Pixels','Position',[50,60,200,185]);
align([hnew,hrefine,hload,hsave,htext,hpopup],'Center','None');

>>>>>>> parent of 7f55efc... Added functionality to output lrspline to a vector graphics tikz figure.
% Create the data to plot.
current_mesh = LRSplineSurface([3,3], [10,10]);

Expand All @@ -48,7 +47,6 @@
ha.Units = 'normalized';
hnew.Units = 'normalized';
hload.Units = 'normalized';
htikz.Units = 'normalized';
hsave.Units = 'normalized';
hrefine.Units = 'normalized';
hraise.Units = 'normalized';
Expand Down Expand Up @@ -140,14 +138,6 @@ function savebutton_Callback(source,eventdata)
end
end

function tikzbutton_Callback(source,eventdata)
% Display mesh plot of the currently selected data.
[file path] = uiputfile('out.tex');
if file ~= 0
current_mesh.tikz([path,file]);
end
end

% Keyboard callbacks (hotkeys)
function keypress(src, e)
switch e.Key
Expand All @@ -165,8 +155,6 @@ function keypress(src, e)
loadbutton_Callback(src, e);
case 's'
savebutton_Callback(src, e);
case 't'
tikzbutton_Callback(src, e);
case 'n'
newbutton_Callback(src, e);
end
Expand Down
Loading

0 comments on commit fac69f2

Please sign in to comment.