This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; 2013.01.21 | |
;; yasushisakai | |
;; | |
;; gitignore for Django using pyCharm | |
;; | |
;;files to ignore | |
settings.py | |
;;extensions to ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import rhinoscript.userinterface | |
import rhinoscript.geometry | |
import rhinoscriptsyntax as rs | |
__commandname__ = "CurrentLayer" | |
def RunCommand( is_interactive ): | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import rhinoscript.userinterface | |
import rhinoscript.geometry | |
import rhinoscriptsyntax as rs | |
__commandname__ = "OffsetPointOnCurve" | |
def RunCommand( is_interactive ): | |
''' | |
creates a point in a curve with the given distance | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created with JetBrains WebStorm. | |
* Date: 12/05/02 | |
* Time: 13:05 | |
*/ | |
sel = activeDocument.selection; | |
function getCenter(_obj){ | |
var position = _obj.position; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created with JetBrains WebStorm. | |
* Date: 12/05/02 | |
* Time: 13:05 | |
*/ | |
sel = activeDocument.selection; | |
function getCenter(_obj){ | |
var position = _obj.position; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import rhinoscriptsyntax as rs | |
documentName = '.'.join(rs.DocumentName().split('.')[:-1]) | |
path = '\\'.join(rs.DocumentPath().split('\\')[:-1]) | |
print rs.LayerNames() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import math | |
import datetime | |
#script for getting the sun position | |
def sunPosition( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import rhinoscriptsyntax as rs | |
import Rhino.Geometry.Vector3d as vec3d | |
def VectorReflection(_vector,_normal): | |
''' | |
反射ベクトルを求める | |
''' | |
n = rs.VectorUnitize(_normal) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import rhinoscriptsyntax as rs | |
import math | |
#再利用出来るように | |
#なるだけ関数として書くこと!!だらだら書かない! | |
#plots a point in the Polar Diagram | |
def plotToPolarGraph(_eye,_target,_graphRadius=1000.0): | |
angles=rs.Angle(_eye,_target) | |
orientation = angles[0] | |
elevationAngle = angles[1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import rhinoscriptsyntax as rs | |
threshold = 5 # curves under this length will be deleted | |
cnt = 0 | |
for o in rs.AllObjects(): | |
crv = rs.coercecurve(o) | |
if crv is not None: | |
length = rs.CurveLength(o) | |
if length < threshold: |
OlderNewer