I have a design that was made by importing an SVG drawing (path), making it a face, and then extruding that along the Z axis. It turns out that the SVG was based on a sketch that was made by overlaying a part on paper and tracing a line around it with a pen - so the sketch was offset around 1-2mm outside the perimeter of the original object.
As a result, I'd like to virtually shave off a couple of mm around the perimeter, or do a negative offset (inset?) of the outline of my object on the XY plane. Is this practically feasible? Do I have to go back and try to do this with the SVG, or the original sketch? I don't want to shrink the entire object, that would result in wrong measurements other places. I want holes/gaps to be bigger, but the outline to be smaller.
fcstd attached.
OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6707 (Git)
Build type: None
Branch: releases/FreeCAD-0-16
Hash: 5465bc47c95db45e0be85dc0e2872419efadce0f
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
Inset object along XY
Forum rules
and Helpful information
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!
Also, be nice to others! Read the FreeCAD code of conduct!
Inset object along XY
- Attachments
-
- sample.fcstd
- (11.25 KiB) Downloaded 28 times
Re: Inset object along XY
- You could use a fillet around the face. The inner edges are then offset by the fillet radius.
- Next you can Draft downgrade until you get the faces.
- Delete all fillet faces, and keep the inner face which is what you wanted.
- Last you can Part->Extrude the face again.
- Next you can Draft downgrade until you get the faces.
- Delete all fillet faces, and keep the inner face which is what you wanted.
- Last you can Part->Extrude the face again.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Inset object along XY
Or you can just hide the things you aren't going to use, but that makes for a bigger file size. The attached file uses the method explained by chisb, but I didn't delete anything. The blue outline is the original shape and grey is 2mm offset (the odd coloration of the top surface is the result of z-fighting):
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.16.6707 (Git)
Build type: None
Branch: releases/FreeCAD-0-16
Hash: 5465bc47c95db45e0be85dc0e2872419efadce0f
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
OS: Ubuntu 16.04.2 LTSWord size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.16.6707 (Git)
Build type: None
Branch: releases/FreeCAD-0-16
Hash: 5465bc47c95db45e0be85dc0e2872419efadce0f
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
Re: Inset object along XY
hi, a more simple method
Extrude SVGface with the extrude function in part design, this is what you already did, but change the taper angle to -10 or another angle that creates the inset you want
In draft workbench make a facebinder to the smaller top face
Extrude the facebinder
Extrude SVGface with the extrude function in part design, this is what you already did, but change the taper angle to -10 or another angle that creates the inset you want
In draft workbench make a facebinder to the smaller top face
Extrude the facebinder
- Attachments
-
- sample-willem.fcstd
- (103.2 KiB) Downloaded 25 times
Re: Inset object along XY
Thanks for the suggestions! I think chrisb's suggestion is the simplest since I know the distance I want to inset, with Willem's suggestion I need to do some (simple) calculation.
A drawback I think so far is that I'd like to script this, and doing the Draft -> Downgrade I get lots of faces. How will I know which face to keep? I guess I could traverse all App.ActiveDocument.Face* and sort by .Shape.Area, keeping the second largest.
Also, another shape I have just disappears when I try to create a fillet of 1mm or more. I can manage a fillet of a bit less than 1mm, but I think that's too little. None of the details are that small, as far as I can tell. Any ideas why it won't fillet?
A drawback I think so far is that I'd like to script this, and doing the Draft -> Downgrade I get lots of faces. How will I know which face to keep? I guess I could traverse all App.ActiveDocument.Face* and sort by .Shape.Area, keeping the second largest.
Also, another shape I have just disappears when I try to create a fillet of 1mm or more. I can manage a fillet of a bit less than 1mm, but I think that's too little. None of the details are that small, as far as I can tell. Any ideas why it won't fillet?
- Attachments
-
- sample2.fcstd
- (18.05 KiB) Downloaded 25 times
Re: Inset object along XY
Seems like insetting in inkscape may be easier. Editing the SVG in inkscape, I could simply choose Edit -> Preferences -> Behaviour -> Steps to define the inset distance, and then simply select the path and choose Path -> Inset. I use this "script" to convert to an object:
Code: Select all
from FreeCAD import Base
import importSVG
import Part
def extrudeSVG(filename, thickness):
doc = App.ActiveDocument
# Import SVG
importSVG.insert(filename, doc.Name) # returns None
Gui.SendMsgToActiveView("ViewFit")
# Get latest object in document:
SVG = doc.Objects[-1]
# Gui.ActiveDocument.activeObject()
# Gui.ActiveDocument.path3400
# All objects: App.ActiveDocument.Objects[0] etc
# Create face, hide SVG
tmp = Part.Face(Part.Wire(Part.__sortEdges__(SVG.Shape.Edges)))
if tmp.isNull(): raise RuntimeError('Failed to create face')
doc.addObject('Part::Feature', 'SVGFace').Shape = tmp
del tmp
SVG.ViewObject.Visibility=False
# Extrude face
SVGFace = doc.Objects[-1]
SVGExtrude = doc.addObject("Part::Extrusion", "SVGExtrude")
SVGExtrude.Base = doc.SVGFace
SVGExtrude.Dir = (0, 0, thickness)
SVGExtrude.Solid = (True)
SVGExtrude.TaperAngle = (0)
doc.SVGFace.ViewObject.Visibility = False
doc.recompute()
# Demo use:
# extrudeSVG(u"/path/to/file/design.svg", 4)
- DeepSOIC
- Veteran
- Posts: 7896
- Joined: Fri Aug 29, 2014 12:45 am
- Location: used to be Saint-Petersburg, Russia
Re: Inset object along XY
Last but not least, in 0.17 Part workbench got a 2D Offset tool.
Re: Inset object along XY
I cannot tell for sure, but here seems something going wrong (please have in mind that filleting is performed by the OCC kernel, lying out of scope of the FreeCAD developers):kefir wrote:Any ideas why it won't fillet?
- Attachments
-
- Bildschirmfoto 2017-03-12 um 19.56.48.png (32.97 KiB) Viewed 2545 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.