Coder Social home page Coder Social logo

anycad / anycad.rapid.net.sample Goto Github PK

View Code? Open in Web Editor NEW
57.0 57.0 16.0 82.63 MB

The samples for creating 3D graphics applications with AnyCAD Rapid .NET SDK

Home Page: http://www.anycad.net

License: MIT License

C# 99.98% Batchfile 0.02%
cad cae cam graphics-programming opengl

anycad.rapid.net.sample's People

Contributors

anycad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

anycad.rapid.net.sample's Issues

功能需求:拾取点

通过 var geometry = GeometryBuilder.CreatePoints(new Float32Array(mPositions), new Float32Array(mColors));
var node = new PrimitiveSceneNode(geometry, material);
node.SetPickable(false);
mRenderView.ShowSceneNode(node);
可以添加单个点,也可以添加点云,但是无法在Render中拾取点。
希望拾取点可以通过点击鼠标左键单独拾取,也可以通过画矩形框进行多选。

How do I rotate scene node? [question]

Hello. I have a TopoShape, I display it on scene, and try to transform obtained SceneNode:

            Matrix4 transfrm = Matrix4.makeRotationAxis(new Vector3(0, 1, 1), (float) Math.PI/2);
            SceneNode tool0 = mRenderView.ShowShape(myTopoShape, Vector3.Blue);
            tool0.SetTransform(transfrm);
            tool0.RequstUpdate();

But my scene element is not affected. What am I missing?

坐标系显示的问题

坐标系某个轴用鼠标选中后,用setvisiable(false)对坐标系node进行隐藏,选中的部分隐藏不了。

Wrong clipping in render control [question]

This question relates latest release of anycad in general. I ask it here.

I have followed code in examples and added a box to scene:

            var box = ShapeBuilder.MakeBox(GP.XOY(), 10, 20, 30);
            mRenderView.ShowShape(box, Vector3.LightGray);

and got such result with clipped planes:

image

Example shows fine. Are there any additional settings to fight off those clippings?

Highlighting of plane feels wrong

I am including picture here. I am hovering mouse over blue box, which is located behind green one.

image

As you can see, highlight is shown in front of green one, overlapping it. I think this may be related to how shader is written. And I think that highlight should not overwrite color of overlapped figures.

Is it possible to configure input events in Anycad

Hello. I want to be able to rotate with the right click mouse event, and not the left. Also, I'd like to know, is it possible in general to configure input behavior in Viewer pane? We would make User to be able to choose how they would pan, zoom and rotate the scene.

AnyCAD.Rapid中ZoomAll()功能

原有anycad中有一个FitAll()方法,同时该方法让模型大小和3D显示区域显示一个合适的比例,而且可以在这个FitAll设置显示比例
现在ZoomAll()直接将模型显示到3D显示区域最大一个范围

能否实现原有anycad中有一个FitAll()方法达到的效果

功能需求:草图编辑

三点截取一个平面,生成一个草图,草图上显示在这个平面上的点,草图编辑完在三维界面中显示并返回编辑后的点?

Add Extrude subroutine for ToposhapeList

Currently FeatureTool class has a call to Extrude a TopoShape

public static TopoShape Extrude(TopoShape base_, double height, GDir _dir);

SUGGESTION:
add a similar call

public static TopoShape Extrude(TopoShapeList base_, double height, GDir _dir);

Transparency material does not work well with material used for display of lines wires

I have placed a scenenode with opacity using such code:

            materialBox = ShapeBuilder.MakeBox(GP.XOY(), Math.Abs( x ), Math.Abs( y ), Math.Abs( z ));
            MeshPhongMaterial GrayMaterial222 = MeshPhongMaterial.Create("phong.color");
            GrayMaterial222.SetColor(Vector3.LightGray);
            GrayMaterial222.SetTransparent(true);
            GrayMaterial222.SetOpacity(0.5f);

            materialNode = BrepSceneNode.Create(materialBox, GrayMaterial222, null);
            mRenderView.ShowSceneNode(materialNode);

I have placed some lines above and below it too. It is expected that you can see all those lines, but you cannot.

View of One side:

image

View of another side:

image

软件关闭时,报opengl32.dll问题。

0x00007FFD0FD20F95 (opengl32.dll) (LaserRanderMeas.exe 中)处有未经处理的异常: 0xC0000005: 读取位置 0x0000000000000A38 时发生访问冲突。
之前使用的0903的版本,更新0921版本后出现该问题。

TextNode效果问题

AnyCAD.Rapid中的FontMaterial所实现的效果跟原有Anycad中TextNode实现的效果不一样
由于需要在3D图像上做文字标注,原有在Anycad上使用的是TextNode,基本可以达到效果,但是
现有AnyCAD.Rapid中FontMaterial实现文字无法达到原来效果

增加字体显示功能

原有anycad中
String fontName = "simhei.ttf";
AnyCAD.Platform.Font font = GlobalInstance.FontManager.FindFont(fontName);
if (font != null)
{
font.SetCharHeight(24);
font.SetCharWdith(24);
font.Update();
}
可以指定显示的字体

而AnyCAD.Rapid版本中,缺乏这个功能
var fontMaterial = FontMaterial.Create("font-texture-1");
fontMaterial.SetFaceSide(EnumFaceSide.DoubleSide);
fontMaterial.SetColor(new Vector3(1, 1, 0));
fontMaterial.SetBackground(new Vector3(0, 0, 1));
fontMaterial.SetBillboard(true);

        var dim = fontMaterial.SetText("Hello 世界!", 32);
        var shape = GeometryBuilder.CreatePlane(dim.x * 0.1f, dim.y * 0.1f);
        var node = new PrimitiveSceneNode(shape, fontMaterial);
        node.SetPickable(false);

        render.ShowSceneNode(node);

How do I remove some object from display?

I can display an object on Render Window using a ShowShape call.

            var box = ShapeBuilder.MakeBox(GP.XOY(), 10, 20, 30);
            render.ShowShape(box, Vector3.Green);

How do I remove something from display?

Exception on startup of project

Hello. I have cloned this project, now I am trying to build it and run.

It builds fine, but I get such exception on startup:

System.TypeInitializationException
  HResult=0x80131534
  Message=The type initializer for 'AnyCAD.Foundation.AnyCADPINVOKE' threw an exception.
  Source=AnyCAD.Foundation.Net
  StackTrace:
   at AnyCAD.Foundation.AnyCADPINVOKE.ModelingEngine_Initialize()
   at AnyCAD.Foundation.GlobalInstance.Initialize()
   at AnyCAD.Demo.Program.Main() in 
  \AnyCAD.WinForms\Program.cs:line 18

Inner Exception 1:
TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception.

Inner Exception 2:
DllNotFoundException: Unable to load DLL 'AnyCAD.Foundation.NetHost.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

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.