在Arch工具台里添加一个工具

Chinese forum
johnwang
Posts: 445
Joined: Sun Jan 27, 2019 12:41 am

Re: 在Arch工具台里添加一个工具

Post by johnwang » Sat Aug 08, 2020 11:02 pm

paullee wrote:
Sat Aug 08, 2020 1:43 pm
試一下 負數
这个可以。

有没有办法让Wall自带材料呢?每次点Wall工具画出来的,都要自己再选材料,太麻烦了。

其实对材料不是非常关心,更关心的是wall的型式,也就是单层(内墙)和多层(外墙)的区别。希望是点两个点一画,就直接到最后的型式。

paullee
Posts: 2661
Joined: Wed May 04, 2016 3:58 pm

Re: 在Arch工具台里添加一个工具

Post by paullee » Sun Aug 09, 2020 12:29 am

看來跟 @vanuan 的想法柤近 :D


Re: Are there features in the works?
vanuan wrote:
Thu Aug 06, 2020 11:21 am
paullee wrote:
Wed Aug 05, 2020 1:30 pm
Can you describe your ideal workflow for reference ?
First of all, when selecting a wall, UX should clearly show the pivot points which forms the wall axis. The axis line defines the reference relative to which the wall grows in thickness and height. Of course, this means, all walls should be modeled as lines, not areas or solids. The latter are beams or slabs.

Secondly, multi material definition should be openable from the wall context menu or in the dialog when double-clicking the wall. Changing wall layers should affect the wall thickness relative to the wall axis. Multimaterial definition should be more powerful, describing both line appearance and physical properties. Maybe the task area is too small and it should be opened in a dedicated MDI window.

Thirdly, there should be an extrusion alignment setting to change the direction of material extrusion. If alignment to center not supported by IFC, model it as multiple layer sets extruded in the opposite directions.

And last but not least, hatching patterns are very important.

After those are implemented, then there should be some material presets, e.g. cladding + insulation + woodframing + drywall, bricks + air + bricks, plaster + insulator + reinforced concrete + plaster.
Roy_043 wrote:
Wed Aug 05, 2020 11:33 am
That is not correct. Please look at Arch_MultiMaterial.
I'll check out how the multimaterial tool can be extended with presets. Maybe that's the only thing that's missing to implement what OP asks.

johnwang
Posts: 445
Joined: Sun Jan 27, 2019 12:41 am

Re: 在Arch工具台里添加一个工具

Post by johnwang » Mon Aug 10, 2020 2:01 am

如果不希望编译图标,可以在Mod\Arch下建resources目录,然后拷入要用的svg图标文件。这里拷入了一个template_resource.svg文件。

用文本编辑器打开Arch_WallExt.py, 将其中指定图标的语句指向拷入的svg文件。

Code: Select all

class _CommandWallExt:
    def GetResources(self):
        #return {'Pixmap'  : 'Arch_WallExt',
        return {'Pixmap'  : os.path.dirname(__file__)+"./resources/template_resource.svg",
因为用到python的os模块,所以在文件最前面,还要导入它,如下:

Code: Select all

import os
import FreeCAD,Draft,ArchComponent,DraftVecUtils,ArchCommands,math
结果是这样的:
arch.jpg
arch.jpg (9.12 KiB) Viewed 1288 times

paullee
Posts: 2661
Joined: Wed May 04, 2016 3:58 pm

Re: 在Arch工具台里添加一个工具

Post by paullee » Sat Aug 15, 2020 11:19 pm

在Arch, Draft, BIM 添加工具都懂了,可以說一下(例如Inkscape)如何畫圖標嗎? :D

johnwang
Posts: 445
Joined: Sun Jan 27, 2019 12:41 am

Re: 在Arch工具台里添加一个工具

Post by johnwang » Sat Aug 15, 2020 11:35 pm

paullee wrote:
Sat Aug 15, 2020 11:19 pm
在Arch, Draft, BIM 添加工具都懂了,可以說一下(例如Inkscape)如何畫圖標嗎? :D
我不会Inkscape呀。

我觉得可以用FreeCAD画,仅限用直线,矩形,圆,折线几个命令,在一个100X100的矩形里画。然后写个脚本,输出到svg文件里。
我现在可以读一个文件,比如存有叶型型线数据的文件,然后画到svg文件里。还可以把fea网格画到svg里。

paullee
Posts: 2661
Joined: Wed May 04, 2016 3:58 pm

Re: 在Arch工具台里添加一个工具

Post by paullee » Sun Aug 16, 2020 12:11 am

不懂FC 可以輸出 SVG :oops:

可以示範一下嗎?

johnwang
Posts: 445
Joined: Sun Jan 27, 2019 12:41 am

Re: 在Arch工具台里添加一个工具

Post by johnwang » Sun Aug 16, 2020 12:54 am

paullee wrote:
Sun Aug 16, 2020 12:11 am
不懂FC 可以輸出 SVG :oops:
在draft里画完,在model tree里选中要输出的。然后File/export,选SVG格式输出。

paullee
Posts: 2661
Joined: Wed May 04, 2016 3:58 pm

Re: 在Arch工具台里添加一个工具

Post by paullee » Sun Aug 16, 2020 1:18 am

哦,癹現要選 Flattened SVG (選了Drawing/*.svg) 不行 :D

'Export of this object type is not support by Drawings module'

另外,輸出 TechDraw / ArchView 可以,但有bug...

Post Reply