FreeCAD Logo FreeCAD 1.0
  • English Afrikaans Arabic Belarusian Catalan Czech German Greek Spanish Spanish Basque Finnish Filipino French Galician Croatian Hungarian Indonesian Italian Japanese Kabyle Korean Lithuanian Dutch Norwegian Bokmal Polish Portuguese Portuguese Romanian Russian Slovak Slovenian Serbian Swedish Turkish Ukrainian Valencian Vietnamese Chinese Chinese
  • Features
  • Download
  • Blog
  • Documentation
    Documentation index Getting started Users documentation The FreeCAD manual Workbenches documentation Python coding documentation C++ coding documentation Tutorials Frequently asked questions Privacy policy About FreeCAD
  • Contribute
    How to help Sponsor Report a bug Make a pull request Jobs and funding Contribution guidelines Developers handbook Translations
  • Community
    Code of conduct Forum The FPA GitHub GitLab Codeberg Mastodon Matrix IRC IRC via Webchat Gitter Discord Reddit Twitter Facebook LinkedIn Calendar
  • ♥ Donate

Donate

$
SEPA Information
Please set up your SEPA bank transfer to:
Beneficiary: The FreeCAD project association
IBAN: BE04 0019 2896 4531
BIC/SWIFT: GEBABEBBXXX
Bank agency: BNP Paribas Fortis
Address: Rue de la Station 64, 1360 Perwez, Belgium

While Stripe doesn't support monthly donations, you can still become a sponsor! Simply make a one-time donation equivalent to 12 months of support, and you'll gain access to the corresponding sponsoring tier. It's an easy and flexible way to contribute.

If you are not sure or not able to commit to a regular donation, but still want to help the project, you can do a one-time donation, of any amount.

Choose freely the amount you wish to donate one time only.

You can support FreeCAD by sponsoring it as an individual or organization through various platforms. Sponsorship provides a steady income for developers, allowing the FPA to plan ahead and enabling greater investment in FreeCAD. To encourage sponsorship, we offer different tiers, and unless you choose to remain anonymous, your name or company logo will be featured on our website accordingly.

from 1 USD / 1 EUR per month. You will not have your name displayed here, but you will have helped the project a lot anyway. Together, normal sponsors maintain the project on its feet as much as the bigger sponsors.

from 25 USD / 25 EUR per month. Your name or company name is displayed on this page.

from 100 USD / 100 EUR per month. Your name or company name is displayed on this page, with a link to your website, and a one-line description text.

from 200 USD / 200 EUR per month. Your name or company name and logo displayed on this page, with a link to your website and a custom description text. Companies that have helped FreeCAD early on also appear under Gold sponsors.

Instead of donating each month, you might find it more comfortable to make a one-time donation that, when divided by twelve, would give you right to enter a sponsoring tier. Don't hesitate to do so!

Choose freely the amount you wish to donate each month.

Please inform your forum name or twitter handle as a notein your transfer, or reach to us, so we can give you proper credits!

Part API

(November 2018) This information may be incomplete and outdated. For the latest API, see the [https://www.freecadweb.org/api autogenerated API documentation] or [https://freecad-python-stubs.readthedocs.io/en/latest/autoapi/Part/ autogenerated Python Part API documentation].

The Part module is the direct connection between FreeCAD and the OpenCasCade kernel. It provides mainly TopoShapes which is the main object type used by OpenCascade. The Part module also contains a variety of convenience functions to create and manipulate topoShapes. Example:

import Part
mycube = Part.makeBox(2,2,2)
Part.show(mycube)

{{APIFunction|fromPythonOCC|OCC.Object|Helper method to convert a pythonocc shape to an internal shape|A Part.Shape}}

{{APIFunction|sortEdges|list of edges|Helper method to sort an unsorted list of edges so that afterwards the start and end vertex of two consecutive edges are geometrically coincident. It returns a single list of edges and the algorithm stops after the first set of connected edges which means that the output list can be smaller than the input list. The sorted list can be used to create a Wire.|a list of edges}}

{{APIFunction|toPythonOCC|Part.Shape|Helper method to convert an internal shape to pythonocc shape|an OCC.Shape}}

{{APIFunction|cast_to_shape|Part.Shape|Cast to the actual shape type| }}

{{APIFunction|export|list,string|Export a list of objects into a single file.| }}

{{APIFunction|getSortedClusters|list of edges|Helper method to sort and cluster a variety of edges| }}

{{APIFunction|insert|string,string|Insert the file (path given as first argument) into the given document (second argument).| }}

{{APIFunction|makeBox|length,width,height,[pnt,dir]|Makes a box located at pnt with the dimensions (length,width,height). By default pnt is Vector(0,0,0) and dir is Vector(0,0,1)|the created shape}}

{{APIFunction|makeCircle|radius,[pnt,dir,angle1,angle2]|Makes a circle with a given radius. By default pnt is Vector(0,0,0), dir is Vector(0,0,1), angle1 is 0 and angle2 is 360|the created shape}}

{{APIFunction|makeCompound|list|Creates a compound out of a list of shapes.|the created shape}}

{{APIFunction|makeCone|radius1,radius2,height,[pnt,dir,angle]|Makes a cone with given radii and height. By default pnt is Vector(0,0,0), dir is Vector(0,0,1) and angle is 360|the created shape}}

{{APIFunction|makeCylinder|radius,height,[pnt,dir,angle]|Makes a cylinder with a given radius and height. By default pnt is Vector(0,0,0),dir is Vector(0,0,1) and angle is 360|the created shape}}

{{APIFunction|makeHelix|pitch,height,radius,[angle,lefthand,heightstyle]|Makes a helix shape with a given pitch, height and radius. Defaults to right-handed cylindrical helix. Non-zero angle parameter produces a conical helix. Lefthand True produces left handed helix. Heightstyle applies only to conical helices. Heightstyle False (default) will cause the height parameter to be interpreted as the length of the side of the underlying frustum. Heightstyle True will cause the height parameter to be interpreted as the vertical height of the helix. Pitch is "metric pitch" (advance/revolution). For conical helix, radius is the minor radius.|the created shape}}

{{APIFunction|makeLine|(x1,y1,z1),(x2,y2,z2)|Makes a line of two points|the created shape}}

{{APIFunction|makeLoft|shapelist,[boolean,boolean]|Creates a loft shape using the list of profiles. Optionally make result a solid (vs surface/shell) or make result a ruled surface.|the created shape}}

{{APIFunction|makePlane|length,width,[pnt,dir]|Makes a plane. By default pnt is Vector(0,0,0) and dir is Vector(0,0,1)|the created shape}}

{{APIFunction|makePolygon|list|Makes a polygon of a list of Vectors|the created shape}}

{{APIFunction|makeRevolution|Curve,[vmin,vmax,angle,pnt,dir]|Makes a revolved shape by rotating the curve or a portion of it around an axis given by (pnt,dir). By default vmin/vmax are set to bounds of the curve,angle is 360,pnt is Vector(0,0,0) and dir is Vector(0,0,1)|the created shape}}

{{APIFunction|makeRuledSurface|Edge or Wire,Edge or Wire|Creates a ruled surface out of two edges or wires. If wires are used then these must have the same number of edges.|the created shape}}

{{APIFunction|makeShell|list|Creates a shell out of a list of faces. Note: Resulting shell should be manifold. Non-manifold shells are not well supported.|the created shape}}

{{APIFunction|makeSolid|Part.Shape|Creates a solid out of the shells inside a shape.|the created shape}}

{{APIFunction|makeSphere|radius,[center_pnt, axis_dir, V_startAngle, V_endAngle, U_angle]|Makes a sphere (or partial sphere) with a given radius. By default center_pnt is Vector(0,0,0), axis_dir is Vector(0,0,1), V_startAngle is 0, V_endAngle is 90 and U_angle is 360|the created shape}}

{{APIFunction|makeTorus|radius1,radius2,[pnt,dir,angle1,angle2,angle]|Makes a torus with a given radii and angles. By default pnt is Vector(0,0,0),dir is Vector(0,0,1),angle1 is 0,angle2 is 360 and angle is 360|the created shape}}

{{APIFunction|makeTube|edge,float|Creates a tube.|the created shape}}

{{APIFunction|open|string|Creates a new document and load the file into the document.| }}

{{APIFunction|read|string|Loads the file and return the shape.|a shape}}

{{APIFunction|show|shape|Adds the shape to the active document or create one if no document exists.| }}


⏵ documentation index > API > Poweruser Documentation > Part > Part API

This page is retrieved from https://github.com/FreeCAD/FreeCAD-documentation/blob/main/wiki/Part_API.md

Get in touch!
Forum GitHub Mastodon Matrix IRC Gitter.im Discord Reddit Twitter Facebook LinkedIn

© The FreeCAD Team. Homepage image credits (top to bottom): ppemawm, r-frank, epileftric, regis, rider_mortagnais, bejant.

This project is supported by: , KiCad Services Corp. and other sponsors

GitHubImprove this page on GitHub