Comments (4)
hi @praveenvenky, it would be a lot easier for me to understand the problem if you can attach some sample images or script/data.
generally speaking, after meshcheckrepair, you will unlikely to get the same number of nodes/element because the repairing is performed independently on both the top/bottom surfaces.
from iso2mesh.
hi @fangq , please see the below script
My problem is to get the bottom part with same number of nodes and elements as Top part.
But without using meshcheckrepair i cannot get the result to s2m.
Also, if I use meshcheckrepair, it gives different number of elements as you said.
Is there a possibility for me to get same number of elements?
%%
load('elements_TP.mat'); % elements of top part
load('nodes_TP.mat') % nodes of TP
%% Extract all the triangular faces of top part.
[openface,elemid]=volface(elements_TP(:,2:5));
openface(:,4) = elemid;
node=nodes_TP(:,2:4)
% surfExt_Top(openface, node)
%% Extracting the neg-Z surface of the top part
% here I have used normals to take only the bottom elements and nodes of TP.
% then I have to extrude it dowwnwards to get the bottom part.
t=4.5;
extrude_vector=[0 0 -t];
keepratio= 1;
maxvol=15;
ISO2MESH_TETGENOPT='-A -q1.1a'
[Neg_zface,node,Neg_z_node_numbers,Neg_z_node_coords] = negZ_top(openface, nodes_TP(:,2:4));% node_coords=nodes_TP(:,2:4)
difference= Neg_z_node_numbers-find(Neg_z_node_numbers)
triangularelements=Neg_zface;
% these below 5 lines are just to get uniform numbering of node and not to bother much abt it
for i=1:length(Neg_zface)
triangularelements(i,1)=Neg_zface(i,1) - difference(Neg_z_node_numbers(:,1)==Neg_zface(i,1));
triangularelements(i,2)=Neg_zface(i,2) - difference(Neg_z_node_numbers(:,1)==Neg_zface(i,2));
triangularelements(i,3)=Neg_zface(i,3) - difference(Neg_z_node_numbers(:,1)==Neg_zface(i,3));
end
plotmesh(Neg_z_node_coords,triangularelements)
%% Giving offset value as a parametric value(for cohesive layer)
offset= 0.3;
Neg_z_node_coords(:,3)=Neg_z_node_coords(:,3)-offset;
%%
[extrude_node,extrude_face] = extrudesurf(Neg_z_node_coords,triangularelements,extrude_vector);
[extrude_node,extrude_elem]=meshcheckrepair(extrude_node,extrude_face,'meshfix');
plotmesh(extrude_node,extrude_elem)
[bottom_part_nodes,bottom_part_elem,bottom_part_faces] = s2m(extrude_node,extrude_elem,keepratio,maxvol);
plotmesh(bottom_part_nodes,bottom_part_elem)
node=bottom_part_nodes;
elem=bottom_part_elem;
from iso2mesh.
@praveenvenky, unfortunately meshcheckrepair
(more specifically, meshfix) does not have the capability to correlate two surface patches.
the only way to do this is perhaps recreating the bottom (or top part) from the other part by projecting one to another (or projecting to a plane). It is going to be complicated.
from iso2mesh.
from iso2mesh.
Related Issues (20)
- Recompile for Apple M1 Macs HOT 1
- smoothsurf works incorrectly HOT 1
- The work of the meshing algorithm is ustable for big meshes HOT 3
- Submodule tools/meshfix points to non existent commit
- Issue when Installing Iso2mesh in cluster (remote computation resources) HOT 1
- Warning about shadowed core library HOT 3
- Merge tetra mesh with multiple elemID within enclosed surface HOT 2
- Iso2mesh ERROR using cgalv2m HOT 5
- cgalv2m does not create flat boundaries HOT 3
- cgalsimp2 command failed HOT 3
- Compiling issue HOT 1
- problem in installing and running iso2mesh in MATLAB HOT 1
- jmeshlib command failed: ERROR- Can't open file. HOT 1
- saveinr() not working for single (float) volumes
- Using qmeshcut to compute an isosurface from an arbitrary grid of points HOT 10
- Binaries for M1/M2 Mac? HOT 3
- Fail to clone submodules. HOT 2
- Compile iso2mesh for ARM Mac HOT 12
- Iso2Mesh Coordinate system origin
- Error using surf2mesh - Error using fscanf Invalid file identifier. Use fopen to generate a valid file identifier.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iso2mesh.