Draft Pattern got lost?

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!
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Draft Pattern got lost?

Post by jmaustpc »

shoogen wrote:Though the image/patern is not visible when hovering the object with the mouse pointer.
yes, the pattern is not visible when the item is either selected or pre-selected, try clicking on one icon the treeveiw... the pattern disappears as the face becomes one complete colour.

However if you select the Draft Rectangle first, then change to make face "true", then display pattern, then it will work even though the Dwire is selected.
renatorivo
Veteran
Posts: 2611
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Re: Draft Pattern got lost?

Post by renatorivo »

Hi,
two things about Pattern
- first - wiki
I think it would be useful to have the page Draft_Pattern where say how the filling of a DWire works.
For this reason, I added a section temporarily (not marked) in
http://www.freecadweb.org/wiki/index.ph ... _Rectangle
with the following text (need help, thank you)
Draft Pattern

{{GuiCommand|Name=Draft Pattern|Workbenches=[[Draft Module|Draft]], [[Arch Module|Arch]]|MenuLocation=?? -> ??|Shortcut=|SeeAlso=}}

All Dwire closed, when in "Flat Lines" display mode, can display a hatch pattern, by setting their "Pattern" property.

# Select the object
# In Combo View -> Data: set Make Face=true
# In Combo View -> View -> Pattern: specify a hatch pattern to fill the wire with
# In Combo View -> View -> Pattern Size: specify the size of the hatch pattern

Note:
* The pattern is not visible when the item is either selected or pre-selected,
* If you create a face with upgrade, pattern tool does not work anymore
* The element Dwire can be created filled directly, by checking the box

- second - personal
while I was playing with the function, I produced the rectangle below, It looks like an object Draft,
but the section Draft is missing. Rectangle1 works regularly
I do not remember how I did it, does anyone have any idea?

thanks

OS: Windows 7
Word size: 64-bit
Version: 0.14.3700 (Git)
Branch: releases/FreeCAD-0-14
Hash: 32f5aae0a64333ec8d5d160dbc46e690510c8fe1
Python version: 2.7.6
Qt version: 4.8.5
Coin version: 4.0.0a
SoQt version: 1.6.0a
OCC version: 6.6.0
Attachments
noDraft.png
noDraft.png (24.24 KiB) Viewed 1507 times
User avatar
yorik
Founder
Posts: 13660
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Draft Pattern got lost?

Post by yorik »

I don't know what happened to your rectangle.. apparently it lost some of its properties. The strange thing is that it is still a draft object (it has the correct icon). You can try this to "recreate" the Draft object (it will recreate its properties), but you might loose some of its information:

import Draft
Draft._Rectangle(FreeCAD.ActiveDocument.Rectangle)
Draft._ViewProviderRectangle(FreeCAD.ActiveDocument.Rectangle.ViewObject)

About the other things above, indeed the pattern vanishes when the object is highlighted. This is because the highlighting is a kind of "overlay", drawn on top of the object...

I still didn't put anything about the pattern in the wiki because it's not 100% totally good yet (the interface to choose patterns is not too nice yet, etc), but, after all indeed it's better to add something than leave it with nothing...
renatorivo
Veteran
Posts: 2611
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Re: Draft Pattern got lost?

Post by renatorivo »

Hi,Yorik
thanks for reply

after applying
yorik wrote:import Draft
Draft._Rectangle(FreeCAD.ActiveDocument.Rectangle)
Draft._ViewProviderRectangle(FreeCAD.ActiveDocument.Rectangle.ViewObject)
with
OS: Ubuntu 12.04.5 LTS
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.15.4138 (Git)
Branch: master
Hash: f119e740c87918b103140b66b2316ae96f136b0e
Python version: 2.7.3
Qt version: 4.8.1
Coin version: 3.1.3
OCC version: 6.7.1


the rectangle has regained its properties Draft Pattern and Texture, but has lost its original size,
and new items Data (data is duplicated: Length1,...) appeared which I don't know what they are.
Attachments
no pattern2.FCStd.zip
delete zip
(4.66 KiB) Downloaded 22 times
rectangleregenerated.png
rectangleregenerated.png (30.82 KiB) Viewed 1465 times
User avatar
yorik
Founder
Posts: 13660
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Draft Pattern got lost?

Post by yorik »

Hm yes I feared so... Probably it's best to delete that rectangle and make it again, otherwise it might bring you problems later on. Something must have gone wrong at some point, but it is hard to tell what...
Post Reply