>
> 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?

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

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?

Thanks for clarifying this.

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

Reply via email to