|
|
| Menu location |
|---|
| Part → Project on Surface |
| Workbenches |
| Part |
| Default shortcut |
| None |
| Introduced in version |
| 0.19 |
| See also |
| None |
The Part ProjectionOnSurface command projects a shape onto a face from another object. It can for example be used to project logos or text objects.
Projection of a logo on a curved surface.
Notes:
(0, 1, 0), the extrusion will be created in the direction -Y (0, -1, 0). This solid extrusion will only be created if the subelement selected was a closed face, by pressing the Add Face button, and by choosing the Note that any extrusions and offsets are along the projection direction. To create these normal to the surface use the Curves SketchOnSurface or Curves MapOnFace tools from the Curves Workbench.
The projection algorithm sometimes is not able to create a valid projection face. If this happens a solid extrusion won't be able to be created either.
If this happens:
See also: Property View.
A Part ProjectOnSurface is derived from a Part Feature object and inherits all its properties. It also has the following additional properties:
Projection
Enumeration): The option are: All, Faces or Edges.Length): Extrusion distance opposite to projection direction.Distance): Offset along projection direction.Direction): Normalized vector in the direction of projection.LinkSub): Link to projection surface.LinkSubList): Projected object(s).An example script, projecting a hexagonal wire onto a cylindrical face, then offsetting and extruding the result, is shown below.
#project a hexagonal face onto the surface of a cylinder
import Part
doc = App.ActiveDocument
poly = doc.addObject("Part::RegularPolygon", "RegularPolygon")
poly.Polygon = 6
poly.Circumradius = 2
poly.Placement = App.Placement(App.Vector(0, -10, 5), App.Rotation(App.Vector(1, 0, 0), 90))
face = doc.addObject("Part::Face", "Face")
face.Sources = (poly, )
cyl = App.ActiveDocument.addObject("Part::Cylinder", "Cylinder")
cyl.Radius = 5
cyl.Height = 10
proj = doc.addObject("Part::ProjectOnSurface", "Projection")
proj.SupportFace = (cyl, u"Face1")
proj.Direction = (0, 1, 0)
proj.Mode = u"All"
proj.Projection = (face, u"Face1")
proj.Height = 1 # opposite to projection direction
proj.Offset = -2 # along projection direction
doc.recompute()