OpenCASCADE

From FreeCAD Documentation
Revision as of 17:29, 15 May 2021 by Maker (talk | contribs) (Created page with "En 2011 se publicó una "edición comunitaria" de OpenCASCADE, abreviada OCE, basada en las fuentes oficiales de OpenCASCADE (OCCT) de la versión 6.5. En teoría, la edición...")

Descripción

OpenCASCADE Tecnología, La OCC o OCCT, para abreviar, es una colección de bibliotecas C++ que juntas constituyen un núcleo de diseño asistido por ordenador (CAD) profesional para modelar objetos 2D y 3D, y construir herramientas especializadas para la fabricación, simulación o visualización. OpenCASCADE es el corazón de las capacidades geométricas de FreeCAD.

Las clases geométricas de OCCT se implementan y se ponen a disposición en FreeCAD a través del Part Module, del que dependen la mayoría de los otros Ambiente de trabajo. También proporciona funciones internas para leer y escribir diferentes formatos de archivo como STEP e IGES, y para realizar proyecciones 2D, que pueden ser usadas para crear dibujos técnicos en TechDraw.

OpenCASCADE proporciona las clases geométricas básicas y las funciones de dibujo al Part Módulo, que luego son utilizadas por todos los Ambiente de trabajo en FreeCAD.

OpenCASCADE no debe confundirse con OpenSCAD, que es un proyecto de código abierto diferente para construir modelos 3D, y que es accesible a través del Ambiente de trabajo OpenSCAD.

OpenCASCADE es un software libre que se rige por los términos de la Licencia Pública General Reducida de GNU (LGPL) versión 2.1 con una excepción adicional.

Instalación

OpenCASCADE es un componente básico de FreeCAD, por lo que si obtiene FreeCAD de uno de los enlaces de la página Descarga, lo tendrá instalado, y no será necesaria ninguna otra instalación.

Sin embargo, si quieres desarrollar aplicaciones que utilicen OCCT, o quieres contribuir con código C++ a FreeCAD, entonces necesitas instalar los archivos de desarrollo de OCCT. En este caso, el procedimiento se explica en Compilación para cada uno de los sistemas principales, Linux, Windows y MacOS.

Edición de la comunidad

En 2011 se publicó una "edición comunitaria" de OpenCASCADE, abreviada OCE, basada en las fuentes oficiales de OpenCASCADE (OCCT) de la versión 6.5. En teoría, la edición comunitaria OCE debería ser compatible con la versión principal OCCT en la mayoría de los aspectos, al tiempo que cuenta con algún código adicional aportado por la comunidad.

However, this alternative distribution stopped active development around 2017, and lagged behind the main version in terms of features and bug fixes. For this reason, since FreeCAD v0.17, FreeCAD is compiled exclusively with OCCT, and OCE is not tested.

In some older Linux distributions, FreeCAD is compiled against OCE 0.18, equivalent to OCCT 6.9.x, causing various issues that have been solved already in the main OCCT 7.x releases. If this is the case, try removing OCE, and installing OCCT instead. If this is not possible, use the AppImage to get a modern FreeCAD with an updated OCCT version.

Historia

The Cas.CADE geometric kernel was originally closed source, but it became open source under its current name around the year 2000. Shortly after, the FreeCAD project was started, with the oldest files being dated to January 2001. Read more in History.

OpenCASCADE version 6.6 and earlier were governed by its own "OCCT public license", which made it not entirely "free software". This was solved with the release of OCCT 6.7 (2013), when it adopted the LGPL2 license.

OCCT Conceptos geométricos

In OpenCascade terminology, we distinguish between geometric primitives and topological shapes. A geometric primitive can be a point, a line, a circle, a plane, etc. or even some more complex types like a B-Spline curve or a surface. A shape can be a vertex, an edge, a wire, a face, a solid or a compound of other shapes. The geometric primitives are not made to be directly displayed on the 3D scene, but rather to be used as building geometry for shapes. For example, an edge can be constructed from a line or from a portion of a circle.

In summary, geometry primitives are "shapeless" building blocks, while topological shapes are the real objects built on them.

A complete list of all primitives and shapes refer to the OCC documentation (Alternative: sourcearchive.com) and search for Geom_* (for geometric primitives) and TopoDS_* (for shapes). There you can also read more about the differences between them. Please note that the official OCC documentation is not available online (you must download an archive) and is mostly aimed at programmers, not at end-users. But hopefully you'll find enough information to get started here. Also see Modeling Data User's Guide.

At a very high level, topology tells what pieces an object is made of, and the logical relationships between them. A shape is made of a certain set of faces. A face is bounded by a certain set of edges. Two faces are adjacent if they share a common edge.

Topology alone does not tell you the size, curvature, or 3D locations of any of those pieces. However, each piece of topology does knows about it's underlying geometry. A face knows what surface it lies on. An edge knows what curve it lies on. The geometry knows about curvature and location in space. - Source


Thus, Topology defines the relationship between simple geometric entities, which can be linked together to represent complex shapes. - Modeling Data User's Guide

Note: Only 3 types of topological objects have geometric representations – vertex, edge, and face (Source).

The geometric types actually can be divided into two major groups: curves and surfaces. Out of the curves (line, circle, ...) you can directly build an edge, out of the surfaces (plane, cylinder, ...) a face can be built. For example, the geometric primitive line is unlimited, i.e. it is defined by a base vector and a direction vector while its shape representation must be something limited by a start and end point. And a box -- a solid -- can be created by six limited planes.

From an edge or face you can also go back to its geometric primitive counterpart.

Thus, out of shapes you can build very complex parts or, the other way round, extract all sub-shapes a more complex shape is made of.

The Part::TopoShape class is the geometrical object that is seen on screen. Essentially all workbenches use these TopoShapes internally to build and display edges, faces, and solids.

Relacionados