Giter Site home page Giter Site logo

irregular-surface-contact's Introduction

Overview

Blender is a power powerful 3D objects editor which provides a very easy to use interface for refining 3D models. It has a very comprehensive and well documented API which can be used for enhancing its features programatically. This work demonstrates how to utilize its API to find contact nodes between two irregular surfaces. This work was carried out after built in mesh assembly features of Salome Meca and Code Aster raised singularity errors. It was deduced that it is because of non coincident irregular surface nodes. This problem was resolved by generating contact groups on the irregular surfaces in Blender which was used to directed Code Aster to form contact exactly where it needs.

Prerequisites

Basic knowledge of Blender menus and selection

Quick Start

Requirement

Blender's python would need pandas library which can be installed in the following way

  • Open 'Python Console' which is part of 'Editor Type' menu
  • Execute the following to get Blender's python path
>>> import sys
>>> sys.exec_prefix
'/path/to/blender/python'
  • Next from the terminal
cd /path/to/blender/python/bin
./python -m ensurepip
./python -m pip install pandas
  • Restart Blender

Running the Script

  • Import sample STL files (L5, disk)
  • Select both imported objects from the 'Outliner' in the 'Editor Type' menu
  • Open 'Text Editor' in the 'Editor Type' menu
  • From the 'Text Editor' menu click 'Text > Create Text Block'
  • Copy paste the code from 'appendixA2.py'
  • While keeping the mouse pointer inside 'Text Editor' press 'Ctrl + p'

Contact vertex groups will be generated. Vertex groups can be viewed in 'Data' type property of 'Properties' type editor in 'Editor Type' menu

Basic Algorithm Detail

The samplesize Parameter

This parameter in the only directive set by the user which the script needs to identify contact between two irregular surfaces

  • It is the number of least distant nodes between the two surfaces
  • The distance of the most distant node among these nodes is the threshold
  • All nodes with distances less than threshold are qualified as contact nodes

Reference

Blender: Using 3rd party Python modules

Euclidean distance

Minimum Euclidean Distance

irregular-surface-contact's People

Contributors

saad-gh avatar

Watchers

James Cloos avatar  avatar

irregular-surface-contact's Issues

gmsh

While using gmsh for creating contact groups it's required to generate the geometry from the STL model with the function gmsh.model.mesh.classifySurfaces(0) which is time consuming.

To resolve that this classification of surface should be divided on separate compute nodes. This would make grouping convenient since gmsh preserves the groups in a way that they are readily available in Code Aster solver. Generating contact groups with Blender requires some manual work to preserve groups which is error prone.

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.