Commit 2ea5150a authored by Anthony Royer's avatar Anthony Royer

Merge branch 'master' into ghostCells

parents 6e2c2be3 768b336a
Pipeline #1057 passed with stage
in 22 minutes 10 seconds
......@@ -25,9 +25,9 @@ stero mode), Ashish Negi (Netgen CAD healing), Trevor Strickler
Benjamin Ruard (Java wrappers), Maxime Graulich (iOS/Android port), Francois
Henrotte (onelab metamodels), Sebastian Eiser (PGF output), Alexis Salzman
(compressed IO), Hang Si (TetGen/BR boundary recovery code), Fernando Lorenzo
(Tochnog support), Anthony Royer (new partitioning code, MSH4 format). See
comments in the sources for more information. If we forgot to list your
contributions please send us an email!
(Tochnog support), Larry Price (Gambit export), Anthony Royer (new partitioning
code, MSH4 format). See comments in the sources for more information. If we
forgot to list your contributions please send us an email!
The TetGen/BR code (Mesh/tetgenBR.{cpp,h}) is copyright (c) 2016 Hang Si,
Weierstrass Institute for Applied Analysis and Stochatics.
......@@ -156,4 +156,4 @@ Hackbarth, Peter Wainwright, Jiri Hnidek, Thierry Thomas, Konstantinos Poulios,
Laurent Van Miegroet, Shahrokh Ghavamian, Geordie McBain, Jose Paulo Moitinho de
Almeida, Guillaume Demesy, Wendy Merks-Swolfs, Cosmin Stefan Deaconu, Nigel
Nunn, Serban Georgescu, Julien Troufflard, Michele Mocciola, Matthijs Sypkens
Smit, Sauli Ruuska, Larry Price.
Smit, Sauli Ruuska.
......@@ -82,7 +82,8 @@ std::vector<std::pair<std::string, std::string> > GetUsage()
s.push_back(mp("-part_weight tri|quad|tet|hex|pri|pyr|trih int",
"Weight of a triangle/quad/etc. during partitioning"));
s.push_back(mp("-part_split", "Save mesh partitions in separate files"));
s.push_back(mp("-part_topo", "Save the partition topology .pro file"));
s.push_back(mp("-part_[no]topo", "Create the partition topology"));
s.push_back(mp("-part_topo_pro", "Save the partition topology .pro file"));
s.push_back(mp("-save_all", "Save all elements (discard physical group definitions)"));
s.push_back(mp("-save_parametric", "Save vertices with their parametric coordinates"));
s.push_back(mp("-save_topology", "Save model topology"));
......@@ -448,11 +449,19 @@ void GetOptions(int argc, char *argv[], bool readConfigFiles)
opt_mesh_partition_split_mesh_files(0, GMSH_SET, 1.);
i++;
}
else if(!strcmp(argv[i] + 1, "part_topo") ||
else if(!strcmp(argv[i] + 1, "part_topo_pro") ||
!strcmp(argv[i] + 1, "savePartTopology")){
opt_mesh_partition_save_topology_file(0, GMSH_SET, 1.);
i++;
}
else if(!strcmp(argv[i] + 1, "part_topo")){
opt_mesh_partition_create_topology(0, GMSH_SET, 1.);
i++;
}
else if(!strcmp(argv[i] + 1, "part_notopo")){
opt_mesh_partition_create_topology(0, GMSH_SET, 0.);
i++;
}
else if(!strcmp(argv[i] + 1, "new")) {
CTX::instance()->files.push_back("-new");
i++;
......
......@@ -40,6 +40,7 @@ int GetFileFormatFromExtension(const std::string &ext)
else if(ext == ".opt") return FORMAT_OPT;
else if(ext == ".unv") return FORMAT_UNV;
else if(ext == ".vtk") return FORMAT_VTK;
else if(ext == ".m") return FORMAT_MATLAB;
else if(ext == ".dat") return FORMAT_TOCHNOG;
else if(ext == ".txt") return FORMAT_TXT;
else if(ext == ".stl") return FORMAT_STL;
......@@ -102,6 +103,7 @@ std::string GetDefaultFileName(int format)
case FORMAT_OPT: name += ".opt"; break;
case FORMAT_UNV: name += ".unv"; break;
case FORMAT_VTK: name += ".vtk"; break;
case FORMAT_MATLAB: name += ".m"; break;
case FORMAT_TOCHNOG: name += ".dat"; break;
case FORMAT_STL: name += ".stl"; break;
case FORMAT_CGNS: name += ".cgns"; break;
......@@ -317,6 +319,12 @@ void CreateOutputFile(const std::string &fileName, int format,
CTX::instance()->bigEndian);
break;
case FORMAT_MATLAB:
GModel::current()->writeMATLAB
(name, CTX::instance()->mesh.binary, CTX::instance()->mesh.saveAll,
CTX::instance()->mesh.scalingFactor);
break;
case FORMAT_MESH:
GModel::current()->writeMESH
(name, CTX::instance()->mesh.saveElementTagType,
......
......@@ -56,6 +56,7 @@
#define FORMAT_TOCHNOG 47
#define FORMAT_TIKZ 48
#define FORMAT_NEU 49
#define FORMAT_MATLAB 50
// Element types
#define TYPE_PNT 1
......
......@@ -279,7 +279,6 @@ int GmshBatch()
MergeFile(CTX::instance()->files[i]);
}
#if defined(HAVE_POST) && defined(HAVE_MESH)
if(!CTX::instance()->bgmFileName.empty()) {
MergePostProcessingFile(CTX::instance()->bgmFileName);
......@@ -317,13 +316,12 @@ int GmshBatch()
RefineMesh(GModel::current(), CTX::instance()->mesh.secondOrderLinear);
else if(CTX::instance()->batch == 6)
GModel::current()->classifyAllFaces();
#if defined(HAVE_METIS)
if(CTX::instance()->batchAfterMesh == 1){
if (CTX::instance()->mesh.numPartitions > 1)
GModel::current()->partitionMesh(CTX::instance()->mesh.numPartitions);
}
#endif
#endif
}
if(CTX::instance()->batch > 0 || CTX::instance()->batchAfterMesh == 1){
if(CTX::instance()->mesh.numPartitions > 1)
GModel::current()->partitionMesh(CTX::instance()->mesh.numPartitions);
std::string name = CTX::instance()->outputFileName;
if(name.empty()){
if(CTX::instance()->mesh.fileFormat == FORMAT_AUTO)
......
......@@ -305,6 +305,8 @@ static int _save_mesh(const char *name){ return genericMeshFileDialog
(name, "MESH Options", FORMAT_MESH, false, true); }
static int _save_mail(const char *name){ return genericMeshFileDialog
(name, "MAIL Options", FORMAT_MAIL, false, false); }
static int _save_matlab(const char *name){ return genericMeshFileDialog
(name, "MATLAB Options", FORMAT_MATLAB, false, false); }
static int _save_bdf(const char *name){ return bdfFileDialog(name); }
static int _save_p3d(const char *name){ return genericMeshFileDialog
(name, "P3D Options", FORMAT_P3D, false, false); }
......@@ -372,6 +374,7 @@ static int _save_auto(const char *name)
case FORMAT_RMED : return _save_view_med(name);
case FORMAT_MESH : return _save_mesh(name);
case FORMAT_MAIL : return _save_mail(name);
case FORMAT_MATLAB : return _save_matlab(name);
case FORMAT_BDF : return _save_bdf(name);
case FORMAT_DIFF : return _save_diff(name);
case FORMAT_INP : return _save_inp(name);
......@@ -431,6 +434,7 @@ static void file_export_cb(Fl_Widget *w, void *data)
#endif
{"Mesh - INRIA Medit" TT "*.mesh", _save_mesh},
{"Mesh - CEA Triangulation" TT "*.mail", _save_mail},
{"Mesh - Matlab" TT "*.m", _save_matlab},
{"Mesh - Nastran Bulk Data File" TT "*.bdf", _save_bdf},
{"Mesh - Plot3D Structured Mesh" TT "*.p3d", _save_p3d},
{"Mesh - STL Surface" TT "*.stl", _save_stl},
......
......@@ -27,7 +27,7 @@ set(SRC
GModelIO_UNV.cpp GModelIO_BDF.cpp GModelIO_IR3.cpp GModelIO_DIFF.cpp
GModelIO_GEOM.cpp GModelIO_INP.cpp GModelIO_MAIL.cpp GModelIO_P3D.cpp
GModelIO_CELUM.cpp GModelIO_NEU.cpp GModelIO_ACTRAN.cpp GModelIO_SU2.cpp
GModelIO_SAMCEF.cpp GModelIO_POS.cpp
GModelIO_SAMCEF.cpp GModelIO_MATLAB.cpp GModelIO_POS.cpp
ExtrudeParams.cpp
Geo.cpp
GeoStringInterface.cpp GeoInterpolation.cpp
......
......@@ -677,6 +677,11 @@ class GModel {
bool saveAll=false, double scalingFactor=1.0,
bool bigEndian=false);
//Matlab format
int writeMATLAB(const std::string &name, bool binary=false,
bool saveAll=false, double scalingFactor=1.0);
// Tochnog format
int writeTOCHNOG(const std::string &name, bool saveGroupsOfNodes=false,
bool saveAll=false, double scalingFactor=1.0);
......
// Gmsh - Copyright (C) 1997-2017 C. Geuzaine, J.-F. Remacle
//
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to the public mailing list <gmsh@onelab.info>.
#include "GModel.h"
#include "OS.h"
#include "MPoint.h"
#include "MLine.h"
#include "MTriangle.h"
#include "MQuadrangle.h"
#include "MTetrahedron.h"
#include "MHexahedron.h"
#include "MPrism.h"
#include "MPyramid.h"
#include "StringUtils.h"
int GModel::writeMATLAB(const std::string &name, bool binary, bool saveAll, double scalingFactor)
{
if(binary)
{
Msg::Warning("Binary format not available for Matlab, saving into ASCII format");
binary = false;
//TODO !
}
FILE *fp = Fopen(name.c_str(), binary ? "wb":"w");
if(!fp){
Msg::Error("Unable to open file '%s'", name.c_str());
return 0;
}
if(noPhysicalGroups()) saveAll = true;
// get the number of vertices and index the vertices in a continuous
// sequence
int numVertices = indexMeshVertices(saveAll);
fprintf(fp, "\%\% Matlab mesh\n");
fprintf(fp, "\%\% %s, Created by Gmsh\n", getName().c_str());
if(binary)
fprintf(fp, "\%\% BINARY\n");
else
fprintf(fp, "\%\% ASCII\n");
// get all the entities in the model
std::vector<GEntity*> entities;
getEntities(entities);
// write mesh vertices
fprintf(fp, "gVertices = %d;\n", numVertices);
fprintf(fp, "gX = zeros(gVertices,1);\n", numVertices);
fprintf(fp, "gY = zeros(gVertices,1);\n", numVertices);
fprintf(fp, "gZ = zeros(gVertices,1);\n", numVertices);
int cpt = 0;
for(unsigned int i = 0; i < entities.size(); i++)
for(unsigned int j = 0; j < entities[i]->mesh_vertices.size(); j++)
{
cpt ++;
entities[i]->mesh_vertices[j]->writeMATLAB(fp, cpt, scalingFactor);
}
fprintf(fp, "\n");
// loop over all elements we need to save and count vertices
int numElements = 0, totalNumInt = 0;
for(unsigned int i = 0; i < entities.size(); i++){
if(entities[i]->physicals.size() || saveAll){
for(unsigned int j = 0; j < entities[i]->getNumMeshElements(); j++){
if(entities[i]->getMeshElement(j)->getTypeForMATLAB()){
numElements++;
totalNumInt += entities[i]->getMeshElement(j)->getNumVertices() + 1;
}
}
}
}
// print vertex indices in ascii or binary
fprintf(fp, "\%\%\n");
fprintf(fp, "nTri=%d;\n", numElements);
fprintf(fp, "gTri=[\n");
for(unsigned int i = 0; i < entities.size(); i++){
if(entities[i]->physicals.size() || saveAll){
for(unsigned int j = 0; j < entities[i]->getNumMeshElements(); j++){
if(entities[i]->getMeshElement(j)->getTypeForMATLAB())
entities[i]->getMeshElement(j)->writeMATLAB(fp, binary);
}
}
}
fprintf(fp, "];\n");
fclose(fp);
return 1;
}
......@@ -2,6 +2,8 @@
//
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to the public mailing list <gmsh@onelab.info>.
//
// Contributed by Larry Price
#include <time.h>
#include <algorithm>
......@@ -18,9 +20,9 @@
namespace
{
static const unsigned GAMBIT_TYPE_EDGE = 1;
static const unsigned GAMBIT_TYPE_QUAD = 2;
static const unsigned GAMBIT_TYPE_TRI = 3;
//static const unsigned GAMBIT_TYPE_EDGE = 1;
//static const unsigned GAMBIT_TYPE_QUAD = 2;
//static const unsigned GAMBIT_TYPE_TRI = 3;
static const unsigned GAMBIT_TYPE_TET = 6;
// This struct allows us to take advantage of C++11 unordered_map while
......
......@@ -1329,6 +1329,22 @@ void MElement::writeVTK(FILE *fp, bool binary, bool bigEndian)
}
}
void MElement::writeMATLAB(FILE *fp, bool binary)
{
if(!getTypeForMATLAB()) return;
if(binary)
{
Msg::Warning("Binary format not available for Matlab, saving into ASCII format");
binary = false;
}
int n = getNumVertices();
for(int i = 0; i < n; i++)
fprintf(fp, " %d", getVertexMATLAB(i)->getIndex());
fprintf(fp, ";\n");
}
void MElement::writeUNV(FILE *fp, int num, int elementary, int physical)
{
int type = getTypeForUNV();
......
......@@ -111,6 +111,9 @@ class MElement
// get the vertex using the VTK ordering
virtual MVertex *getVertexVTK(int num){ return getVertex(num); }
// get the vertex using the MATLAB ordering
virtual MVertex *getVertexMATLAB(int num){ return getVertex(num); }
// get the vertex using the Tochnog ordering
virtual MVertex *getVertexTOCHNOG(int num){ return getVertex(num); }
......@@ -388,6 +391,7 @@ class MElement
virtual void writePLY2(FILE *fp);
virtual void writeUNV(FILE *fp, int num=0, int elementary=1, int physical=1);
virtual void writeVTK(FILE *fp, bool binary=false, bool bigEndian=false);
virtual void writeMATLAB(FILE *fp, bool binary=false);
virtual void writeTOCHNOG(FILE *fp, int num);
virtual void writeMESH(FILE *fp, int elementTagType=1, int elementary=1,
int physical=0);
......@@ -406,6 +410,7 @@ class MElement
virtual int getTypeForMSH() const { return 0; }
virtual int getTypeForUNV() const { return 0; }
virtual int getTypeForVTK() const { return 0; }
virtual int getTypeForMATLAB() const { return 0; }
virtual const char *getStringForTOCHNOG() const { return 0; }
virtual const char *getStringForPOS() const { return 0; }
virtual const char *getStringForBDF() const { return 0; }
......
......@@ -112,6 +112,7 @@ class MTriangle : public MElement {
virtual int getTypeForMSH() const { return MSH_TRI_3; }
virtual int getTypeForUNV() const { return 91; } // thin shell linear triangle
virtual int getTypeForVTK() const { return 5; }
virtual int getTypeForMATLAB() const { return 1; }
virtual const char *getStringForPOS() const { return "ST"; }
virtual const char *getStringForBDF() const { return "CTRIA3"; }
virtual const char *getStringForDIFF() const { return "ElmT3n2D"; }
......
......@@ -294,6 +294,15 @@ void MVertex::writeVTK(FILE *fp, bool binary, double scalingFactor, bool bigEndi
}
}
void MVertex::writeMATLAB(FILE *fp, int i, bool binary, double scalingFactor)
{
if(_index < 0) return; // negative index vertices are never saved
fprintf(fp, "gX(%d) = %.16g;\n", i, x() * scalingFactor);
fprintf(fp, "gY(%d) = %.16g;\n", i, y() * scalingFactor);
fprintf(fp, "gZ(%d) = %.16g;\n", i, z() * scalingFactor);
}
void MVertex::writeTOCHNOG(FILE *fp, int dim, double scalingFactor)
{
if(_index < 0) return; // negative index vertices are never saved
......
......@@ -101,6 +101,7 @@ class MVertex{
void writeUNV(FILE *fp, double scalingFactor=1.0);
void writeVTK(FILE *fp, bool binary=false, double scalingFactor=1.0,
bool bigEndian=false);
void writeMATLAB(FILE *fp, int index, bool binary=false, double scalingFactor=1.0);
void writeTOCHNOG(FILE *fp, int dim, double scalingFactor=1.0);
void writeMESH(FILE *fp, double scalingFactor=1.0);
void writeNEU(FILE *fp, int dim, double scalingFactor=1.0);
......
......@@ -1050,6 +1050,10 @@ static void CreateNewEntities(GModel *const model,
(*it)->points.clear();
}
// If we don't create the partition topology let's just assume that the user
// does not care about multi-connected partitions or partition boundaries.
if(!CTX::instance()->mesh.partitionCreateTopology) return;
// Divide the non connected entities
regions = model->getRegions();
faces = model->getFaces();
......@@ -1284,19 +1288,6 @@ static void CreateNewEntities(GModel *const model,
}
template <class ITERATOR>
static void fillit_(hashmapface &faceToElement,
const std::vector<unsigned int> &partitions,
ITERATOR it_beg, ITERATOR it_end)
{
for (ITERATOR it = it_beg; it != it_end ; ++it){
for(int i = 0; i < (*it)->getNumFaces(); i++){
faceToElement[(*it)->getFace(i)].push_back
(std::pair<MElement*, std::vector<unsigned int> >(*it, partitions));
}
}
}
template <class ITERATOR>
static void fillit_(hashmapedge &edgeToElement,
const std::vector<unsigned int> &partitions,
ITERATOR it_beg, ITERATOR it_end)
......@@ -1662,19 +1653,12 @@ static void CreatePartitionBoundaries(GModel *const model,
if (meshDim >= 3){ // Create partition faces
Msg::Info(" - Creating partition faces");
for(GModel::const_riter it = model->firstRegion(); it != model->lastRegion(); ++it){
if((*it)->geomType() == GEntity::PartitionVolume){
// FIXME: this is slow
fillit_(faceToElement, static_cast<partitionRegion*>(*it)->getPartitions(),
(*it)->tetrahedra.begin(), (*it)->tetrahedra.end());
fillit_(faceToElement, static_cast<partitionRegion*>(*it)->getPartitions(),
(*it)->hexahedra.begin(), (*it)->hexahedra.end());
fillit_(faceToElement, static_cast<partitionRegion*>(*it)->getPartitions(),
(*it)->prisms.begin(), (*it)->prisms.end());
fillit_(faceToElement, static_cast<partitionRegion*>(*it)->getPartitions(),
(*it)->pyramids.begin(), (*it)->pyramids.end());
fillit_(faceToElement, static_cast<partitionRegion*>(*it)->getPartitions(),
(*it)->trihedra.begin(), (*it)->trihedra.end());
for(unsigned int i = 0; i < boundaryElements.size(); i++){
for(std::set<MElement*>::iterator it = boundaryElements[i].begin(); it != boundaryElements[i].end(); ++it){
for(int j = 0; j < (*it)->getNumFaces(); j++){
faceToElement[(*it)->getFace(j)].push_back
(std::pair<MElement*, std::vector<unsigned int> >(*it, std::vector<unsigned int>(1,i)));
}
}
}
......@@ -1761,12 +1745,26 @@ static void CreatePartitionBoundaries(GModel *const model,
if (meshDim >= 2){ // Create partition edges
Msg::Info(" - Creating partition edges");
for(GModel::const_fiter it = model->firstFace(); it != model->lastFace(); ++it){
if((*it)->geomType() == GEntity::PartitionSurface){
fillit_(edgeToElement, static_cast<partitionFace*>(*it)->getPartitions(),
(*it)->triangles.begin(), (*it)->triangles.end());
fillit_(edgeToElement, static_cast<partitionFace*>(*it)->getPartitions(),
(*it)->quadrangles.begin(), (*it)->quadrangles.end());
if (meshDim == 2){
for(unsigned int i = 0; i < boundaryElements.size(); i++){
for(std::set<MElement*>::iterator it = boundaryElements[i].begin();
it != boundaryElements[i].end(); ++it){
for(int j = 0; j < (*it)->getNumEdges(); j++){
edgeToElement[(*it)->getEdge(j)].push_back
(std::pair<MElement*, std::vector<unsigned int> >
(*it, std::vector<unsigned int>(1,i)));
}
}
}
}
else{
for(GModel::const_fiter it = model->firstFace(); it != model->lastFace(); ++it){
if((*it)->geomType() == GEntity::PartitionSurface){
fillit_(edgeToElement, static_cast<partitionFace*>(*it)->getPartitions(),
(*it)->triangles.begin(), (*it)->triangles.end());
fillit_(edgeToElement, static_cast<partitionFace*>(*it)->getPartitions(),
(*it)->quadrangles.begin(), (*it)->quadrangles.end());
}
}
}
for(hashmapedge::const_iterator it = edgeToElement.begin();
......@@ -1848,10 +1846,24 @@ static void CreatePartitionBoundaries(GModel *const model,
if (meshDim >= 1){ // Create partition vertices
Msg::Info(" - Creating partition vertices");
for(GModel::const_eiter it = model->firstEdge(); it != model->lastEdge(); ++it){
if((*it)->geomType() == GEntity::PartitionCurve){
fillit_(vertexToElement, static_cast<partitionEdge*>(*it)->getPartitions(),
(*it)->lines.begin(), (*it)->lines.end());
if (meshDim == 1){
for(unsigned int i = 0; i < boundaryElements.size(); i++){
for(std::set<MElement*>::iterator it = boundaryElements[i].begin();
it != boundaryElements[i].end(); ++it){
for(int j = 0; j < (*it)->getNumPrimaryVertices(); j++){
vertexToElement[(*it)->getVertex(j)].push_back
(std::pair<MElement*, std::vector<unsigned int> >
(*it, std::vector<unsigned int>(1,i)));
}
}
}
}
else{
for(GModel::const_eiter it = model->firstEdge(); it != model->lastEdge(); ++it){
if((*it)->geomType() == GEntity::PartitionCurve){
fillit_(vertexToElement, static_cast<partitionEdge*>(*it)->getPartitions(),
(*it)->lines.begin(), (*it)->lines.end());
}
}
}
for(hashmapvertex::const_iterator it = vertexToElement.begin();
......@@ -2425,6 +2437,7 @@ int PartitionMesh(GModel *const model)
}
}
}
std::vector< std::set<MElement*> > boundaryElements = graph.getBoundaryElements();
std::multimap<MElement*, short> ghostCells = graph.getGhostCells();
model->setGhostCells(ghostCells);
......
Point(1) = {0,0,0};
Point(2) = {1,0,0};
Point(3) = {1,1,0};
Point(4) = {0,1,0};
Line(1) = {1,2};
Line(2) = {2,3};
Line(3) = {3,4};
Line(4) = {4,1};
Line Loop(5) = {1,2,3,4};
Plane Surface(6) = {5};
// computes the distance to point 1
Field[1] = Distance;
Field[1].NodesList = {1};
// computes a function of the value computed by field 1 ("F1")
Field[2] = MathEval;
Field[2].F = "Exp(-7*(1-F1))";
// applies field 2 as background mesh
Background Field = 2;
SetFactory("OpenCASCADE");
a() = ShapeFromFile("cube-sphere-cube-compound.brep");
//Recursive Delete{ Volume{1,3}; }
BooleanFragments{ Volume{a()}; Delete; }{}
//Save "bb.step";
SetFactory("OpenCASCADE");
Mesh.CharacteristicLengthMin = 0.4;
Mesh.CharacteristicLengthMax = 0.4;
Circle(1) = {0,0,0, 2, Pi};
Circle(2) = {0,0,0, 2, Pi, 2*Pi};
Extrude{0,0,10}{ Line{1,2}; }
Cylinder(2) = {0, 0, 5, 0, 10, 0, 1, 2*Pi};
BooleanDifference{ Surface{1,2}; Delete; }{ Volume{2}; Delete; }
Rectangle(9) = {0, 0, 4, 4, 1, 0};
Rotate {{1, 0, 0}, {0, 0, 4}, Pi/2} {Surface{9};}
Rotate {{0, 0, 1}, {0, 0, 4}, Pi/6} {Surface{9};}
BooleanFragments{ Surface{1,9}; Delete; }{}
SetFactory("Built-in");
p1 = newp;
Point(p1) = { 0, 0, 0.0, 1 };
p2 = newp;
Point(p2) = { 10, 0, 0.0, 2 };
l1 = newl;
Line(l1) = { p1, p2 };
s1 = news;
out[] = Extrude { 0, 15, 0} {Line{ l1 };};
s1 = out[1];
Color Yellow { Surface{ s1 }; }
View "comments" {T3(2, 18, 0, TextAttributes("Align", "Center", "Font", "Helvetica")){ "Built-in" };};
SetFactory("OpenCASCADE");
p3 = newp;
Point(p3) = { 15, 0, 0.0, 1 };
p4 = newp;
Point(p4) = { 25, 0, 0.0, 2 };
l2 = newl;
Line(l2) = { p3, p4 };
s2 = news;
out[] = Extrude { 0, 15, 0} {Line{ l2 };};
s2 = out[1];
Color LightYellow { Surface{ s2 }; }
View "comments" {T3(20, 18, 0, TextAttributes("Align", "Center", "Font", "Helvetica")){ "OpenCASCADE" };};
//Mesh 2;
SetFactory("OpenCASCADE");
a() = ShapeFromFile("mesh_T106_V3.step");
b() = BooleanFragments{ Surface{a()}; Delete; }{};
Surface Loop(1) = {b()};
Volume(1) = {1};
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment