Revit自适应点Orientation和referenceline的解释

api.chm里的解释

Member name Description
ToHost

The adaptive point will be oriented to the coordinate system of the geometry the point is hosted on. This option was previously named: HostReferenceStrictly

ToHostAndLoopSystem

The adaptive point will be oriented to the coordinate system of the geometry the point is hosted on. However, the orientation of the Z axis is controlled by the order of placed points. If the placed adaptive points of a component are placed in a different order with respect to the host order, (clockwise instead of counter-clockwise), then the Z axis will invert and the planar projection will flip.

This option was previously named: HostReferenceAutoFlip.

ToGlobalZthenHost

The Z axis of the adaptive point will be oriented to the Z axis of the document the instance is placed in. The XY axis are determined by the XY of the geometry the point is hosted on.

This option was previously named: PlacementVertical.

ToGlobalXYZ

The adaptive point will be oriented to the coordinate system of the document the instance is placed in.

This option was previously named: PlacementOrthogonal

ToInstanceZthenHost

The Z axis of the adaptive point will be oriented to the Z axis of the adaptive family instance the point is part of. The XY axis are determined by the XY of the geometry the point is hosted on.

This option was previously named: FamilyVertical

ToInstance

The adaptive point will be oriented to the coordinate system of the adaptive family instance the point is part of. This is the default orientation of adaptive points.

This option was previously named: FamilyOrthogonal

   

主要分析下toglobal和tohos和toinstance,其余的组合情况可以类推.

1.最好区分的ToGlobal

自适应点的transform的basis永远是XYZ.basisX,XYZ.basisY,XYZ.basisZ,只不过origin会根据你放的位置(position)而变化

2.ToHost和ToInstance

在generic adaptive model .rft里通过UI放置的referencepoint的初始默认是Ref.level的,所以它的transform的三个轴等于global的轴(你可以手动更改其host来更改它的初始transform),api里则通过newreferencepoint(transform)来实现.

而tohost和toinstance是什么意思呢?

tohost即是采取你放置的face或者referenceplane等等的transform的轴

toinstance可以这么理解,在初始自适应族文档中,如前所述自适应的trnasform三轴是global的,如果你对其施以变换T(比如flip,mirror,rotate或者单纯的放在了一个斜的reference plane上),那么toinstance的意义就是tohost的基础上对transform施以变换T

举个例子,族文档中对初始global坐标的自适应点绕z轴旋转30°(注意1.取消自适应点才能进行旋转操作,顺便一提api中referencepoint的setcoordinatesystem等相关操作只对UI中referencepoint的properties browser中含有镜像,翻转,旋转且不为灰色有效.注意2,必须将自适应点的host设置为not associated),orientation设置toinstance,load到项目文档中,host选零标高,那么toinstance则会在此基础上旋转30°,而tohost不会,因为零标高的transform就是global的

3.Place on workplane和Place on face

一般勾选place on workplane.后者只要移到某个face上会无视你选择的host而采取face的tranform(当然toinstance的话还会施加一个变换)只有toglobal时无视workonface

一般来讲以标高平面为host的构件component都是on workplane而以某构件为目标的附属构件或者在族文档的内嵌nested构件都是on face,在建族时要考虑好加载时的坐标系,比如on face的情况,face的z轴是指向face外侧法向的,所以建族时要考虑好z向

简单概括下,on face相当于snap相当于pick a new host,所以自然无视你在下拉框里的host,而on workplane就严格限制了工作平面

4.ToHostandLoopSystem

 tohost的变体,z轴不却决于host的平面的法向,而是取决于自适应放置顺序(按右手系确定),注意至少三个点.

5.reference line 和 model line

想必初学者都对mass familydocument(包括体量.rft和自适应模型.rft)中的reference line(参照线) 和model line(模型线)的区别头疼不已.试解释如下:

      modelline属于curveelement,它是element中的model element并不是geometry element,view element,annotation element等等不具有实体的element.在普通的familydocument中,创建blend融合,extrusion拉伸,旋转revolution,扫描(放样)sweep,放样融合sweptblend时系统都会创建一个绘图模式供我们绘制profiles轮廓,其轮廓在api中对应curvearrarray或者sweepprofile,其iterator为curve,是属于geometry的没有实体的element,而在mass familydocument中,profile是referencearray或者referencearrarray需要创建一个实体modelcurve(modelline为其子类)然后从其GeometryCurve属性中获取reference,实际上api中并没有referenceline这个类,而是通过modelline的changetoreferenceline()方法转换为referenceline,创建的形状图元的类名叫做form(尽管它有类似的拉伸,旋转等创建方法,但其实在UI中我们是看不见的,这些都是人为叫的,在api中则是比如newextrusion()和newextrusionform的区别)

    所以我们在普通的fmailydocument中建模时很难用到modelline而在自适应或体量中需要借助modelline来绘制profile,而referenceline其实只是modelline的一个变种,它的reference前缀表明它剥离了modelline的实体属性,变成了reference(尽管referenceline没有这个类但有理由相信它属于reference下)它天然是reference所以可以直接用来绘制profile,而api中则必须要先绘制modelline来绘制profile,由于modelline是实体如果放到项目中是能看见的线,所以在创建form时,api和revitUI都贴心的帮我们将profile的modelline都删除掉了.

    referenceline还有其他的存在意义.我们知道在普通的familydocument中我们常常依赖referenceplane来进行参数化,而referenceplane必须依赖于一个已经存在的planar plane平面它可以是另一个参照平面可以是标高也可以是form的planar face,而reference则是专为mass familydocument设计的强大的参照工具,它可以3D snapping,形成至少两个的正交的参照面,如果没有形成chain,端点处又各有一个参照面.它的缺陷是它形成的参照面无法命名,要手动pick.

   此外referenceline由于是特殊的modelline在创建form被自动消除时会留下此modelline的reference,这意味着,如果我们参数化时依赖了构成profile的modelline,modelline被消耗掉后,这个参数化的依赖项也随之消失,但是如果是referenceline的话就会维持这个依赖

 

 

 

 

你可能感兴趣的:(revit)