This XTension will find the surface contact area between 2 surfaces. The primary surface is the base, and secondary is one covering the primary.The result of the XTension will generate a one voxel thick unsmoothed surface object above the primary surface representing where the 2 surfaces physically overlap.Two new statistics will be generated. 1) The first will be a total surface area of each new surface object. The measurement will be estimated by taking the number of voxels and multiplying by the area of a single (XY pixel). 2) The second statistic will be in the "overall" tab, reporting the percentage of NEW summed surface contact area relative to the total surface area of the primary surfaces
I have a surface (facade which contains windows) and polylines which make another surface group (extended windows). I want to subtract the extended windows from the facade surface. I am using Solid Difference but it is only subtracting the extended portion of the windows, not all the windows. I intended to get the facade surface subtracted totally from the windows as well as their extended portion and get the end result in the form of a polyline which is failing. Your help will be much appreciated.
(Please ignore one window surface that is missing)
Kim, I tried to add some additional curves into the script, however, the Region Difference node is not working. Initially, the error was " Solution exception:Object reference not set to an instance of an object" and I thought it was due to a polyline that was not closed, and after improving it, it still does not work.
Could you please have another look at it?
Thanks very much for your time and help!!!
Hello everyone, I would like to ask you, if there is a tool in grasshopper(or a way to do it), that allows to project (or wrap) a geometry onto a surface (or many surfaces) in a specific direction, like the example I posted here below.
Thank you in advance.
Hi inno,
Thank you for your quick response, but what I need is to get a projected surface in X with the same parameterization of the original, so that I can remap a feature keeping the exact shape from X view and still keeping demolding angles.
So any time you modify the input geometry(in purple) or the target base patch(in blue) everything is updated.
to say the same in other words, you want a portion of the terrain surface to be trimmed in such a way its new boundaries are overlapping the projection_along_Z of the boundaries of the surfaces themselves, so you need to start from the terrain surface and somehow trim it
Call pygame.Surface()pygame object for representing images to create a new image object. The Surface willbe cleared to all black. The only required arguments are the sizes. With noadditional arguments, the Surface will be created in a format that bestmatches the display Surface.
Advance users can combine a set of bitmasks with a depth value. The masksare a set of 4 integers representing which bits in a pixel will representeach color. Normal Surfaces should not require the masks argument.
Surfaces can have many extra attributes like alpha planes, colorkeys, sourcerectangle clipping. These functions mainly effect how the Surface is blittedto other Surfaces. The blit routines will attempt to use hardwareacceleration when possible, otherwise they will use highly optimizedsoftware blitting methods.
There are three types of transparency supported in pygame: colorkeys,surface alphas, and pixel alphas. Surface alphas can be mixed withcolorkeys, but an image with per pixel alphas cannot use the other modes.Colorkey transparency makes a single color value transparent. Any pixelsmatching the colorkey will not be drawn. The surface alpha value is a singlevalue that changes the transparency for the entire image. A surface alpha of255 is opaque, and a value of 0 is completely transparent.
Per pixel alphas are different because they store a transparency value forevery pixel. This allows for the most precise transparency effects, but italso the slowest. Per pixel alphas cannot be mixed with surface alpha andcolorkeys.
There is support for pixel access for the Surfaces. Pixel access on hardwaresurfaces is slow and not recommended. Pixels can be accessed using theget_at() and set_at() functions. These methods are fine forsimple access, but will be considerably slow when doing of pixel work withthem. If you plan on doing a lot of pixel level work, it is recommended touse a pygame.PixelArraypygame object for direct pixel access of surfaces, which gives an array like view of thesurface. For involved mathematical manipulations try thepygame.surfarraypygame module for accessing surface pixel data using array interfaces module (It's quite quick, but requires NumPy.)
Any functions that directly access a surface's pixel data will need thatsurface to be lock()'ed. These functions can lock() andunlock() the surfaces themselves without assistance. But, if afunction will be called many times, there will be a lot of overhead formultiple locking and unlocking of the surface. It is best to lock thesurface manually before making the function call many times, and thenunlocking when you are finished. All functions that need a locked surfacewill say so in their docs. Remember to leave the Surface locked only whilenecessary.
Surface pixels are stored internally as a single number that has all thecolors encoded into it. Use the map_rgb() andunmap_rgb() to convert between individual red, green, and bluevalues into a packed integer for that Surface.
Draws a source Surface onto this Surface. The draw can be positioned withthe dest argument. The dest argument can either be a pair of coordinates representing the position ofthe upper left corner of the blit or a Rect, where the upper left corner of the rectangle will be used as theposition for the blit. The size of the destination rectangle does noteffect the blit.
New in pygame 2.0.0: Optional special_flags: BLEND_ALPHA_SDL2 - Uses the SDL2 blitter for alpha blending,this gives different results than the default blitter, which is modelled after SDL1, due todifferent approximations used for the alpha blending formula. The SDL2 blitter also supportsRLE on alpha blended surfaces which the pygame one does not.
Creates a new copy of the Surface with the pixel format changed. The newpixel format can be determined from another existing Surface. Otherwisedepth, flags, and masks arguments can be used, similar to thepygame.Surface()pygame object for representing images call.
If no arguments are passed the new Surface will have the same pixelformat as the display Surface. This is always the fastest format forblitting. It is a good idea to convert all Surfaces before they areblitted many times.
The new copy will have the same class as the copied surface. This letsas Surface subclass inherit this method without the need to override,unless subclass specific instance attributes also need copying.
Creates a new copy of the surface with the desired pixel format. The newsurface will be in a format suited for quick blitting to the given formatwith per pixel alpha. If no surface is given, the new surface will beoptimized for blitting to the current display.
Makes a duplicate copy of a Surface. The new surface will have the samepixel formats, color palettes, transparency settings, and class as theoriginal. If a Surface subclass also needs to copy any instance specificattributes then it should override copy().
Fill the Surface with a solid color. If no rect argument is given theentire Surface will be filled. The rect argument will limit the fill to aspecific area. The fill will also be contained by the Surface clip area.
The color argument can be either a RGB sequence, a RGBA sequenceor a mapped color index. If using RGBA, the Alpha (A part ofRGBA) is ignored unless the surface uses per pixel alpha (Surface hasthe SRCALPHA flag).
Move the image by dx pixels right and dy pixels down. dx and dy may benegative for left and up scrolls respectively. Areas of the surface thatare not overwritten retain their original pixel values. Scrolling iscontained by the Surface clip area. It is safe to have dx and dy valuesthat exceed the surface size.
Set the current color key for the Surface. When blitting this Surfaceonto a destination, any pixels that have the same color as the colorkeywill be transparent. The color can be an RGB color or a mapped colorinteger. If None is passed, the colorkey will be unset.
Set the current alpha value for the Surface. When blitting this Surfaceonto a destination, the pixels will be drawn slightly transparent. Thealpha value is an integer from 0 to 255, 0 is fully transparent and 255is fully opaque. If None is passed for the alpha value, then alphablending will be disabled, including per-pixel alpha.
Lock the pixel data of a Surface for access. On accelerated Surfaces, thepixel data may be stored in volatile video memory or nonlinear compressedforms. When a Surface is locked the pixel memory becomes available toaccess by regular software. Code that reads or writes pixel values willneed the Surface to be locked.
All pygame functions will automatically lock and unlock the Surface dataas needed. If a section of code is going to make calls that willrepeatedly lock and unlock the Surface many times, it can be helpful towrap the block inside a lock and unlock pair.
Returns True if the Surface is required to be locked to access pixeldata. Usually pure software Surfaces do not require locking. This methodis rarely needed, since it is safe and quickest to just lock all Surfacesas needed.
d3342ee215