[Gmsh] openCASCADE error: Unknown entity of dimension x with tag y

Christophe Geuzaine cgeuzaine at uliege.be
Wed Jun 13 22:49:00 CEST 2018



> On 13 Jun 2018, at 16:57, Deep Bandivadekar <deep.bandivadekar at strath.ac.uk> wrote:
> 
> Hello,
> 
> I upgraded my gmsh from 2.10.0 to 3.0.6 for the boolean feature and I wanted test the same.
> It's a fairly straightforward script in which I wanted to locate the intersection of the two diagonals using the boolean operator.
> ---------------------------------------------------------------
> i=0;
> Point(i) = {0,0,0,0.5}; o1 = i; i++;
> Point(i) = {0,1,0,0.5}; e1 = i; i++;
> Point(i) = {1,0,0,0.5}; e2 = i; i++;
> Point(i) = {1,1,0,0.5}; e3 = i; i++;
> //Point(i) = {0.5,0.5,0,0.5}; e4 = i; i++;
> 
> Line(i) = {o1, e1}; l1 = i; i++;
> Line(i) = {e1, e3}; l2 = i; i++;
> Line(i) = {e3, e2}; l3 = i; i++;
> Line(i) = {e2, o1}; l4 = i; i++;
> Line(i) = {e1, e2}; l5 = i; i++;
> Line(i) = {e3, o1};
> 
> 
> //+
> SetFactory("OpenCASCADE");
> BooleanIntersection{ Line{9}; }{ Line{10}; }
> -------------------------------------------------------------------------------
> 
> I get following error statements:
> Error: Unknown OpenCASCADE entity of dimension 1 with tag 9
> Error: <location of file>, line 18: Could not apply booleanoperator
> 
> What is the issue here? Can someone help?
> 

You change the CAD kernel to OpenCASCADE after having created the points and lines - which are thus created with the default (built-in) kernel, and are thus unknown to OpenCASCADE. (Also, BooleanIntersection in OpenCASCADE does not deal with curves - use BooleanFragments instead.)

Here's the corrected script:

SetFactory("OpenCASCADE");

i=1;
Point(i) = {0,0,0,0.5}; o1 = i; i++;
Point(i) = {0,1,0,0.5}; e1 = i; i++;
Point(i) = {1,0,0,0.5}; e2 = i; i++;
Point(i) = {1,1,0,0.5}; e3 = i; i++;
//Point(i) = {0.5,0.5,0,0.5}; e4 = i; i++;

i=1;
Line(i) = {o1, e1}; l1 = i; i++;
Line(i) = {e1, e3}; l2 = i; i++;
Line(i) = {e3, e2}; l3 = i; i++;
Line(i) = {e2, o1}; l4 = i; i++;
Line(i) = {e1, e2}; l5 = i; i++;
Line(i) = {e3, o1};

BooleanFragments{ Line{5}; Delete; }{ Line{6}; Delete; }





> 
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh

— 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine

Free software: http://gmsh.info | http://getdp.info | http://onelab.info

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20180613/2a421469/attachment.html>


More information about the gmsh mailing list