Coder Social home page Coder Social logo

dsutilities's Introduction

DSUtilities

Useful workflows that we seem to reinvent every couple of weeks packaged together in compact components. Split into subcategories:

Topology

AutoShatter

Automatically detect intersections of curves, shatter at the intersection points, and return all the new shatter curves without any duplicates.

Topologize

Export the topology of a series of interconnected curves. Goes well with AutoShatter. It takes in a list of curves as the input and automatically detects shared end points. Topologize converts the network into a JSON string with the following keys:

  • X A list of length n that stores the X positions of all unique end points
  • Y The Y position of end points
  • Z The Z position of end points
  • Istarts A list of length m of the starting node indices of all curves
  • Iends A list of ending node indices
  • Inodes An optional parameter that stores the indices of end points that are of interest
    • EG. If drawing a network to export for structural analysis, it may be useful to quickly mark the points that act as supports. Place a point at these positions and input into the component to extract their index in the XYZ fields.

Parameterization

ControlSurfaceCurve

Generate a control surface of $u\times v$ points, automatically generate sliders for the Z-height, and map the distance between curve midpoints and the surface as curve-wise values.

ControlSurfacePoint

Same thing but for points

Section

Tools for defining arbitrarily complex cross sections and extracting useful information them. Drawn sections must be parallel to the global XYZ planes, and assumes the following:

  • Given the selection of (XY, YZ, XZ) planes, where XY is default, the second axis is assumed to be the "Vertical" axis, IE, the first axis represents the "strong" rotational axis.
  • All drawn curves that define the section are closed and co-planar

Section

Define a section using a set of closed curves for solid regions and a set of closed curves for void regions. You can input a list of closed curves for each. Void regions must be entirely contained within solid regions

SectionProperties

Get all the information you could want from a section.

Intersect

Generate a new section from the intersection of one section with a closed curve (note that this does properly exclude voided regions, but is not visualized).

AfromD

Get the area enclosed at a depth d from the top/bottom of the section. By default, d representes the distance from the top of the section bounding box; switch direction from -1 to 1 to reverse.

DfromA

Inverse of above. Given a target area, determine which depth from the top/bottom provides this area. User can select tolerance/number of iterations for solution.

dsutilities's People

Contributors

keithjlee avatar keithjlee2 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

dsutilities's Issues

Section doesn't work on XZ and YZ planes.

MRE.

I have 2 circles. They share a center, but with different radius.

I rotated the plane between XY, YZ, ZX, but only XY works.

I have connected the plane into Plane of the Section component.

image

image

image

Missing features

  • Make section makers for common cross sections
  • Make AsapElement, AsapNode, AsapLoad

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.