[SOLVED] How to add wire to the face?

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
stefankorisnik3
Posts: 101
Joined: Sun Jul 24, 2022 12:49 pm

[SOLVED] How to add wire to the face?

Post by stefankorisnik3 »

Have the solid object and inside closed wire:

Code: Select all

f = App.ActiveDocument.getObject("f1_1821001_solid_cs0")
>>> f
<Part::PartFeature>
The wire:

Code: Select all

w = f.Shape.Wires[0]
>>> w
<Wire object at 000002BB59E552E0>
Making the new face:

Code: Select all

face = Part.Face()
>>> face.addWire(w)
And i get:

Code: Select all

Traceback (most recent call last):
  File "<input>", line 1, in <module>
OSError: Illegal storage access! Please save your work under a new file name and restart the application!
I have tried and with

Code: Select all

face.addWire(copy(w))
but same
How can i add wire to the face
Also i want next to do to add this face to the mesh, how can i do this?

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.29177 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: 68e337670e227889217652ddac593c93b5e8dc94
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.2
Locale: English/United Kingdom (en_GB)
Installed mods: 
  * CurvedShapes 1.0.3
  * Curves 0.5.2
Last edited by stefankorisnik3 on Mon Aug 01, 2022 7:27 pm, edited 1 time in total.
User avatar
onekk
Veteran
Posts: 6199
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: How to add wire to the face?

Post by onekk »

stefankorisnik3 wrote: Mon Aug 01, 2022 2:42 pm ...
Wrong assumptions.

A face has wires, but not in this sense.

It will be better to keep things in one post, if you agree.

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
Post Reply