Shape from Lines in Sketcher?

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!
Woodside
Posts: 7
Joined: Mon Apr 15, 2019 3:06 am

Shape from Lines in Sketcher?

Postby Woodside » Thu Jun 06, 2019 2:11 am

Is there a tool to automatically convert a set of lines into a closed shape?
E.g. a single line would just make a long rectangle with perimeter an equal distance away from the line.
I want to create some shapes by simply expanding from a path by a specified distance, and it's awfully time consuming to set up all those constraints manually.
Woodside
Posts: 7
Joined: Mon Apr 15, 2019 3:06 am

Re: Shape from Lines in Sketcher?

Postby Woodside » Thu Jun 06, 2019 2:13 am

This is an example of what I'm doing manually:

https://pasteboard.co/Ii5Kxt8.png

And I feel like there should be a better way.
chrisb
Posts: 17515
Joined: Tue Mar 17, 2015 9:14 am

Re: Shape from Lines in Sketcher?

Postby chrisb » Thu Jun 06, 2019 6:28 am

So you want a 2D offset. That's currently not possible in Sketcher, but Abdullah talked about it being somewhere on his list.
User avatar
quick61
Posts: 3793
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Shape from Lines in Sketcher?

Postby quick61 » Thu Jun 06, 2019 1:51 pm

Woodside wrote:
Thu Jun 06, 2019 2:13 am
This is an example of what I'm doing manually:

https://pasteboard.co/Ii5Kxt8.png

And I feel like there should be a better way.
Hello Woodside, a few of things...

First, you can attach your images and files to your post which is much better than a hosting service as one never knows how long those services will be in operation, and if they go away, the image is gone and no one will be able to look back on it and see what was discussed. We try to keep the hosting services in reserve for very large files.

Another thing, in your image, I notice that you have a number of what we call zero constraints. This is not a good way to constrain a sketch, with a dimension of 0.0 units. Those 0.0 distance constraints can always be replaced with a geometrical constraint.

To simplify things a bit, you can make the outside in one sketch, then pocket the holes with another sketch, or break it down with a series of simpler sketches.

In the attached example, you can see I have made the same basic shape with 2 triangles in the first sketch, and a single rectangle in a second sketch. Much simpler to constrain fully, no 0.0 distance constraints, and the part is done. Fast and easy. ;)

simplerway.FCStd
(18.68 KiB) Downloaded 6 times
Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
User avatar
meme2704
Posts: 2926
Joined: Sat Apr 01, 2017 2:47 pm
Location: Vosges

Re: Shape from Lines in Sketcher?

Postby meme2704 » Thu Jun 06, 2019 3:58 pm

Hi
I have a solution, borrowed from our friends Arch: you draw the skit and you use the wall tool.
I did it in V.16, I do not know why, I can not do it with V.19 :mrgreen:
Attachments
mur.FCStd
(13.84 KiB) Downloaded 5 times
mur.PNG
mur.PNG (4.83 KiB) Viewed 129 times
Woodside
Posts: 7
Joined: Mon Apr 15, 2019 3:06 am

Re: Shape from Lines in Sketcher?

Postby Woodside » Fri Jun 07, 2019 1:41 am

quick61,

Sorry about that. I went ahead and attached the image to this post just in case.

I think what meme2704 suggested with wall is most appropriate for what I want. Thanks!
Attachments
BIXKbP6D.png
BIXKbP6D.png (42.73 KiB) Viewed 97 times
paullee
Posts: 1629
Joined: Wed May 04, 2016 3:58 pm

Re: Shape from Lines in Sketcher?

Postby paullee » Fri Jun 07, 2019 8:24 am

Works here in 0.19_pre... though meme2704's file open with lot of errors reported

Code: Select all

Upgrading Wall Role property to IfcType
Traceback (most recent call last):
  File "/home/paullee/Downloads/FreeCAD_0.19-16790-Linux-Conda_Py3Qt5_glibc2.12-x86_64/squashfs-root/usr/Mod/Arch/ArchWall.py", line 567, in onDocumentRestored
    ArchComponent.Component.onDocumentRestored(self,obj)
  File "/home/paullee/Downloads/FreeCAD_0.19-16790-Linux-Conda_Py3Qt5_glibc2.12-x86_64/squashfs-root/usr/Mod/Arch/ArchComponent.py", line 200, in onDocumentRestored
    Component.setProperties(self,obj)
  File "/home/paullee/Downloads/FreeCAD_0.19-16790-Linux-Conda_Py3Qt5_glibc2.12-x86_64/squashfs-root/usr/Mod/Arch/ArchComponent.py", line 151, in setProperties
    ArchIFC.setProperties(obj)
  File "/home/paullee/Downloads/FreeCAD_0.19-16790-Linux-Conda_Py3Qt5_glibc2.12-x86_64/squashfs-root/usr/Mod/Arch/ArchIFC.py", line 28, in setProperties
    migrateDeprecatedAttributes(obj)
  File "/home/paullee/Downloads/FreeCAD_0.19-16790-Linux-Conda_Py3Qt5_glibc2.12-x86_64/squashfs-root/usr/Mod/Arch/ArchIFC.py", line 169, in migrateDeprecatedAttributes
    r = obj.IfcRole
<class 'AssertionError'>: The enum is empty

yorik wrote: ping
Maybe you can have a look when available.

Indeed this case is just exactly what 'Arch Generator' is conceiving to do right ? - a simple '2d offset' for this case