diff --git a/OpenMEP/Element/DuctSystem.cs b/OpenMEP/Element/DuctSystem.cs new file mode 100644 index 00000000..1fe0f0ed --- /dev/null +++ b/OpenMEP/Element/DuctSystem.cs @@ -0,0 +1,46 @@ +using Autodesk.Revit.DB.Mechanical; +using Autodesk.Revit.DB.Plumbing; +using OpenMEP.Helpers; +using RevitServices.Persistence; + +namespace OpenMEP.Element; + +public class DuctSystem +{ + private DuctSystem() + { + } + + /// + /// flag true to return all ducting systems + /// + /// flag true or false to fresh + /// pipePingSystemTypes + public static IEnumerable GetAllDuctSystemTypes(bool toggle) + { + // filter for all piping systems + Autodesk.Revit.DB.FilteredElementCollector collector = new Autodesk.Revit.DB.FilteredElementCollector(DocumentManager.Instance.CurrentDBDocument); + Autodesk.Revit.DB.ElementClassFilter filter = new Autodesk.Revit.DB.ElementClassFilter(typeof(Autodesk.Revit.DB.Mechanical.MechanicalSystemType)); + Autodesk.Revit.DB.FilteredElementIterator iterator = collector.WherePasses(filter).GetElementIterator(); + iterator.Reset(); + while (iterator.MoveNext()) + { + Autodesk.Revit.DB.Element element = iterator.Current!; + if (element is MechanicalSystemType pipingSystemType) + { + yield return pipingSystemType.ToDynamoType(); + } + } + } + + /// + /// return duct system type by name + /// + /// name of pipe system type + /// the element system type + public static Revit.Elements.Element? GetDuctSystemTypeByName(string typeName) + { + return GetAllDuctSystemTypes(true).FirstOrDefault(x => x!.Name == typeName); + } + +} \ No newline at end of file diff --git a/OpenMEP/Element/DuctType.cs b/OpenMEP/Element/DuctType.cs new file mode 100644 index 00000000..0f1c3e2c --- /dev/null +++ b/OpenMEP/Element/DuctType.cs @@ -0,0 +1,48 @@ +using OpenMEP.Helpers; +using RevitServices.Persistence; + +namespace OpenMEP.Element; + +public class DuctType +{ + private DuctType() + { + + } + + /// + /// get pipe type by name + /// + /// type name of duct + /// type of duct + public static Revit.Elements.Element? GetDuctTypeByName(string typeName) + { + return GetAllDuctTypes().FirstOrDefault(x => x!.Name == typeName); + } + + /// + /// return all duct types of the current document + /// + /// All Duct Types + public static List GetAllDuctTypes() + { + // Get all the pipe types in the current document + Autodesk.Revit.DB.Document doc = DocumentManager.Instance.CurrentDBDocument; + Autodesk.Revit.DB.FilteredElementCollector collector = new Autodesk.Revit.DB.FilteredElementCollector(doc); + Autodesk.Revit.DB.ElementClassFilter filter = new Autodesk.Revit.DB.ElementClassFilter(typeof(Autodesk.Revit.DB.Mechanical.DuctType)); + Autodesk.Revit.DB.FilteredElementIterator iterator = collector.WherePasses(filter).GetElementIterator(); + iterator.Reset(); + List pipeTypes = new List(); + while (iterator.MoveNext()) + { + Autodesk.Revit.DB.Element element = iterator.Current!; + if (element is Autodesk.Revit.DB.Mechanical.DuctType ductType) + { + pipeTypes.Add(ductType.ToDynamoType()); + } + } + return pipeTypes; + } + + +} \ No newline at end of file diff --git a/OpenMEP/Element/MEPCurveType.cs b/OpenMEP/Element/MEPCurveType.cs new file mode 100644 index 00000000..5891b52f --- /dev/null +++ b/OpenMEP/Element/MEPCurveType.cs @@ -0,0 +1,136 @@ +using System.Security.Policy; +using OpenMEP.Helpers; + +namespace OpenMEP.Element; + +/// +/// A class can use for DuctType, PipeType, CableTrayType, ConduitType, WireType, MEPCurveType +/// +public class MEPCurveType +{ + private MEPCurveType() + { + + } + + /// The default cross fitting of the MEP curve type. + /// type of mep curve + /// This property is used to retrieve the default cross fitting of the MEP curve type, + /// and can be if there is no default value. + /// Use to set this property for PipeType MEPCurves. + /// + /// Cross fitting + public static Revit.Elements.Element? Cross(Revit.Elements.Element mepcurvetype) + { + if (mepcurvetype == null) throw new ArgumentNullException(nameof(mepcurvetype)); + var mepCurveType = mepcurvetype.InternalElement as Autodesk.Revit.DB.MEPCurveType; + if(mepCurveType!.Cross== null) return null; + return mepCurveType!.Cross.ToDynamoType(); + } + + /// The default elbow fitting of the MEP curve type. + /// type of mep curve + /// This property is used to retrieve the default elbow fitting of the MEP curve type, + /// and can be if there is no default value. + /// Use to set this property for PipeType MEPCurves. + /// + /// Elbow fitting + public static Revit.Elements.Element? Elbow(Revit.Elements.Element mepcurvetype) + { + if (mepcurvetype == null) throw new ArgumentNullException(nameof(mepcurvetype)); + var mepCurveType = mepcurvetype.InternalElement as Autodesk.Revit.DB.MEPCurveType; + if(mepCurveType!.Elbow== null) return null; + return mepCurveType!.Elbow.ToDynamoType(); + } + + /// The default tap fitting of the MEP curve type. + /// type of mep curve + /// This property is used to retrieve the default tap fitting of the MEP curve type, + /// and can be if there is no default value. + /// Use to set this property for PipeType MEPCurves. + /// + /// Tap fitting + public static Revit.Elements.Element? Tap(Revit.Elements.Element mepcurvetype) + { + if (mepcurvetype == null) throw new ArgumentNullException(nameof(mepcurvetype)); + var mepCurveType = mepcurvetype.InternalElement as Autodesk.Revit.DB.MEPCurveType; + if(mepCurveType!.Tap== null) return null; + return mepCurveType!.Tap.ToDynamoType(); + } + + /// The default union fitting of the MEP curve type. + /// type of mep curve + /// This property is used to retrieve the default union fitting of the MEP curve type, + /// and can be if there is no default value. + /// Use to set this property for PipeType MEPCurves. + /// + /// union fitting + public static Revit.Elements.Element? Union(Revit.Elements.Element mepcurvetype) + { + if (mepcurvetype == null) throw new ArgumentNullException(nameof(mepcurvetype)); + var mepCurveType = mepcurvetype.InternalElement as Autodesk.Revit.DB.MEPCurveType; + if(mepCurveType!.Union== null) return null; + return mepCurveType!.Union.ToDynamoType(); + } + + /// The default transition fitting of the MEP curve type. + /// type of mep curve + /// This property is used to retrieve the default transition fitting of the MEP curve type, + /// and can be if there is no default value. + /// Use to set this property for PipeType MEPCurves. + /// + /// transition fitting + public static Revit.Elements.Element? Transition(Revit.Elements.Element mepcurvetype) + { + if (mepcurvetype == null) throw new ArgumentNullException(nameof(mepcurvetype)); + var mepCurveType = mepcurvetype.InternalElement as Autodesk.Revit.DB.MEPCurveType; + if(mepCurveType!.Transition== null) return null; + return mepCurveType!.Transition.ToDynamoType(); + } + + /// The default multi shape transition fitting of the MEP curve type. + /// type of mep curve + /// This property is used to retrieve the default multi shape transition fitting of the MEP curve type, + /// and can be if there is no default value. + /// Use to set this property for PipeType MEPCurves. + /// + /// multi shape transition fitting + public static Revit.Elements.Element? MultiShapeTransition(Revit.Elements.Element mepcurvetype) + { + if (mepcurvetype == null) throw new ArgumentNullException(nameof(mepcurvetype)); + var mepCurveType = mepcurvetype.InternalElement as Autodesk.Revit.DB.MEPCurveType; + if (mepCurveType!.MultiShapeTransition == null) return null; + return mepCurveType.MultiShapeTransition.ToDynamoType(); + } + + /// The shape of the profile. + /// type of mep curve + /// 2019 + /// ConnectorProfileType + public static dynamic Shape(Revit.Elements.Element mepcurvetype) + { + if (mepcurvetype == null) throw new ArgumentNullException(nameof(mepcurvetype)); + var mepCurveType = mepcurvetype.InternalElement as Autodesk.Revit.DB.MEPCurveType; + return mepCurveType!.Shape; + } + + /// The roughness of the MEP curve type. For PipeTypes, please use Segment::Roughness + /// type of mep curve + /// Roughness + public static double Roughness(Revit.Elements.Element mepcurvetype) + { + if (mepcurvetype == null) throw new ArgumentNullException(nameof(mepcurvetype)); + var mepCurveType = mepcurvetype.InternalElement as Autodesk.Revit.DB.MEPCurveType; + return mepCurveType!.Roughness; + } + + /// The preferred junction type of the MEP curve type. + /// type of mep curve + /// Use to set this property for PipeType MEPCurves. + public static dynamic PreferredJunctionType(Revit.Elements.Element mepcurvetype) + { + if (mepcurvetype == null) throw new ArgumentNullException(nameof(mepcurvetype)); + var mepCurveType = mepcurvetype.InternalElement as Autodesk.Revit.DB.MEPCurveType; + return mepCurveType!.PreferredJunctionType; + } +} \ No newline at end of file diff --git a/OpenMEP/Element/Pipe.cs b/OpenMEP/Element/Pipe.cs index 91ac7821..d391e040 100644 --- a/OpenMEP/Element/Pipe.cs +++ b/OpenMEP/Element/Pipe.cs @@ -523,7 +523,7 @@ Autodesk.DesignScript.Geometry.Point point /// Return Tee Of Pipe In Routing Preferences /// /// pipe - /// tee + /// tee public static global::Revit.Elements.Element? GetTee(global::Revit.Elements.Element pipe) { Autodesk.Revit.DB.Plumbing.Pipe? pipeInternalElement = pipe.InternalElement as Autodesk.Revit.DB.Plumbing.Pipe; @@ -536,7 +536,7 @@ Autodesk.DesignScript.Geometry.Point point /// Return Union Of Pipe In Routing Preferences /// /// pipe - /// union + /// union public static global::Revit.Elements.Element? GetUnion(global::Revit.Elements.Element pipe) { Autodesk.Revit.DB.Plumbing.Pipe? pipeInternalElement = pipe.InternalElement as Autodesk.Revit.DB.Plumbing.Pipe; @@ -549,7 +549,7 @@ Autodesk.DesignScript.Geometry.Point point /// Return Cross Of Pipe In Routing Preferences /// /// pipe - /// cross + /// cross public static global::Revit.Elements.Element? GetCross(global::Revit.Elements.Element pipe) { Autodesk.Revit.DB.Plumbing.Pipe? pipeInternalElement = pipe.InternalElement as Autodesk.Revit.DB.Plumbing.Pipe; @@ -562,7 +562,7 @@ Autodesk.DesignScript.Geometry.Point point /// Return Tap Of Pipe In Routing Preferences /// /// pipe - /// tap + /// tap public static global::Revit.Elements.Element? GetTap(global::Revit.Elements.Element pipe) { Autodesk.Revit.DB.Plumbing.Pipe? pipeInternalElement = pipe.InternalElement as Autodesk.Revit.DB.Plumbing.Pipe; @@ -576,7 +576,7 @@ Autodesk.DesignScript.Geometry.Point point /// Return Transition Of Pipe In Routing Preferences /// /// pipe - /// transition + /// transition public static global::Revit.Elements.Element? GetTransition(global::Revit.Elements.Element pipe) { Autodesk.Revit.DB.Plumbing.Pipe? pipeInternalElement = pipe.InternalElement as Autodesk.Revit.DB.Plumbing.Pipe; diff --git a/OpenMEP/Element/PipingSystem.cs b/OpenMEP/Element/PipingSystem.cs index cac4b9eb..c2d7a2a5 100644 --- a/OpenMEP/Element/PipingSystem.cs +++ b/OpenMEP/Element/PipingSystem.cs @@ -14,7 +14,7 @@ private PipingSystem() /// flag true to return all piping systems /// /// flag true or false to fresh - /// pipePingSystemTypes + /// pipeSystemTypes public static IEnumerable GetAllPipeSystemTypes(bool toggle) { // filter for all piping systems @@ -33,4 +33,14 @@ private PipingSystem() } } + /// + /// return pipe system type by name + /// + /// name of pipe system type + /// the element system type + public static Revit.Elements.Element? GetPipeSystemTypeByName(string typeName) + { + return GetAllPipeSystemTypes(true).FirstOrDefault(x => x!.Name == typeName); + } + } \ No newline at end of file diff --git a/OpenMEPSandbox/Geometry/Point.cs b/OpenMEPSandbox/Geometry/Point.cs index 39af21ac..2d5d81d2 100644 --- a/OpenMEPSandbox/Geometry/Point.cs +++ b/OpenMEPSandbox/Geometry/Point.cs @@ -15,20 +15,16 @@ private Point() /// Project a point onto a plane /// /// point need to project - /// vector normal of plane + /// plane to be project /// new point projected on plane public static Autodesk.DesignScript.Geometry.Point ProjectOntoPlane( Autodesk.DesignScript.Geometry.Point point, - Autodesk.DesignScript.Geometry.Vector planeNormal) + Autodesk.DesignScript.Geometry.Plane plane) { - double a = planeNormal.X; - double b = planeNormal.Y; - double c = planeNormal.Z; - - double dx = (b * b + c * c) * point.X - (a * b) * point.Y - (a * c) * point.Z; - double dy = -(b * a) * point.X + (a * a + c * c) * point.Y - (b * c) * point.Z; - double dz = -(c * a) * point.X - (c * b) * point.Y + (a * a + b * b) * point.Z; - return Autodesk.DesignScript.Geometry.Point.ByCoordinates(dx, dy, dz); + Point3 point3 = point.ToGSharkType(); + GShark.Geometry.Plane plane1 = plane.ToGSharkType(); + Point3 projectedPoint = point3.ProjectToPlan(plane1); + return Autodesk.DesignScript.Geometry.Point.ByCoordinates(projectedPoint.X, projectedPoint.Y, projectedPoint.Z); } /// diff --git a/docs/OpenMEPPage/geometry/dyn/Point.ProjectOntoPlane.dyn b/docs/OpenMEPPage/geometry/dyn/Point.ProjectOntoPlane.dyn index e0ce5650..30c6865d 100644 --- a/docs/OpenMEPPage/geometry/dyn/Point.ProjectOntoPlane.dyn +++ b/docs/OpenMEPPage/geometry/dyn/Point.ProjectOntoPlane.dyn @@ -1,5 +1,5 @@ { - "Uuid": "dea79531-866c-4b5f-bbae-66a6e5f8ca07", + "Uuid": "be6d3684-e989-41a6-b7ff-db8e311a8556", "IsCustomNode": false, "Description": "", "Name": "Point.ProjectOntoPlane", @@ -11,12 +11,11 @@ "Nodes": [ { "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore", + "Id": "5ca103062a7b4d2a96b409d98de9205a", "NodeType": "FunctionNode", - "FunctionSignature": "OpenMEP.Geometry.Point.ProjectOntoPlane@Autodesk.DesignScript.Geometry.Point,Autodesk.DesignScript.Geometry.Vector", - "Id": "9db3e3d8f1ad49d28f05fec994f69872", "Inputs": [ { - "Id": "98c560b82ae24e6e92a461070549289e", + "Id": "32e9a38014274d94a48d372379c540a1", "Name": "point", "Description": "point need to project\n\nPoint", "UsingDefaultValue": false, @@ -25,9 +24,9 @@ "KeepListStructure": false }, { - "Id": "9af7f920466e41b387f8a556477b36e3", - "Name": "planeNormal", - "Description": "vector normal of plane\n\nVector", + "Id": "b24d4326919f47a1a8b985f191e9ce4e", + "Name": "plane", + "Description": "plane to be project\n\nPlane", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, @@ -36,7 +35,7 @@ ], "Outputs": [ { - "Id": "56d2f4c2bcc443efa27bcb211f9f23b6", + "Id": "291e908c772940de80f87bbb51b77f1d", "Name": "point", "Description": "new point projected on plane", "UsingDefaultValue": false, @@ -45,17 +44,17 @@ "KeepListStructure": false } ], + "FunctionSignature": "OpenMEPSandbox.Geometry.Point.ProjectOntoPlane@Autodesk.DesignScript.Geometry.Point,Autodesk.DesignScript.Geometry.Plane", "Replication": "Auto", - "Description": "Project a point onto a plane\n\nPoint.ProjectOntoPlane (point: Point, planeNormal: Vector): Point" + "Description": "Project a point onto a plane\n\nPoint.ProjectOntoPlane (point: Point, plane: Plane): Point" }, { "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore", + "Id": "1a1013b3c121477eb54370545263e274", "NodeType": "FunctionNode", - "FunctionSignature": "Autodesk.DesignScript.Geometry.Plane.ByOriginNormal@Autodesk.DesignScript.Geometry.Point,Autodesk.DesignScript.Geometry.Vector", - "Id": "c1a2dbda9b91437f89e4515ff2ae897b", "Inputs": [ { - "Id": "0a67e5f48e1b40968a59cfad202b3c67", + "Id": "b42ba31cc58a4c249b92af42c8cbb64c", "Name": "origin", "Description": "Origin point of plane\n\nPoint\nDefault value : Autodesk.DesignScript.Geometry.Point.ByCoordinates(0, 0, 0)", "UsingDefaultValue": true, @@ -64,7 +63,7 @@ "KeepListStructure": false }, { - "Id": "dc0bc441b1ad47338760ad5e5062d36a", + "Id": "3c629953d5ce44afb561bbe38dcb21fa", "Name": "normal", "Description": "Normal direction vector of plane\n\nVector\nDefault value : Autodesk.DesignScript.Geometry.Vector.ByCoordinates(0, 0, 1)", "UsingDefaultValue": true, @@ -75,7 +74,7 @@ ], "Outputs": [ { - "Id": "454a75a42d3c42b18ee00233d7cf1b67", + "Id": "fd3ee420ca9049cfb6b2379c0f291086", "Name": "Plane", "Description": "Plane created by origin and normal", "UsingDefaultValue": false, @@ -84,47 +83,17 @@ "KeepListStructure": false } ], + "FunctionSignature": "Autodesk.DesignScript.Geometry.Plane.ByOriginNormal@Autodesk.DesignScript.Geometry.Point,Autodesk.DesignScript.Geometry.Vector", "Replication": "Auto", "Description": "Create a Plane centered at root Point, with input normal Vector.\n\nPlane.ByOriginNormal (origin: Point = Autodesk.DesignScript.Geometry.Point.ByCoordinates(0, 0, 0), normal: Vector = Autodesk.DesignScript.Geometry.Vector.ByCoordinates(0, 0, 1)): Plane" }, { "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore", + "Id": "31b6c4ecf51747aa871b6512bb3715c3", "NodeType": "FunctionNode", - "FunctionSignature": "Autodesk.DesignScript.Geometry.Plane.Normal", - "Id": "c6fc306c64a04296a760a0606fc7a9c4", - "Inputs": [ - { - "Id": "d50a9d47e78b4ad78a7baa93250c505a", - "Name": "plane", - "Description": "Autodesk.DesignScript.Geometry.Plane", - "UsingDefaultValue": false, - "Level": 2, - "UseLevels": false, - "KeepListStructure": false - } - ], - "Outputs": [ - { - "Id": "f8a6a9b046994e76875664888b6536c1", - "Name": "Vector", - "Description": "Vector", - "UsingDefaultValue": false, - "Level": 2, - "UseLevels": false, - "KeepListStructure": false - } - ], - "Replication": "Auto", - "Description": "Returns the normal direction of the Plane.\n\nPlane.Normal: Vector" - }, - { - "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore", - "NodeType": "FunctionNode", - "FunctionSignature": "Autodesk.DesignScript.Geometry.Point.ByCoordinates@double,double,double", - "Id": "470da233c4cc4a27a64ad7089fd5c662", "Inputs": [ { - "Id": "ad62c3c7366e4ce0a84d6a6e5ddfd995", + "Id": "c8ecb1057fd841cc8867f6a7fb599673", "Name": "x", "Description": "X coordinate\n\ndouble\nDefault value : 0", "UsingDefaultValue": true, @@ -133,7 +102,7 @@ "KeepListStructure": false }, { - "Id": "e0086bb2eab543b9b4aeaa28332f5571", + "Id": "d6659a67941a465dae7d988c0657939d", "Name": "y", "Description": "Y coordinate\n\ndouble\nDefault value : 0", "UsingDefaultValue": true, @@ -142,7 +111,7 @@ "KeepListStructure": false }, { - "Id": "08362fda7b72472d82605985acd02d93", + "Id": "d2afbb6214b540f9b298b2b3627685af", "Name": "z", "Description": "Z coordinate\n\ndouble\nDefault value : 0", "UsingDefaultValue": true, @@ -153,7 +122,7 @@ ], "Outputs": [ { - "Id": "699967768ea546babf1ccca4f0ad9bb0", + "Id": "013a55293e8b4b89bfcb3884d0667850", "Name": "Point", "Description": "Point created by coordinates", "UsingDefaultValue": false, @@ -162,57 +131,42 @@ "KeepListStructure": false } ], + "FunctionSignature": "Autodesk.DesignScript.Geometry.Point.ByCoordinates@double,double,double", "Replication": "Auto", "Description": "Form a Point given 3 cartesian coordinates\n\nPoint.ByCoordinates (x: double = 0, y: double = 0, z: double = 0): Point" }, { - "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore", - "NodeType": "FunctionNode", - "FunctionSignature": "Autodesk.DesignScript.Geometry.Vector.Cross@Autodesk.DesignScript.Geometry.Vector", - "Id": "ff5d04026c9b4c00805ae4c8d48acc1a", - "Inputs": [ - { - "Id": "b80a377ed531426c8ede82da93be6760", - "Name": "vector", - "Description": "Autodesk.DesignScript.Geometry.Vector", - "UsingDefaultValue": false, - "Level": 2, - "UseLevels": false, - "KeepListStructure": false - }, - { - "Id": "965b1fd48484472ab543371b6d0da81f", - "Name": "cross", - "Description": "Vector", - "UsingDefaultValue": false, - "Level": 2, - "UseLevels": false, - "KeepListStructure": false - } - ], + "ConcreteType": "CoreNodeModels.Input.IntegerSlider, CoreNodeModels", + "NumberType": "Integer", + "MaximumValue": 100, + "MinimumValue": 0, + "StepValue": 1, + "Id": "f8fe11b241574d9ab93bd28663294195", + "NodeType": "NumberInputNode", + "Inputs": [], "Outputs": [ { - "Id": "72dfec5f3fc6404a955ce9ae4695e132", - "Name": "Vector", - "Description": "Vector", + "Id": "bec293287d3a4b13a70fb50776644f4b", + "Name": "", + "Description": "Int64", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, "KeepListStructure": false } ], - "Replication": "Auto", - "Description": "Form the cross product of two vectors\n\nVector.Cross (cross: Vector): Vector" + "Replication": "Disabled", + "Description": "Produces integer values", + "InputValue": 8 }, { "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore", + "Id": "738c02fa1d2842b4ba5f17bb15a98207", "NodeType": "FunctionNode", - "FunctionSignature": "Autodesk.DesignScript.Geometry.Vector.XAxis", - "Id": "2ffd67b704b34d29b18e3852faed9c48", "Inputs": [], "Outputs": [ { - "Id": "9c34b419197142d680e60f583e9f7881", + "Id": "ae2431e62d8949eb9b78b1729d5cd2e3", "Name": "Vector", "Description": "Vector", "UsingDefaultValue": false, @@ -221,91 +175,37 @@ "KeepListStructure": false } ], + "FunctionSignature": "Autodesk.DesignScript.Geometry.Vector.XAxis", "Replication": "Auto", "Description": "Get the canonical X axis Vector (1,0,0)\n\nVector.XAxis ( ): Vector" }, - { - "ConcreteType": "CoreNodeModels.Input.DoubleSlider, CoreNodeModels", - "NodeType": "NumberInputNode", - "NumberType": "Double", - "MaximumValue": 50.0, - "MinimumValue": -50.0, - "StepValue": 3.0, - "InputValue": -50.0, - "Id": "608440d5091d4503b9152928cc9ae629", - "Inputs": [], - "Outputs": [ - { - "Id": "eb890b80d7aa4c868c251b8178f01620", - "Name": "", - "Description": "Double", - "UsingDefaultValue": false, - "Level": 2, - "UseLevels": false, - "KeepListStructure": false - } - ], - "Replication": "Disabled", - "Description": "A slider that produces numeric values." - }, { "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore", + "Id": "4c7daf830a4a478c8384678b601316a3", "NodeType": "FunctionNode", - "FunctionSignature": "Autodesk.DesignScript.Geometry.Circle.ByPlaneRadius@Autodesk.DesignScript.Geometry.Plane,double", - "Id": "ac63d31d97ad4de9a1e4f7aaad928111", "Inputs": [ { - "Id": "8c62bb281e6341bda84d1b212715d35a", - "Name": "plane", - "Description": "Root of plane used to center circle\n\nPlane\nDefault value : Autodesk.DesignScript.Geometry.Plane.XY()", + "Id": "2d7e4e1715824f0c9e410276a52f8d40", + "Name": "x", + "Description": "X coordinate\n\ndouble\nDefault value : 0", "UsingDefaultValue": true, "Level": 2, "UseLevels": false, "KeepListStructure": false }, { - "Id": "0e0a2084c516430483f9be63f5baa41a", - "Name": "radius", - "Description": "Radius\n\ndouble\nDefault value : 1", - "UsingDefaultValue": true, - "Level": 2, - "UseLevels": false, - "KeepListStructure": false - } - ], - "Outputs": [ - { - "Id": "437726f34cfe43428a5bea40d4984565", - "Name": "Circle", - "Description": "Circle created with plane and radius", - "UsingDefaultValue": false, - "Level": 2, - "UseLevels": false, - "KeepListStructure": false - } - ], - "Replication": "Auto", - "Description": "Create a Circle centered at the input Plane origin (root), lying in the input Plane, with given radius.\n\nCircle.ByPlaneRadius (plane: Plane = Autodesk.DesignScript.Geometry.Plane.XY(), radius: double = 1): Circle" - }, - { - "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore", - "NodeType": "FunctionNode", - "FunctionSignature": "Autodesk.DesignScript.Geometry.Plane.ByOriginNormal@Autodesk.DesignScript.Geometry.Point,Autodesk.DesignScript.Geometry.Vector", - "Id": "942f1646d84a42c189027d37ad5191d7", - "Inputs": [ - { - "Id": "23939fafe9f245d487431d7c942d8b68", - "Name": "origin", - "Description": "Origin point of plane\n\nPoint\nDefault value : Autodesk.DesignScript.Geometry.Point.ByCoordinates(0, 0, 0)", + "Id": "a5d95aceb070402d910ec3e5d58b5e43", + "Name": "y", + "Description": "Y coordinate\n\ndouble\nDefault value : 0", "UsingDefaultValue": true, "Level": 2, "UseLevels": false, "KeepListStructure": false }, { - "Id": "b8bb0edd7fb54b5b8efc1d10b8352931", - "Name": "normal", - "Description": "Normal direction vector of plane\n\nVector\nDefault value : Autodesk.DesignScript.Geometry.Vector.ByCoordinates(0, 0, 1)", + "Id": "526115ea73654afcb0a4cd9470c8435a", + "Name": "z", + "Description": "Z coordinate\n\ndouble\nDefault value : 0", "UsingDefaultValue": true, "Level": 2, "UseLevels": false, @@ -314,29 +214,33 @@ ], "Outputs": [ { - "Id": "b16a76c0322f414297f703018b7bcef5", - "Name": "Plane", - "Description": "Plane created by origin and normal", + "Id": "79fd9f4d9ea44661946968af4da2ff36", + "Name": "Point", + "Description": "Point created by coordinates", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, "KeepListStructure": false } ], + "FunctionSignature": "Autodesk.DesignScript.Geometry.Point.ByCoordinates@double,double,double", "Replication": "Auto", - "Description": "Create a Plane centered at root Point, with input normal Vector.\n\nPlane.ByOriginNormal (origin: Point = Autodesk.DesignScript.Geometry.Point.ByCoordinates(0, 0, 0), normal: Vector = Autodesk.DesignScript.Geometry.Vector.ByCoordinates(0, 0, 1)): Plane" + "Description": "Form a Point given 3 cartesian coordinates\n\nPoint.ByCoordinates (x: double = 0, y: double = 0, z: double = 0): Point" }, { - "ConcreteType": "Dynamo.Graph.Nodes.CodeBlockNodeModel, DynamoCore", - "NodeType": "CodeBlockNode", - "Code": "20;", - "Id": "38fecbadfd114d35af64a6aa18951269", + "ConcreteType": "CoreNodeModels.Input.IntegerSlider, CoreNodeModels", + "NumberType": "Integer", + "MaximumValue": 100, + "MinimumValue": 0, + "StepValue": 1, + "Id": "95027c7558f8442096360d64275b6771", + "NodeType": "NumberInputNode", "Inputs": [], "Outputs": [ { - "Id": "9824a939f9644fcf980d5395b3fb189d", + "Id": "bbccf804de1d4c7d91af6434db6da284", "Name": "", - "Description": "Value of expression at line 1", + "Description": "Int64", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, @@ -344,46 +248,16 @@ } ], "Replication": "Disabled", - "Description": "Allows for DesignScript code to be authored directly" - }, - { - "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore", - "NodeType": "FunctionNode", - "FunctionSignature": "Autodesk.DesignScript.Geometry.Surface.ByPatch@Autodesk.DesignScript.Geometry.Curve", - "Id": "a19c70f027264e13bf422917a6eeeacf", - "Inputs": [ - { - "Id": "084d90b3903141f0818188ee6f56baed", - "Name": "closedCurve", - "Description": "Closed curve used as surface boundary\n\nCurve", - "UsingDefaultValue": false, - "Level": 2, - "UseLevels": false, - "KeepListStructure": false - } - ], - "Outputs": [ - { - "Id": "d13492f3e53f4b8590bf9033a29b34f1", - "Name": "Surface", - "Description": "Surface created by patch", - "UsingDefaultValue": false, - "Level": 2, - "UseLevels": false, - "KeepListStructure": false - } - ], - "Replication": "Auto", - "Description": "Create a Surface by filling in the interior of a closed boundary defined by input Curves.\n\nSurface.ByPatch (closedCurve: Curve): Surface" + "Description": "Produces integer values", + "InputValue": 17 }, { "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore", + "Id": "6528aacf1cd145948cc3cc225dbe3bff", "NodeType": "FunctionNode", - "FunctionSignature": "Autodesk.DesignScript.Geometry.Line.ByStartPointEndPoint@Autodesk.DesignScript.Geometry.Point,Autodesk.DesignScript.Geometry.Point", - "Id": "e1b75bffb3b841a48943e40832fefd4c", "Inputs": [ { - "Id": "32ddfc87ecb74824847ca89fd3d64090", + "Id": "26f1048e075b4b158dabb0c96f7a79e4", "Name": "startPoint", "Description": "Line start point\n\nPoint", "UsingDefaultValue": false, @@ -392,7 +266,7 @@ "KeepListStructure": false }, { - "Id": "2f3b84065de445518f4f8369d9b8e881", + "Id": "dd17a777630449d6a8fa1ddcd0033f60", "Name": "endPoint", "Description": "Line end point\n\nPoint", "UsingDefaultValue": false, @@ -403,7 +277,7 @@ ], "Outputs": [ { - "Id": "052c2a3fdb60490bb8cc291d000c8861", + "Id": "e80fb5cdc13946f7800e98a4990a23c5", "Name": "Line", "Description": "Line from start and end point", "UsingDefaultValue": false, @@ -412,87 +286,84 @@ "KeepListStructure": false } ], + "FunctionSignature": "Autodesk.DesignScript.Geometry.Line.ByStartPointEndPoint@Autodesk.DesignScript.Geometry.Point,Autodesk.DesignScript.Geometry.Point", "Replication": "Auto", "Description": "Creates a straight Line between two input Points.\n\nLine.ByStartPointEndPoint (startPoint: Point, endPoint: Point): Line" + }, + { + "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore", + "Id": "7ca55658b01549a3bc24c5fffdf54193", + "NodeType": "FunctionNode", + "Inputs": [], + "Outputs": [ + { + "Id": "470393ce83284ae5a8c4eb25aad5c8bc", + "Name": "Vector", + "Description": "Vector", + "UsingDefaultValue": false, + "Level": 2, + "UseLevels": false, + "KeepListStructure": false + } + ], + "FunctionSignature": "Autodesk.DesignScript.Geometry.Vector.YAxis", + "Replication": "Auto", + "Description": "Get the canonical Y axis Vector (0,1,0)\n\nVector.YAxis ( ): Vector" } ], "Connectors": [ { - "Start": "56d2f4c2bcc443efa27bcb211f9f23b6", - "End": "2f3b84065de445518f4f8369d9b8e881", - "Id": "dda6443bf0044d53ad365981f8f92a09", + "Start": "291e908c772940de80f87bbb51b77f1d", + "End": "dd17a777630449d6a8fa1ddcd0033f60", + "Id": "a199c69339f3477d90454d1e74b0b734", "IsHidden": "False" }, { - "Start": "454a75a42d3c42b18ee00233d7cf1b67", - "End": "d50a9d47e78b4ad78a7baa93250c505a", - "Id": "66c4f1297ac6407dbef95c1049abe6f8", + "Start": "fd3ee420ca9049cfb6b2379c0f291086", + "End": "b24d4326919f47a1a8b985f191e9ce4e", + "Id": "968c6558590e427c8f762fc0bbdaa225", "IsHidden": "False" }, { - "Start": "f8a6a9b046994e76875664888b6536c1", - "End": "b80a377ed531426c8ede82da93be6760", - "Id": "9ca666b2758b47208a51e64777eb162b", + "Start": "013a55293e8b4b89bfcb3884d0667850", + "End": "32e9a38014274d94a48d372379c540a1", + "Id": "6bfe3592a72b4812ba722b7f680f6de0", "IsHidden": "False" }, { - "Start": "699967768ea546babf1ccca4f0ad9bb0", - "End": "98c560b82ae24e6e92a461070549289e", - "Id": "24b30cdbb01b4fcfabb8d7b27ca32afe", + "Start": "013a55293e8b4b89bfcb3884d0667850", + "End": "26f1048e075b4b158dabb0c96f7a79e4", + "Id": "aab570264c3e4a309c918208b8799f07", "IsHidden": "False" }, { - "Start": "699967768ea546babf1ccca4f0ad9bb0", - "End": "32ddfc87ecb74824847ca89fd3d64090", - "Id": "932a7f613a8e4fb5834546590f4e97e4", + "Start": "bec293287d3a4b13a70fb50776644f4b", + "End": "c8ecb1057fd841cc8867f6a7fb599673", + "Id": "57dd1b78b3a94aaea179e0ccdaa99d31", "IsHidden": "False" }, { - "Start": "72dfec5f3fc6404a955ce9ae4695e132", - "End": "9af7f920466e41b387f8a556477b36e3", - "Id": "ce14c96b748f42059d01b6705efc4ac0", + "Start": "bec293287d3a4b13a70fb50776644f4b", + "End": "d6659a67941a465dae7d988c0657939d", + "Id": "89ac6935b3ae402884e48f9f39725225", "IsHidden": "False" }, { - "Start": "72dfec5f3fc6404a955ce9ae4695e132", - "End": "b8bb0edd7fb54b5b8efc1d10b8352931", - "Id": "d1812284f1fa4bc19aee493dce59df8e", + "Start": "ae2431e62d8949eb9b78b1729d5cd2e3", + "End": "3c629953d5ce44afb561bbe38dcb21fa", + "Id": "1df0f001eaf54828876fb38b0ad962b0", "IsHidden": "False" }, { - "Start": "9c34b419197142d680e60f583e9f7881", - "End": "965b1fd48484472ab543371b6d0da81f", - "Id": "19199c04ede84288872972f375073bd0", + "Start": "79fd9f4d9ea44661946968af4da2ff36", + "End": "b42ba31cc58a4c249b92af42c8cbb64c", + "Id": "6cab15a1cd964039aee2d1f03f031edf", "IsHidden": "False" }, { - "Start": "eb890b80d7aa4c868c251b8178f01620", - "End": "ad62c3c7366e4ce0a84d6a6e5ddfd995", - "Id": "213c426b941b400398c256b5f422b614", - "IsHidden": "False" - }, - { - "Start": "eb890b80d7aa4c868c251b8178f01620", - "End": "e0086bb2eab543b9b4aeaa28332f5571", - "Id": "bb1a81a15aa74a468382712a04a1e632", - "IsHidden": "False" - }, - { - "Start": "437726f34cfe43428a5bea40d4984565", - "End": "084d90b3903141f0818188ee6f56baed", - "Id": "f71a6766e29542f1bc92bd20f99cb3b6", - "IsHidden": "False" - }, - { - "Start": "b16a76c0322f414297f703018b7bcef5", - "End": "8c62bb281e6341bda84d1b212715d35a", - "Id": "331b229ac64c4641987d3d4cb42393c2", - "IsHidden": "False" - }, - { - "Start": "9824a939f9644fcf980d5395b3fb189d", - "End": "0e0a2084c516430483f9be63f5baa41a", - "Id": "1208a2e5f0824d02bce50ff44d791236", + "Start": "bbccf804de1d4c7d91af6434db6da284", + "End": "2d7e4e1715824f0c9e410276a52f8d40", + "Id": "194c79aeeea744328a92466c61ff8d43", "IsHidden": "False" } ], @@ -503,7 +374,7 @@ "Version": "1.0.0", "ReferenceType": "Package", "Nodes": [ - "9db3e3d8f1ad49d28f05fec994f69872" + "5ca103062a7b4d2a96b409d98de9205a" ] } ], @@ -513,13 +384,7 @@ { "ExtensionGuid": "28992e1d-abb9-417f-8b1b-05e053bee670", "Name": "Properties", - "Version": "2.16", - "Data": {} - }, - { - "ExtensionGuid": "DFBD9CC0-DB40-457A-939E-8C8555555A9D", - "Name": "Generative Design", - "Version": "3.0", + "Version": "2.18", "Data": {} } ], @@ -536,148 +401,118 @@ "ScaleFactor": 1.0, "HasRunWithoutCrash": true, "IsVisibleInDynamoLibrary": true, - "Version": "2.16.1.2727", + "Version": "2.18.0.2986", "RunType": "Automatic", "RunPeriod": "1000" }, "Camera": { - "Name": "Background Preview", - "EyeX": -161.9678955078125, - "EyeY": 31.990095138549805, - "EyeZ": -17.784633636474609, - "LookX": 152.30952453613281, - "LookY": -50.175067901611328, - "LookZ": 31.512321472167969, - "UpX": 0.0938582792878151, - "UpY": 0.99539625644683838, - "UpZ": 0.019418973475694656 + "Name": "_Background Preview", + "EyeX": 26.784555435180664, + "EyeY": 26.384380340576172, + "EyeZ": 36.725555419921875, + "LookX": -15.971466064453125, + "LookY": -21.730712890625, + "LookZ": -47.156829833984375, + "UpX": -0.062308214604854584, + "UpY": 0.98095512390136719, + "UpZ": -0.18396934866905212 }, "ConnectorPins": [], "NodeViews": [ { + "Id": "5ca103062a7b4d2a96b409d98de9205a", "Name": "Point.ProjectOntoPlane", - "ShowGeometry": true, - "Id": "9db3e3d8f1ad49d28f05fec994f69872", "IsSetAsInput": false, "IsSetAsOutput": false, "Excluded": false, - "X": 811.4982940821186, - "Y": 390.03398229037487 + "ShowGeometry": true, + "X": 702.0, + "Y": 351.2 }, { + "Id": "1a1013b3c121477eb54370545263e274", "Name": "Plane.ByOriginNormal", - "ShowGeometry": true, - "Id": "c1a2dbda9b91437f89e4515ff2ae897b", "IsSetAsInput": false, "IsSetAsOutput": false, "Excluded": false, - "X": 49.748829680541007, - "Y": 481.23182533851963 - }, - { - "Name": "Plane.Normal", "ShowGeometry": true, - "Id": "c6fc306c64a04296a760a0606fc7a9c4", - "IsSetAsInput": false, - "IsSetAsOutput": false, - "Excluded": false, - "X": 324.47421110579057, - "Y": 491.24464720193009 + "X": 380.4, + "Y": 359.19999999999993 }, { + "Id": "31b6c4ecf51747aa871b6512bb3715c3", "Name": "Point.ByCoordinates", - "ShowGeometry": true, - "Id": "470da233c4cc4a27a64ad7089fd5c662", "IsSetAsInput": false, "IsSetAsOutput": false, "Excluded": false, - "X": 451.52934300314666, - "Y": 255.40163994739919 + "ShowGeometry": true, + "X": 366.0, + "Y": 156.0 }, { - "Name": "Vector.Cross", - "ShowGeometry": true, - "Id": "ff5d04026c9b4c00805ae4c8d48acc1a", + "Id": "f8fe11b241574d9ab93bd28663294195", + "Name": "Integer Slider", "IsSetAsInput": false, "IsSetAsOutput": false, "Excluded": false, - "X": 553.7645881648823, - "Y": 554.87791623670523 + "ShowGeometry": true, + "X": -108.0, + "Y": 217.60000000000008 }, { + "Id": "738c02fa1d2842b4ba5f17bb15a98207", "Name": "Vector.XAxis", - "ShowGeometry": true, - "Id": "2ffd67b704b34d29b18e3852faed9c48", "IsSetAsInput": false, "IsSetAsOutput": false, "Excluded": false, - "X": 249.61026001457469, - "Y": 652.42641399762613 - }, - { - "Name": "Number Slider", "ShowGeometry": true, - "Id": "608440d5091d4503b9152928cc9ae629", - "IsSetAsInput": false, - "IsSetAsOutput": false, - "Excluded": false, - "X": 42.710258991333262, - "Y": 249.66850687394765 + "X": 66.839855388007663, + "Y": 381.28115689594074 }, { - "Name": "Circle.ByPlaneRadius", - "ShowGeometry": true, - "Id": "ac63d31d97ad4de9a1e4f7aaad928111", + "Id": "4c7daf830a4a478c8384678b601316a3", + "Name": "Point.ByCoordinates", "IsSetAsInput": false, "IsSetAsOutput": false, "Excluded": false, - "X": 1291.8849003759137, - "Y": 504.74281278602808 - }, - { - "Name": "Plane.ByOriginNormal", "ShowGeometry": true, - "Id": "942f1646d84a42c189027d37ad5191d7", - "IsSetAsInput": false, - "IsSetAsOutput": false, - "Excluded": false, - "X": 827.26338706003753, - "Y": 603.10580714252228 + "X": 68.800000000000409, + "Y": 584.00000000000011 }, { - "Name": "Code Block", - "ShowGeometry": true, - "Id": "38fecbadfd114d35af64a6aa18951269", + "Id": "95027c7558f8442096360d64275b6771", + "Name": "Integer Slider", "IsSetAsInput": false, "IsSetAsOutput": false, "Excluded": false, - "X": 1138.4091017790661, - "Y": 695.74764333674648 + "ShowGeometry": true, + "X": -355.20000000000005, + "Y": 592.80000000000007 }, { - "Name": "Surface.ByPatch", - "ShowGeometry": true, - "Id": "a19c70f027264e13bf422917a6eeeacf", + "Id": "6528aacf1cd145948cc3cc225dbe3bff", + "Name": "Line.ByStartPointEndPoint", "IsSetAsInput": false, "IsSetAsOutput": false, "Excluded": false, - "X": 1613.6161229094805, - "Y": 503.89724499905662 + "ShowGeometry": true, + "X": 976.35065597054154, + "Y": 186.9259831867767 }, { - "Name": "Line.ByStartPointEndPoint", - "ShowGeometry": true, - "Id": "e1b75bffb3b841a48943e40832fefd4c", + "Id": "7ca55658b01549a3bc24c5fffdf54193", + "Name": "Vector.YAxis", "IsSetAsInput": false, "IsSetAsOutput": false, "Excluded": false, - "X": 1157.936846891899, - "Y": 193.88232011086296 + "ShowGeometry": true, + "X": -128.57663707895517, + "Y": 421.49309682317863 } ], "Annotations": [], - "X": -175.87196129548, - "Y": 28.740945903824695, - "Zoom": 0.79397968142532194 + "X": 313.44002271932789, + "Y": 73.202471954874227, + "Zoom": 0.69561644130111489 } } \ No newline at end of file diff --git a/docs/OpenMEPPage/geometry/dyn/pic/Point.ProjectOntoPlane.gif b/docs/OpenMEPPage/geometry/dyn/pic/Point.ProjectOntoPlane.gif index bac0f661..52d4f5a9 100644 Binary files a/docs/OpenMEPPage/geometry/dyn/pic/Point.ProjectOntoPlane.gif and b/docs/OpenMEPPage/geometry/dyn/pic/Point.ProjectOntoPlane.gif differ