Hi Jelle,

that sounds like a great idea - thanks for the invitation! I think SMESH is a 
huge plus for PythonOCC that deserves attention.
I could write about how I use SMESH through PythonOCC in my software for e.g. 
hybrid meshing, meshing periodic domains etc. What do you think ?

For the SMESH and GEOM updates (I'm not sure about the current status as I  
haven't received a response from Fotios yet) I tried to create a branch from 
Thomas "tp/oce-0.10-support" branch. Cloning worked fine, but for creating my 
own branch  I would need a github account, right ? 
With the update to SMESH  version 6.5.0 I can now enjoy Salomes new "viscous 
layers" meshing feature through PythonOCC, which is pretty neat.

By the way, thanks for pointing out how to graph BRep topology. That's really 
powerful. I think I will need that for associating subshapes (edges/faces) for 
automatic prism meshing (e.g. in the space between two shells of different size 
but same topology). 

Thanks,
Mark
 


Am 25.09.2012 um 19:00 schrieb jelle feringa:

> Wow, cool Mark!
> 
> Mark, what about inviting you to write a post on the PythonOCC blog on the 
> development of your software & some projections & speculations of the SMESH 
> subproject?
> I feel pretty bad about not having yet further explored your contribution, I 
> hope to find the time sooner than later!
> But a blog post about further developments would be very interesting, wouldnt 
> you say so?
> 
> Let me know if you think its a fun idea,
> 
> Thanks,
> 
> -jelle
> 
> 
> On Tue, Sep 25, 2012 at 6:46 PM, Mark Blome <bl...@zib.de> wrote:
> 
> Hi Yuting,
> 
> if you have meshed your geometry with SMESH then you can easily extract a 
> submesh for any subshape of your geometry, e.g.
> 
> from OCC.Utils.Topology import Topo
> ...
> for edge in Topo(box).edges(): 
>       submesh = mesh.GetSubMesh(edge)
>       submeshds = submesh.GetSubMeshDS()
>       for ielem in range(submeshds .NbElements()):
>               elem = submeshds.elemValue(ielem)
>               n1 = elem.GetNode(0).GetID(); n2 = elem.GetNode(1).GetID();
>               ...
> To find out  which one of your shape edges you need to consider you can - for 
> example - check the location of the points of it's vertices. 
> 
> Regards,
> Mark
> 
> 
> Am 25.09.2012 um 15:06 schrieb 张玉婷:
> 
>> Hi Jelle,
>> 
>> Thanks for quick reply.
>> 
>> Yes, I am talking about FEM meshing. May I re-explain my question. I have a 
>> big modeling, I have meshed it already. What I want right now is: only to 
>> get the nodes index of  one end of the partial modeling (just the node on 
>> one edge). I am wondering is there any commands to get the specific edge 
>> index and the nodes index belonging to that edge, after meshing?
>> 
>> Regards,
>> Yuting
>> 
>> On Tue, Sep 25, 2012 at 2:46 PM, jelle feringa <jelleferi...@gmail.com> 
>> wrote:
>> 
>> I am trying to find the node indices belong to some wires, edges or surfaces 
>> (which are at some given locations). I am wondering is there such commands 
>> available in pythonocc? 
>> 
>> 
>> Hi Yuting,
>> 
>> Do you mean by nodes, vertices [ a bit FEM speak.. ]?
>> I think what you aim at is topology traversal.
>> 
>> Sure, try this:
>> 
>> In [13]: from OCC.BRepPrimAPI import BRepPrimAPI_MakeBox
>> 
>> In [14]: box = BRepPrimAPI_MakeBox(1,1,1).Shape()
>> 
>> In [15]: box
>> Out[15]: <OCC.TopoDS.TopoDS_Shape; proxy of <Swig Object of type 
>> 'TopoDS_Shape *' at 0x10f13a570> >
>> 
>> In [16]: from OCC.Utils.Topology import Topo
>> 
>> In [17]: from OCC.Utils.Construct import vertex2pnt
>> 
>> In [18]: for vert in Topo(box).vertices(): print vertex2pnt(vert).Coord()
>> 
>> 
>> 
>>  
>> (1.0, 1.0, 0.0)
>> 
>> 
>> 
>> 
>> 
>> _______________________________________________
>> Pythonocc-users mailing list
>> Pythonocc-users@gna.org
>> https://mail.gna.org/listinfo/pythonocc-users
>> 
>> 
>> _______________________________________________
>> Pythonocc-users mailing list
>> Pythonocc-users@gna.org
>> https://mail.gna.org/listinfo/pythonocc-users
> 
> 
> _______________________________________________
> Pythonocc-users mailing list
> Pythonocc-users@gna.org
> https://mail.gna.org/listinfo/pythonocc-users
> 
> 

_______________________________________________
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users

Reply via email to