Files
2021-04-20 11:36:21 +02:00

246 lines
20 KiB
Plaintext

{\rtf1\fbidis\ansi\ansicpg1252\deff0\deflang1033\deflangfe1033\deftab420{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial;}{\f1\fswiss\fprq2\fcharset0 Tahoma;}{\f2\fnil\fcharset0 Tahoma;}}
{\colortbl ;\red0\green0\blue0;}
{\info{\horzdoc}{\*\lchars (.<?[\'7b\'ab\'b7\'91\'93}{\*\fchars !"'),.:\'3b>?]`|\'7d~\'a8\'af\'b7\'bb\'92\'94\'85}}
\viewkind4\uc1\pard\ltrpar\nowidctlpar\kerning2\b\f0\fs20 Application:\b0 SlabShapeEditing\line\b Revit Platform:\b0 Architecture, Structure\line\b Revit Version:\b0 2011.0\line\b First Released For:\b0 2009.0\line\b Programming Language:\b0 C#\line\b Skill Level:\b0 Medium\line\b Category:\b0 Geometry, Elements\line\b Type:\b0 ExternalCommand\line\line\b Subject:\b0 Create SlabShapeVertex and SlabShapeCrease.\line\b Summary:\b0 \line\kerning0 This sample demonstrates how to create SlabShapeVertex and SlabShapeCrease, and then use them to edit slab\rquote s shape.\par
\pard\ltrpar\nowidctlpar\qj\kerning2\b\par
Classes: \par
\pard\ltrpar\nowidctlpar\fi360\kerning0\b0 Autodesk.Revit.DB.SlabShapeEditor\par
Autodesk.Revit.DB.SlabShapeCrease\par
Autodesk.Revit.DB.SlabShapeCreaseArray\par
Autodesk.Revit.DB.SlabShapeCreaseArrayIterator\par
Autodesk.Revit.DB.SlabShapeVertex\par
Autodesk.Revit.DB.Line\par
Autodesk.Revit.DB.Edge\par
Autodesk.Revit.DB.CurveArray\par
Autodesk.Revit.DB.GeometryObject\par
\pard\ltrpar\nowidctlpar\qj\kerning2\par
\b Project Files: \par
\b0 Command.cs\par
\pard\ltrpar\nowidctlpar\li360\kerning0 This file contains a class Command that implements the IExternalCommand interface, get selected slab, creates SlabShapeEditingForm and gets ExternalCommandData.\par
\par
\pard\ltrpar\nowidctlpar\qj SlabShapeEditingForm\kerning2 .cs\par
\pard\ltrpar\nowidctlpar\li360\kerning0 This file contains a class SlabShapeEditingForm which inherits from Form. This Form has a PictureBox show the geometry info of Slab and some button used to create vertex and crease. \par
\pard\ltrpar\nowidctlpar\li720\par
\pard\ltrpar\nowidctlpar\qj\kerning2 SlabProfile.cs\par
\pard\ltrpar\nowidctlpar\li360\tx720\kerning0 This file contains a class \kerning2 Sl\kerning0 abProfile which calculates the geometry info of Slab. SlabProfile consists of methods Draw2D(), AddVertex() and AddCrease(). Draw2D() is used to draw \kerning2 Slab \kerning0 curves on the picture box, and AddVertex() and AddCrease() are used to create vertex and crease on slab.\par
\pard\ltrpar\nowidctlpar\qj\kerning2\par
LineTool.cs\par
\pard\ltrpar\nowidctlpar\li360\tx720\kerning0 This file contains a class named LineTool which provides some methods to draw lines on the form and store the data of drawn lines. It also provide method to draw new created vertex as rectangle\par
\pard\ltrpar\nowidctlpar\tx720\par
\pard\ltrpar\nowidctlpar\qj\kerning2 MathTools.cs\par
\pard\ltrpar\nowidctlpar\li360\tx720\kerning0 This file contains Verctor4 and Matrix4 two classes. These two classes are used to transform points between 3D and 2D.\par
\pard\ltrpar\nowidctlpar\qj\kerning2\par
\b Description:\b0 \par
\pard\ltrpar\nowidctlpar This sample shows user how to:\par
\pard\ltrpar\nowidctlpar\fi-360\li360 1.\tab Create SlabShapeVertex by \par
\pard\ltrpar\nowidctlpar SlabShapeEditor.DrawPoint(Autodesk.Revit.Geometry.XYZ location) method.\par
\pard\ltrpar\nowidctlpar\fi-360\li360 2.\tab Create SlabShapeCrease by\par
\pard\ltrpar\nowidctlpar SlabShapeEditor.DrawSplitLine(SlabShapeVertex startVertex, SlabShapeVertex endVertex) method. A crease is consisted by two vertices.\par
\pard\ltrpar\nowidctlpar\fi-360\li360 3.\tab Move new created vertex by\cf1\kerning0\f1\fs18\par
\pard\ltrpar\nowidctlpar\cf0\kerning2\f0\fs20 SlabShapeEditor.ModifySubElement(SlabShapeVertex pVertex, double offset)\par
\pard\ltrpar\nowidctlpar\fi-360\li360 4.\tab Move new created crease by\cf1\kerning0\f1\fs18\par
\pard\ltrpar\nowidctlpar\cf0\kerning2\f0\fs20 SlabShapeEditor.ModifySubElement(SlabShapeCrease pCrease, double offset), offset use to set position of midpoint on crease.\cf1\kerning0\f1\fs18\par
\pard\ltrpar\nowidctlpar\li360\cf0\kerning2\f0\fs20\par
\pard\ltrpar\nowidctlpar\qj\par
\b Instructions:\b0 \par
\pard\ltrpar\nowidctlpar\fi-420\li420\qj\tx420 1.\tab Draw a slab in Revit or open the CreateComplexAreaRein.rvt, and then select the slab.\par
\pard\ltrpar\nowidctlpar\fi-420\li420\qj 2.\tab Run this command.\par
3.\tab Click \ldblquote create vertex\rdblquote \kerning0\f2\fs17{\pict\wmetafile8\picw635\pich635\picwgoal360\pichgoal360
0100090000031204000000000e03000000000e03000026060f001206574d464301000000000001
00eb5b0000000001000000f005000000000000f0050000010000006c0000000000000000000000
17000000170000000000000000000000770200007802000020454d4600000100f00500000c0000
00010000000000000000000000000000000005000000040000510100000e010000000000000000
00000000000068240500b01e0400460000002c00000020000000454d462b014001001c00000010
0000000210c0db01000000600000006000000046000000b8020000ac020000454d462b22400400
0c000000000000001e4009000c00000000000000244001000c0000000000000030400200100000
00040000000000803f214007000c000000000000000840000504020000f80100000210c0db0100
0000000000000000000000000000000000000100000089504e470d0a1a0a0000000d4948445200
0000180000001808020000006f15aaaf000000017352474200aece1ce900000009704859730000
0ec400000ec401952b0e1b0000018049444154384fad94bf4ac35014c6ad55413385f8043af802
59923d93afd19748910c199a296f10a89363111c043308ba5971707014424b146c081924d0b4e0
a7a79e5cb44993b49770b849eef9eeeffcb9b79524c9d626460b428aa2ac291545d142284b270d
b40683f387a737d77521b4cdfeef93f0239ed6b2bbfb47711c93424e04958a509ee7d1ca93e383
2544f3f977742b2d542ccb324d53d77591280faddd3e8450b9edf72fb1c6b66dc7712449cad257
5996892e17aac202100e5fd3b42644602115c33060111d6c6d22e48559545525a8d1e8b91e11b3
903fb2039c300c91cd1a44220bab8085ea5b95683cfe24e7c79f21b2507dab12f9be4fa9c10403
1131cb7fa21d2e27760882000ed36e171f4f8743fe4535425ee80bf75a96de2cef2356210af853
38e8c03f2c2b8888850651882022cb6f8e0a88580593b3d90c4fa7d329e9f8c2aaedf57aa216bd
969cbec2aaa1fd590b139c6fca45915df73e62eafbdb0bbe8f16e5bfbabe032776a86be3f88574
377af98b096e3cff02f7d9baf0443afd350000000049454e44ae42608200084001082400000018
0000000210c0db01000000030000000000000000000000000000001b4000004000000034000000
0100000002000000000000bf000000bf0000c0410000c04103000000000000b3000000b3ffffbf
41000000b3000000b3ffffbf412100000008000000620000000c00000001000000150000000c00
000004000000150000000c0000000400000051000000d401000000000000000000001700000017
0000000000000000000000000000000000000018000000180000005000000064000000b4000000
20010000000000002000cc00180000001800000028000000180000001800000001000400000000
000000000000000000000000000f0000000000000000000000ffffff00f1f1f10004040400f0fb
ff0090a9ad0077777700d6e7e700eaeaea00b2b2b2006666660086868600c0c0c000cbcbcb0000
008000222222222222222222222222233333333333333333333332239595959595959595959a32
2348888888888888888856322347dbeebc87878787879a322348beeeeb888888888856322347ee
eeee87878787879a322348eeee33b88888888856322347beeeb3b3b78787879a322348dbeedb1b
338888885632234787878b1bbb3787879a32234888888dbbddb3888856322347878787b1111b37
879a3223488888888b1111b3885632234787878787b1111b379a322348888888888b11db335632
23478787878787b1bbb39a32234888888888888bbbbd56322347878787878787b31c9a32234888
88888888888bbb5632234787878787878787879a32234444444444444444445632233333333333
3333333333322222222222222222222222224c0000006400000000000000000000001700000017
000000000000000000000018000000180000002900aa0000000000000000000000803f00000000
000000000000803f00000000000000000000000000000000000000000000000000000000000000
00220000000c000000ffffffff460000001c00000010000000454d462b024000000c0000000000
00000e000000140000000000000010000000140000000400000003010800050000000b02000000
00050000000c0218001800030000001e0004000000070104000400000007010400cf000000410b
2000cc001800180000000000180018000000000028000000180000001800000001000400000000
000000000000000000000000000f0000000000000000000000ffffff00f1f1f10004040400f0fb
ff0090a9ad0077777700d6e7e700eaeaea00b2b2b2006666660086868600c0c0c000cbcbcb0000
008000222222222222222222222222233333333333333333333332239595959595959595959a32
2348888888888888888856322347dbeebc87878787879a322348beeeeb888888888856322347ee
eeee87878787879a322348eeee33b88888888856322347beeeb3b3b78787879a322348dbeedb1b
338888885632234787878b1bbb3787879a32234888888dbbddb3888856322347878787b1111b37
879a3223488888888b1111b3885632234787878787b1111b379a322348888888888b11db335632
23478787878787b1bbb39a32234888888888888bbbbd56322347878787878787b31c9a32234888
88888888888bbb5632234787878787878787879a32234444444444444444445632233333333333
3333333333322222222222222222222222220c00000040092900aa000000000000001800180000
000000040000002701ffff030000000000
}\kerning2\f0\fs20 button and click mouse in picture box to create a vertex on slab.\par
4.\tab Click \ldblquote create crease\rdblquote \kerning0\f2\fs17{\pict\wmetafile8\picw635\pich635\picwgoal360\pichgoal360
010009000003c805000000000e04000000000e04000026060f001208574d464301000000000001
00cf100000000001000000f007000000000000f0070000010000006c0000000000000000000000
17000000170000000000000000000000770200007802000020454d4600000100f00700000c0000
00010000000000000000000000000000000005000000040000510100000e010000000000000000
00000000000068240500b01e0400460000002c00000020000000454d462b014001001c00000010
0000000210c0db010000006000000060000000460000004c03000040030000454d462b22400400
0c000000000000001e4009000c00000000000000244001000c0000000000000030400200100000
00040000000000803f214007000c0000000000000008400005980200008c0200000210c0db0100
0000000000000000000000000000000000000100000089504e470d0a1a0a0000000d4948445200
0000180000001808020000006f15aaaf000000017352474200aece1ce900000009704859730000
0ec400000ec401952b0e1b0000021449444154384f63fcf8f12303350023d0206161610a8d7afb
f62dd4a0dfbf7f33fc21d9699bb71f3a7af4686f6f2fd02026b85b5ebfff05442fde3c239e44f6
07c220514136a00433b3c8a3f5eb674a6aadaff104b2212268e4ce9de7e6cc99337ffe86dfdfef
c1cd42711150f4efdf375fd4d5c1d2c64036440499dcb66d5753539d1b18b0722a613108ee229e
9b3721d2986e397dfaceb3678f52525276eddaf5e5cb17ec5e03060dd46663a80234b79c387142
555555474707221d1616f6e4c9137c2e62380b913d8bec22a05ba4a4a4343434806601930b308c
debd7b47c045986104740bd014636390538166b1b37303197bf6ec91919121218c6ede7cc5c7c7
07310508366fdedcd9d93a6fde3c2d2d2d12c2e8dab56b40d5f6f6f67053cacbcb3b3b3b81a640
42100e58e02c60ac01c31b142eb030faf68dfdd3a74f57ae5c79f0e089b6b6fad5ab37274fee6f
6948b7b0b080c5e91d2c5e83c71a3c8c1e3f7e0cf49495951530ca77efde3d73e6d4b4b4345bc7
28e4d824228cce9e053a07a88e9b9b1b18ae757575b1b1b181818130b740531916af61a6a3c58b
1703530a272727c42c48b800fd0e27b107363c6543c2e8ecd9b3ebd7af07320a0a0ae6ce9d0b89
23ccb44e388c8cd3d21e3fbeb471e346535315a06aacf98e808bf0e435d25cc48023af617517be
5893930bcc7af52ab0a5055779842c8e25d6d6ad5b002c5f8065154924dc20aa16fec8814f361b
007a2886f7604395230000000049454e44ae426082000840010824000000180000000210c0db01
000000030000000000000000000000000000001b40000040000000340000000100000002000000
000000bf000000bf0000c0410000c04103000000000000b3000000b3ffffbf41000000b3000000
b3ffffbf412100000008000000620000000c00000001000000150000000c000000040000001500
00000c000000040000005100000040030000000000000000000017000000170000000000000000
0000000000000000000000180000001800000050000000b0000000000100004002000000000000
2000cc001800000018000000280000001800000018000000010008000000000000000000000000
0000000000220000000000000000000000ffffff00f1f1f10004040400f0fbff00b2b2b2007777
7700eaeaea00d6e7e7009999cc000000800033669900a4a0a0008686860090a9ad00c0c0c00066
66990022222200cccccc0099cccc00d7d7d70016161600969696009999990029292900dddddd00
cbcbcb0033333300393939003333990042424200555555004d4d4d000000660002020202020202
020202020202020202020202020202020202030303030303030303030303030303030303030303
03020203010e050e050e050e050e050e050e050e050e0506030202030104070707070707070707
0707070707070705060302020301070708130a1008070807080708070807080506030202030104
0707090a100707070707070707070707050603020203010707080f0a1008070807080708070807
0805060302020301040707090a21031c05070707070707070705060302020301070708130a1d1f
1c1e200f07080708070805060302020301040707090a1d050f1a1e031607070707070506030202
03010707080f0a100f0f0f0d0d1c170708070805060302020301040707090a0b19050d0c1a0c1b
0e07070705060302020301070708130a10080f0f01010105180507080506030202030104070709
0a1007070f0f01010105180f07050603020203010707080f0a1008070805120101010c110f0506
0302020301040707090a0b070707070512011417110316060302020301070708130a1008070807
080514050d0d1516060302020301040707090a10070707070707050d0d0d0f0506030202030107
07080f0a10080708070807080c11121205060302020301040707090a0b07070707070707070c0d
0d0e06030202030107070807080708070807080708070807080506030202030104040404040404
040404040404040404040506030202030303030303030303030303030303030303030303030202
02020202020202020202020202020202020202020202024c000000640000000000000000000000
1700000017000000000000000000000018000000180000002900aa000000000000000000000080
3f00000000000000000000803f0000000000000000000000000000000000000000000000000000
000000000000220000000c000000ffffffff460000001c00000010000000454d462b024000000c
000000000000000e00000014000000000000001000000014000000040000000301080005000000
0b0200000000050000000c0218001800030000001e000400000007010400040000000701040085
010000410b2000cc00180018000000000018001800000000002800000018000000180000000100
080000000000000000000000000000000000220000000000000000000000ffffff00f1f1f10004
040400f0fbff00b2b2b20077777700eaeaea00d6e7e7009999cc000000800033669900a4a0a000
8686860090a9ad00c0c0c0006666990022222200cccccc0099cccc00d7d7d70016161600969696
009999990029292900dddddd00cbcbcb0033333300393939003333990042424200555555004d4d
4d0000006600020202020202020202020202020202020202020202020202020303030303030303
0303030303030303030303030303020203010e050e050e050e050e050e050e050e050e05060302
020301040707070707070707070707070707070705060302020301070708130a10080708070807
080708070805060302020301040707090a10070707070707070707070705060302020301070708
0f0a10080708070807080708070805060302020301040707090a21031c05070707070707070705
060302020301070708130a1d1f1c1e200f07080708070805060302020301040707090a1d050f1a
1e03160707070707050603020203010707080f0a100f0f0f0d0d1c170708070805060302020301
040707090a0b19050d0c1a0c1b0e07070705060302020301070708130a10080f0f010101051805
070805060302020301040707090a1007070f0f01010105180f07050603020203010707080f0a10
08070805120101010c110f05060302020301040707090a0b070707070512011417110316060302
020301070708130a1008070807080514050d0d1516060302020301040707090a10070707070707
050d0d0d0f050603020203010707080f0a10080708070807080c11121205060302020301040707
090a0b07070707070707070c0d0d0e060302020301070708070807080708070807080708070805
060302020301040404040404040404040404040404040405060302020303030303030303030303
0303030303030303030303020202020202020202020202020202020202020202020202020c0000
0040092900aa000000000000001800180000000000040000002701ffff030000000000
}\kerning2\f0\fs20 button and click mouse in picture box to create a crease on slab.\par
5.\tab Click \ldblquote select\rdblquote \kerning0\f2\fs17{\pict\wmetafile8\picw529\pich503\picwgoal300\pichgoal285
0100090000035c04000000002603000000002603000026060f004206574d464301000000000001
0007e40000000001000000200600000000000020060000010000006c0000000000000000000000
130000001200000000000000000000000e020000f401000020454d4600000100200600000c0000
00010000000000000000000000000000000005000000040000510100000e010000000000000000
00000000000068240500b01e0400460000002c00000020000000454d462b014001001c00000010
0000000210c0db010000006000000060000000460000008402000078020000454d462b22400400
0c000000000000001e4009000c00000000000000244001000c0000000000000030400200100000
00040000000000803f214007000c0000000000000008400005d0010000c40100000210c0db0100
0000000000000000000000000000000000000100000089504e470d0a1a0a0000000d4948445200
0000140000001308020000001feebae2000000017352474200aece1ce900000009704859730000
0ec500000ec101230029fb0000014a49444154384f9d54b14e8440145c4e50cf42206a21a51fc7
2f905c4189858d15b5e599e015172a3a5a0b3fc182e6122e04f70a058959873c8264dd35de6d36
2fc3f266e7cd5b584308c10e1d46d3346ddb9e9f896dfd79e51eefde8dffe03ccfd3349d415599
6d58f61fbb741fafaeebf6e4df9a60621d51578b35bfa9eb7a7672d44819c4a4a1d31f94dbaf53
c9a7e878596ec1e47c07acecc5a0acf30ce6219e8ba2b8bd8b97b68d08acecbfd6739665178bc5
86314460a5bed63331af1923fe7e9eab28222622b0e779a85fd2d79e731886c447ec7155398e63
cd2f932419fd936726ba374cce39625996a6694651441811182b534c6f9f1eef832060f8b6954c
c604ad137fcc89e3188febf5daf7fd9eacd40459a94fbbfc284bd582369d4afd41993c4f7d227b
248fd54afe159ea79d1b3d53b7247d52ee2f03fc587bdd0438f3d5eae1f965f30db7885afb8514
02da0000000049454e44ae4260820000000840010824000000180000000210c0db010000000300
00000000000000000000000000001b40000040000000340000000100000002000000000000bf00
0000bf0000a0410000984103000000000000b3000000b3ffff9f41000000b3000000b3ffff9741
2100000008000000620000000c00000001000000150000000c00000004000000150000000c0000
000400000051000000380200000000000000000000130000001200000000000000000000000000
0000000000001400000013000000500000006c000000bc0000007c010000000000002000cc0014
000000130000002800000014000000130000000100080000000000000000000000000000000000
110000000000000000000000ffffff00f8f8f800f1f1f100f0fbff00eaeaea00b2b2b200666666
00ff00000090a9ad0077777700cccccc0086868600000099000000800004040400969696000204
05040304050403040504030405040304090a0203040504030405080304050403040c0f03060704
040c04050403080808030405040c0f0504090a02050f0c0405080808080803040c0f0304050607
0204050f0c040504080405040c0f05040304090a020304050f0c04050803040c0f030405100f06
0704040304050f0c0405040c0f05040c0f0c04090a0205040304050f0c0d0c0f03100f10030405
06070204050403040c0d0e0d0c0f0c0405040304090a0203040504030d0e0d0e0d050403040504
0306070404030405040c0d0e0d0c04050403040504090a0205040304050b0c0d0c0b0304050403
04050607020405040304050403040504030405040304090a020304050403040508030405040304
0504030607040403040504080808080804050403040504090a0205040304050408080804030405
040304050607020405040304050408040504030405040304090a02030405040304050403040504
0304050403060701010101010101010101010101010101010101014c0000006400000000000000
000000001300000012000000000000000000000014000000130000002900aa0000000000000000
000000803f00000000000000000000803f00000000000000000000000000000000000000000000
00000000000000000000220000000c000000ffffffff460000001c00000010000000454d462b02
4000000c000000000000000e000000140000000000000010000000140000000400000003010800
050000000b0200000000050000000c0213001400030000001e0004000000070104000400000007
01040001010000410b2000cc001300140000000000130014000000000028000000140000001300
00000100080000000000000000000000000000000000110000000000000000000000ffffff00f8
f8f800f1f1f100f0fbff00eaeaea00b2b2b20066666600ff00000090a9ad0077777700cccccc00
868686000000990000008000040404009696960002040504030405040304050403040504030409
0a0203040504030405080304050403040c0f03060704040c04050403080808030405040c0f0504
090a02050f0c0405080808080803040c0f03040506070204050f0c040504080405040c0f050403
04090a020304050f0c04050803040c0f030405100f060704040304050f0c0405040c0f05040c0f
0c04090a0205040304050f0c0d0c0f03100f1003040506070204050403040c0d0e0d0c0f0c0405
040304090a0203040504030d0e0d0e0d0504030405040306070404030405040c0d0e0d0c040504
03040504090a0205040304050b0c0d0c0b03040504030405060702040504030405040304050403
0405040304090a0203040504030405080304050403040504030607040403040504080808080804
050403040504090a02050403040504080808040304050403040506070204050403040504080405
04030405040304090a020304050403040504030405040304050403060701010101010101010101
010101010101010101010c00000040092900aa0000000000000013001400000000000400000027
01ffff030000000000
}\kerning2\f0\fs20 button, then move mouse and click in picture box to select new created vertex or crease, when new vertex or crease turn red, it means you have selected it successfully.\par
6.\tab Then input the distance user want to move in the textbox (just input number, unit is feet), click \ldblquote Update\rdblquote button.\par
7.\tab Click \ldblquote Reset\rdblquote button to restore the original shape of slab.\par
8.\tab If user wants to observe slab in different direction, just click right mouse button down and move mouse in picture box.\par
}