Chamfer edges deletes my objects (newbie)

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!
chrisb
Veteran
Posts: 53921
Joined: Tue Mar 17, 2015 9:14 am

Re: Chamfer edges deletes my objects (newbie)

Post by chrisb »

I have managed to create a tapered extrude by the following procedure:
- Use inkscape to simplify path
- smooth points as far as possible, so that the points are either very clear tangent or very clear corners
- save
- load into FreeCAD as geometry
- create sketch, I used my script to create only arcs and straight lines.

Code: Select all

''' Approxamation of wires containing bezier curves by arcs '''

import FreeCAD
import Path
from PathScripts import PathUtils
import Draft

def shape2Sketch(shape):
  # replace shape.edges with arcs
  global test
  newEdges = PathUtils.cleanedges(shape.Edges,2.0)

  wire = Part.Wire([Part.Edge(i) for i in newEdges])

  sketch = Draft.makeSketch(wire,autoconstraints=True,delete=True)
  
selection = FreeCADGui.Selection.getSelectionEx()
for s in selection:
  shape2Sketch(s.Object.Shape)
- make all appropriate points explicite tangent - this seems to be most important!
- extrude with taper angle 20°

The result is not totally satisfactory, yet it is correct.
Bildschirmfoto 2019-05-07 um 00.07.19.png
Bildschirmfoto 2019-05-07 um 00.07.19.png (22.67 KiB) Viewed 247 times
Attachments
stamp_cb.FCStd
(51.25 KiB) Downloaded 15 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
tzulah
Posts: 10
Joined: Thu May 02, 2019 4:22 pm

Re: Chamfer edges deletes my objects (newbie)

Post by tzulah »

chrisb,

Thank you so much for this help! I am trying to use your script. I don't see the part about making tangents explicit - where is that?
chrisb
Veteran
Posts: 53921
Joined: Tue Mar 17, 2015 9:14 am

Re: Chamfer edges deletes my objects (newbie)

Post by chrisb »

The script doesn't have that, I did it manually in Sketcher.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply