2011/6/14 Jayesh Salvi <jayeshsa...@gmail.com>

> >
> > I mean 'hazardous' because there might be a confusion between the CGAL
> and
> > pythonOCC (BRep) data models.
> >
> > Reading your github repos, I see that the Sphere class inherits from
> > Polyhedron. But a sphere is *not* a polyhedron, whereas its tesselation
> is.
> > Polyhderons have flat faces and straight edges.
> >
> > According to me, 'simple' API means: easy to learn, enabling few lines of
> > well readable code to achieve expectations. It must be semantically
> explicit
> > and unambiguous (which is not the case if you make the Sphere and
> Cylinder
> > classes inherit from PolyHedron).
>
> Oh I see what you are saying. This answers some questions I had.
>
> IIUC, you are saying that the name Polyhedron implies only topology,
> which sphere and cylinder are topology+geometry. Is that correct?
>

For the difference between geometry ans topology, I suggest the reading of
Roman's blog:

http://opencascade.blogspot.com/2009/02/topology-and-geometry-in-open-cascade.html
http://opencascade.blogspot.com/2009/02/topology-and-geometry-in-open-cascade_09.html



> I didn't think about that while naming the base class Polyhedron. I
> think I should rename it to "Primitive". Does that sound ok?
>

These are 'BRep Primitives', and the OCC module that creates such primitives
is named 'BRepPrimAPI'.


>
> Moreover could you tell me, is there a way for me to get only the
> topology of sphere/cylinder? As you said, they are tesselations, so
> OpenCASCADE does its best to generate as smooth a surface as possible
> to match the real curvature. But this results in lot of polygons. What
> option do I have to limit or control the number of polygons in the
> tesselations?
>

With OCC/pythonOCC, you only handle topology/geometry, never tesselations
unless you explicitely call BRepMesh::Mesh. The 'deflection' parameter of
this function enables modifying the quality of the number of triangles
generated. However, the meshing algorithm does not allow to generate very
small meshes.


>
> Thanks for clarifying this.
>
>
Thomas
_______________________________________________
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users

Reply via email to