Topological_data_scripting - Creating_simple_topology sample

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
Milos

Topological_data_scripting - Creating_simple_topology sample

Post by Milos »

FreeCAD seems me like very interesting open source tool.
I try it and its nice.

I went through this scripting example - http://sourceforge.net/apps/mediawiki/f ... e_topology

Showing creation of topology, wire, and extrude wire to create kind of solid shape fence.
I know nearly nothing about Open Cascade but the sample mentioned above will be much more usefull for me if there is several more steps showning how create solid shape based on simple topology (its 2d boundary).

I will very appreacite if somebody can recommend me extension of example to create solid part.
guest

Re: Topological_data_scripting - Creating_simple_topology sample

Post by guest »

In the terminology of OCC you have first a set of connected edges. An edge can be built out of any type of geometric curve like line, circle, arc of circle, parabola, hyperbola, Bezier/BSpline curve and so on. The Python interface of these classes offers the method toShape() (with two optional arguments that define the parameter range) to create the edges.

Out of the edges you build a higher-level object which contains the topology of the edges. This is called a wire.

The next step is to fill up the wire to get a face. Finally, by extruding the face you'll get a solid.

Starting from some plain geometric curves the procedure is actually always the same:
curve -> edges -> wire -> face -> solid
Milos

Re: Topological_data_scripting - Creating_simple_topology sample

Post by Milos »

Thank you for short excellent tip
Post Reply