ar closed curve that is supposed to go to create a flat surface together with the other closed curves present in the same plane.
I don't know how can create this surface!!…
I live on my computer and I even sleep with it, so learning all this is probably within my reach but I'm a complete beginner as of now.
I'm downloading the 32 bit version of rhino 5 since the 64 bit doesn't seem to work with your downloads Jon.
I haven't grasped everything you have made yet Jon I can't even begin to understand what your IFC stuff is actually capable of, but just to be clear I'm not interested in solely being able to tell that something is colliding as there are already software that can do that beautifully. What I want to do is bypass that step altogether by never having collision-checking back and forth go on, even collisions which aren't physical collisions, but rather just violations by code. The simplest way to do this would be to simply make the geometry of the beams 2 feet wider than they are in real life, so that way you could put a light right next to the 'over-sized' beam and it would still be within the rules. But that would be extremely primitive and I'm sure there's a way to do it mathematically.
Just to clarify, I'm the fire sprinkler designer in the architectural circus. The sprinkler designer (me) doesn't really get the luxury of telling the other trades that they're colliding with my stuff and they should move. Rather, I get their drawings, find out I'm colliding with them, and move around them. So it would be of great use to me to have this be automatic - that is, to automatically space my sprinklers the neccesary distance away from all obstructions. There are different spacing rules for different obstructions - walls, beams, open web steel, unit heaters, hvac ducts depending on how wide the ducts are, lights, fans, high rack storage, basically anything that would obstruct the water spray from a sprinkler needs to be taken into account and spaced away from.
It's therefore a very attractive idea to be able to just draw a rectangle (representing the walls of a simple room) for instance, have the sprinklers automatically spaced as far apart as possible within the rectangle according to the rulebooks (to minimize the amount of sprinklers needed which minimizes the material cost of the job).
Then add obstructions inside the rectangle, such as a beam, and have the sprinklers relocate themselves or add new sprinklers to accommodate for the new obstruction.. Keep adding obstructions until you have the realistic 3d model of the room, with the sprinklers spaced accordingly, and you have an up-to-code sprinkler system.
There is one example where sprinklers actually need to be spaced really close to, rather than away from, an object.. and that is the ceiling (sprinklers must be within 12 in of ceiling typically).
If the HVAC guy decides to reroute his ducts right through my sprinklers, then I could draw 3D HVAC ducts (I usually get 2D drawings coming in) going right through the room and the sprinklers would relocate and auto-space away from the ducts, without actually having to tell the HVAC guy he is colliding with me because all that will do is require me to do a redesign anyway.
And presto, the HVAC guy loves me because I didn't complain to him at all and seemingly did all this work by moving around him when all I really did was use the computer to do it, the job gets done much faster and I don't have to worry that I'm going to lose my job in court because I made a silly human error when I was patching my system manually because some HVAC guy made me redesign 12 times in different places.
From what I have been reading from you guys, doing this is possible although (I realize) ambitious. The end result would be vastly increased productivity, less error making, cheaper design cost, etc. Using programs like Rhino, architects are getting more and more funny-shaped buildings and making it difficult for guys like me to make sprinkler systems within the rules, and I see it as an inevitability that computers will be making almost all of the typical design decisions in the future when it comes to life safety systems, I'm just trying to see if it's possible to start implementing this extra aid today.
…
a type hierarchy with two interfaces and three classes:
IVehicle
IAutomobile
Bicycle
VolvoCar
AudiCar
IVehicle is an interface which lays down some ground-rules for all sort of vehicles. For example their maximum speed, maximum number of occupants and fuel type (diesel, horse, foot-power).
Bicycle is a class which implement IVehicle and nothing else.
IAutomobile is another interface, which derives from IVehicle but adds some more rules. For example it also demands that any class implementing IAutomobile has a property telling you whether the steering wheel is on the left or the right and how many kilometers per litre of fuel it manages.
VolvoCar and AudiCar are classes that both implement IAutomobile (they are, after all, both a type of automobile). Since IAutomobile inherits from IVehicle, they need to also implement that interface. VolvoCar might look like this:
class VolvoCar : IAutomobile
{
public int MaxSpeed { get { return 160; } } //IVehicle implementation
public int MaxPeople { get { return 5; } } //IVehicle implementation
public string Fuel { get { return "diesel"; } } //IVehicle implementation
public double Consumption { get return "18.4"; } } //IAutomobile implementation
public bool WheelOnLeft { get { return true; } } //IAutomobile implementation
public string TypeCode { get { return "V70"; } } //A property only volvos have.
}
Now let's imagine that you are given an instance of VolvoCar. This can happen as one of four types:
System.Object (everything derives from System.Object, so this is always possible)
IVehicle (VolvoCar implements this interface because IAutomobile derives from it)
IAutomobile (VolvoCar specifically implements this interface)
VolvoCar (the type itself)
These are just four different ways of looking at VolvoCar, and each way allows you to see less or more detail. If you have a VolvoCar instance stored inside a variable of type IVehicle, then you do not have access to the steering wheel property, because that is not part of IVehicle. If you want to access WheelOnLeft or Consumption you can cast your instance to type IAutomobile:
Dim vehicle As IVehicle = GetVehicleFromSomewhere()
Dim car As IAutomobile = DirectCast(vehicle, IAutomobile)
The car and vehicle variables now both point to the same volvo in memory, but car allows you to access more information. You could even cast it to a VolvoCar, in order to get access not just to WheelOnLeft and Consumption, but also to TypeCode:
Dim vehicle As IVehicle = GetVehicleFromSomewhere()
Dim volvo As VolvoCar = DirectCast(vehicle, VolvoCar)
Note though that casting sort of violates the type-safetyness of a program. The GetVehicleFromSomewhere() function returns a variable of type IVehicle. So it is allowed to return VolvoCar, AudiCar or Bicycle without breaking that promise. But if it returns Bicycle then our attempt to cast it to an IAutomobile or VolvoCar will fail.
So, conclusion:
Casting allows you to look at an instance using a more detailed (or less detailed if you want) type. Pre-requisite is that the instance actually is of that type.
In VB.NET, you can use the DirectCast and TryCast methods for this. TryCast is to be preferred, but it only works on classes, not structs.
In C# you can use the (type)variable notation or the as keyword.
You can use the TypeOf (VB.NET) and is (C#) keywords to first see whether a cast will work or not.
--
David Rutten
david@mcneel.com
Tirol, Austria…
Added by David Rutten at 2:58am on October 9, 2013
h, and using the BScale and BDistance are creating havoc somehow too. I've simplified first, and used the Kangaroo Frames component along with setting internal iterations, to make MeshMachine act like a normal component, along with releasing the FixC and FixV. The FixV didn't make any sense anyway. I've also set Pull to 0 to speed it up during testing, since much less calculation is involved to just let the meshes collapse, prevented from disappearing altogether by using a mere 15 iterations.
Also, your breps are open so that allows much more chaos and then collapse, though they did manage to close themselves too at times. Here is closed breps with a full 45 iterations:
So now that it's working, lets re-Fix the curves, and the problem arises that there is an extra seam line that is getting fixed too, running along the cylinder, stopping the mesh from pulling tight under tension wherever a vertex happens to be near that line:
So lets grab only the naked edge curves instead:
And what happens if we lose the end caps, now that we don't have an extra line skewing the result?:
There is no real curvature differences since it's not a curvy brep so the Adapt at full 1 setting has little to do. Now what does the BScale and BDist do? Nothing! Why? Your scale is out of whack, 99 mm high cylinders but only a falloff maximum of about 5, so let's make the falloff be 25 instead, but I must restore the end caps or the meshes collapse away for some reason and freezes Rhino for a minute or so the first time I try it:
It's a start.
If I intersect the cylinders, nothing changes, since they are being treated as separate runs. MeshMachine outputs a sequence of two outputs though, due to Frames being set to a bare minimum of 2 needed to get it to work, so I filter out the original run, which is just the unmodified initial mesh it creates.
The lesson so far is that closed meshes are much less prone to collapse and glitches leading to screw ups.
A Boolean union of the cylinders is when it gets funner, here show with and without the fixed curves that seem to define boundaries too where really there are just polysurface edges:
…
owing a tutorial is easy and adapting the idea of it again - it's not a fuss - i guess my skills are at 1 - since I can not yet stand alone! However I am very determined to nail this program to the ground and be at a 9 by Easter - of course that means a lot of work and hours testing - but I am young and ambitions!
I am a revit user and I just switched over (from the dark rigid side) to rhino because of a simple math problem which has to do with variations and combinations.
I am investigating the form factor for my thesis.
Form factor= building envelope (the area of the facade+the area of the roof+the area of the footprint)/the total area of the floors.
I have started by defining a specific set of parameters such as height, number of floors, maximum total floor area so I can compare the results.
Therefore the floating number will be the facade area - which in the end, considering the height is a constant - ends up being just the length of a certain shape - circle, square, triangle ...
I have done the calculation through excel after extracting from revit but only on simple shapes as follow(the following examples are my own analyzing work):
My problem is: I need a way to get all possible shapes that meet the criteria i put in - which at the moment will be defined by square meters of a floor- that is why galapagos comes in - I need it to make all possible combinations that can be computed that meet the criteria - so then the user(myself or who ever else want to use it) can make an informed choice. I am not looking for a square - circle, sphere or anything I can manually create by just using basic geometry, I am looking for all the possible combination that equal the same area.
(plan view)
After i can solve it for one level - i will constrain that all the levels add up have specific total area - so if a level get's bigger in size another one gets smaller. Again run it through Galapagos and get all possible outcomes (like the sections below)
I am aiming to get an outcome from which you have options to pick out of -> a design process not a specific shape.
You are thinking too complex - not that it's a bad thing - but I am looking for something more simplistic than that. I need a shape - windows and panels are for later use in my process and at this early stage completely irrelevant - and that will be another percentage math problem rather than aesthetics. I just need shapes to morph based on input parameters.
I hope this was an interesting read for you and I really appreciate your patience with me.…
f objects with the main ring body, and that cannot be done in parallel since you are modifying the item once at a time, algorithmically.
The original example of a cylinder and sphere are textbook failures of the Rhino 5 dumb algorithm, since that combination features kissing surfaces that confuse Rhino about where they are intersecting since really in tolerance values they are overlapping along a ribbon instead of a sharp line.
Normally you would slightly move or rescale one of the pair to create a single loop intersection curve that doesn't wander around in jerky fashion trying to combine two surfaces that fail to actually plunge through one another.
Your main Boolean union is 116 prongs with a ring base, and that's slow because Rhino bogs down as the model gets more an more complicated with each internal step, I imagine.
The speed is not all that slow either, only 21 seconds for the Booleans themselves.
If you turn of Grasshopper preview meshing via the toolbar menu it should be significantly faster while you are tweaking the design.
To troubleshoot the slow Boolean, I went into Rhino and tried merely splitting the ring body with the prongs and that itself was just about as slow as the Boolean union, so Rhino is not being badass about it. Then I exploded the ring body and tried splitting just that with the prongs and it was *much* faster to operate on just that single surface! The black box reveals itself a bit.
In kind, splitting the prongs with that single surface was about the same speed as splitting it with the whole ring body, so no speed gain there.
But, to speed up your script, since we *cannot* in fact use parallel processing, we can instead manually create that prong surface by doing our own splits and using Grasshopper's natural order of parts, hopefully consistent, to get rid of the junk.
That prong surface is item 4 of an exploded object.
So I will mutually split them and tease out the good parts from the junk and then rejoin the parts, no Boolean union component needed.
First, I went into your prong cluster and removed the capping, so I have merely an open revolution surface instead of a polysurface, letting me access the surface trim command after quickly finding the BrepBrep intersection curves between the prongs and the single ring surface.
For that Boolean union step I'm down from 11 seconds to 4 seconds, but confusingly we added a second to the Boolean difference that follows:
It's fast since we are manually selecting junk instead of Rhino having to sort which is which, I imagine.
We still have a slow Boolean subtraction of the gems and holes from the finished ring body.
That's not simple so will remain slow and cannot be parallel processed since again there's a single main ring body being modified in each step, and nor are there simple pairs of split object to select from manually to discard junk.
…
I wanted to use it for a client, really I can't since they will freak out about a weird version of Rhino being needed.
http://discourse.mcneel.com/t/scripting-blendsrf/24635
http://mcneel.myjetbrains.com/youtrack/issue/RH-29978
What you call trivial is the core of your business, the core of your product, meaning Grasshopper user ability to access serious commands or not. This is, after all, one of the most important commands in the entire Rhino universe. Without it, I have to just completely abandon NURBS and edit meshes since I can't join surfaces smoothly so I have to stop using fragments at all and only meshes afford local detail well compared to single NURBS surfaces. Only polysurfaces can mix in little high UV count blends to deal with tight local detail.
I guess I'll switch to the WIP now. Test that, and just tell clients, hey, that's life. It's not exactly easy to find the WIP download, being a hidden "Serengeti" topic on the main Rhino forum, but I can offer the membership link.
http://discourse.mcneel.com/t/how-do-i-actually-download-serengeti/23846
http://www.rhino3d.com/download/rhino/wip
I had to manually install IronPython 2.7.5 too, to fix a broken Python system:
http://ironpython.codeplex.com/releases/view/169382
Now, where on Earth do I find the Rhinocommon manual for Rhino 6 WIP?
I guess it's within the main Rhino EditPythonScript editor, though that can't be searched like a normal manual:
CreateBlendSurface(face0: BrepFace, edge0: BrepEdge, domain0: Interval, rev0: bool, continuity0: BlendContinuity, face1: BrepFace, edge1: BrepEdge, domain1: Interval, rev1: bool, continuity1: BlendContinuity) -> Array[Brep]
Makes a surface blend between two surface edges.
face0: First face to blend from. edge0: First edge to blend from. domain0: The domain of edge0 to use. rev0: If false, edge0 will be used in its natural direction. If true, edge0 will be used in the reversed direction.
continuity0: Continuity for the blend at the start. face1: Second face to blend from. edge1: Second edge to blend from. domain1: The domain of edge1 to use. rev1: If false, edge1 will be used in its natural direction. If true, edge1 will be used in the reversed direction.
continuity1: Continuity for the blend at the start. Returns: Array of Breps if successful.
Now I have normal, productive homework, of figuring out how to specify edges from a Python script.
I'll just sell this extra special capability of Rhino 5 WIP from Grasshopper as a cutting edge advanced new feature other lowly consultants can't match, assuming I can get it to work first.
The initial strategy is to Grasshopper create discrete surfaces, blow holes in a parent surface, scale down and move the little surfaces away, and just blend everything together into a polysurface. Then a client won't freak out so badly when I show them how to use meshes instead, since at least there's an alternative straight from NURBS, that maybe isn't as creatively open ended, but will get them out of a bind if their own client freaks out about meshes converted to NURBS via ZBrush ZRemesher run through T-Splines to get a smooth NURBS polysurface surface that looks like odd patchwork.
Alas, the above Rhinocommon blurb is incomplete, lacking info about what values for continuity are defined as, such as position, tangency, or curvature. I guess I'll just use try numbers.
…
e following tutorial: http://digitaltoolbox.info/grasshopper-intermediate/offset-scale/
I think the beginning is correct because I have the same things. However, at the last step I can't correctly generate the tabs for assemble this shape. I try to put "flatten" everywhere but it doesn't work ... If someone just give me a little help please ? Or check if everything is okay? Or if there is an another tutorial ? Or if the question has already been asked in this forum ? I take! I'm really sorry if my problem is not very interesting but I'm new ... Yours, Anna, windows 7 on bootcamp Rhino 5 Grasshopper O.8.0063
Files :
Shape.3dm
Shape.gh
…
and where the decimal place should be.
The reason it only shows the first 5 numbers that make up 1,000,000 is because anything smaller than 100 is considered insignificant when talking about 1 million. Think of it like this if 1 million represents an Olympic size swimming pool then 10 would represent the volume of a full tank of petrol for an average family car. You would have to stand there for an extremely long time to fill up the pool from a petrol pump.
It's important to know that these insignificant digits are still there for the purpose of calculations but are just not being displayed.
There are times when you may want to display these numbers in a format that makes more sense, for these occasions we can use the Format() function.
Format() Function
For versions BEFORE 0.9.0001 the VB Format Function is available through the Expression Components found on the Math Tab > Script Panel
Either by using the F input* or the Expressions Editor found on the Context Menu you can apply a format mask to the x input.
* except FxN
Anatomy of the formatting function above:
Format(..............................) <-- VB function
Format("........................."....) <-- Display String
Format("{0....................}"....) <-- Place Holder for first variable
Format("{0:0.000000000}"...) <-- Format Mask for 9 decimal places
Format("{0:0.000000000}", x) <-- Variable
This can be applied to points and their components:
For versions AFTER 0.9.0001 there is a dedicated Format Component or you can use the Expressions Components successor Evaluate.
For more information on the tags used in the Format Function see these links.
Standard formatting tags Custom formatting tags
WARNING:
If you format a number to be displayed in this way it becomes a string and will no longer have the complete Real number available for calculations. Always use the input to the format function for further requirements in calculations.…