Giter VIP home page Giter VIP logo

lattice2's Introduction

Lattice2 Workbench

Total alerts Language grade: Python

Lattice Workbench is a plug-in module/addon (workbench) for FreeCAD.

It's purpose is working with placements and arrays of placements. It functions similar to what an Assembly workbench does, but with emphasis on arrays. There are no constraints and relations, there are just arrays of placements that can be generated, combined, transformed, superimposed, and populated with shapes.

Ever wondered how to create a protractor with FreeCAD? That's the aim of this workbench (including tick labeling). Also, exploded assemblies can be made with this workbench.

Additionally, the workbench features a few general-purpose tools, such as parametric downgrade, bounding boxes, shape info tool, and tools for working with collections of shapes (compounds).

One of the big design goals of the workbench is being as parametric as possible.

Getting started

Follow through the Basic Tutorial to get the basic concept of Lattice2.

Highlights

Lattice2-FreeCAD-wormcutter

Lattice2-FreeCAD-placement-interpolator

Take a look at other examples in the Gallery of screenshots.

Features

Let's have a glance over the most important capabilities that the workbench adds to FreeCAD:

  • Re-use arrays as many times as you need. Unlike Draft array, which directly generates the array of shapes, lattice array tools generate arrays of placements. These can later be populated with shapes, as many times as necessary, without having to set up another array.
  • Extends PartDesign workflow, offering a way to reuse a sequence of features in arbitrary bodies and places.
  • Elements of array can be different. Unlike Draft Arrays, which always generate a set of equal shapes, Lattice arrays can be used to arrange a set of different shapes. Pack the shapes to be arranged into a Compound, and use Lattice Populate with children feature to arrange them.
  • Arrays of placements can be combined, inverted, generated from existing shape arrangements, made from individual placements, projected onto shapes, filtered, etc. This allows to produce complex arrangements without scripting.
  • Single placements can be used for primitive assembling of parts.
  • linear arrays and polar arrays can have their axes linked to edges of shapes
  • ParaSeries feature allows to generate a series of parts with some parameter varied over a list of values.

Why Lattice2, not just Lattice?

Lattice2 was created at the moment when breaking changes needed to be made to Lattice, but there were a few things made with Lattice. So, it was decided to keep the workbench in that time's state indefinitely as version 1.0, and start development of a new version.

The goal was to allow editing old projects made with Lattice v1, by having both versions installed at the same time. So a new repository was started, and all the files were renamed to start with 'lattice2' or otherwise differ from those of Lattice v1.

Lattice3 (if ever) will be a standalone repository, for the same reasons.

Installation

Prerequisites

  • FreeCAD >= v0.16.5155
  • PartDesign tools require v0.17+
  • Both Py2/Qt4 and Py3/Qt5 builds are supported.

The workbench is OS independent, it should work on any system FreeCAD can be run on. If you find that it doesn't - that is a bug. Please open an ticket in the issue queue.

Note: Lattice2 is written in FreeCAD's Python, and must be run from within FreeCAD. It requires no compilation, and can be installed by copying the repository to a special location.

Automated install

There are several options to automate installation of this workbench.

  • The most recommended method is to use FreeCAD's built-in Addon Manager (Tools > Addon manager).
  • Another method; Lattice2 workbench is packaged to Launchpad in the Ubuntu FreeCAD Community PPA (thanks to @abdullahtahiriyo).
  • Lattice2 can be installed via @microelly's Plugin Loader (this option is deprecated).

Note: Any of the above options will require a restart of FreeCAD in order for the workbench to function.

Manual install

Expand this section if you prefer to manually install Lattice2
  1. Download the workbench. There are several ways to do this, you can choose either:
  • Scroll to the top of the page, and click 'clone or download' -> 'download zip' button
  • git clone https://github.com/DeepSOIC/Lattice2
  1. If you downloaded the .zip, unpack the archive and rename it to Lattice2. If you used git clone then ignore this step.
  2. Move the newly created Lattice2 directory to where your default FreeCAD install directory is located:
  • Windows: (sytem-wide install) %AppData%\FreeCAD\Mod\Lattice2
  • Windows: (for individual installs) C:\Program Files\FreeCAD\Mod\Lattice2
  • Linux: ~/.FreeCAD/Mod/Lattice2
  • MacOS: ~/.FreeCAD/Mod/Lattice2
  1. Restart FreeCAD

Important Note: Make sure that InitGui.py (and the rest of .py files) end up directly under Mod\Lattice2 directory (not under nested directory like Mod\Lattice2\Lattice2).

Usage

After installing the workbench and restarting FC, Lattice2 should now appear in the workbench dropdown menu. It will be listed down towards the bottom of list. Now, you can familiarize yourself with Lattice2 through the Basic Tutorial.

Side Note: If you want to install the workbench for development, git clone the repository wherever you like, and make a symlink in where FreeCAD can pick it up as an add-on.

Status

The workbench is stable. I will take care to not make breaking changes, and some new functionality may keep coming.

If you make your FreeCAD project using Lattice2, all further changes to the project must be done with Lattice2 installed, even if you don't touch the relevant features. Otherwise, the parametric features in the project will lose their bound functionality, and will not recompute, even if you install Lattice2 later. This is the case for all add-ons in FreeCAD, not just Lattice2.

Getting Help

For Documentation see the Lattice2 wiki on Github. As the word "wiki" suggests, you can help by editing the documentation.

If you need help on something specific, you can ask a question on FreeCAD forum (there is no Lattice forum yet...). You can also ask me directly. Note: If you post to the forum, please add this to your post so that I get a notification:
[quote=DeepSOIC user_id=3888]Ding![/quote]

NEW!: Github Discussions for Lattice2 are enabled, you are welcome to ask questions and post random thoughts there!

Contributing

If you have found a bug or are requesting a new feature, please first check to see if it has been previously reported already on the Lattice2 Github repo issue tracker. If not, feel free to open a ticket.

If you have fixed a bug or implemented a new feature you think suits the workbench, feel free to make a pull-request on Github.

License

Lattice workbench is licensed under LGPL V2, just like FreeCAD. For more info, see copying.lib file in this repository.

lattice2's People

Contributors

chennes avatar deepsoic avatar luzpaz avatar maxwxyz avatar mwganson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

lattice2's Issues

Memory Leak

I think Lattice2 has a memory leak. I left a model open over night and my machine was almost unusable in morning. I have 16GB and FreeCAD had almost all of it.

I closed and reopened FreeCAD and the model and the memory started to creep up immediately. After playing with it some, I've observed the following:

  1. It doesn't start consuming memory just by loading the workbench
  2. It's related to a placement object. Once a placement is added, it starts to leak.
  3. More placements == faster leak.
  4. closing the document doesn't release the memory. Have to close FreeCAD.

I created a simple rectangular pad, added a placement to the corner and it leaks roughly 3MB/Minute

Here's my FreeCAD info. This is basically the master branch as of yesterday with a some python only changes in Path. I can re-verify with a clean build of master if necessary.

OS: Debian GNU/Linux buster/sid (i3/i3)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.16726 +1 (Git)
Build type: Unknown
Branch: (HEAD detached at mlampert/feature/4th-axis-setup)
Hash: 599ed42f7968cb90811e73e94c7c60ead7ee3484
Python version: 3.7.3rc1
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)

Missing icon

Cannot find icon: :/icons/Lattice2_ScLERP.svg

ParaSeries fails when there's a link to a part in another document

I am trying to generate a series of sketches with one varied parameter (diameter of a circle). I had no problem getting it to work in a "tryout" document. But when I did the same in a document where I actually wanted to use it, I get the following error message:

  File "L:\*****\AppData\Roaming\FreeCAD\Mod\lattice2\lattice2BaseFeature.py", line 148, in execute
    plms = self.derivedExecute(obj)
  File "L:\*****\AppData\Roaming\FreeCAD\Mod\lattice2\lattice2ParaSeries.py", line 207, in derivedExecute
    doc2.copyObject(screen(selfobj.Object), True)
<class 'RuntimeError'>: {'sclassname': 'class Base::RuntimeError', 'sErrMsg': 'Document must be saved at least once before link to external objects', 'sfile': '', 'iline': 0, 'sfunction': '', 'swhat': 'Document must be saved at least once before link to external objects', 'btranslatable': False, 'breported': False}

Did take me quite some time and tries to find what causes this issue. But in the end it is the simple fact that a link to a body in another document breaks the ParaSeries. It does not matter where the link is in the document tree, neither does it matter where the ParaSeries is or if it has any relation to the linked object. Deleting all external links makes the ParaSeries work as expected.

OS: Windows 10 (10.0)
Word size of FreeCAD: 64-bit
Version: 0.20.Unknown
Build type: Release
Python version: 3.9.7
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: German/Austria (de_AT)

Using LatticePattern with App::Link

Hello,
Is there a possibility to somehow at least indirectly via some workaround use linked PD body in LatticePattern? Trying to use it directly like normal PD body ends with Feature Link is not a PartDesign feature. Unsupported.
If it really can't be used right now would you consider adding a support for linked PD bodies in future?

"Invalid type" exception with spredsheet data in FreeCAD 0.19

When I try to use a value from a FC spreadsheet for the "Count" property of e.g. the PolarArray then the following exception is thrown:
<Exception> Invalid type 'l' in property binding 'Count' 11942.7 <App> Document.cpp(3693): Failed to recompute ArrayTest#PolarArray: Invalid type 'l' in property binding 'Count'

it does work in FC 0.18, though.

I've also figured out a hack to work around this issue in FC 0.19. When I add a unit symbol like "mm" at the end of the number in the spreadsheet, then I can use it for the "Count" property. It will only issue a warning that the unit symbol will be stripped.

OS: Gentoo/Linux (GNOME/gnome)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.20655 (Git) AppImage
Build type: Release
Branch: master
Hash: e8e67e8c5ebbc9f9ed9ea67aba5b891969595ece
Python version: 3.8.2
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)

Populate with copies: Build Array "Polar" Offset not working

OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24267 +99 (Git)
Build type: Release
Branch: Branch_0.19.3
Hash: 6530e364184ce05ccff39501e175cf2237e6ee4b
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: English/Australia (en_AU)

The Attached Video & File might confirm a bug, Works fine on full circle - however I've exhausted all options on a semicircle to get the chain to offset. The polar array does move with Offset, however the parts fail to rebuild.

https://youtu.be/KRElDkAlpYc
https://drive.google.com/file/d/1s2V_Wm77bde4UPMKmBb_Uz8H78vEYWfn/view?usp=sharing

Lattice2 does not work in FreeCAD 0.18.1

FreeCAD 0.18.1 complains when I try to use Lattice2:

invalid literal for int() with base 10: '18.1'

It seems that lattice2's version check does not understand x.x.x format.

polar array - cannot change Num Elements

I can select the number field - but the number of elements will not change, but always remain "5". - Arrows right hand side are grayed out.

OS: Ubuntu 18.04 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14061 (Git)
Build type: None
Branch: master
Hash: c4fc02cbcfff975712e977dc08f859fba71ba0ad
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)

Great WB, bthw. Can really do awesome things!

Cheers,
Wolf

two icons missed

I have lattice2 integrated into my pluginmanager.
only this small error:

Cannot find icon: :/icons/Lattice2_ShapeInfoFeature.svg
Cannot find icon: :/icons/Lattice2_ExposeLinkSub.svg

Missing icon

Report view is giving me this
Cannot find icon: :/icons/Lattice2_ScLERP.svg

PolarArray Values Property losing delimiters?

After setting Values Source to "Values Property", editing Values list,
then clicking "OK", the list is collapsed into one value.
Initially, the list appears good, only after editing is it corrupted.
Oddly, editing the corrupted list by separating the values with <CR>
has no effect.
AND, If corrupted list is edited adding only a comma (no <CR>) between values, list is stored properly again.

I'm using freecad-daily...

OS: Ubuntu 16.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14498 (Git)
Build type: Release
Branch: master
Hash: e381e6b739a6b83b5f476546b64569cfa03a4e3a
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)

in-array reference placement / Lattice3

development branch:

https://github.com/DeepSOIC/Lattice2/tree/reference-placement

todo:

  • basic API

  • visualization

  • support in features:

    • single placement(s)
    • attached array
    • array from shape
    • linear array
    • polar array
    • invert
    • join arrays
    • array filter.
    • project array
    • interpolate array
    • populate copies
    • [halfway there] populate children
    • mirror
    • paraseries
    • toposeries
  • review all CS choices in reference placement recomputes

  • populate to align reference placements?

  • change command logic of:

    • populate copies
    • populate children
    • new icons, maybe?
  • new features:

    • extract reference
    • override reference
    • mover object
  • update documentation:

    • add it to introduction
    • basic tutorial
    • check other tutorials
    • feature documentation
  • testing:

    • Py3
    • PartDesign
    • old projects

  • fix edit attached placement by doubleclick
  • change attached-array default referencing option to "first"

Lattice3:

  • change to new-style module

  • change icon

  • new features:

    • Link-style array support
    • Array from LinkArray

Z-Placement in PolarArray

I am changing the Z placement of a PolarArray feature but it keeps resetting it to 0. Is it right?

The features are not being generated too (maybe because of the wrong z-placement). So, I am adding z=18, for instance, but after the refresh, it will be moved to z=0 again.

Am I doing something wrong or this is a bug?

The base feature is the small whitish trapezoidal form (top-left)
image

Current settings are these.
image

Polar array errors out when attached to an App::Plane

Sure, here it is (but I think you already saw it in Freecad Forum)
lattice_polar_array.zip

I was not using the latest version of Lattice2, now I am using, and I am seeing this

Traceback (most recent call last):
  File "/home/lheck/.FreeCAD/Mod/lattice2/lattice2BaseFeature.py", line 148, in execute
    plms = self.derivedExecute(obj)
  File "/home/lheck/.FreeCAD/Mod/lattice2/lattice2PolarArray2.py", line 119, in derivedExecute
    self.updateReadonlyness(selfobj)
  File "/home/lheck/.FreeCAD/Mod/lattice2/lattice2PolarArray2.py", line 103, in updateReadonlyness
    arc = self.fetchArc(selfobj) 
  File "/home/lheck/.FreeCAD/Mod/lattice2/lattice2PolarArray2.py", line 115, in fetchArc
    return fetchArc(lnkobj, sub)
  File "/home/lheck/.FreeCAD/Mod/lattice2/lattice2PolarArray2.py", line 56, in fetchArc
    linkedShape = obj.Shape
<class 'AttributeError'>: 'App.GeoFeature' object has no attribute 'Shape'
448.595 <App> Document.cpp(3715): Failed to recompute lattice_polar_array#PolarArray: 'App.GeoFeature' object has no attribute 'Shape'
Recompute failed! Please check report view.

If I am using Lattice2 wrong, I will be glad if you can teach me how to fix this.

Originally posted by @leoheck in #41 (comment)

Missing icons reported in terminal

Cannot find icon: :/icons/Lattice2_ScLERP.svg
Cannot find icon: :/icons/Part_Mirror.svg

OS: Manjaro Linux (XFCE/xfce)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.19955 (Git) AppImage
Build type: Release
Branch: master
Hash: fd907d6d9789f71007b8d0177d167f1de82629b8
Python version: 3.8.2
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)

Running the latest Lattice2 HEAD 9a8fa96

Lattice Icons have weird location in Linkstage.

I am working on an icon theme for Linkstage.
And it goes pretty good, but now there is a pattern Icon from Lattice2 on the part workbench. And since I like to have it complete I wanted to mod that one. But I couldn't.
It has a weird location link. I have no idea if it is an error in Linkstage or that it is the workbench. But maybe it rings you some bells if you see it. Normal icons don't have the :/icons/ in front of the location. And I guess the : breaks the iconset config file. I checked some other Workbenches like surface and path they all have normal resource paths.

afbeelding

If you have Linkstage installed and want to see it yourself you can do as followed:
afbeelding

new icon:
PartDesign_Lattice2_PDPattern

expression button on ParameterRef property of ParaSeries doesn't do what a normie expects

When you want to type Parameter Ref, it opens a popup you can populate with an expression. When you close it, the entered expression is not written in the python variable. If you type it directly, it works.

This is because the property is just a string which is supposed to hold expression-like content, and f(x) button sets an expression to compute that string, not the actual string.

I'm not sure what to do about it. There might be a legit use for that weird f(x) button, but mostly it just confuses everyone.

Placement: custom will move selected object, as well as the new placement

Example:
make Cube
select it
Create custom placement. A dialog appears.
As you change values, both the cube and the placement move; but in the end, placement and cube are independent..

solutions:

  1. deselect the object
  2. or, maybe, treat this and create a copy of cube. Or linked placement.
  3. Or option 2 deserves special command

No Lattice Update/Recompute?

It seems sometimes my PolarArray gets "stuck" -
varying parameters, etc. result in no change to Lattice objects or display...
The way to effect a change is to delete my Lattice and re-create.

Clone array feature

For PartDesign Next / Part-o-magic
The idea is to suck out Placements from other parts and bodies

Weak parenting

populate tools hide the array under themselves. The purpose of the array is to be re-usable. So maybe it's best to not parent the array, to keep it on top of tree?

That also applies to input shapes for 'moved object' mode population. The original is most likely needed too, so it should remain.

Multiple colors/appearances

Thank you for this extremely useful tool. I have a question.

I am working on making a 3D model for a relay.

  1. Started in the Part Design workbench by creating a part.
  2. Added two bodies, one for the main relay cube shape, and
  3. one for modeling a single pin to be placement array'd.
  4. I drew a chiral sketch mapped to the face on the underside of the relay.
  5. I put a placement on the top face of the single pin, and
  6. A placement on the first chiral shape I drew in the sketch for the relay cube.
  7. I made an array of placements out of the chiral sketch, and then
  8. used the Lattice Part Design pattern copy to attach the single pin to the array of placements.

That is what you see here:

image

image

I am trying to change the overall appearance of the relay to look like the example image shown here: https://www.digikey.com/products/en?keywords=EC2-3NU

But I cannot figure out how to change the appearance of the relay body and pins separately. Is there a way to do that?

Error with FreeCAD 0.14

https://github.com/DeepSOIC/Lattice2/blob/master/lattice2Common.py#L54

I don't know if FreeCAD 0.14 is supported or not.

Gives an error with FreeCAD 0.14:

Error: 'module' object has no attribute 'FreeCADError'

FreeCAD:

OS: Debian GNU/Linux 8.6 (jessie)
Word size: 64-bit
Version: 0.14.3702 (Git)
Branch: releases/FreeCAD-0-14
Hash: b3368125c63289ec8ce9faec2b2ae4c78d436406
Python version: 2.7.8
Qt version: 4.8.6
Coin version: 4.0.0a
SoQt version: 1.6.0a
OCC version: 6.7.0

Attached Placement Error

Hello,

When trying to use the Attached Placement function, this error happens, independently of what is selected, be it a vertex, a line, a surface or nothing:
Lattice2 - Attached Placement Error
Traceback (most recent call last): File "E:\Users\rstecman\AppData\Roaming\FreeCAD\Mod\lattice2\lattice2AttachablePlacement.py", line 207, in Activated CreateAttachablePlacement(name= "Placment") File "E:\Users\rstecman\AppData\Roaming\FreeCAD\Mod\lattice2\lattice2AttachablePlacement.py", line 173, in CreateAttachablePlacement FreeCADGui.doCommand("f = lattice2AttachablePlacement.makeAttachablePlacement(name='"+name+"')") File "<string>", line 1, in <module> File "E:\Users\rstecman\AppData\Roaming\FreeCAD\Mod\lattice2\lattice2AttachablePlacement.py", line 46, in makeAttachablePlacement obj = FreeCAD.ActiveDocument.addObject("Part::AttachableObjectPython",name) Base.FreeCADError: No document object found of type 'Part::AttachableObjectPython'
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.4 (GitTag)
Build type: Release
Branch: releases/FreeCAD-0-18
Hash: 980bf9060e28555fecd9e3462f68ca74007b70f8
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Portuguese/Brazil (pt_BR)

FC 0.19 qRegisterResourceData signature mismatch?

I'm trying out 0.19 and got some errors loading Lattice2.

OS: Ubuntu 18.04.3 LTS (ubuntu:GNOME/ubuntu-wayland)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Python version: 3.6.8
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)

Loading Part module... done
'PySide2.QtCore.qRegisterResourceData' called with wrong argument types:
PySide2.QtCore.qRegisterResourceData(int, str, str, str)
Supported signatures:
PySide2.QtCore.qRegisterResourceData(int, bytes, bytes, bytes)
Traceback (most recent call last):
File "", line 49, in Initialize
File "/home/mike/.FreeCAD/Mod/lattice2/Lattice2.py", line 28, in
import Lattice2CodeModules as Code
File "/home/mike/.FreeCAD/Mod/lattice2/Lattice2CodeModules.py", line 1, in
import lattice2Common as _common_code
File "/home/mike/.FreeCAD/Mod/lattice2/lattice2Common.py", line 88, in
import lattice2_rc
File "/home/mike/.FreeCAD/Mod/lattice2/lattice2_rc.py", line 21, in
qInitResources()
File "/home/mike/.FreeCAD/Mod/lattice2/lattice2_rc.py", line 16, in qInitResources
QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)

Attachment using objects name instead of label

Hi, I am experimenting with this lattice2 plugin. Thanks, by the way, it is awesome.

I am using the polar array, and in the Attachment panel I am seeing this Pad004 but I don't have any Pad004, this name is hidden from the user. What I have is wall_ribs instead. This is the name that the plugin should use. What happens it most of the time the user does not rename features so de label has the same name as the object.

Ah, and this should be used everywhere if you agree that this is an important change.

With latest FC build Lattice shapestirng doesn't work

`Running the Python command 'Lattice2_ShapeString' failed:
Traceback (most recent call last):
File "/home/mac/.local/share/FreeCAD/Mod/lattice2/./lattice2ShapeString.py", line 285, in Activated
CreateLatticeShapeString(name = "Strings")
File "/home/mac/.local/share/FreeCAD/Mod/lattice2/./lattice2ShapeString.py", line 260, in CreateLatticeShapeString
FreeCADGui.doCommand("f = lattice2ShapeString.makeLatticeShapeString(name='"+name+"')")
File "", line 1, in
File "/home/mac/.local/share/FreeCAD/Mod/lattice2/./lattice2ShapeString.py", line 77, in makeLatticeShapeString
LatticeShapeString(obj)
File "/home/mac/.local/share/FreeCAD/Mod/lattice2/./lattice2ShapeString.py", line 105, in init
self.makeFoolObj(obj)
File "/home/mac/.local/share/FreeCAD/Mod/lattice2/./lattice2ShapeString.py", line 142, in makeFoolObj
self.draft_shape_string = _ShapeString(foolObj)
File "/home/mac/freecad-build/Mod/Draft/draftobjects/shapestring.py", line 59, in init
obj.addProperty("App::PropertyBool", "MakeFace", "Draft", _tip).MakeFace = True

'NoneType' object has no attribute 'MakeFace'`

[code]
OS: Debian GNU/Linux 11 (bullseye) (XFCE/lightdm-xsession)
Word size of FreeCAD: 64-bit
Version: 0.20.28431 (Git)
Build type: Unknown
Branch: master
Hash: 1d95f7b58da86406571377d4e0ce06190761d9b5
Python 3.9.2, Qt 5.15.2, Coin 4.0.0, OCC 7.5.1
Locale: C/Default (C)
Installed mods:

  • kicadStepUpMod 10.11.6
  • Manipulator 1.4.3
  • DynamicData 2.45.0
  • fasteners 0.3.38
  • fcgear 1.0.0
  • plugins
  • Defeaturing
  • Assembly4 0.11.10
  • OpticsWorkbench 1.0.8
  • workfeature-macro
  • sheetmetal 0.2.49
  • A2plus 0.4.55a
  • CurvedShapes 1.0.1
  • Curves 0.3.0
  • lattice2 1.0.0
    [/code]

How to use TopoSeries?

I'm trying to attach copies of the sketch Feature (the trapezium at the top) to some of the edges of another sketch (Path just below). I'm expecting to obtain the shape on the right (in my actual use case, I'd only select a subset of the edges). The Feature sketch has 4 degrees of freedom, which allow placing both its endpoints and it will stretch as needed. The use case is to add gluing tabs for a model made out of paper.

image

I tried to click TopoSeries after selecting the Feature and the Edges of Path (made with the Downgrade to Edges tool). I also tried to click TopoSeries after selecting the Feature and the Array from Edges of Path (made with Downgrade to Edges โ†’ Array from shape: internal placements with orient mode = child.Edge and Translate mode = child.Vertex)

In both cases, I get this message:

Error:
In supplied links, nothing to loop over compounds was found. Key-by-key errors follow:

How is the TopoSeries tool supposed to be used? I tried looking for documentation but couldn't find any example.

Here's the FreeCAD document in the screenshot: test_lattice2_toposeries.FCStd.zip

I just discoved Lattice2 and it seems very useful so far :)

Lattice2 for Std Part

As far as I can tell, there's no way to use Lattice2 to place Std Part instances.

If this is already possible, it would be great to have an example of some sort on the Wiki.

Macro not recorded for Explode Compound

When recording a macro and using Lattice2 Explode Compound, the operation is not recorded. Is there any manual way to add this code to a macro? If so please send to me at oneilpatr at gmail dot com

Thanks

PolarArray double-click editing doesn't work

  • start FreeCAD, make a new document, change to lattice2
  • click on icon PolarArray --> a polar array is created
  • double click on the obj in tree view
  • click on ok
  • error message ...
Traceback (most recent call last):
  File "/home/hugo/.FreeCAD/Mod/lattice2/lattice2AttachablePlacement.py", line 93, in unsetEdit
    if not (mode == EDIT_ATTACHMENT or (mode == 0 and always_edit_attachment)): raise NotImplementedError()
<class 'NameError'>: name 'always_edit_attachment' is not defined

reported by bernd:
https://forum.freecadweb.org/viewtopic.php?p=320316#p320316

Shape of the paper plane

I'm in the process of studying your powerful workbench and have a suggestion. The shape of the paper plane is granted very nice. However, I think it would be probably more practical to have the back edges of the "wings" parallel to the Y-axis. I'm thinking that someone may want to visually align a placement perpendicular to something and these edges would facilitate that.

This is a detail but I guess that the change is minimal.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.